share/hedgewars/Data/Scripts/Multiplayer/WxW.lua
changeset 13740 2bb7141496a9
parent 13687 a8b2a5e7e9db
child 13750 110d6c1e817f
equal deleted inserted replaced
13739:b3b55b03d499 13740:2bb7141496a9
   960 	if roundN == 1 then
   960 	if roundN == 1 then
   961 		PlaySound(sndPlaced)
   961 		PlaySound(sndPlaced)
   962 		SetInputMask(0xFFFFFFFF)
   962 		SetInputMask(0xFFFFFFFF)
   963 		AddCaption(loc("Configuration accepted."), msgColorTech, capgrpMessage)
   963 		AddCaption(loc("Configuration accepted."), msgColorTech, capgrpMessage)
   964 		if GetGameFlag(gfPlaceHog) then
   964 		if GetGameFlag(gfPlaceHog) then
   965 			TurnTimeLeft = PlacementTime
   965 			SetTurnTimeLeft(PlacementTime)
   966 			AddAmmo(CurrentHedgehog, amTeleport, 100)
   966 			AddAmmo(CurrentHedgehog, amTeleport, 100)
   967 			SetWeapon(amTeleport)
   967 			SetWeapon(amTeleport)
   968 			AddCaption(
   968 			AddCaption(
   969 				string.format(loc("%s, place the first hedgehog!"), GetHogTeamName(CurrentHedgehog)),
   969 				string.format(loc("%s, place the first hedgehog!"), GetHogTeamName(CurrentHedgehog)),
   970 				0xFFFFFFFF,
   970 				0xFFFFFFFF,
   971 				capgrpMessage2
   971 				capgrpMessage2
   972 			)
   972 			)
   973 			roundN = 2
   973 			roundN = 2
   974 		else
   974 		else
   975 			TurnTimeLeft = TurnTime
   975 			SetTurnTimeLeft(TurnTime)
   976 			AddCaption(string.format(loc("Let's go, %s!"), GetHogTeamName(CurrentHedgehog)), capcolDefault, capgrpMessage2)
   976 			AddCaption(string.format(loc("Let's go, %s!"), GetHogTeamName(CurrentHedgehog)), capcolDefault, capgrpMessage2)
   977 			roundN = 100
   977 			roundN = 100
   978 			wallsLeft = #wTouched
   978 			wallsLeft = #wTouched
   979 			allowCrate = true
   979 			allowCrate = true
   980 		end
   980 		end
  1278 
  1278 
  1279 	if GetGameFlag(gfPlaceHog) then
  1279 	if GetGameFlag(gfPlaceHog) then
  1280 		if roundN < 2 then
  1280 		if roundN < 2 then
  1281 			SetWeapon(amSkip)
  1281 			SetWeapon(amSkip)
  1282 			AddAmmo(CurrentHedgehog, amTeleport, 0)
  1282 			AddAmmo(CurrentHedgehog, amTeleport, 0)
  1283 			TurnTimeLeft = -1
  1283 			SetTurnTimeLeft(cMaxTurnTime)
  1284 			SetInputMask(0)
  1284 			SetInputMask(0)
  1285 		end
  1285 		end
  1286 		if roundN == 2 then
  1286 		if roundN == 2 then
  1287 			if turnsCount > hogCount then
  1287 			if turnsCount > hogCount then
  1288 				roundN = 100
  1288 				roundN = 100
  1335 	else
  1335 	else
  1336 		allowCrate = false
  1336 		allowCrate = false
  1337 	end
  1337 	end
  1338 
  1338 
  1339 	if roundN == 1 then
  1339 	if roundN == 1 then
  1340 		TurnTimeLeft = -1
  1340 		SetTurnTimeLeft(cMaxTurnTime)
  1341 		SetInputMask(0)
  1341 		SetInputMask(0)
  1342 		allowCrate = false
  1342 		allowCrate = false
  1343 		UpdateMenu()
  1343 		UpdateMenu()
  1344 		AddCaption(string.format(loc("%s may choose the rules."), GetHogTeamName(CurrentHedgehog)), msgColorTech, capgrpGameState)
  1344 		AddCaption(string.format(loc("%s may choose the rules."), GetHogTeamName(CurrentHedgehog)), msgColorTech, capgrpGameState)
  1345 		HandleStartingStage()
  1345 		HandleStartingStage()