share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua
changeset 12610 dd0fb5b15567
parent 12554 194b00c4ba07
child 12611 fb0734d5dd87
equal deleted inserted replaced
12609:12d4886de2b1 12610:dd0fb5b15567
   613   EndTurn(true)
   613   EndTurn(true)
   614   stage = spyKillStage
   614   stage = spyKillStage
   615   AddEvent(CheckChoice, {}, DoChoice, {}, 0)
   615   AddEvent(CheckChoice, {}, DoChoice, {}, 0)
   616   AddEvent(CheckKilledOther, {}, DoKilledOther, {}, 0)
   616   AddEvent(CheckKilledOther, {}, DoKilledOther, {}, 0)
   617   AddEvent(CheckChoiceRefuse, {}, DoChoiceRefuse, {}, 0)
   617   AddEvent(CheckChoiceRefuse, {}, DoChoiceRefuse, {}, 0)
   618   ShowMission(loc("Backstab"), loc("Judas"), loc("Kill the traitor...or spare his life!|Kill him or press [Precise]!"), 1, 8000)
   618   ShowMission(loc("Backstab"), loc("Judas"),
       
   619     string.format(loc("Kill the traitor, %s, or spare his life!"), GetHogName(spyHog)) .. "|" ..
       
   620     loc("Kill him or skip your turn."),
       
   621     1, 8000)
   619 end
   622 end
   620 
   623 
   621 -----------------------------Events------------------------------------
   624 -----------------------------Events------------------------------------
   622 function CheckTurnsOver()
   625 function CheckTurnsOver()
   623   return TurnsLeft == 0
   626   return TurnsLeft == 0
  1104 function onPrecise()
  1107 function onPrecise()
  1105   if GameTime > 2500 and AnimInProgress() then
  1108   if GameTime > 2500 and AnimInProgress() then
  1106     SetAnimSkip(true)
  1109     SetAnimSkip(true)
  1107     return
  1110     return
  1108   end
  1111   end
  1109   if stage == spyKillStage then
  1112 end
       
  1113 
       
  1114 function onHogAttack(ammoType)
       
  1115   if stage == spyKillStage and ammoType == amSkip then
  1110     highJumped = true
  1116     highJumped = true
  1111   end
  1117   end
  1112 end
  1118 end