share/hedgewars/Data/Maps/CTF_Blizzard/map.lua
changeset 4871 4a99a45ea886
parent 4843 673f74c89687
child 4953 ebd3dae634ca
equal deleted inserted replaced
4870:c02406028e02 4871:4a99a45ea886
    66 
    66 
    67 -- removed branding and version number
    67 -- removed branding and version number
    68 -- removed teleport from starting weapons
    68 -- removed teleport from starting weapons
    69 -- increased captures to 3
    69 -- increased captures to 3
    70 
    70 
       
    71 -----------
       
    72 -- 0.7
       
    73 ------------
       
    74 
       
    75 -- hopefully fixed a bug with the teleporters
       
    76 
       
    77 -- added a fix for crate possibly getting imbedded in land when it was near
       
    78 -- the water line
       
    79 
    71 loadfile(GetDataPath() .. "Scripts/Locale.lua")()
    80 loadfile(GetDataPath() .. "Scripts/Locale.lua")()
    72 
    81 
    73 ---------------------------------------------------------------
    82 ---------------------------------------------------------------
    74 ----------lots of bad variables and things
    83 ----------lots of bad variables and things
    75 ----------because someone is too lazy
    84 ----------because someone is too lazy
    80 
    89 
    81 local roundsCounter = 0	-- used to determine when to spawn more crates
    90 local roundsCounter = 0	-- used to determine when to spawn more crates
    82 						-- currently every 6 TURNS, should this work
    91 						-- currently every 6 TURNS, should this work
    83 						-- on ROUNDS instead?
    92 						-- on ROUNDS instead?
    84 local effectTimer = 0
    93 local effectTimer = 0
       
    94 
       
    95 local ropeGear = nil
    85 
    96 
    86 --------------------------
    97 --------------------------
    87 -- hog and team tracking variales
    98 -- hog and team tracking variales
    88 --------------------------
    99 --------------------------
    89 
   100 
   347 		wtf = 1
   358 		wtf = 1
   348 		bbq = 0
   359 		bbq = 0
   349 	end
   360 	end
   350 
   361 
   351 	if fThief[wtf] ~= nil then
   362 	if fThief[wtf] ~= nil then
   352 		--SetEffect(fThief[wtf], hePoisoned, false)
   363 		
   353 		fGear[wtf] = SpawnAmmoCrate(fThiefX[wtf],fThiefY[wtf]-50,amSkip)
   364 		if fThiefY[wtf] > 2040 then
       
   365 			fGear[wtf] = SpawnAmmoCrate(fThiefX[wtf],(fThiefY[wtf]+10),amSkip)
       
   366 		else
       
   367 			fGear[wtf] = SpawnAmmoCrate(fThiefX[wtf],(fThiefY[wtf]-50),amSkip)
       
   368 		end
       
   369 
   354 		AddVisualGear(fThiefX[wtf], fThiefY[wtf], vgtBigExplosion, 0, false)
   370 		AddVisualGear(fThiefX[wtf], fThiefY[wtf], vgtBigExplosion, 0, false)
   355 		fThief[wtf] = nil
   371 		fThief[wtf] = nil
   356 	end
   372 	end
   357 
   373 
   358 end
   374 end
   415 		destinationY = 321
   431 		destinationY = 321
   416 	end
   432 	end
   417 
   433 
   418 	if teleportActive == true then
   434 	if teleportActive == true then
   419 		if actionReset == 0 then
   435 		if actionReset == 0 then
   420 			SetGearMessage(CurrentHedgehog, gmAttack)
   436 			if ropeGear ~= nil then
       
   437 				if GetGearElasticity(ropeGear) ~= 0 then
       
   438 					SetGearMessage(CurrentHedgehog, gmAttack)
       
   439 				end
       
   440 			end
   421 			--AddCaption(actionReset .. ";" .. "attack")
   441 			--AddCaption(actionReset .. ";" .. "attack")
   422 		elseif actionReset == 10 then
   442 		elseif actionReset == 10 then
   423 			SetGearMessage(CurrentHedgehog, 0)
   443 			SetGearMessage(CurrentHedgehog, 0)
   424 			--AddCaption(actionReset .. ";" .. "reset")
   444 			--AddCaption(actionReset .. ";" .. "reset")
   425 		elseif actionReset == 20 then
   445 		elseif actionReset == 20 then
   750 		numhhs = numhhs + 1
   770 		numhhs = numhhs + 1
   751 		SetEffect(gear, heResurrectable, true)
   771 		SetEffect(gear, heResurrectable, true)
   752 
   772 
   753 	end
   773 	end
   754 
   774 
       
   775 	if GetGearType(gear) == gtRope then
       
   776 		ropeGear = gear
       
   777 	end
       
   778 
   755 end
   779 end
   756 
   780 
   757 function onGearDelete(gear)
   781 function onGearDelete(gear)
   758 
   782 
   759 	if (gear == fGear[0]) or (gear == fGear[1]) then
   783 	if (gear == fGear[0]) or (gear == fGear[1]) then
   760 		FlagDeleted(gear)
   784 		FlagDeleted(gear)
   761 	end
   785 	end
   762 
   786 
   763 end
   787 	if GetGearType(gear) == gtRope then
       
   788 		ropeGear = nil
       
   789 	end
       
   790 
       
   791 end