hedgewars/uGears.pas
changeset 14062 44f20c9e6861
parent 13897 aa321e51da14
child 14217 ab5e710d353d
equal deleted inserted replaced
14061:128fbd36eee4 14062:44f20c9e6861
   161                 // SD damage never reduces health below 1
   161                 // SD damage never reduces health below 1
   162                 tmp:= min(tmp, max(0, Gear^.Health - 1 - Gear^.Damage));
   162                 tmp:= min(tmp, max(0, Gear^.Health - 1 - Gear^.Damage));
   163                 inc(Gear^.Damage, tmp);
   163                 inc(Gear^.Damage, tmp);
   164                 if tmp > 0 then
   164                 if tmp > 0 then
   165                     // Make hedgehog moan on damage
   165                     // Make hedgehog moan on damage
   166                     HHHurt(Gear^.Hedgehog, dsPoison);
   166                     HHHurt(Gear^.Hedgehog, dsPoison, tmp);
   167                 end
   167                 end
   168             end;
   168             end;
   169 
   169 
   170         Gear:= Gear^.NextGear
   170         Gear:= Gear^.NextGear
   171     end;
   171     end;
   507         inc(hiTicks) // we do not recieve a message for this
   507         inc(hiTicks) // we do not recieve a message for this
   508         end
   508         end
   509     end;
   509     end;
   510 AddRandomness(CheckSum);
   510 AddRandomness(CheckSum);
   511 TurnClockActive:= prevtime <> TurnTimeLeft;
   511 TurnClockActive:= prevtime <> TurnTimeLeft;
   512 inc(GameTicks)
   512 inc(GameTicks);
       
   513 if (OuchTauntTimer > 0) then
       
   514     dec(OuchTauntTimer);
   513 end;
   515 end;
   514 
   516 
   515 //Purpose, to reset all transient attributes toggled by a utility and clean up various gears and effects at end of turn
   517 //Purpose, to reset all transient attributes toggled by a utility and clean up various gears and effects at end of turn
   516 //If any of these are set as permanent toggles in the frontend, that needs to be checked and skipped here.
   518 //If any of these are set as permanent toggles in the frontend, that needs to be checked and skipped here.
   517 procedure EndTurnCleanup;
   519 procedure EndTurnCleanup;