share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
changeset 12534 34a91e2b927e
parent 12533 f8801c72a6c8
child 12537 66566cfe0a7e
equal deleted inserted replaced
12533:f8801c72a6c8 12534:34a91e2b927e
   378 function professorAndMinionsDeath(gear)
   378 function professorAndMinionsDeath(gear)
   379 	if gameOver then return end
   379 	if gameOver then return end
   380 	AnimCaption(hero.gear, loc("Congrats! You destroyed the enemy!"), 6000)
   380 	AnimCaption(hero.gear, loc("Congrats! You destroyed the enemy!"), 6000)
   381 	SendStat(siCustomAchievement, loc("You have eliminated the whole evil team. You're pretty tough!"))
   381 	SendStat(siCustomAchievement, loc("You have eliminated the whole evil team. You're pretty tough!"))
   382 
   382 
       
   383 	SaveCampaignVar("ProfDiedOnMoon", "1")
   383 	victory()
   384 	victory()
   384 end
   385 end
   385 
   386 
   386 function professorDeath(gear)
   387 function professorDeath(gear)
   387 	if gameOver then return end
   388 	if gameOver then return end
   402 	SendStat(siCustomAchievement, loc("You have eliminated Professor Hogevil."))
   403 	SendStat(siCustomAchievement, loc("You have eliminated Professor Hogevil."))
   403 	SendStat(siCustomAchievement, loc("You drove the minions away."))
   404 	SendStat(siCustomAchievement, loc("You drove the minions away."))
   404 	DismissTeam(teamB.name)
   405 	DismissTeam(teamB.name)
   405 	AnimWait(hero.gear,5000)
   406 	AnimWait(hero.gear,5000)
   406 
   407 
       
   408 	SaveCampaignVar("ProfDiedOnMoon", "1")
   407 	victory()
   409 	victory()
   408 end
   410 end
   409 
   411 
   410 function minionsDeath(gear)
   412 function minionsDeath(gear)
   411 	if professor.dead or GetHealth(professor.gear) == nil or GetHealth(professor.gear) == 0 then return end
   413 	if professor.dead or GetHealth(professor.gear) == nil or GetHealth(professor.gear) == 0 then return end
   415 	DismissTeam(teamC.name)
   417 	DismissTeam(teamC.name)
   416 	AnimWait(hero.gear,5000)
   418 	AnimWait(hero.gear,5000)
   417 	SendStat(siCustomAchievement, loc("You have eliminated the evil minions."))
   419 	SendStat(siCustomAchievement, loc("You have eliminated the evil minions."))
   418 	SendStat(siCustomAchievement, loc("You drove Professor Hogevil away."))
   420 	SendStat(siCustomAchievement, loc("You drove Professor Hogevil away."))
   419 
   421 
       
   422 	SaveCampaignVar("ProfDiedOnMoon", "0")
   420 	victory()
   423 	victory()
   421 end
   424 end
   422 
   425 
   423 -------------- ANIMATIONS ------------------
   426 -------------- ANIMATIONS ------------------
   424 
   427