share/hedgewars/Data/Scripts/Multiplayer/The_Specialists.lua
changeset 14563 90c215f83273
parent 14528 e176bf229649
equal deleted inserted replaced
14562:3be619402d6b 14563:90c215f83273
    24 
    24 
    25   S = Soldier
    25   S = Soldier
    26   E = Engineer
    26   E = Engineer
    27   N = Ninja
    27   N = Ninja
    28   D = Demo
    28   D = Demo
    29   I = Sniper
    29   X = Sniper
    30   A = Saint
    30   H = Saint
    31   P = Pyro
    31   P = Pyro
    32   L = Loon
    32   L = Loon
    33 
    33 
    34 == Examples ==
    34 == Examples ==
    35 Example 1:
    35 Example 1:
    38 
    38 
    39 4 soldiers and 4 pyros for all teams.
    39 4 soldiers and 4 pyros for all teams.
    40 
    40 
    41 Example 2:
    41 Example 2:
    42 
    42 
    43     t1=LPAIDNES,t2=NNNNNNNN
    43     t1=LPHXDNES,t2=NNNNNNNN
    44 
    44 
    45 Team 1: Loon, Pyro, Saint, Sniper, Demo, Ninja, Engineer, Soldier.
    45 Team 1: Loon, Pyro, Saint, Sniper, Demo, Ninja, Engineer, Soldier.
    46 Team 2: All-ninja team.
    46 Team 2: All-ninja team.
    47 All other teams use the default settings.
    47 All other teams use the default settings.
    48 
    48 
    59 HedgewarsScriptLoad("/Scripts/Params.lua")
    59 HedgewarsScriptLoad("/Scripts/Params.lua")
    60 
    60 
    61 -- default team values
    61 -- default team values
    62 local currTeamIdx = 0;
    62 local currTeamIdx = 0;
    63 local teamRoles = {
    63 local teamRoles = {
    64 	{'S','E','N','D','I','A','P','L'},
    64 	{'S','E','N','D','X','H','P','L'},
    65 	{'S','E','N','D','I','A','P','L'},
    65 	{'S','E','N','D','X','H','P','L'},
    66 	{'S','E','N','D','I','A','P','L'},
    66 	{'S','E','N','D','X','H','P','L'},
    67 	{'S','E','N','D','I','A','P','L'},
    67 	{'S','E','N','D','X','H','P','L'},
    68 	{'S','E','N','D','I','A','P','L'},
    68 	{'S','E','N','D','X','H','P','L'},
    69 	{'S','E','N','D','I','A','P','L'},
    69 	{'S','E','N','D','X','H','P','L'},
    70 	{'S','E','N','D','I','A','P','L'},
    70 	{'S','E','N','D','X','H','P','L'},
    71 	{'S','E','N','D','I','A','P','L'}
    71 	{'S','E','N','D','X','H','P','L'}
    72 };
    72 };
    73 
    73 
    74 local numhhs = 0
    74 local numhhs = 0
    75 local hhs = {}
    75 local hhs = {}
    76 
    76 
   120 		SetAmmo(amFirePunch, 1, 0, 0, 0)
   120 		SetAmmo(amFirePunch, 1, 0, 0, 0)
   121 	elseif teamRoles[groupIndex][hogIndex] == 'D' then
   121 	elseif teamRoles[groupIndex][hogIndex] == 'D' then
   122 		SetAmmo(amDynamite, 1, 0, 0, 0)
   122 		SetAmmo(amDynamite, 1, 0, 0, 0)
   123 		SetAmmo(amMine, 1, 0, 0, 0)
   123 		SetAmmo(amMine, 1, 0, 0, 0)
   124 		SetAmmo(amDrill, 1, 0, 0, 0)
   124 		SetAmmo(amDrill, 1, 0, 0, 0)
   125 	elseif teamRoles[groupIndex][hogIndex] == 'I' then
   125 	elseif teamRoles[groupIndex][hogIndex] == 'X' then
   126 		SetAmmo(amSniperRifle, 1, 0, 0, 0)
   126 		SetAmmo(amSniperRifle, 1, 0, 0, 0)
   127 		SetAmmo(amDEagle, 1, 0, 0, 0)
   127 		SetAmmo(amDEagle, 1, 0, 0, 0)
   128 		SetAmmo(amPortalGun, 2, 0, 0, 0)
   128 		SetAmmo(amPortalGun, 2, 0, 0, 0)
   129 	elseif teamRoles[groupIndex][hogIndex] == 'A' then
   129 	elseif teamRoles[groupIndex][hogIndex] == 'H' then
   130 		SetAmmo(amSeduction, 9, 0, 0, 0)
   130 		SetAmmo(amSeduction, 9, 0, 0, 0)
   131 		SetAmmo(amResurrector, 1, 0, 0, 0)
   131 		SetAmmo(amResurrector, 1, 0, 0, 0)
   132 		SetAmmo(amInvulnerable, 1, 0, 0, 0)
   132 		SetAmmo(amInvulnerable, 1, 0, 0, 0)
   133 		SetAmmo(amLowGravity, 1, 0, 0, 0)
   133 		SetAmmo(amLowGravity, 1, 0, 0, 0)
   134 	elseif teamRoles[groupIndex][hogIndex] == 'P' then
   134 	elseif teamRoles[groupIndex][hogIndex] == 'P' then
   195 
   195 
   196 			SetHogName(hhs[i],loc("Demo"))
   196 			SetHogName(hhs[i],loc("Demo"))
   197 			SetHogHat(hhs[i], "Skull")
   197 			SetHogHat(hhs[i], "Skull")
   198 			SetHealth(hhs[i], scaleHealth(200))
   198 			SetHealth(hhs[i], scaleHealth(200))
   199 
   199 
   200 		elseif teamRoles[currTeamIdx][z] == 'I' then
   200 		elseif teamRoles[currTeamIdx][z] == 'X' then
   201 
   201 
   202 			SetHogName(hhs[i],loc("Sniper"))
   202 			SetHogName(hhs[i],loc("Sniper"))
   203 			SetHogHat(hhs[i], "Sniper")
   203 			SetHogHat(hhs[i], "Sniper")
   204 			SetHealth(hhs[i], scaleHealth(120))
   204 			SetHealth(hhs[i], scaleHealth(120))
   205 
   205 
   206 		elseif teamRoles[currTeamIdx][z] == 'A' then
   206 		elseif teamRoles[currTeamIdx][z] == 'H' then
   207 
   207 
   208 			SetHogName(hhs[i],loc("Saint"))
   208 			SetHogName(hhs[i],loc("Saint"))
   209 			SetHogHat(hhs[i], "angel")
   209 			SetHogHat(hhs[i], "angel")
   210 			SetHealth(hhs[i], scaleHealth(300))
   210 			SetHealth(hhs[i], scaleHealth(300))
   211 
   211