equal
deleted
inserted
replaced
1724 ApplyDamage(Gear, tmpDmg) |
1724 ApplyDamage(Gear, tmpDmg) |
1725 else |
1725 else |
1726 Gear^.State:= Gear^.State or gstWinner; |
1726 Gear^.State:= Gear^.State or gstWinner; |
1727 |
1727 |
1728 DeleteCI(Gear); |
1728 DeleteCI(Gear); |
1729 Gear^.dX:= Ammo^.dX * Power * _0_01; |
1729 if (Gear^.Kind = gtHedgehog) and PHedgehog(Gear^.Hedgehog)^.King then |
1730 Gear^.dY:= Ammo^.dY * Power * _0_01; |
1730 begin |
|
1731 Gear^.dX:= Ammo^.dX * Power * _0_005; |
|
1732 Gear^.dY:= Ammo^.dY * Power * _0_005 |
|
1733 end |
|
1734 else |
|
1735 begin |
|
1736 Gear^.dX:= Ammo^.dX * Power * _0_01; |
|
1737 Gear^.dY:= Ammo^.dY * Power * _0_01 |
|
1738 end; |
|
1739 |
1731 Gear^.Active:= true; |
1740 Gear^.Active:= true; |
1732 Gear^.State:= Gear^.State or gstMoving; |
1741 Gear^.State:= Gear^.State or gstMoving; |
1733 |
1742 |
1734 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then |
1743 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then |
1735 begin |
1744 begin |
2047 Gear:= nil |
2056 Gear:= nil |
2048 end |
2057 end |
2049 end; |
2058 end; |
2050 |
2059 |
2051 function ModifyDamage(dmg: Longword; Gear: PGear): Longword; |
2060 function ModifyDamage(dmg: Longword; Gear: PGear): Longword; |
|
2061 var i: hwFloat; |
2052 begin |
2062 begin |
2053 (* Invulnerability cannot be placed in here due to still needing kicks |
2063 (* Invulnerability cannot be placed in here due to still needing kicks |
2054 Not without a new damage machine. |
2064 Not without a new damage machine. |
2055 King check should be in here instead of ApplyDamage since Tiy wants them kicked less |
2065 King check should be in here instead of ApplyDamage since Tiy wants them kicked less |
2056 *) |
2066 *) |
|
2067 i:= _1; |
|
2068 if (CurrentHedgehog <> nil) and CurrentHedgehog^.King then i:= _1_5; |
2057 if (PHedgehog(Gear^.Hedgehog) <> nil) and (PHedgehog(Gear^.Hedgehog)^.King) then |
2069 if (PHedgehog(Gear^.Hedgehog) <> nil) and (PHedgehog(Gear^.Hedgehog)^.King) then |
2058 ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * cDamagePercent * _0_5) |
2070 ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent * _0_5) |
2059 else |
2071 else |
2060 ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * cDamagePercent) |
2072 ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent) |
2061 end; |
2073 end; |
2062 |
2074 |
2063 procedure init_uGears; |
2075 procedure init_uGears; |
2064 begin |
2076 begin |
2065 CurAmmoGear:= nil; |
2077 CurAmmoGear:= nil; |