ACF3: Simplify infinite shoryuken crate
authorWuzzy <Wuzzy2@mail.ru>
Sat, 25 May 2019 01:45:46 +0200
changeset 15054 6fc8f0a2929d
parent 15053 d131ec7be850
child 15055 ce3efc9cc6d3
ACF3: Simplify infinite shoryuken crate
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Sat May 25 00:23:14 2019 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Sat May 25 01:45:46 2019 +0200
@@ -140,7 +140,6 @@
 
 startAnimStarted = false
 blowTaken = false
-fireTaken = false
 gravityTaken = false
 sniperTaken = false
 leaksDead = false
@@ -341,7 +340,6 @@
   RestoreHedge(cannibals[5])
   AddAmmo(cannibals[5], amDEagle, 0)
   HideHedge(cannibals[5])
-  AddEvent(CheckTookFire, {}, DoTookFire, {}, 0)
   SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
   SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
   EndTurn(true)
@@ -413,7 +411,7 @@
   PlaceGirder(1033, 649, 0)
   PlaceGirder(952, 650, 0)
 
-  fireCrate = SpawnSupplyCrate(1846, 1100, amFirePunch)
+  SpawnSupplyCrate(1846, 1100, amFirePunch, AMMO_INFINITE)
   SpawnSupplyCrate(1900, 1100, amPickHammer)
   SpawnSupplyCrate(950, 674, amDynamite)
   SpawnSupplyCrate(994, 825, amRope)
@@ -766,7 +764,7 @@
   AddGear(2239, 1295, gtMine, 0, 0, 0, 0)
 
   AnimSetGearPosition(leaks, 3781, 1583)
-  AddAmmo(cannibals[1], amShotgun, 100)
+  AddAmmo(cannibals[1], amShotgun, AMMO_INFINITE)
   AddAmmo(leaks, amSwitch, 0)
 end
 
@@ -880,13 +878,6 @@
 
 
 --////////////////////////////Event Functions////////////////////////
-function CheckTookFire()
-  return fireTaken
-end
-
-function DoTookFire()
-  AddAmmo(leaks, amFirePunch, 100)
-end
 
 function CheckDensePit()
   if GetHealth(dense) ~= nil then
@@ -1161,8 +1152,6 @@
   end
   if gear == blowCrate then
     blowTaken = true
-  elseif gear == fireCrate then
-    fireTaken = true
   elseif gear == gravityCrate then
     gravityTaken = true
   elseif gear == leaks and not victory then