--- a/share/hedgewars/Data/Maps/Basketball/map.lua Fri Nov 25 13:53:22 2016 +0100
+++ b/share/hedgewars/Data/Maps/Basketball/map.lua Fri Nov 25 14:06:00 2016 +0100
@@ -2,8 +2,6 @@
HedgewarsScriptLoad("/Scripts/Locale.lua")
-local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0}
-
local started = false
function onGameInit()
@@ -24,39 +22,11 @@
started = true
end
-function onGameTick()
-end
-
function onAmmoStoreInit()
SetAmmo(amBaseballBat, 9, 0, 0, 0)
SetAmmo(amSkip, 9, 0, 0, 0)
end
-function onGearAdd(gear)
-end
-
-function onGearDelete(gear)
- if not started then
- return
- end
- if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then
- local clan = GetHogClan(CurrentHedgehog)
- local s
- if clan ~= nil then
- if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then
- score[clan] = score[clan] + 1
- s = string.format(loc("%s is out and Team %d|scored a point!| |Score:"), GetHogName(gear), clan + 1)
- else
- score[clan] = score[clan] - 1
- s = string.format(loc("%s is out and Team %d|scored a penalty!| |Score:"), GetHogName(gear), clan + 1)
- end
- s = s .. " " .. score[0]
- for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end
- ShowMission(loc("Basketball"), loc("Not So Friendly Match"), s, -amBaseballBat, 0)
- end
- end
-end
-
function onNewTurn()
SetWeapon(amBaseballBat)
end