forked from Mirrors/openclonk
Maze (Heart of the Mountain) parameters for map size and coop/race mode added.
Medium (default) size is a bit smaller than the previous default, because the map got a lot harder due to fog anyway. Also removed superfluous Landscape.txt.issue1247
parent
c2d9e1b46e
commit
89c3f79398
|
@ -9,9 +9,12 @@
|
|||
#include Library_Goal
|
||||
|
||||
local goal_rect, has_winner;
|
||||
local is_cooperative;
|
||||
|
||||
protected func Initialize()
|
||||
{
|
||||
// default to race mode
|
||||
is_cooperative = false;
|
||||
return inherited(...);
|
||||
}
|
||||
|
||||
|
@ -21,6 +24,12 @@ func SetGoalRect(r)
|
|||
return true;
|
||||
}
|
||||
|
||||
func SetCooperative(bool to_val)
|
||||
{
|
||||
is_cooperative = to_val;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* Scenario saving */
|
||||
|
||||
|
@ -28,6 +37,7 @@ func SaveScenarioObject(props)
|
|||
{
|
||||
if (!inherited(props, ...)) return false;
|
||||
if (goal_rect) props->AddCall("Goal", this, "SetGoalRect", goal_rect);
|
||||
if (is_cooperative) props->AddCall("Goal", this, "SetCooperative", is_cooperative);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -58,6 +68,9 @@ public func IsFulfilled()
|
|||
for (var flag in [PLRZOOM_LimitMax, PLRZOOM_Direct])
|
||||
SetPlayerZoomByViewRange(plr,LandscapeWidth(),LandscapeWidth(),flag);
|
||||
SetPlayerViewLock(plr, false);
|
||||
SetFoW(false, plr);
|
||||
// Eliminate non-winning players
|
||||
if (is_cooperative) continue; // in coop mode, everyone wins
|
||||
if (GetIndexOf(winners, plr) >= 0) continue;
|
||||
if (winner_teams) if (GetIndexOf(winner_teams, GetPlayerTeam(plr)) >= 0) continue;
|
||||
EliminatePlayer(plr);
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
/*--
|
||||
Cool Cavern
|
||||
Author: Maikel
|
||||
|
||||
Cavern with lots of snow, ice, rock and dirt.
|
||||
--*/
|
||||
|
||||
|
||||
// Randomly placed material specks according to rndchecker.
|
||||
overlay MatRC {
|
||||
algo=rndchecker; a=8;
|
||||
zoomX=-50; zoomY=-50;
|
||||
turbulence=100; loosebounds=1;
|
||||
};
|
||||
|
||||
// Fills an overlay with earth and materials.
|
||||
overlay MatFill {
|
||||
overlay { mat=Earth; tex=earth_dry; loosebounds=1; };
|
||||
MatRC { mat=Ore; tex=ore; a=20; };
|
||||
MatRC { mat=Snow; tex=snow1; a=20; };
|
||||
MatRC { mat=Granite; tex=granite; a=20; };
|
||||
MatRC { mat=Rock; tex=rock; a=20; };
|
||||
MatRC { mat=Ore; tex=ore; a=20; };
|
||||
MatRC { mat=Ice; tex=ice3; a=20; };
|
||||
MatRC { mat=Snow; tex=snow1; a=20; };
|
||||
MatRC { mat=Ice; tex=ice3; };
|
||||
MatRC { mat=Rock; tex=rock; };
|
||||
MatRC { mat=Tunnel; tex=tunnel; };
|
||||
MatRC { mat=Earth; tex=earth_dry; };
|
||||
MatRC { mat=Earth; tex=earth_rough; };
|
||||
overlay {
|
||||
algo=lines; a=3; b=16;
|
||||
rotate=45;
|
||||
turbulence=100;
|
||||
mat=Tunnel; tex=tunnel;
|
||||
};
|
||||
overlay {
|
||||
algo=lines; a=3; b=16;
|
||||
rotate=-45;
|
||||
turbulence=100;
|
||||
mat=Tunnel; tex=tunnel;
|
||||
};
|
||||
};
|
||||
|
||||
// Randomly placed material specks according to bozo.
|
||||
overlay MatBozo {
|
||||
algo=bozo; a=5;
|
||||
turbulence=1000; loosebounds=1;
|
||||
};
|
||||
|
||||
// Fills an overlay with ice, tunnel, rock and granite.
|
||||
overlay BorderFill {
|
||||
overlay { mat=Rock; tex=rock; loosebounds=1;
|
||||
MatBozo { mat=Tunnel; tex=tunnel; };
|
||||
MatBozo { mat=Rock; tex=rock_cracked; a=6; };
|
||||
MatBozo { mat=Granite; tex=granite; a=14; };
|
||||
MatBozo { mat=Ice; tex=ice3; a=8; };
|
||||
MatBozo { mat=Tunnel; tex=tunnel; };
|
||||
};
|
||||
};
|
||||
|
||||
// A lengthy vertical cavern surrounded by ice, dirt and rock.
|
||||
map Cavern {
|
||||
overlay {
|
||||
// Cut cavern out of the landscape.
|
||||
x=40; wdt=20; y=-6; hgt=100;
|
||||
turbulence=100; lambda=4;
|
||||
loosebounds=1;
|
||||
} ^ overlay {
|
||||
// Fill remaining area with MatFill.
|
||||
MatFill;
|
||||
// And create a border around this area.
|
||||
overlay {
|
||||
algo=border; a=4; b=4;
|
||||
// Fill border with BorderFill.
|
||||
BorderFill;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -235,9 +235,14 @@ func DrawEnd()
|
|||
|
||||
protected func InitializeMap(map)
|
||||
{
|
||||
map->Resize(270,270);
|
||||
var s = SCENPAR_MapSize-1;
|
||||
//var d = SCENPAR_Difficulty-1;
|
||||
var map_size = [[120,120], [200,200], [330,330]][s];
|
||||
var find_cave_iterations = [100,150,300][s];
|
||||
|
||||
FindCaves(200);
|
||||
Resize(map_size[0],map_size[1]);
|
||||
|
||||
FindCaves(find_cave_iterations);
|
||||
FindCaveConnections();
|
||||
FindStart();
|
||||
MakeMaze();
|
||||
|
|
|
@ -48,7 +48,7 @@ func RelaunchPlayer(int plr)
|
|||
return LaunchPlayer(plr);
|
||||
}
|
||||
|
||||
func CreateBonus(int x, int y, int value)
|
||||
func CreateBonus(int x, int y, int value, bool is_cooperative)
|
||||
{
|
||||
var obj;
|
||||
if (Random(value) > 50)
|
||||
|
@ -89,11 +89,13 @@ protected func Initialize()
|
|||
var zoom = 10, cave, n_caves = GetLength(g_caves);
|
||||
for (cave in g_caves) { cave.X *= zoom; cave.Y *= zoom; }
|
||||
// Goal
|
||||
var is_cooperative = (SCENPAR_Goal == 1);
|
||||
var starting_cave = g_caves[0];
|
||||
var goal = FindObject(Find_ID(Goal_RubyHunt));
|
||||
if (!goal) goal = CreateObject(Goal_RubyHunt);
|
||||
goal->SetPosition();
|
||||
goal->SetGoalRect(Rectangle(0, starting_cave.Y-40, starting_cave.X-20, 40));
|
||||
goal->SetCooperative(is_cooperative);
|
||||
goal_cave = g_caves[n_caves-1];
|
||||
// Place extra elements in caves (except at start/end)
|
||||
for (cave in g_caves)
|
||||
|
@ -117,7 +119,7 @@ protected func Initialize()
|
|||
else if (!(cave.dirs & 8))
|
||||
{
|
||||
// Connecting cave without bottom
|
||||
CreateBonus(x, y, 25 + 25 * !cave.is_main_path);
|
||||
CreateBonus(x, y, 25 + 25 * !cave.is_main_path, is_cooperative);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -2,3 +2,31 @@ MsgGoalAbove=Das Ziel ist oberhalb von hier.
|
|||
MsgGoalBelow=Das Ziel ist unterhalb von hier.
|
||||
MsgGoalLeft=Das Ziel ist links von hier.
|
||||
MsgGoalRight=Das Ziel ist rechts von hier.
|
||||
|
||||
# Scenario parameters: goal
|
||||
Goal=Spielmodus
|
||||
DescGoal=Setzt das Spielziel auf mit- oder gegeneinander
|
||||
GoalCooperative=Kooperativ
|
||||
DescGoalCooperative=Spieler versuchen gemeinsam, einen Rubin zu finden.
|
||||
GoalRace=Wettrennen
|
||||
DescGoalRace=Der erste Spieler, der einen Rubin findet und zum Start zurück bringt, gewinnt die Runde.
|
||||
|
||||
# Scenario parameters: difficulty
|
||||
Difficulty=Schwierigkeit
|
||||
DescDifficulty=Setzt die Schwierigkeit dieser Runde.
|
||||
DiffNormal=Normal
|
||||
DescDiffNormal=Die Schwierigkeit dieser Runde ist normal.
|
||||
DiffHard=Schwer
|
||||
DescDiffHard=Die Schwierigkeit dieser Runde ist schwer.
|
||||
DiffInsane=Irrsinnig
|
||||
DescDiffInsane=Die Schwierigkeit dieser Runde ist irrsinnig.
|
||||
|
||||
# Scenario parameters: map size
|
||||
MapSize=Kartengröße
|
||||
DescMapSize=Setzt die Kartengröße dieser Runde.
|
||||
MapSmall=Klein
|
||||
DescMapSmall=Die Karte dieser Runde wird klein sein
|
||||
MapAverage=Durchschnittlich
|
||||
DescMapAverage=Die Karte dieser Runde wird durchschnittlich sein.
|
||||
MapLarge=Groß
|
||||
DescMapLarge=Die Karte dieser Runde wird groß sein.
|
||||
|
|
|
@ -1,4 +1,32 @@
|
|||
MsgGoalAbove=The goal is above this post.
|
||||
MsgGoalBelow=The goal is below this post.
|
||||
MsgGoalLeft=The goal is left of this post.
|
||||
MsgGoalRight=The goal is right of this post.
|
||||
MsgGoalRight=The goal is right of this post.
|
||||
|
||||
# Scenario parameters: goal
|
||||
Goal=Game mode
|
||||
DescGoal=Determines if players play with or against each other.
|
||||
GoalCooperative=Cooperative
|
||||
DescGoalCooperative=Players try together to find a ruby.
|
||||
GoalRace=Race
|
||||
DescGoalRace=The first player to find a ruby and return it home wins the round.
|
||||
|
||||
# Scenario parameters: difficulty
|
||||
Difficulty=Difficulty
|
||||
DescDifficulty=Sets this round's difficulty.
|
||||
DiffNormal=Normal
|
||||
DescDiffNormal=This round's difficulty will be set to normal.
|
||||
DiffHard=Hard
|
||||
DescDiffHard=This round's difficulty will be set to hard.
|
||||
DiffInsane=Insane
|
||||
DescDiffInsane=This round's difficulty will be set to insane.
|
||||
|
||||
# Scenario parameters: map size
|
||||
MapSize=Map size
|
||||
DescMapSize=Sets this round's map size.
|
||||
MapSmall=Small
|
||||
DescMapSmall=This round's map will be small.
|
||||
MapAverage=Average
|
||||
DescMapAverage=This round's map will be average.
|
||||
MapLarge=Large
|
||||
DescMapLarge=This round's map will be large.
|
||||
|
|
Loading…
Reference in New Issue