share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua
changeset 12229 04535e6dc15a
parent 12226 3ec0261e01f0
child 12352 7f09d01ecb45
equal deleted inserted replaced
12228:8b523acb3220 12229:04535e6dc15a
    23 	-- Disable Sudden Death
    23 	-- Disable Sudden Death
    24 	HealthDecrease = 0
    24 	HealthDecrease = 0
    25 	WaterRise = 0
    25 	WaterRise = 0
    26 
    26 
    27 	AddTeam(loc("Feeble Resistance"), 14483456, "Simple", "Island", "Default", "cm_kiwi")
    27 	AddTeam(loc("Feeble Resistance"), 14483456, "Simple", "Island", "Default", "cm_kiwi")
    28 	player = AddHog(string.format(loc("Pathetic Hog #%d"), 1), 0, 50, "NoHat")
    28 	player = AddHog(loc("Greg"), 0, 50, "NoHat")
    29 	p2 = AddHog(string.format(loc("Pathetic Hog #%d"), 2), 0, 20, "NoHat")
    29 	p2 = AddHog(loc("Mark"), 0, 20, "NoHat")
    30 
    30 
    31 	--AddTeam("Toxic Team", 	1175851, "Simple", "Island", "Robot","cm_binary")
    31 	--AddTeam("Toxic Team", 	1175851, "Simple", "Island", "Robot","cm_binary")
    32 	AddTeam(loc("Cybernetic Empire"), 	1175851, "Simple", "Island", "Robot", "cm_cyborg")
    32 	AddTeam(loc("Cybernetic Empire"), 	1175851, "Simple", "Island", "Robot", "cm_cyborg")
    33 	enemy = AddHog(loc("Unit 3378"), 5, 30, "cyborg1")
    33 	enemy = AddHog(loc("Unit 3378"), 5, 30, "cyborg1")
    34 
    34 
    65 	SpawnAmmoCrate(1704,954,amPickHammer)
    65 	SpawnAmmoCrate(1704,954,amPickHammer)
    66 	SpawnAmmoCrate(704,623,amBlowTorch)
    66 	SpawnAmmoCrate(704,623,amBlowTorch)
    67 	SpawnUtilityCrate(1543,744,amJetpack)
    67 	SpawnUtilityCrate(1543,744,amJetpack)
    68 	SpawnAmmoCrate(227,442,amDrill)
    68 	SpawnAmmoCrate(227,442,amDrill)
    69 
    69 
    70 	ShowMission(loc("Codename: Teamwork"), loc("Scenario"), loc("- Eliminate Unit 3378 |- Feeble Resistance must survive") .. loc("|- Mines time: 0 seconds"), 0, 0)
    70 	ShowMission(loc("Teamwork"), loc("Scenario"), loc("Eliminate Unit 3378.") .. "|" .. loc("Both your hedgehogs must survive.") .. "|" .. loc("Mines time: 0 seconds"), 0, 0)
    71 
    71 
    72 end
    72 end
    73 
    73 
    74 
    74 
    75 --function onGameTick()
    75 --function onGameTick()
   107 	if GetGearType(gear) == gtCase then
   107 	if GetGearType(gear) == gtCase then
   108 		TurnTimeLeft = TurnTimeLeft + 5000
   108 		TurnTimeLeft = TurnTimeLeft + 5000
   109 	end
   109 	end
   110 
   110 
   111 	if (gear == enemy) and (GameOver == false) then
   111 	if (gear == enemy) and (GameOver == false) then
   112 		ShowMission(loc("Codename: Teamwork"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
   112 		ShowMission(loc("Teamwork"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
   113 		GameOver = true
   113 		GameOver = true
   114 	elseif  ( ((gear == player) or (gear == p2)) and (GameOver == false)) then
   114 	elseif  ( ((gear == player) or (gear == p2)) and (GameOver == false)) then
   115 		ShowMission(loc("Codename: Teamwork"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
   115 		ShowMission(loc("Teamwork"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
   116 		GameOver = true
   116 		GameOver = true
   117 		SetHealth(p2,0)
   117 		SetHealth(p2,0)
   118 		SetHealth(player,0)
   118 		SetHealth(player,0)
   119 	end
   119 	end
   120 
   120