equal
deleted
inserted
replaced
57 local hogsLimit = 1 |
57 local hogsLimit = 1 |
58 |
58 |
59 local teamsDead = {} |
59 local teamsDead = {} |
60 local teamsDeleted = {} |
60 local teamsDeleted = {} |
61 local hogLimitHit = false |
61 local hogLimitHit = false |
|
62 local teamLimitHit = false |
62 local cnthhs |
63 local cnthhs |
63 |
64 |
64 local circles = {} |
65 local circles = {} |
65 local circleFrame = -1 |
66 local circleFrame = -1 |
66 |
67 |
155 DeleteGear(gear) |
156 DeleteGear(gear) |
156 end |
157 end |
157 end |
158 end |
158 |
159 |
159 function limitHogsClan(gear) |
160 function limitHogsClan(gear) |
160 hogLimitHit = true |
161 teamLimitHit = true |
161 SetEffect(gear, heResurrectable, 0) |
162 SetEffect(gear, heResurrectable, 0) |
162 setGearValue(gear, "excess", true) |
163 setGearValue(gear, "excess", true) |
163 DeleteGear(gear) |
164 DeleteGear(gear) |
164 end |
165 end |
165 |
166 |
195 -- Rule 2: One hog per team |
196 -- Rule 2: One hog per team |
196 for i=0 , TeamsCount - 1 do |
197 for i=0 , TeamsCount - 1 do |
197 cnthhs = 0 |
198 cnthhs = 0 |
198 runOnHogsInTeam(limitHogsTeam, GetTeamName(i)) |
199 runOnHogsInTeam(limitHogsTeam, GetTeamName(i)) |
199 end |
200 end |
|
201 if teamLimitHit then |
|
202 WriteLnToChat(loc("Only one team per clan allowed! Excess teams will be removed.")) |
|
203 end |
200 if hogLimitHit then |
204 if hogLimitHit then |
201 -- TODO: Update warning message to include excess teams as well |
|
202 WriteLnToChat(loc("Only one hog per team allowed! Excess hogs will be removed.")) |
205 WriteLnToChat(loc("Only one hog per team allowed! Excess hogs will be removed.")) |
203 end |
206 end |
204 trackTeams() |
207 trackTeams() |
205 showStartingInfo() |
208 showStartingInfo() |
206 end |
209 end |