Fixed holy-vision bug

This commit is contained in:
n0body 2003-10-27 00:36:19 +00:00
parent 61e1d1ccd7
commit 879030503c
2 changed files with 14 additions and 4 deletions
doc/scripts
src/action

View file

@ -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>

View file

@ -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;
}