share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua
changeset 11982 6f4b96669f9d
parent 11981 acae870a66b9
child 12091 db5e12d623cc
equal deleted inserted replaced
11981:acae870a66b9 11982:6f4b96669f9d
    28 -- of the game. It is a comma-seperated list of key=value pairs, where each
    28 -- of the game. It is a comma-seperated list of key=value pairs, where each
    29 -- key is a word and each value is an integer between 0 and 4294967295.
    29 -- key is a word and each value is an integer between 0 and 4294967295.
    30 --
    30 --
    31 -- Possible keys:
    31 -- Possible keys:
    32 --- initialenergy: Amount of energy that each team starts with (default: 550)
    32 --- initialenergy: Amount of energy that each team starts with (default: 550)
       
    33 ---                Note: Must be smaller than or equal to maxenergy
    33 --- energyperround: Amount of energy that each team gets per round (default: 50)
    34 --- energyperround: Amount of energy that each team gets per round (default: 50)
    34 --- maxenergy: Maximum amount of energy each team can hold (default: 1000)
    35 --- maxenergy: Maximum amount of energy each team can hold (default: 1000)
    35 
    36 
    36 -- Example: “initialenergy=750, maxenergy=2000” starts thee game with 750 energy
    37 -- Example: “initialenergy=750, maxenergy=2000” starts thee game with 750 energy
    37 -- and sets the maximum energy to 2000
    38 -- and sets the maximum energy to 2000
  1592 
  1593 
  1593 	sCirc = AddVisualGear(0,0,vgtCircle,0,true)
  1594 	sCirc = AddVisualGear(0,0,vgtCircle,0,true)
  1594 	SetVisualGearValues(sCirc, 0, 0, 100, 255, 1, 10, 0, 40, 3, 0x00000000)
  1595 	SetVisualGearValues(sCirc, 0, 0, 100, 255, 1, 10, 0, 40, 3, 0x00000000)
  1595 
  1596 
  1596 	for i = 0, ClansCount-1 do
  1597 	for i = 0, ClansCount-1 do
  1597 		clanPower[i] = conf_initialEnergy
  1598 		clanPower[i] = math.min(conf_initialEnergy, conf_maxEnergy)
  1598 		clanLWepIndex[i] = 1 -- for ease of use let's track this stuff
  1599 		clanLWepIndex[i] = 1 -- for ease of use let's track this stuff
  1599 		clanLUtilIndex[i] = 1
  1600 		clanLUtilIndex[i] = 1
  1600 		clanLGearIndex[i] = 1
  1601 		clanLGearIndex[i] = 1
  1601 		clanUsedExtraTime[i] = false
  1602 		clanUsedExtraTime[i] = false
  1602 		clanCratesSpawned[i] = 0
  1603 		clanCratesSpawned[i] = 0