changeset 12309 | 6b34067a6344 |
parent 12308 | 82951b9b3c2f |
child 12320 | a85212a8d0e0 |
12308:82951b9b3c2f | 12309:6b34067a6344 |
---|---|
126 |
126 |
127 local probability = {1,2,5,10,20,50,200,500,1000000}; |
127 local probability = {1,2,5,10,20,50,200,500,1000000}; |
128 local atktot = 0 |
128 local atktot = 0 |
129 local utiltot = 0 |
129 local utiltot = 0 |
130 |
130 |
131 local lastHog = nil |
|
131 local someHog = nil -- just for looking up the weps |
132 local someHog = nil -- just for looking up the weps |
132 |
133 |
133 local mode = nil |
134 local mode = nil |
134 |
135 |
135 function onParameters() |
136 function onParameters() |
308 runOnGears(StartingSetUp) |
309 runOnGears(StartingSetUp) |
309 runOnGears(ConvertValues) |
310 runOnGears(ConvertValues) |
310 end |
311 end |
311 |
312 |
312 function AssignHogAmmo() |
313 function AssignHogAmmo() |
313 -- Re-assign ammo to this guy, so that his entire ammo set will |
314 if (CurrentHedgehog ~= nil) then |
314 -- be visible during another player's turn |
315 -- Re-assign ammo to this guy, so that his entire ammo set will |
315 if lastHog ~= nil then |
316 -- be visible during another player's turn |
316 ConvertValues(lastHog) |
317 if lastHog ~= nil then |
317 end |
318 ConvertValues(lastHog) |
318 |
319 end |
319 -- Give the new hog what he is supposed to have, too |
320 |
320 ConvertValues(CurrentHedgehog) |
321 -- Give the new hog what he is supposed to have, too |
322 ConvertValues(CurrentHedgehog) |
|
323 |
|
324 lastHog = CurrentHedgehog |
|
325 end |
|
321 end |
326 end |
322 |
327 |
323 function onNewTurn() |
328 function onNewTurn() |
324 AssignHogAmmo() |
329 AssignHogAmmo() |
325 end |
330 end |