share/hedgewars/Data/Scripts/Multiplayer/Continental_supplies.lua
changeset 10527 285b428f391c
parent 10453 7e90d5856d56
child 10956 80c3314f8123
equal deleted inserted replaced
10526:b43d175d1577 10527:285b428f391c
     1 --[[
     1 --[[
     2 Made for 0.9.20
     2 Made for 0.9.21
     3 
     3 
     4 Copyright (C) 2012 Vatten
     4 Copyright (C) 2012 Vatten
     5 
     5 
     6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
     6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
     7 
     7 
    42 	else
    42 	else
    43 		return 1
    43 		return 1
    44 	end
    44 	end
    45 end
    45 end
    46 
    46 
    47 function EndTurn(baseRetreatTime)
    47 function EndTurn()
    48 	local retreatTimePercentage = 100
       
    49 	SetState(CurrentHedgehog,bor(GetState(CurrentHedgehog),gstAttacked))
    48 	SetState(CurrentHedgehog,bor(GetState(CurrentHedgehog),gstAttacked))
    50 	TurnTimeLeft = baseRetreatTime / 100 * retreatTimePercentage
    49 	--3 sec espace time
    51  end
    50 	TurnTimeLeft = GetAwayTime*10*3
       
    51 end
    52 
    52 
    53 --for sundaland
    53 --for sundaland
    54 local turnhog=0
    54 local turnhog=0
    55 
    55 
    56 local teams_ok = {}
    56 local teams_ok = {}
  1034 	
  1034 	
  1035 	--african special
  1035 	--african special
  1036 	if(africanSpecial == 1 and GetCurAmmoType() == amSeduction and band(GetState(CurrentHedgehog),gstAttacked)==0)
  1036 	if(africanSpecial == 1 and GetCurAmmoType() == amSeduction and band(GetState(CurrentHedgehog),gstAttacked)==0)
  1037 	then
  1037 	then
  1038 		--SetState(CurrentHedgehog, gstAttacked)
  1038 		--SetState(CurrentHedgehog, gstAttacked)
  1039 		EndTurn(3000)
  1039 		EndTurn()
  1040 		
  1040 		
  1041 		temp_val=0
  1041 		temp_val=0
  1042 		runOnGears(weapon_duststorm)
  1042 		runOnGears(weapon_duststorm)
  1043 		SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+temp_val)
  1043 		SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+temp_val)
  1044 
  1044 
  1095 				PlaySound(sndThrowRelease)
  1095 				PlaySound(sndThrowRelease)
  1096 				AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-20, gtCluster, 0, 0, -1000000, 32)
  1096 				AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog)-20, gtCluster, 0, 0, -1000000, 32)
  1097 			end
  1097 			end
  1098 		end
  1098 		end
  1099 		
  1099 		
  1100 		EndTurn(3000)
  1100 		EndTurn()
  1101 		
  1101 		
  1102 		DeleteVisualGear(visualcircle)
  1102 		DeleteVisualGear(visualcircle)
  1103 		visualcircle=nil
  1103 		visualcircle=nil
  1104 		kergulenSpecial=0
  1104 		kergulenSpecial=0
  1105 		
  1105