equal
deleted
inserted
replaced
5226 if (tmp^.Kind = gtHedgehog) or (tmp^.Kind = gtMine) or (tmp^.Kind = gtExplosives) then |
5226 if (tmp^.Kind = gtHedgehog) or (tmp^.Kind = gtMine) or (tmp^.Kind = gtExplosives) then |
5227 begin |
5227 begin |
5228 //tmp^.State:= tmp^.State or gstFlatened; |
5228 //tmp^.State:= tmp^.State or gstFlatened; |
5229 if (tmp^.Kind <> gtHedgehog) or (tmp^.Hedgehog^.Effects[heInvulnerable] = 0) then |
5229 if (tmp^.Kind <> gtHedgehog) or (tmp^.Hedgehog^.Effects[heInvulnerable] = 0) then |
5230 begin |
5230 begin |
5231 // do 1/2 current hp worth of damage if extra damage is enabled (1/3 damage if not) |
|
5232 if cDamageModifier > _1 then |
|
5233 d:= 2 |
|
5234 else |
|
5235 d:= 3; |
|
5236 // base damage on remaining health |
5231 // base damage on remaining health |
5237 dmg:= (tmp^.Health - tmp^.Damage); |
5232 dmg:= (tmp^.Health - tmp^.Damage); |
5238 if dmg > 0 then |
5233 if dmg > 0 then |
5239 begin |
5234 begin |
|
5235 // do 1/2 current hp worth of damage if extra damage is enabled (1/3 damage if not) |
|
5236 if cDamageModifier > _1 then |
|
5237 d:= 2 |
|
5238 else |
|
5239 d:= 3; |
5240 // always round up |
5240 // always round up |
5241 if dmg mod d > 0 then |
5241 if dmg mod d > 0 then |
5242 dmg:= dmg div d + 1 |
5242 dmg:= dmg div d + 1 |
5243 else |
5243 else |
5244 dmg:= dmg div d; |
5244 dmg:= dmg div d; |