share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
changeset 13467 1515e643cd91
parent 13145 5083fb0a2992
child 13468 4ea2c8fa699e
equal deleted inserted replaced
13466:172ad57e2e0f 13467:1515e643cd91
   177 winAnimAD = {}
   177 winAnimAD = {}
   178 
   178 
   179 --/////////////////////////Animation Functions///////////////////////
   179 --/////////////////////////Animation Functions///////////////////////
   180 function AfterMidFailAnim()
   180 function AfterMidFailAnim()
   181   DismissTeam(loc("Natives"))
   181   DismissTeam(loc("Natives"))
       
   182   DismissTeam(loc("Princess"))
   182   EndTurn(true)
   183   EndTurn(true)
   183 end
   184 end
   184 
   185 
   185 function AfterMidAnimAlone()
   186 function AfterMidAnimAlone()
   186   SetupCourse()
   187   SetupCourse()
   911 function DoLeaksDead()
   912 function DoLeaksDead()
   912   if not princessDead then
   913   if not princessDead then
   913     EndTurn(true)
   914     EndTurn(true)
   914     AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
   915     AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
   915     DismissTeam(loc("Natives"))
   916     DismissTeam(loc("Natives"))
       
   917     DismissTeam(loc("Princess"))
   916   end
   918   end
   917 end
   919 end
   918 
   920 
   919 function CheckDenseDead()
   921 function CheckDenseDead()
   920   return denseDead
   922   return denseDead
   923 function DoDenseDead()
   925 function DoDenseDead()
   924   if not princessDead then
   926   if not princessDead then
   925     EndTurn(true)
   927     EndTurn(true)
   926     AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
   928     AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
   927     DismissTeam(loc("Natives"))
   929     DismissTeam(loc("Natives"))
       
   930     DismissTeam(loc("Princess"))
   928   end
   931   end
   929 end
   932 end
   930 
   933 
   931 function CheckTookBlowTorch()
   934 function CheckTookBlowTorch()
   932   return blowTaken
   935   return blowTaken
  1007 
  1010 
  1008 function DoLost()
  1011 function DoLost()
  1009   if not cyborgDead then
  1012   if not cyborgDead then
  1010     SwitchHog(cyborg)
  1013     SwitchHog(cyborg)
  1011   end
  1014   end
  1012   AddAnim(endFailAnim)
  1015   if not (leaksDead or denseDead) then
       
  1016     AddAnim(endFailAnim)
       
  1017   end
  1013   AddFunction({func = DismissTeam, args = {loc("Natives")}})
  1018   AddFunction({func = DismissTeam, args = {loc("Natives")}})
       
  1019   AddFunction({func = DismissTeam, args = {loc("Princess")}})
  1014   AddFunction({func = EndTurn, args = {true}})
  1020   AddFunction({func = EndTurn, args = {true}})
  1015 end
  1021 end
  1016 
  1022 
  1017 function CheckWon()
  1023 function CheckWon()
  1018   return cyborgDead and not princessDead
  1024   return cyborgDead and not princessDead
  1080 
  1086 
  1081     -- Disable Sudden Death
  1087     -- Disable Sudden Death
  1082     HealthDecrease = 0
  1088     HealthDecrease = 0
  1083     WaterRise = 0
  1089     WaterRise = 0
  1084 
  1090 
  1085 	AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
  1091 	AddTeam(loc("Natives"), 0x0072FF, "Bone", "Island", "HillBilly", "cm_birdy")
  1086 	leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
  1092 	leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
  1087   dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood")
  1093   dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood")
  1088 
  1094 
  1089   AddTeam(loc("Cannibal Sentry"), 14483456, "skull", "Island", "Pirate","cm_vampire")
  1095   AddTeam(loc("Cannibal Sentry"), 0xDD0000, "skull", "Island", "Pirate","cm_vampire")
  1090   cannibals = {}
  1096   cannibals = {}
  1091   for i = 1, 4 do
  1097   for i = 1, 4 do
  1092     cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
  1098     cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
  1093     AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i]))
  1099     AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i]))
  1094     SetEffect(cannibals[i], heArtillery, 1)
  1100     SetEffect(cannibals[i], heArtillery, 1)
  1098     cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
  1104     cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
  1099     AnimSetGearPosition(cannibals[i], 0, 0)
  1105     AnimSetGearPosition(cannibals[i], 0, 0)
  1100     SetEffect(cannibals[i], heArtillery, 1)
  1106     SetEffect(cannibals[i], heArtillery, 1)
  1101   end
  1107   end
  1102 
  1108 
  1103   AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_binary")
  1109   AddTeam(loc("011101001"), 0xDD0000, "ring", "UFO", "Robot", "cm_binary")
  1104   cyborg = AddHog(loc("Y3K1337"), 0, 200, "cyborg1")
  1110   cyborg = AddHog(loc("Y3K1337"), 0, 200, "cyborg1")
       
  1111 
       
  1112   AddTeam(loc("Princess"), 0x0072FF, "Bone", "Island", "HillBilly", "cm_birdy")
  1105   princess = AddHog(loc("Fell From Heaven"), 0, 200, "tiara")
  1113   princess = AddHog(loc("Fell From Heaven"), 0, 200, "tiara")
  1106 
  1114 
  1107   AnimSetGearPosition(dense, 0, 0)
  1115   AnimSetGearPosition(dense, 0, 0)
  1108   AnimSetGearPosition(leaks, 0, 0)
  1116   AnimSetGearPosition(leaks, 0, 0)
  1109   AnimSetGearPosition(cyborg, 0, 0)
  1117   AnimSetGearPosition(cyborg, 0, 0)