44 --------------------------------------------------------------- |
49 --------------------------------------------------------------- |
45 |
50 |
46 local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} |
51 local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} |
47 |
52 |
48 function onGameInit() |
53 function onGameInit() |
49 GameFlags = gfSolidLand + gfBorder + gfInvulnerable + gfRandomOrder + gfLowGravity |
54 GameFlags = gfSolidLand + gfBorder + gfInvulnerable + gfLowGravity |
50 TurnTime = 20000 |
55 TurnTime = 20000 |
51 CaseFreq = 0 |
56 CaseFreq = 0 |
52 LandAdds = 0 |
57 LandAdds = 0 |
53 Explosives = 0 |
58 Explosives = 0 |
54 Delay = 0 |
59 Delay = 500 |
55 end |
60 end |
56 |
61 |
57 function onGameStart() |
62 function onGameStart() |
58 ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0); |
63 ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0); |
59 end |
64 end |
61 function onGameTick() |
66 function onGameTick() |
62 end |
67 end |
63 |
68 |
64 function onAmmoStoreInit() |
69 function onAmmoStoreInit() |
65 SetAmmo(amBaseballBat, 9, 0, 0) |
70 SetAmmo(amBaseballBat, 9, 0, 0) |
|
71 SetAmmo(amSkip, 9, 0, 0) |
66 end |
72 end |
67 |
73 |
68 function onGearAdd(gear) |
74 function onGearAdd(gear) |
69 end |
75 end |
70 |
76 |
71 function onGearDelete(gear) |
77 function onGearDelete(gear) |
72 if GetGearType(gear) == gtHedgehog then |
78 if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then |
73 local clan = GetHogClan(gear) |
79 local clan = GetHogClan(CurrentHedgehog) |
74 score[clan] = score[clan] + 1 |
80 local s = GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " " |
75 local s = loc(sscore) .. ": " .. score[0] |
81 if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then |
|
82 score[clan] = score[clan] + 1 |
|
83 s = s .. loc(scored) |
|
84 else |
|
85 score[clan] = score[clan] - 1 |
|
86 s = s .. loc(failed) |
|
87 end |
|
88 s = s .. "| |" .. loc(sscore) .. ": " .. score[0] |
76 for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end |
89 for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end |
77 ShowMission(loc(caption), loc(subcaption), GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " " .. loc(scored) .. "| |" .. s, -amBaseballBat, 0) |
90 ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0) |
78 end |
91 end |
79 end |
92 end |