# HG changeset patch # User nemo # Date 1390050595 18000 # Node ID 82dd9f0c88f744252ec86f4c3f18759ee84c43c0 # Parent ead5e4b21671f3b7fb1a59b922ce21c51eb80b28 Make poison damage possibly variable (might as well since effects is a count). Scripts might find it handy. diff -r ead5e4b21671 -r 82dd9f0c88f7 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Fri Jan 17 16:13:10 2014 -0500 +++ b/hedgewars/hwengine.pas Sat Jan 18 08:09:55 2014 -0500 @@ -480,7 +480,7 @@ procedure freeEverything (complete:boolean); begin if complete then - begin + begin WriteLnToConsole('Freeing resources...'); uAI.freeModule; // AI things need to be freed first uAIMisc.freeModule; //stub @@ -506,7 +506,7 @@ uTextures.freeModule; uPhysFSLayer.freeModule; uLocale.freeModule; - end; + end; uIO.freeModule; uLand.freeModule; diff -r ead5e4b21671 -r 82dd9f0c88f7 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Fri Jan 17 16:13:10 2014 -0500 +++ b/hedgewars/uGears.pas Sat Jan 18 08:09:55 2014 -0500 @@ -127,7 +127,7 @@ tmp:= 0; if Gear^.Hedgehog^.Effects[hePoisoned] <> 0 then begin - inc(tmp, ModifyDamage(5, Gear)); + inc(tmp, ModifyDamage(Gear^.Hedgehog^.Effects[hePoisoned], Gear)); if (GameFlags and gfResetHealth) <> 0 then dec(Gear^.Hedgehog^.InitialHealth) // does not need a minimum check since <= 1 basically disables it end; diff -r ead5e4b21671 -r 82dd9f0c88f7 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Fri Jan 17 16:13:10 2014 -0500 +++ b/hedgewars/uGearsUtils.pas Sat Jan 18 08:09:55 2014 -0500 @@ -154,7 +154,7 @@ if Gear^.Kind <> gtFlame then FollowGear:= Gear end; if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) and (Gear^.State and gstHHDeath = 0) then - Gear^.Hedgehog^.Effects[hePoisoned] := 1; + Gear^.Hedgehog^.Effects[hePoisoned] := 5; end; end;