From: Lukas Krickl Date: Mon, 23 Feb 2026 19:00:44 +0000 (+0100) Subject: t_unit: removed min and max damage. units now do exact damage. X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=767de7f5cf2f9ff5f651f219378f7b6c69b4c23c;p=lrts%2F.git t_unit: removed min and max damage. units now do exact damage. --- diff --git a/src/t_unit.h b/src/t_unit.h index 6335bbe..42d09a2 100644 --- a/src/t_unit.h +++ b/src/t_unit.h @@ -19,10 +19,24 @@ enum t_unit_damage_type { T_UNIT_SIEGE }; +/* + * unit class + * each class has weaknesses to + * certain damage types + */ +enum t_unit_class { + T_UNIT_CLASS_INFANTRY, + T_UNIT_CLASS_MOUNTED, + T_UNIT_CLASS_SIEGE, + T_UNIT_CLASS_BUILDING +}; + struct t_unit { unsigned int id; enum t_unit_type type; enum t_unit_flags flags; + enum t_unit_class unit_class; + enum t_unit_damage_type damage_type; i16 view_radius; @@ -31,12 +45,7 @@ struct t_unit { i16 armor; /* Unit damage type and damage range */ - i16 damage_min; - i16 damage_max; - enum t_unit_damage_type damage_type; - - /* a unit can be reistant to certain damage types */ - enum t_unit_damage_type res; + i16 damage; struct t_command_queue commands; };