Make poison damage possibly variable (might as well since effects is a count). Scripts might find it handy.
authornemo
Sat, 18 Jan 2014 08:09:55 -0500
changeset 10012 82dd9f0c88f7
parent 10011 ead5e4b21671
child 10013 4d7302e9b617
Make poison damage possibly variable (might as well since effects is a count). Scripts might find it handy.
hedgewars/hwengine.pas
hedgewars/uGears.pas
hedgewars/uGearsUtils.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;
--- 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;
--- 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;