share/hedgewars/Data/Scripts/Multiplayer/Highlander.lua
changeset 12321 1be56fa243c8
parent 12320 a85212a8d0e0
child 12340 f706ca71aa86
equal deleted inserted replaced
12320:a85212a8d0e0 12321:1be56fa243c8
   271 
   271 
   272 function onGameInit()
   272 function onGameInit()
   273 	EnableGameFlags(gfInfAttack, gfRandomOrder, gfPerHogAmmo)
   273 	EnableGameFlags(gfInfAttack, gfRandomOrder, gfPerHogAmmo)
   274 	DisableGameFlags(gfResetWeps, gfSharedAmmo)
   274 	DisableGameFlags(gfResetWeps, gfSharedAmmo)
   275 	HealthCaseProb = 100
   275 	HealthCaseProb = 100
   276 	Goals = loc("Highlander: Eliminate enemy hogs and take their weapons") .."|" ..
   276 	Goals = loc("Highlander: Eliminate enemy hogs to take their weapons") .. "|" ..
   277 	loc("Constant Weaponry: Weapons are reset on end of turn")
   277 	loc("Replenishment: Weapons are restocked on turn start of a new hog")
   278 end
   278 end
   279 
   279 
   280 function onGameStart()
   280 function onGameStart()
   281     utilChoices[amSkip] = 0
   281     utilChoices[amSkip] = 0
   282     local c = 0
   282     local c = 0
   311 	runOnGears(ConvertValues)
   311 	runOnGears(ConvertValues)
   312 end
   312 end
   313 
   313 
   314 function CheckForHogSwitch()
   314 function CheckForHogSwitch()
   315 
   315 
       
   316 	--[[ Restock the weapons of the hog on turn start, provided it is not the same hog as before.
       
   317 	This exception is done do avoid a single hog receiving tons of weapons when it is the only unfrozen
       
   318 	hog and takes consecutive turns. ]]
       
   319 
   316 	if (CurrentHedgehog ~= nil) then
   320 	if (CurrentHedgehog ~= nil) then
   317 
   321 
   318 		currHog = CurrentHedgehog
   322 		currHog = CurrentHedgehog
   319 
   323 
   320 		if currHog ~= lastHog then
   324 		if currHog ~= lastHog then