hedgewars/uGearsUtils.pas
changeset 9148 78c699d8fdfd
parent 9080 9b42757d7e71
child 9149 6790f1938cd9
equal deleted inserted replaced
9147:0ab57cdf9346 9148:78c699d8fdfd
   181 *)
   181 *)
   182 i:= _1;
   182 i:= _1;
   183 if (CurrentHedgehog <> nil) and CurrentHedgehog^.King then
   183 if (CurrentHedgehog <> nil) and CurrentHedgehog^.King then
   184     i:= _1_5;
   184     i:= _1_5;
   185 if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.King or (Gear^.Hedgehog^.Effects[heFrozen] > 0)) then
   185 if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.King or (Gear^.Hedgehog^.Effects[heFrozen] > 0)) then
   186     ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent * _0_5)
   186     ModifyDamage:= hwRound(cDamageModifier * dmg * i * cDamagePercent * _0_5 * _0_01)
   187 else
   187 else                                                                                
   188     ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent)
   188     ModifyDamage:= hwRound(cDamageModifier * dmg * i * cDamagePercent * _0_01)
   189 end;
   189 end;
   190 
   190 
   191 procedure ApplyDamage(Gear: PGear; AttackerHog: PHedgehog; Damage: Longword; Source: TDamageSource);
   191 procedure ApplyDamage(Gear: PGear; AttackerHog: PHedgehog; Damage: Longword; Source: TDamageSource);
   192 var s: shortstring;
   192 var s: shortstring;
   193     vampDmg, tmpDmg, i: Longword;
   193     vampDmg, tmpDmg, i: Longword;