equal
deleted
inserted
replaced
133 begin |
133 begin |
134 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
134 dmg:= ModifyDamage(min(dmg div 2, Radius), Gear); |
135 //AddFileLog('Damage: ' + inttostr(dmg)); |
135 //AddFileLog('Damage: ' + inttostr(dmg)); |
136 if (Mask and EXPLNoDamage) = 0 then |
136 if (Mask and EXPLNoDamage) = 0 then |
137 begin |
137 begin |
138 if Gear^.Hedgehog^.Effects[heInvulnerable] = 0 then |
138 if (Gear^.Kind <> gtHedgehog) or (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) then |
139 ApplyDamage(Gear, AttackingHog, dmg, dsExplosion) |
139 ApplyDamage(Gear, AttackingHog, dmg, dsExplosion) |
140 else |
140 else |
141 Gear^.State:= Gear^.State or gstWinner; |
141 Gear^.State:= Gear^.State or gstWinner; |
142 end; |
142 end; |
143 if ((Mask and EXPLDoNotTouchAny) = 0) and (((Mask and EXPLDoNotTouchHH) = 0) or (Gear^.Kind <> gtHedgehog)) then |
143 if ((Mask and EXPLDoNotTouchAny) = 0) and (((Mask and EXPLDoNotTouchHH) = 0) or (Gear^.Kind <> gtHedgehog)) then |
146 Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, tdX)/(Gear^.Density/_3); |
146 Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, tdX)/(Gear^.Density/_3); |
147 Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, tdY)/(Gear^.Density/_3); |
147 Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, tdY)/(Gear^.Density/_3); |
148 |
148 |
149 Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser); |
149 Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser); |
150 if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and (not gstCollision); |
150 if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and (not gstCollision); |
151 if Gear^.Hedgehog^.Effects[heInvulnerable] = 0 then |
151 if (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) then |
152 Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner); |
152 Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner); |
153 Gear^.Active:= true; |
153 Gear^.Active:= true; |
154 if Gear^.Kind <> gtFlame then FollowGear:= Gear |
154 if Gear^.Kind <> gtFlame then FollowGear:= Gear |
155 end; |
155 end; |
156 if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) and (Gear^.State and gstHHDeath = 0) then |
156 if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) and (Gear^.State and gstHHDeath = 0) then |
822 dist:= hwRound(Distance(dx, dy)); |
822 dist:= hwRound(Distance(dx, dy)); |
823 dmg:= ModifyDamage(min(r - dist, 25), t); |
823 dmg:= ModifyDamage(min(r - dist, 25), t); |
824 end; |
824 end; |
825 if dmg > 0 then |
825 if dmg > 0 then |
826 begin |
826 begin |
827 if t^.Hedgehog^.Effects[heInvulnerable] = 0 then |
827 if (Gear^.Kind <> gtHedgehog) or (t^.Hedgehog^.Effects[heInvulnerable] = 0) then |
828 ApplyDamage(t, Gear^.Hedgehog, dmg, dsBullet) |
828 ApplyDamage(t, Gear^.Hedgehog, dmg, dsBullet) |
829 else |
829 else |
830 Gear^.State:= Gear^.State or gstWinner; |
830 Gear^.State:= Gear^.State or gstWinner; |
831 |
831 |
832 DeleteCI(t); |
832 DeleteCI(t); |
918 if (Ammo^.Kind = gtDrill) then |
918 if (Ammo^.Kind = gtDrill) then |
919 begin |
919 begin |
920 Ammo^.Timer:= 0; |
920 Ammo^.Timer:= 0; |
921 exit; |
921 exit; |
922 end; |
922 end; |
923 if Gear^.Hedgehog^.Effects[heInvulnerable] = 0 then |
923 if (Gear^.Kind <> gtHedgehog) or (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) then |
924 begin |
924 begin |
925 if (Ammo^.Kind = gtKnife) and (tmpDmg > 0) then |
925 if (Ammo^.Kind = gtKnife) and (tmpDmg > 0) then |
926 for j:= 1 to max(1,min(3,tmpDmg div 5)) do |
926 for j:= 1 to max(1,min(3,tmpDmg div 5)) do |
927 begin |
927 begin |
928 VGear:= AddVisualGear(hwRound(Ammo^.X-((Ammo^.X-Gear^.X)/_2)), hwRound(Ammo^.Y-((Ammo^.Y-Gear^.Y)/_2)), vgtStraightShot); |
928 VGear:= AddVisualGear(hwRound(Ammo^.X-((Ammo^.X-Gear^.X)/_2)), hwRound(Ammo^.Y-((Ammo^.Y-Gear^.Y)/_2)), vgtStraightShot); |