682 if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then |
684 if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then |
683 begin |
685 begin |
684 inc(tmp, ModifyDamage(5, Gear)); |
686 inc(tmp, ModifyDamage(5, Gear)); |
685 if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth) // does not need a minimum check since <= 1 basically disables it |
687 if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth) // does not need a minimum check since <= 1 basically disables it |
686 end; |
688 end; |
687 inc(tmp, cHealthDecrease); |
689 if (TotalRounds > cSuddenDTurns - 1) then |
688 if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth, cHealthDecrease); |
690 begin |
|
691 inc(tmp, cHealthDecrease); |
|
692 if (GameFlags and gfResetHealth) <> 0 then dec(PHedgehog(Gear^.Hedgehog)^.InitialHealth, cHealthDecrease) |
|
693 end; |
689 if PHedgehog(Gear^.Hedgehog)^.King then |
694 if PHedgehog(Gear^.Hedgehog)^.King then |
690 begin |
695 begin |
691 flag:= false; |
696 flag:= false; |
692 team:= PHedgehog(Gear^.Hedgehog)^.Team; |
697 team:= PHedgehog(Gear^.Hedgehog)^.Team; |
693 for i:= 0 to Pred(team^.HedgehogsNumber) do |
698 for i:= 0 to Pred(team^.HedgehogsNumber) do |
795 end; |
800 end; |
796 stWater: if (not bBetweenTurns) and (not isInMultiShoot) then |
801 stWater: if (not bBetweenTurns) and (not isInMultiShoot) then |
797 begin |
802 begin |
798 if TotalRounds = cSuddenDTurns + 1 then bWaterRising:= true; |
803 if TotalRounds = cSuddenDTurns + 1 then bWaterRising:= true; |
799 |
804 |
800 if bWaterRising then |
805 if bWaterRising and (cWaterRise > 0) then |
801 AddGear(0, 0, gtWaterUp, 0, _0, _0, 0); |
806 AddGear(0, 0, gtWaterUp, 0, _0, _0, 0)^.Tag:= cWaterRise; |
802 |
807 |
803 inc(step) |
808 inc(step) |
804 end else inc(step); |
809 end else inc(step); |
805 stChWin2: begin |
810 stChWin2: begin |
806 CheckForWin; |
811 CheckForWin; |
807 inc(step) |
812 inc(step) |
808 end; |
813 end; |
809 stHealth: begin |
814 stHealth: begin |
810 if (TotalRounds = cSuddenDTurns - 1) and (cHealthDecrease = 0) and not isInMultiShoot then |
815 if (TotalRounds = cSuddenDTurns) and not SuddenDeathDmg and not isInMultiShoot then |
811 begin |
816 begin |
812 cHealthDecrease:= 5; |
817 SuddenDeathDmg:= true; |
813 AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState); |
818 AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState); |
814 playSound(sndSuddenDeath) |
819 playSound(sndSuddenDeath) |
815 end |
820 end |
816 else if (TotalRounds < cSuddenDTurns - 1) and not isInMultiShoot then |
821 else if (TotalRounds < cSuddenDTurns) and not isInMultiShoot then |
817 begin |
822 begin |
818 i:= cSuddenDTurns - TotalRounds - 1; |
823 i:= cSuddenDTurns - TotalRounds; |
819 s:= inttostr(i); |
824 s:= inttostr(i); |
820 if i = 1 then |
825 if i = 1 then |
821 AddCaption(trmsg[sidRoundSD], cWhiteColor, capgrpGameState) |
826 AddCaption(trmsg[sidRoundSD], cWhiteColor, capgrpGameState) |
822 else if i in [2, 5, 10, 15, 20, 25, 50, 100] then |
827 else if i in [2, 5, 10, 15, 20, 25, 50, 100] then |
823 AddCaption(Format(trmsg[sidRoundsSD], s), cWhiteColor, capgrpGameState); |
828 AddCaption(Format(trmsg[sidRoundsSD], s), cWhiteColor, capgrpGameState); |