share/hedgewars/Data/Maps/Basketball/map.lua
author koda
Thu, 01 Apr 2010 00:21:00 +0000
changeset 3223 f0e590790f3b
parent 3197 e1fa864fd6ca
child 3235 c7ceda2f5d4a
permissions -rw-r--r--
credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current fixed diglett hat szczur updated locale
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3004
e9b3613cc3fb Engine:
smxx
parents: 3003
diff changeset
     1
-- Hedgewars - Basketball for 2+ Players
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     2
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     3
local caption = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     4
	["en"] = "Hedgewars-Basketball",
3050
smxx
parents: 3004
diff changeset
     5
	["de"] = "Hedgewars-Basketball",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
     6
	["es"] = "Hedgewars-Baloncesto",
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
     7
	["pl"] = "Hedgewars-Koszykówka"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     8
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     9
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    10
local subcaption = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    11
	["en"] = "Not So Friendly Match",
3050
smxx
parents: 3004
diff changeset
    12
	["de"] = "Kein-so-Freundschaftsspiel",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    13
	["es"] = "Partido no-tan-amistoso",
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    14
	["pl"] = "Mecz Nie-Taki-Towarzyski"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    15
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    16
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    17
local goal = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    18
	["en"] = "Bat your opponents through the|baskets and out of the map!",
3050
smxx
parents: 3004
diff changeset
    19
	["de"] = "Schlage deine Widersacher durch|die Körbe und aus der Karte hinaus!",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    20
	["es"] = "¡Batea a tus oponentes fuera del mapa a través de la canasta!",
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    21
	["pl"] = "Spałuj swoich przekiwników|wyrzucając ich przez kosz, za mapę!"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    22
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    23
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    24
local scored = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    25
	["en"] = " scored a point!",
3050
smxx
parents: 3004
diff changeset
    26
	["de"] = " erhält einen Punkt!",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    27
	["es"] = " anotó un tanto!",
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    28
	["pl"] = " zdobył punkt!"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    29
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    30
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    31
local failed = {
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    32
	["en"] = " scored a penalty!",
3050
smxx
parents: 3004
diff changeset
    33
	["de"] = " erhält eine Strafe!",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    34
	["es"] = " anotó una falta!",
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    35
	["pl"] = " zdobył punkt karny!"
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    36
	}
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    37
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    38
	local sscore = {
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    39
	["en"] = "Score",
3050
smxx
parents: 3004
diff changeset
    40
	["de"] = "Punktestand",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    41
	["es"] = "Puntuación",
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    42
	["pl"] = "Punktacja"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    43
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    44
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    45
local team = {
3050
smxx
parents: 3004
diff changeset
    46
	["en"] = "Team",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    47
	["es"] = "Equipo",
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    48
	["pl"] = "Drużyna"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    49
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    50
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    51
local drowning = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    52
	["en"] = "is out and",
3050
smxx
parents: 3004
diff changeset
    53
	["de"] = "ist draußen und",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    54
	["es"] = "cayó y",
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    55
	["en"] = "jest wyautowany i",
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    56
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    57
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    58
local function loc(text)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    59
	if text == nil then return "**missing**"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    60
	elseif text[L] == nil then return text["en"]
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    61
	else return text[L]
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    62
	end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    63
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    64
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    65
---------------------------------------------------------------
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    66
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    67
local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    68
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    69
function onGameInit()
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    70
	GameFlags = gfSolidLand + gfBorder + gfInvulnerable + gfLowGravity
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    71
	TurnTime = 20000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    72
	CaseFreq = 0
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    73
	LandAdds = 0
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    74
	Explosives = 0
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    75
	Delay = 500
3197
smxx
parents: 3050
diff changeset
    76
	SuddenDeathTurns = 99999 -- "disable" sudden death
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    77
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    78
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    79
function onGameStart()
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    80
	ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0);
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    81
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    82
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    83
function onGameTick()
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    84
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    85
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    86
function onAmmoStoreInit()
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    87
	SetAmmo(amBaseballBat, 9, 0, 0)
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    88
	SetAmmo(amSkip, 9, 0, 0)
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    89
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    90
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    91
function onGearAdd(gear)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    92
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    93
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    94
function onGearDelete(gear)
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    95
	if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    96
		local clan = GetHogClan(CurrentHedgehog)
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    97
		local s = GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " "
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    98
		if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    99
			score[clan] = score[clan] + 1
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   100
			s = s .. loc(scored)
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   101
		else
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   102
			score[clan] = score[clan] - 1
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   103
			s = s .. loc(failed)
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   104
		end
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   105
		s = s .. "| |" .. loc(sscore) .. ": " .. score[0]
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   106
		for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   107
		ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0)
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   108
	end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   109
end