ACF3: Explode princess when skipping 12turn course failanim
authorWuzzy <Wuzzy2@mail.ru>
Tue, 06 Feb 2018 06:33:32 +0100
changeset 12910 06791c62c759
parent 12909 c851be2c0494
child 12911 4ea0691d0ad5
ACF3: Explode princess when skipping 12turn course failanim
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Tue Feb 06 06:23:37 2018 +0100
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Tue Feb 06 06:33:32 2018 +0100
@@ -429,41 +429,44 @@
 end
 
 -- Dump mines in princess cage
-function DumpMines()
-  AddGear(2261, 1835, gtMine, 0, 0, 0, 0)
-  AddGear(2280, 1831, gtMine, 0, 0, 0, 0)
-  AddGear(2272, 1809, gtMine, 0, 0, 0, 0)
-  AddGear(2290, 1815, gtMine, 0, 0, 0, 0)
-  AddGear(2278, 1815, gtMine, 0, 0, 0, 0)
-  AddGear(2307, 1811, gtMine, 0, 0, 0, 0)
-  AddGear(2286, 1820, gtMine, 0, 0, 0, 0)
-  AddGear(2309, 1813, gtMine, 0, 0, 0, 0)
-  AddGear(2303, 1822, gtMine, 0, 0, 0, 0)
-  AddGear(2317, 1827, gtMine, 0, 0, 0, 0)
-  AddGear(2312, 1816, gtMine, 0, 0, 0, 0)
-  AddGear(2316, 1812, gtMine, 0, 0, 0, 0)
-  AddGear(2307, 1802, gtMine, 0, 0, 0, 0)
-  AddGear(2276, 1818, gtMine, 0, 0, 0, 0)
-  AddGear(2284, 1816, gtMine, 0, 0, 0, 0)
-  AddGear(2292, 1811, gtMine, 0, 0, 0, 0)
-  AddGear(2295, 1814, gtMine, 0, 0, 0, 0)
-  AddGear(2306, 1811, gtMine, 0, 0, 0, 0)
-  AddGear(2292, 1815, gtMine, 0, 0, 0, 0)
-  AddGear(2314, 1815, gtMine, 0, 0, 0, 0)
-  AddGear(2286, 1813, gtMine, 0, 0, 0, 0)
-  AddGear(2275, 1813, gtMine, 0, 0, 0, 0)
-  AddGear(2269, 1814, gtMine, 0, 0, 0, 0)
-  AddGear(2273, 1812, gtMine, 0, 0, 0, 0)
-  AddGear(2300, 1808, gtMine, 0, 0, 0, 0)
-  AddGear(2322, 1812, gtMine, 0, 0, 0, 0)
-  AddGear(2323, 1813, gtMine, 0, 0, 0, 0)
-  AddGear(2311, 1811, gtMine, 0, 0, 0, 0)
-  AddGear(2303, 1809, gtMine, 0, 0, 0, 0)
-  AddGear(2287, 1808, gtMine, 0, 0, 0, 0)
-  AddGear(2282, 1808, gtMine, 0, 0, 0, 0)
-  AddGear(2277, 1809, gtMine, 0, 0, 0, 0)
-  AddGear(2296, 1809, gtMine, 0, 0, 0, 0)
-  AddGear(2314, 1818, gtMine, 0, 0, 0, 0)
+function DumpMines(t)
+  if not t then
+    t = 0
+  end
+  AddGear(2261, 1835, gtMine, 0, 0, 0, t)
+  AddGear(2280, 1831, gtMine, 0, 0, 0, t)
+  AddGear(2272, 1809, gtMine, 0, 0, 0, t)
+  AddGear(2290, 1815, gtMine, 0, 0, 0, t)
+  AddGear(2278, 1815, gtMine, 0, 0, 0, t)
+  AddGear(2307, 1811, gtMine, 0, 0, 0, t)
+  AddGear(2286, 1820, gtMine, 0, 0, 0, t)
+  AddGear(2309, 1813, gtMine, 0, 0, 0, t)
+  AddGear(2303, 1822, gtMine, 0, 0, 0, t)
+  AddGear(2317, 1827, gtMine, 0, 0, 0, t)
+  AddGear(2312, 1816, gtMine, 0, 0, 0, t)
+  AddGear(2316, 1812, gtMine, 0, 0, 0, t)
+  AddGear(2307, 1802, gtMine, 0, 0, 0, t)
+  AddGear(2276, 1818, gtMine, 0, 0, 0, t)
+  AddGear(2284, 1816, gtMine, 0, 0, 0, t)
+  AddGear(2292, 1811, gtMine, 0, 0, 0, t)
+  AddGear(2295, 1814, gtMine, 0, 0, 0, t)
+  AddGear(2306, 1811, gtMine, 0, 0, 0, t)
+  AddGear(2292, 1815, gtMine, 0, 0, 0, t)
+  AddGear(2314, 1815, gtMine, 0, 0, 0, t)
+  AddGear(2286, 1813, gtMine, 0, 0, 0, t)
+  AddGear(2275, 1813, gtMine, 0, 0, 0, t)
+  AddGear(2269, 1814, gtMine, 0, 0, 0, t)
+  AddGear(2273, 1812, gtMine, 0, 0, 0, t)
+  AddGear(2300, 1808, gtMine, 0, 0, 0, t)
+  AddGear(2322, 1812, gtMine, 0, 0, 0, t)
+  AddGear(2323, 1813, gtMine, 0, 0, 0, t)
+  AddGear(2311, 1811, gtMine, 0, 0, 0, t)
+  AddGear(2303, 1809, gtMine, 0, 0, 0, t)
+  AddGear(2287, 1808, gtMine, 0, 0, 0, t)
+  AddGear(2282, 1808, gtMine, 0, 0, 0, t)
+  AddGear(2277, 1809, gtMine, 0, 0, 0, t)
+  AddGear(2296, 1809, gtMine, 0, 0, 0, t)
+  AddGear(2314, 1818, gtMine, 0, 0, 0, t)
 end
 
 function SetupAnimRefusedDied()
@@ -535,6 +538,7 @@
   table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 500}})
   table.insert(failAnimAD, {func = AnimSay, args = {leaks, loc("No! What have I done?! What have YOU done?!"), SAY_SHOUT, 3000}})
   table.insert(failAnimAD, {func = AnimSwitchHog, args = {princess}})
+  AddSkipFunction(failAnimAD, SkipFailAnimAlone, {})
 
   table.insert(endAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {437, 1700, 519, 1722}}})
   table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
@@ -1044,6 +1048,12 @@
   AddFunction({func = AddFunction, args = {{func = AfterMidFailAnim, args = {}}}})
 end
 
+function SkipFailAnimAlone()
+  DumpMines(1)
+  KillPrincess()
+  AnimSwitchHog(princess)
+end
+
 --////////////////////////////Main Functions/////////////////////////
 
 function onGameInit()