ACF5: Spare traitor's life with skip instead of precise
authorWuzzy <almikes@aol.com>
Sat, 30 Sep 2017 04:26:40 +0200
changeset 12615 dd0fb5b15567
parent 12614 12d4886de2b1
child 12616 fb0734d5dd87
ACF5: Spare traitor's life with skip instead of precise Since you can accidentally press precise
ChangeLog.txt
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua
--- a/ChangeLog.txt	Sat Sep 30 04:03:08 2017 +0200
+++ b/ChangeLog.txt	Sat Sep 30 04:26:40 2017 +0200
@@ -177,6 +177,7 @@
 
 A Classic Fairytale:
  + Mission 4: Add infinite skip
+ + Mission 5: Spare traitor's life with Skip instead of Precise
  + Mission 6: Add alternate dialogues when killing cyborgs before collecting the crates
  + All missions: Clarify mine timers
  * Mission 1: Leaf of faith: Hog was able to walk to the right and get stuck
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Sat Sep 30 04:03:08 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Sat Sep 30 04:26:40 2017 +0200
@@ -615,7 +615,10 @@
   AddEvent(CheckChoice, {}, DoChoice, {}, 0)
   AddEvent(CheckKilledOther, {}, DoKilledOther, {}, 0)
   AddEvent(CheckChoiceRefuse, {}, DoChoiceRefuse, {}, 0)
-  ShowMission(loc("Backstab"), loc("Judas"), loc("Kill the traitor...or spare his life!|Kill him or press [Precise]!"), 1, 8000)
+  ShowMission(loc("Backstab"), loc("Judas"),
+    string.format(loc("Kill the traitor, %s, or spare his life!"), GetHogName(spyHog)) .. "|" ..
+    loc("Kill him or skip your turn."),
+    1, 8000)
 end
 
 -----------------------------Events------------------------------------
@@ -1106,7 +1109,10 @@
     SetAnimSkip(true)
     return
   end
-  if stage == spyKillStage then
+end
+
+function onHogAttack(ammoType)
+  if stage == spyKillStage and ammoType == amSkip then
     highJumped = true
   end
 end