diff --git a/doc/scripts/unittype.html b/doc/scripts/unittype.html index 2fecd4511..21d996cbb 100644 --- a/doc/scripts/unittype.html +++ b/doc/scripts/unittype.html @@ -485,9 +485,7 @@ step in a random direction, in percents. Usefull for neutral animals. </dd> <dt>clicks-to-explode</dt> <dd>If this is non-zero, then after that many clicks the unit will commit -suicide. Doesn't work with resource workers/resources. It can even be used -in combination with demolish-damage and demolish-range, though it wouldn't -be very fair. +suicide. Doesn't work with resource workers/resources. </dd> <dt>computer-reaction-range</dt> <dd>This is supossed to be the reaction range for AI units, but it is not used. @@ -508,6 +506,12 @@ it should be used to attack resource buildings first? You can safely ignore it. cycles. If you set this the unit will die by itself after a while. Don't use it for spells, spells will override this with their own ttl setting. </dd> +<dt>burn-percent</dt> +<dd>The unit will start burning when it has less health than this, in percents. +</dd> +<dt>burn-damage-rate</dt> +<dd>The rate at which the unit will get damaged. The period is the same as with regeneration. +</dd> <dt>points</dt> <dd>This is the score value of an unit. Used for the final score. </dd> diff --git a/src/action/actions.cpp b/src/action/actions.cpp index 0d8f1935f..e9f43a60a 100644 --- a/src/action/actions.cpp +++ b/src/action/actions.cpp @@ -327,7 +327,13 @@ local void HandleBuffs(Unit* unit, int amount) // if (unit->TTL && unit->TTL < (GameCycle - unit->HP)) { DebugLevel0Fn("Unit must die %lu %lu!\n" _C_ unit->TTL _C_ GameCycle); - HitUnit(0, unit, amount); // * type->LossPerCycle or somthing? + // + // Hit unit does some funky stuff... + // + unit->HP -= amount; + if (unit->HP < 0) { + LetUnitDie(unit); + } if (unit->Selected) { MustRedraw |= RedrawInfoPanel; }