share/hedgewars/Data/Missions/Training/portal.lua
changeset 11667 7652eeb0fc7f
parent 11245 41799450378a
child 11668 991c790da01e
equal deleted inserted replaced
11651:e5c101a6fb8d 11667:7652eeb0fc7f
    14 	MinesNum = 0 -- The number of mines being placed
    14 	MinesNum = 0 -- The number of mines being placed
    15 	Explosives = 0 -- The number of explosives being placed
    15 	Explosives = 0 -- The number of explosives being placed
    16 	Delay = 10 -- The delay between each round
    16 	Delay = 10 -- The delay between each round
    17 	Map = "portal" -- The map to be played
    17 	Map = "portal" -- The map to be played
    18 	Theme = "Hell" -- The theme to be used
    18 	Theme = "Hell" -- The theme to be used
    19 	Goals = loc("Use the portal to move fast and far, use it to kill, use it with caution!")  --the goal ...
       
    20 	
       
    21 	
    19 	
    22 ----AddTeam(teamname, color, grave, fort, voicepack, flag)--
    20 ----AddTeam(teamname, color, grave, fort, voicepack, flag)--
    23 	AddTeam(loc("Subject"), 14483406, "Simple", "Island", "Default", "cm_star")
    21 	AddTeam(loc("Subjects"), 0xFFFF01, "Simple", "Island", "Default", "cm_test")
    24 	player = AddHog(loc("player"), 0, 10, "Terminator_Glasses")
    22 	player = AddHog(loc("Subject 1"), 0, 10, "Terminator_Glasses")
    25 
    23 
    26 	AddTeam(loc("Hell Army"), 1170801, "Simple", "Island", "Default", "cm_galaxy")
    24 	AddTeam(loc("Hell Army"), 0xFF0402, "skull", "Island", "Default", "cm_hellish")
    27 	enemy1 = AddHog(loc("Lucifer"), 1, 200, "thinkingcap")
    25 	enemy1 = AddHog(loc("Lucifer"), 1, 200, "InfernalHorns")
    28 	enemy2 = AddHog(loc("voldemort"), 1, 150, "WizardHat")
    26 	enemy2 = AddHog(loc("Voldemort"), 1, 150, "WizardHat")
    29 	enemy3 = AddHog(loc("zombi"), 1, 100, "zombi")
    27 	enemy3 = AddHog(loc("Zombi"), 1, 100, "Zombi")
    30 	enemy4 = AddHog(loc("Predator"), 1, 14, "predator")
    28 	enemy4 = AddHog(loc("Predator"), 1, 14, "anzac")
    31 	enemy5 = AddHog(loc("oneye"), 1, 50, "cyclops")
    29 	enemy5 = AddHog(loc("Oneye"), 1, 50, "cyclops")
    32 	enemy6 = AddHog(loc("razac"), 1, 50, "plaguemask")
    30 	enemy6 = AddHog(loc("Razac"), 1, 50, "Evil")
    33 	enemy7 = AddHog(loc("C-2"), 1, 50, "cyborg1")
    31 	enemy7 = AddHog(loc("C-2"), 1, 50, "cyborg1")
    34 	enemy8 = AddHog(loc("Rider"), 1, 50, "scif_SparkssHelmet")
    32 	enemy8 = AddHog(loc("Rider"), 1, 50, "scif_SparkssHelmet")
    35 
    33 
    36 	AddTeam(loc("badmad"), 1170801, "Simple", "Island", "Default", "cm_jupiter")
    34 	AddTeam(loc("Badmad"), 0xFF0402, "skull", "Island", "Default", "cm_pentagram")
    37 	enemy9 = AddHog(loc("C-1"), 1, 50, "cyborg2")
    35 	enemy9 = AddHog(loc("C-1"), 1, 50, "cyborg2")
    38 	enemy10 = AddHog(loc("hiden"), 1, 40, "daftpunkguymanuel")
    36 	enemy10 = AddHog(loc("Hidden"), 1, 40, "bushhider")
    39 	enemy11 = AddHog(loc("ronald"), 1, 70, "clown")
    37 	enemy11 = AddHog(loc("Ronald"), 1, 70, "clown")
    40 	enemy12 = AddHog(loc("phosphatoglucidique"), 1, 50, "chef")
    38 	enemy12 = AddHog(loc("Phosphat"), 1, 50, "chef")
    41 	enemy13 = AddHog(loc("Lestat"), 1, 30, "draculakz")
    39 	enemy13 = AddHog(loc("Lestat"), 1, 30, "vampirichog")
    42 
    40 
    43 	SetGearPosition(player, 350, 1820)
    41 	SetGearPosition(player, 350, 1820)
    44     SetGearPosition(enemy1, 2037, 1313)
    42     SetGearPosition(enemy1, 2037, 1313)
    45 	SetGearPosition(enemy2, 1369, 1605)
    43 	SetGearPosition(enemy2, 1369, 1605)
    46 	SetGearPosition(enemy3, 1750, 1937)
    44 	SetGearPosition(enemy3, 1750, 1937)
   165 	
   163 	
   166 				--GIRDER--
   164 				--GIRDER--
   167 	PlaceGirder(3363, 1323, 4)
   165 	PlaceGirder(3363, 1323, 4)
   168 
   166 
   169 
   167 
   170 	ShowMission (loc("Portal mission"), loc("training"), "", -amPortalGun, 5000)
   168 	ShowMission (loc("Portal Mind Challenge"), loc("Mission"), 
   171 	HogSay(player, loc("I should get myself a portal gun, maybe this crate has one"), SAY_THINK)
   169 		loc("Defeat all enemies!") .. "|" .. loc("In this mission you have infinite time."),
       
   170 		-amPortalGun, 5000)
       
   171 	HogSay(player, loc("I should get myself a portal device, maybe this crate has one."), SAY_THINK)
   172 	
   172 	
   173 
   173 
   174 
   174 
   175 
   175 
   176 end
   176 end
   178 function onGameTick()
   178 function onGameTick()
   179 
   179 
   180     if (player ~= nil)  then
   180     if (player ~= nil)  then
   181 		if (gearIsInBox(player, 1650, 1907, 200, 60) and (adviceGiven == false)) then
   181 		if (gearIsInBox(player, 1650, 1907, 200, 60) and (adviceGiven == false)) then
   182 			adviceGiven = true
   182 			adviceGiven = true
   183 				HogSay(player, loc("Hmmm, I'll have to find some way of moving him off this anti-portal surface..."), SAY_THINK)
   183 				HogSay(player, loc("Hmmm, I’ll have to find some way of moving him off this anti-portal surface."), SAY_THINK)
   184 		elseif (gearIsInBox(player, 2960, 790, 200, 60) and (adviceGiven2 == false)) then
   184 		elseif (gearIsInBox(player, 2960, 790, 200, 60) and (adviceGiven2 == false)) then
   185 			adviceGiven2 = true
   185 			adviceGiven2 = true
   186 				HogSay(player, loc("The anti-portal zone is all over the floor, and I have nothing to kill him...Droping something could hurt him enough to kill him..."), SAY_THINK)
   186 				HogSay(player, loc("The anti-portal surface is all over the floor, and I have nothing to kill him. Dropping something could hurt him enough to kill him."), SAY_THINK)
   187  end
   187  end
   188  end
   188  end
   189 	
   189 	
   190 	end
   190 	end
   191 	
   191 	
   202 
   202 
   203 function onGearDelete(gear)
   203 function onGearDelete(gear)
   204 
   204 
   205 	if gear == portalgun then
   205 	if gear == portalgun then
   206 		--AddAmmo(player, amPortalGun, 10000)
   206 		--AddAmmo(player, amPortalGun, 10000)
   207 		HogSay(player, loc("GREAT ! Let's kill all this enemies, using portals"), SAY_THINK)
   207 		HogSay(player, loc("Great! Let’s kill all these enemies, using portals."), SAY_THINK)
   208 	end
   208 	end
   209 
   209 
   210 	if gear == girder then 
   210 	if gear == girder then 
   211 		HogSay(player, loc("Will be useful if I need a new plateform or if I want to rise...."), SAY_THINK)
   211 		HogSay(player, loc("This will be useful when I need a new platform or if I want to rise."), SAY_THINK)
   212 	end
   212 	end
   213 	
   213 	
   214 	if gear == parachute then
   214 	if gear == parachute then
   215 		HogSay(player, loc("You can't fire a portal on the blue surface"), SAY_THINK)
   215 		HogSay(player, loc("You can’t open a portal on the blue surface."), SAY_THINK)
   216 	end
   216 	end
   217 --if you wanted to check for collection only
   217 --if you wanted to check for collection only
   218 --you could probably say
   218 --you could probably say
   219 --if (gear == myParachuteGear) and (band(GetGearMessage(gear), gmDestroy) ~= 0) then
   219 --if (gear == myParachuteGear) and (band(GetGearMessage(gear), gmDestroy) ~= 0) then
   220 
   220 
   221 	if gear == extratime then
   221 	if gear == extratime then
   222 		HogSay(player, loc(" What !! For all of this struggle i just win some ... TIME o0"), SAY_SHOUT)
   222 		HogSay(player, loc("What?! For all this struggle I just win some ... time? Oh dear!"), SAY_SHOUT)
   223 	end
   223 	end
   224 
       
   225 	
   224 	
   226 	if gear == player then
   225 	if gear == player then
   227         player = nil
   226         player = nil
   228     end
   227     end
   229 end
   228 end