Control: Remove tardis and resurrector
authorWuzzy <Wuzzy2@mail.ru>
Thu, 08 Mar 2018 01:12:35 +0100
changeset 13102 a4872ca7f17c
parent 13101 b500d07a50a1
child 13103 cf2a58dccc4a
Control: Remove tardis and resurrector
ChangeLog.txt
share/hedgewars/Data/Maps/Control/map.lua
--- a/ChangeLog.txt	Thu Mar 08 00:54:12 2018 +0100
+++ b/ChangeLog.txt	Thu Mar 08 01:12:35 2018 +0100
@@ -49,6 +49,7 @@
  + Battalion (King Mode): If the king dies, the hogs die normally instead of disappearing
  + Space Invasion: Add a default Space Invasion game scheme
  + HedgeEditor: Show cursor coordinates in top left corner
+ + Control: Remove TimeBox and Resurrector from ammo menu
  * Battalion: Some texts in the mission panel were wrong and misleading
  * Construction Mode: Remove drill strike if added by weapon scheme (it's broken)
 
--- a/share/hedgewars/Data/Maps/Control/map.lua	Thu Mar 08 00:54:12 2018 +0100
+++ b/share/hedgewars/Data/Maps/Control/map.lua	Thu Mar 08 01:12:35 2018 +0100
@@ -317,9 +317,9 @@
 function onGameInit()
 
 	-- Things we don't modify here will use their default values.
-	--GameFlags = gfInfAttack + gfSolidLand -- Game settings and rules
 	
-	GameFlags = band(bor(GameFlags, gfInfAttack + gfSolidLand), bnot(gfKing + gfForts))
+	EnableGameFlags(gfInfAttack, gfSolidLand)
+	DisableGameFlags(gfKing, gfForts)
 	WaterRise = 0
 	HealthDecrease = 0
 
@@ -385,6 +385,15 @@
 		--AddCaption(zz) -- number of times it took to work
 	end
 
+	for h=1, numhhs do
+		-- Tardis screws up the game too much, teams might not get killed correctly after victory
+		-- if a hog is still in time-travel.
+		-- This could be fixed, removing the Tardis is just a simple and lazy fix.
+		AddAmmo(hhs[h], amTardis, 0)
+		-- Resurrector is pointless, all hogs are already automatically resurrected.
+		AddAmmo(hhs[h], amResurrector, 0)
+	end
+
 	ShowMission(missionName, missionCaption, missionHelp, 0, 0)
 
 end