From 1eebe15fa19d0a6a15b9185ee28388c2b72e795c Mon Sep 17 00:00:00 2001 From: Maikel de Vries Date: Sun, 3 Jan 2016 16:01:37 +0100 Subject: [PATCH] dark mine: king of the hill as scenario option --- planet/Arena.ocf/DarkMine.ocs/DescDE.txt | 12 ++++---- planet/Arena.ocf/DarkMine.ocs/DescUS.txt | 9 +++--- .../Arena.ocf/DarkMine.ocs/ParameterDefs.txt | 5 ++++ planet/Arena.ocf/DarkMine.ocs/Script.c | 29 +++++++++++++++++++ planet/Arena.ocf/DarkMine.ocs/StringTblDE.txt | 4 ++- planet/Arena.ocf/DarkMine.ocs/StringTblUS.txt | 4 ++- 6 files changed, 51 insertions(+), 12 deletions(-) diff --git a/planet/Arena.ocf/DarkMine.ocs/DescDE.txt b/planet/Arena.ocf/DarkMine.ocs/DescDE.txt index c5e792973..c1c72550c 100644 --- a/planet/Arena.ocf/DarkMine.ocs/DescDE.txt +++ b/planet/Arena.ocf/DarkMine.ocs/DescDE.txt @@ -1,10 +1,10 @@ - Dunkle Mine +Dunkle Mine -Du befindest dich in einer verlassenen Mine, die noch immer Gold enthalten soll. Wenn du deine Widersacher ausschalten kannst, kannst du das Gold für dich beanspruchen. In der Mine sind noch einige Loren, gefüllt mit Sprengstoffen und anderem Werkzeug. Nutze dies, um deine Gegner zu täuschen und in die Falle zu locken. +Du befindest dich in einer verlassenen Mine, die noch immer Gold enthalten soll. Wenn du deine Widersacher ausschalten kannst, kannst du das Gold für dich beanspruchen. In der Mine sind noch einige Loren, gefüllt mit Sprengstoffen und anderem Werkzeug. Nutze dies, um deine Gegner zu täuschen und in die Falle zu locken. -Ziel: Last Man Standing (Bleibe als letzter am Leben) +Ziel: Eliminiere deinen Gegner. -- Variable Anzahl Relaunches einstellbar. +- Drei Spielziele einstellbar. +- Variable Anzahl Relaunches/Kills/Punkte einstellbar. - Nutze die Dunkelheit zu deinem Vorteil. -- Die Loren enthalten nützliche Ausrüstung. - +- Die Loren enthalten nützliche Ausrüstung. \ No newline at end of file diff --git a/planet/Arena.ocf/DarkMine.ocs/DescUS.txt b/planet/Arena.ocf/DarkMine.ocs/DescUS.txt index 7b6d0a9e0..8bb63f9eb 100644 --- a/planet/Arena.ocf/DarkMine.ocs/DescUS.txt +++ b/planet/Arena.ocf/DarkMine.ocs/DescUS.txt @@ -1,9 +1,10 @@ - Dark Mine +Dark Mine You find yourself in an abandoned mine with competitors, the last one standing can claim all the gold. The mines are dark because all torches have been burned up, but they left their lorries with valuable explosives and other mining equipment. Use these to deceive, trap and eliminate your opponents. -Goal: Last Man Standing (Be the last one alive to win) +Goal: Eliminate your opponents. -- Amount of relaunches is variable. +- Choose between three different goals. +- Amount of relaunches/kills/points is variable. - Use the dark caves to your advantage. -- The lorries contain explosives, mining tools and more. +- The lorries contain explosives, mining tools and more. \ No newline at end of file diff --git a/planet/Arena.ocf/DarkMine.ocs/ParameterDefs.txt b/planet/Arena.ocf/DarkMine.ocs/ParameterDefs.txt index 52d36a924..915329f04 100644 --- a/planet/Arena.ocf/DarkMine.ocs/ParameterDefs.txt +++ b/planet/Arena.ocf/DarkMine.ocs/ParameterDefs.txt @@ -15,6 +15,11 @@ Default=1 Name=$ModeLastManStanding$ Description=$DescModeLastManStanding$ Value=1 + + [Option] + Name=$ModeKingOfTheHill$ + Description=$DescModeKingOfTheHillg$ + Value=2 [ParameterDef] diff --git a/planet/Arena.ocf/DarkMine.ocs/Script.c b/planet/Arena.ocf/DarkMine.ocs/Script.c index 71cf95d79..f81853df9 100644 --- a/planet/Arena.ocf/DarkMine.ocs/Script.c +++ b/planet/Arena.ocf/DarkMine.ocs/Script.c @@ -13,6 +13,7 @@ static cave_list; // Game modes. static const GAMEMODE_Deathmatch = 0; static const GAMEMODE_LastManStanding = 1; +static const GAMEMODE_KingOfTheHill = 2; protected func Initialize() { @@ -21,6 +22,12 @@ protected func Initialize() CreateObject(Goal_DeathMatch); else if (SCENPAR_GameMode == GAMEMODE_LastManStanding) CreateObject(Goal_LastManStanding); + else if (SCENPAR_GameMode == GAMEMODE_KingOfTheHill) + { + var goal = CreateObject(Goal_KingOfTheHill, LandscapeWidth() / 2, LandscapeHeight() / 2); + goal->SetRadius(72); + goal->SetPointLimit(Max(SCENPAR_NrRelaunchesKills, 1)); + } CreateObject(Rule_KillLogs); CreateObject(Rule_Gravestones); @@ -66,6 +73,28 @@ public func WinKillCount() return Max(SCENPAR_NrRelaunchesKills, 1); } +// Forward callbacks to OnPlayerRelaunch for KotH goal. +protected func InitializePlayer(int plr) +{ + if (SCENPAR_GameMode == GAMEMODE_KingOfTheHill) + GameCall("OnPlayerRelaunch", plr, false); + return _inherited(plr, ...); +} + +// Forward callbacks to OnPlayerRelaunch for KotH goal. +protected func RelaunchPlayer(int plr, int killer) +{ + if (SCENPAR_GameMode == GAMEMODE_KingOfTheHill) + { + var clonk = CreateObjectAbove(Clonk, 0, 0, plr); + clonk->MakeCrewMember(plr); + SetCursor(plr, clonk); + clonk->DoEnergy(100000); + GameCall("OnPlayerRelaunch", plr, true); + } + return _inherited(plr, killer); +} + // Callback from the last man standing and deathmatch goal. // Takes over the role of initializing the player. protected func OnPlayerRelaunch(int plr, bool is_relaunch) diff --git a/planet/Arena.ocf/DarkMine.ocs/StringTblDE.txt b/planet/Arena.ocf/DarkMine.ocs/StringTblDE.txt index a569dc128..7e775c4e7 100644 --- a/planet/Arena.ocf/DarkMine.ocs/StringTblDE.txt +++ b/planet/Arena.ocf/DarkMine.ocs/StringTblDE.txt @@ -5,7 +5,9 @@ ModeDeathmatch=Deathmatch DescModeDeathmatch=The first player to reach the required number of kills wins the round. ModeLastManStanding=Last Man Standing DescModeLastManStanding=The last surviving player wins the round. +ModeKingOfTheHill=King Of The Hill +DescModeKingOfTheHill=The one making the required number of kills as the king survives. # Scenario parameters: number of relaunches -NrRelaunchesKills=Kills (DM) / Relaunches (LMS) +NrRelaunchesKills=Kills/Relaunches/Punkte DescNrRelaunchesKills=Number of needed kills to win a deathmatch round or number of additional relaunches for a last man standing round. diff --git a/planet/Arena.ocf/DarkMine.ocs/StringTblUS.txt b/planet/Arena.ocf/DarkMine.ocs/StringTblUS.txt index b37a6fad2..36d9d6546 100644 --- a/planet/Arena.ocf/DarkMine.ocs/StringTblUS.txt +++ b/planet/Arena.ocf/DarkMine.ocs/StringTblUS.txt @@ -5,7 +5,9 @@ ModeDeathmatch=Deathmatch DescModeDeathmatch=The first player to reach the required number of kills wins the round. ModeLastManStanding=Last Man Standing DescModeLastManStanding=The last surviving player wins the round. +ModeKingOfTheHill=King Of The Hill +DescModeKingOfTheHill=The one making the required number of kills as the king survives. # Scenario parameters: number of relaunches -NrRelaunchesKills=Kills (DM) / Relaunches (LMS) +NrRelaunchesKills=Kills/Relaunches/Points DescNrRelaunchesKills=Number of needed kills to win a deathmatch round or number of additional relaunches for a last man standing round.