# HG changeset patch # User Wuzzy # Date 1506785027 -7200 # Node ID bcd679240cd2ab1aa231ddb2d58335cdb1dd22ec # Parent 88b9f41a57890164e32341ee8a7b7e99c58048f9 ASA, moon01: Don't save checkpoint if player was first detected, and then grabbed the weapons diff -r 88b9f41a5789 -r bcd679240cd2 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua --- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua Sat Sep 30 17:04:41 2017 +0200 +++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua Sat Sep 30 17:23:47 2017 +0200 @@ -339,16 +339,24 @@ -------------- ACTIONS ------------------ function weaponsPlatform(gear) - saveCheckpoint("2") - SaveCampaignVar("HeroHealth",GetHealth(hero.gear)) - EndTurn(true) - weaponsAcquired = true - SetWind(60) - GameFlags = bor(GameFlags,gfDisableWind) - AddAmmo(hero.gear, amRope, 0) - if GetX(hero.gear) < 1900 then - AddAnim(dialog02) + if not battleZoneReached then + -- Player entered weapons platform before entering battle zone. + -- Checkpoint and dialog! + saveCheckpoint("2") + SaveCampaignVar("HeroHealth",GetHealth(hero.gear)) + EndTurn(true) + weaponsAcquired = true + SetWind(60) + GameFlags = bor(GameFlags,gfDisableWind) + AddAmmo(hero.gear, amRope, 0) + if GetX(hero.gear) < 1900 then + AddAnim(dialog02) + end end + -- The player may screw up by going into the battle zone too early (dialog03). + -- In that case, the player is punished for this stupid move (no checkpoint), + -- but it is still theoretically possible to win by going for the weapons + -- very fast. end function heroDeath(gear)