# HG changeset patch # User Wuzzy # Date 1506619582 -7200 # Node ID 5b23c42ef150dd7b2d9f78e3b685dc35080c75a1 # Parent e2b5c6e805e8a90c2f5cae1dd64f986c797657ae ASA fruit03: Fix skipping not adding to turn time in next turn diff -r e2b5c6e805e8 -r 5b23c42ef150 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Thu Sep 28 18:39:59 2017 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit03.lua Thu Sep 28 19:26:22 2017 +0200 @@ -122,7 +122,6 @@ AddAmmo(hero.gear, amSniperRifle, 2) AddAmmo(hero.gear, amWatermelon, 2) - -- these 2 are needed in order hero has 10 sec more in the first turn AddAmmo(hero.gear, amSkip, 100) timeLeft = 0 @@ -142,7 +141,7 @@ function onNewTurn() if CurrentHedgehog == hero.gear then if firstTurn then - -- Unique game rule in this mission + -- Unique game rule in this mission: First turn has more time TurnTimeLeft = 25000 -- Generous ready time on first turn to give more time to read ReadyTimeLeft = 35000 @@ -192,10 +191,15 @@ end end -onHogAttack = hideMissionOnAction -onAttack = hideMissionOnAction onSlot = hideMissionOnAction onSetWeapon = hideMissionOnAction +onAttack = hideMissionOnAction +function onHogAttack(ammoType) + hideMissionOnAction() + if CurrentHedgehog == hero.gear then + lastWeaponUsed = ammoType + end +end -------------- EVENTS ------------------ @@ -277,11 +281,6 @@ end end -function onSwitch() - ReadyTimeLeft = ReadyTimeLeft + 2000 - PlaySound(sndExtraTime) -end - function isHog(gear) local hog = false for i=1,table.getn(enemiesOdd) do