# HG changeset patch # User nemo # Date 1264965862 0 # Node ID f56592281526985634e8ff4ab16c8e81ef0fa88a # Parent c216de4d0c93bc5476a782c2c6b24de254a86df5 Remove king invulnerability, disable everything but teleport instead. diff -r c216de4d0c93 -r f56592281526 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Jan 31 16:35:18 2010 +0000 +++ b/hedgewars/GSHandlers.inc Sun Jan 31 19:24:22 2010 +0000 @@ -93,12 +93,14 @@ if(Gear^.Invulnerable) then exit; if _0_4 < Gear^.dY then begin + dmg:= ModifyDamage(1 + hwRound((hwAbs(Gear^.dY) - _0_4) * 70), Gear); + if dmg < 1 then exit; + if _0_6 < Gear^.dY then PlaySound(sndOw4, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack) else PlaySound(sndOw1, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack); - dmg:= ModifyDamage(1 + hwRound((hwAbs(Gear^.dY) - _0_4) * 70), Gear); ApplyDamage(Gear, dmg); end end; diff -r c216de4d0c93 -r f56592281526 hedgewars/uAmmos.pas --- a/hedgewars/uAmmos.pas Sun Jan 31 16:35:18 2010 +0000 +++ b/hedgewars/uAmmos.pas Sun Jan 31 19:24:22 2010 +0000 @@ -107,6 +107,8 @@ end; ammos[a]:= cnt; if shoppa then Ammoz[a].NumberInCase:= 1; // FIXME - TEMPORARY remove when crate number in case editor is added + + if ((GameFlags and gfKing) <> 0) and (a <> amTeleport) then Ammoz[a].SkipTurns:= 1; end else ammos[a]:= AMMO_INFINITE end; diff -r c216de4d0c93 -r f56592281526 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sun Jan 31 16:35:18 2010 +0000 +++ b/hedgewars/uGears.pas Sun Jan 31 19:24:22 2010 +0000 @@ -721,7 +721,7 @@ end; if (Gear <> nil) then - if ((GameFlags and gfInvulnerable) = 0) and (not King or (TotalRounds >= 0)) then // King is protected for one round + if (GameFlags and gfInvulnerable) = 0 then Gear^.Invulnerable:= false; end; end; diff -r c216de4d0c93 -r f56592281526 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Sun Jan 31 16:35:18 2010 +0000 +++ b/hedgewars/uTeams.pas Sun Jan 31 19:24:22 2010 +0000 @@ -312,7 +312,6 @@ King:= true; Hat:= 'crown'; Gear^.Health:= hwRound(int2hwFloat(Gear^.Health)*_1_5); - Gear^.Invulnerable:= true end end;