Chance to play sndNutter if player sacrifices hog and misses
authorWuzzy <Wuzzy2@mail.ru>
Sun, 28 Oct 2018 00:47:10 +0200
changeset 14023 bbecf663d599
parent 14022 e155b300d49f
child 14024 03a5d9f0bcc9
Chance to play sndNutter if player sacrifices hog and misses
hedgewars/uStats.pas
--- a/hedgewars/uStats.pas	Sun Oct 28 00:24:27 2018 +0200
+++ b/hedgewars/uStats.pas	Sun Oct 28 00:47:10 2018 +0200
@@ -272,12 +272,13 @@
     // Missed shot
     // A miss is defined as a shot with a damaging weapon with 0 kills, 0 damage, 0 hogs poisoned and 0 targets hit
     else if AmmoDamagingUsed and (Kills <= killsCheck) and (PoisonTurn = 0) and (PoisonClan = 0) and (DamageTurn = 0) and (HitTargets = 0) then
-        // Chance to call hedgehog stupid if sacrificed for nothing
+        // Chance to call hedgehog stupid or nutter if sacrificed for nothing
         if CurrentHedgehog^.stats.Sacrificed then
-            if random(2) = 0 then
-                AddVoice(sndMissed, PreviousTeam^.voicepack)
-            else
-                AddVoice(sndStupid, PreviousTeam^.voicepack)
+            case random(3) of
+            0: AddVoice(sndMissed, PreviousTeam^.voicepack);
+            1: AddVoice(sndStupid, PreviousTeam^.voicepack);
+            2: AddVoice(sndNutter, PreviousTeam^.voicepack);
+            end
         else
             AddVoice(sndMissed, PreviousTeam^.voicepack)