merge
authornemo
Sun, 27 Feb 2011 18:03:33 -0500 (2011-02-27)
changeset 4971 98c5b7a0630a
parent 4970 039771ae3f65 (current diff)
parent 4953 ebd3dae634ca (diff)
child 4972 2f9c8a12edce
merge
--- a/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua	Sun Feb 27 21:45:37 2011 +0300
+++ b/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua	Sun Feb 27 18:03:33 2011 -0500
@@ -1,5 +1,5 @@
 --------------------------------
--- CTF_BLIZZARD 0.6
+-- CTF_BLIZZARD 0.8
 --------------------------------
 
 ---------
@@ -73,9 +73,16 @@
 ------------
 
 -- hopefully fixed a bug with the teleporters
+-- added a fix for crate possibly getting imbedded in land when it was near the water line
 
--- added a fix for crate possibly getting imbedded in land when it was near
--- the water line
+-----------
+-- 0.8
+------------
+
+-- fixed version control fail with missing check on onGearDelete
+
+-- changed hog placements code so that they start in the same place for both teams
+-- and hogs move in the same order, not backwards to each other.
 
 loadfile(GetDataPath() .. "Scripts/Locale.lua")()
 
@@ -591,7 +598,7 @@
 					team1Placed = 0
 				end
 			elseif GetHogClan(hhs[g]) == 1 then
-				SetGearPosition(hhs[g],2230+ ((team2Placed+1)*50),1570)
+				SetGearPosition(hhs[g],2691- ((team2Placed+1)*50),1570)
 				team2Placed = team2Placed +1
 				if team2Placed > 6 then
 					team2Placed = 0
@@ -707,6 +714,8 @@
 
 	SetAmmo(amFirePunch, 9, 0, 0, 0)
 	SetAmmo(amBaseballBat, 2, 0, 0, 0)
+	--SetAmmo(amKamikaze, 2, 0, 0, 0)
+
 
 	SetAmmo(amDynamite,2,0,0,1)
 	SetAmmo(amSMine,4,0,0,0)
@@ -788,4 +797,18 @@
 		ropeGear = nil
 	end
 
+	if GetGearType(gear) == gtHedgehog then
+		for i = 0, (numhhs-1) do
+			if gear == hhs[i] then
+				
+				for k = 0,1 do
+					if gear == fThief[k] then
+						FlagThiefDead(gear)
+					end
+				end				
+				hhs[i] = nil	
+			end		
+		end
+	end
+
 end
--- a/share/hedgewars/Data/Maps/Control/map.lua	Sun Feb 27 21:45:37 2011 +0300
+++ b/share/hedgewars/Data/Maps/Control/map.lua	Sun Feb 27 18:03:33 2011 -0500
@@ -1,8 +1,6 @@
---------------------------------
--- CONTROL 0.3
 --------------------------------
-
--- in this version
+-- CONTROL 0.5
+--------------------------------
 
 ---------
 -- 0.2
@@ -30,6 +28,13 @@
 
 -- added scaling scoring based on clans: 300 points to win - 25 per team in game
 
+--------
+-- 0.5
+--------
+
+-- removed user branding
+-- fixed infinite attack time exploit
+
 -----------------
 --script begins
 -----------------
@@ -42,13 +47,15 @@
 ----------to read about tables properly
 ------------------ "Oh well, they probably have the memory"
 
+local TimeCounter = 0
+
 local gameWon = false
 local pointLimit = 300
 
 local vCirc = {}
 local vCircCount = 0
 
-local hGCount = 0
+--local hGCount = 0
 
 local vCircX = {}
 local vCircY = {}
@@ -288,8 +295,6 @@
 
 function onGameStart()
 
-	
-
 	-- build zones
 	cPoint[0] = CreateZone(571,47,120,80)
 	cPoint[1] = CreateZone(1029,643,120,80)
@@ -347,7 +352,7 @@
 		--AddCaption(zz) -- number of times it took to work
 	end
 
-	ShowMission(loc("CONTROL v0.3"), loc("by mikade"), loc("Control pillars to score points.") .. "|" .. loc("Goal:") .. " " .. pointLimit .. " " .. loc("points"), 0, 0)
+	ShowMission(loc("CONTROL v0.3"), loc(""), loc("Control pillars to score points.") .. "|" .. loc("Goal:") .. " " .. pointLimit .. " " .. loc("points"), 0, 0)
 
 
 end
@@ -355,6 +360,8 @@
 
 function onNewTurn()
 
+	-- reset the time counter so that it will get set to TurnTimeLeft in onGameTick	
+	TimeCounter = 0
 		
 	if lastTeam ~= GetHogTeamName(CurrentHedgehog) then
 		lastTeam = GetHogTeamName(CurrentHedgehog)
@@ -426,11 +433,26 @@
 
 	end
 
-	hGCount = hGCount + 1
-	if (hGCount >= 2000) and (gameWon == false) then
-		hGCount = 0
-		AwardPoints()
-	end
+	-- set TimeCounter to starting time if it is uninitialised (from onNewTurn)	
+	if (TimeCounter == 0) and (TurnTimeLeft > 0) then
+		TimeCounter = TurnTimeLeft	
+	end	
+	
+	-- has it ACTUALLY been 2 seconds since we last did this?	
+	if (TimeCounter - TurnTimeLeft) >= 2000 then
+		TimeCounter = TurnTimeLeft
+		
+		if (gameWon == false) then
+			AwardPoints()		
+		end	
+	end	
+	
+	--AddCaption(TimeCounter)	
+	--hGCount = hGCount + 1
+	--if (hGCount >= 2000) and (gameWon == false) then
+	--	hGCount = 0
+	--	AwardPoints()
+	--end
 
 end