Iron Peak game goal is now metal production and expansion

issue1247
Maikel de Vries 2014-07-06 18:13:09 +02:00
parent a08b5bcdb8
commit 4967b07a39
7 changed files with 123 additions and 116 deletions

View File

@ -1,5 +1,5 @@
Name=Ausdehnung
Name=Ausbreitung
#Goal window
MsgGoalFulfilled=Du hast deine Ausdehnungsziele erreicht.
MsgGoalFulfilled=Du hast deine Ausbreitungsziele erreicht.
MsgGoalUnFulfilled=Dehne deine Herrschaft aus, durch das bauen der Flaggen. Momentan kontrollierst du erst %d% der gefragter Herrschaft.

View File

@ -27,7 +27,6 @@ protected func InitializeMap(proplist map)
// Set the map size.
map->Resize(map_size[0], map_size[1]);
// Draw the main surface: a mountain with the polygon algorithm.
var wdt = map.Wdt;
var hgt = map.Hgt;
@ -99,6 +98,5 @@ public func DrawMaterial(string mat, proplist onto_mask, int speck_size, int rat
rnd_checker = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = rnd_checker};
var algo = {Algo = MAPALGO_And, Op = [onto_mask, rnd_checker]};
Draw(mat, algo);
return;
}

View File

@ -3,70 +3,47 @@
OverloadMaterials
OverloadTextures
1=Vehicle-none
10=Tunnel-tunnel
11=Tunnel-tunnel
12=Tunnel-brickback
13=BrickSoft-brick1
19=DuroLava-lava_red
20=Water-water1-water2-water3-water1-water3-water2
#21=Oil-Liquid
22=Acid-acid
23=Lava-lava_red
24=DuroLava-lava_red
25=Water-water
#26=Oil-Smooth
27=Acid-acid
28=Lava-lava_red
28=Earth-earth
29=Earth-earth_dry
30=Earth-earth_rough
31=Earth-earth_topsoil
32=Earth-earth_midsoil
#33=Ashes-Smooth3
#34=Ashes-Rough
#35=Ashes-Ridge
33=Ashes-ashes
35=SandDry-sand_rough
36=Ore-ore
37=Ore-ore
38=Ore-ore
40=Granite-granite
41=Granite-granite
42=Granite-rock
45=Gold-gold
50=Rock-rock
51=Rock-rock_cracked
52=Rock-rock
53=Firestone-firestone
54=Coal-coal
55=Sand-sand_rough
#56=Sand-Smooth2
#57=Sand-Smooth3
#59=FlyAshes-Smooth
#60=Crystal-Flare
#61=Crystal-Structure
#62=Crystal-Structure2
56=Sand-sand_smooth
65=Ice-ice2
66=Ice-ice2
67=Ice-ice3
68=Ice-ice3
70=Snow-snow1
71=Snow-snow1
72=Snow-snow1
73=Brick-brick1
#80=FlySand-Smooth2
#81=FlySand-Smooth3
#82=FlySand-Smooth

View File

@ -7,36 +7,26 @@ Difficulty=40
[Definitions]
Definition1=Objects.ocd
[Game]
Rules=Rule_TeamAccount=1;
[Player1]
Wealth=40
Crew=Clonk=2
Knowledge=Foundry=1;SteamEngine=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Pump=1;Chest=1;Idol=1;Basement=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;Bucket=1;Ropeladder=1;
BaseMaterial=Shovel=2;Pickaxe=2;Axe=2;Hammer=2;Dynamite=10;Loam=10;Wood=20;Metal=10;Clonk=2;Lorry=1;
BaseMaterial=Shovel=2;Pickaxe=2;Axe=2;Hammer=2;Clonk=5;Bread=1;
[Player2]
Wealth=40
Crew=Clonk=2
Knowledge=Foundry=1;SteamEngine=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Pump=1;Chest=1;Idol=1;Basement=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;Bucket=1;Ropeladder=1;
BaseMaterial=Shovel=2;Pickaxe=2;Axe=2;Hammer=2;Dynamite=10;Loam=10;Wood=20;Metal=10;Clonk=2;Lorry=1;
BaseMaterial=Shovel=2;Pickaxe=2;Axe=2;Hammer=2;Clonk=5;Bread=1;
[Player3]
Wealth=40
Crew=Clonk=2
Knowledge=Foundry=1;SteamEngine=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Pump=1;Chest=1;Idol=1;Basement=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;Bucket=1;Ropeladder=1;
BaseMaterial=Shovel=2;Pickaxe=2;Axe=2;Hammer=2;Dynamite=10;Loam=10;Wood=20;Metal=10;Clonk=2;Lorry=1;
BaseMaterial=Shovel=2;Pickaxe=2;Axe=2;Hammer=2;Clonk=5;Bread=1;
[Player4]
Wealth=40
Crew=Clonk=2
Knowledge=Foundry=1;SteamEngine=1;ToolsWorkshop=1;ChemicalLab=1;WindGenerator=1;Flagpole=1;Sawmill=1;Elevator=1;Pump=1;Chest=1;Idol=1;Basement=1;Lorry=1;Pickaxe=1;Axe=1;Hammer=1;Shovel=1;ToolsWorkshop_SplitFirestone=1;Barrel=1;Dynamite=1;DynamiteBox=1;Bucket=1;Ropeladder=1;
BaseMaterial=Shovel=2;Pickaxe=2;Axe=2;Hammer=2;Dynamite=10;Loam=10;Wood=20;Metal=10;Clonk=2;Lorry=1;
BaseMaterial=Shovel=2;Pickaxe=2;Axe=2;Hammer=2;Clonk=5;Bread=1;
[Landscape]
InEarth=Rock=1;Firestone=3;Loam=2
InEarthLevel=30,0,0,100
Sky=Clouds2
MapWidth=150
MapHeight=150

View File

@ -7,7 +7,7 @@
// Scenario properties which can be set later by the lobby options.
static const SCENOPT_Material = 1; // Amount of material available from start.
static const SCENOPT_Material = 3; // Amount of material available from start.
static const SCENOPT_MapSize = 1; // Size of the map.
static const SCENOPT_Difficulty = 1; // Difficulty settings.
@ -16,50 +16,59 @@ static mountain_location;
protected func Initialize()
{
// Goal: Resource extraction, set to ore mining.
var goal = CreateObject(Goal_ResourceExtraction);
goal->SetResource("Ore");
// Goal: Expand your area of influence to secure the ore.
var goal = CreateObject(Goal_Expansion);
goal->SetExpansionGoal(300 + 100 * SCENOPT_Difficulty);
// Goal: Construct flagpole at the top.
// TODO: implement this goal.
// Second goal: Construct metal.
var metal_cnt = 10 + 10 * SCENOPT_Difficulty;
goal = CreateObject(Goal_Construction);
goal->AddConstruction(Metal, metal_cnt);
// Rules: team account and buying at flagpole.
CreateObject(Rule_TeamAccount);
CreateObject(Rule_BuyAtFlagpole);
// Find A good location for the players to start.
FindMountainLocation();
// Cover the mountain in some snow already.
GiveMountainSnowCover();
// Add a snow storm effect, strong winds and lot's of snow.
AddEffect("SnowStorm", nil, 100, 5, nil);
// Create a lorry with necessary equipment to start a settlement.
//var lorry = CreateObject(Lorry, mountain_location[0], mountain_location[1], NO_OWNER);
//lorry->CreateContents(Wood, 16);
//lorry->CreateContents(Metal, 4);
//lorry->CreateContents(Dynamite, 3);
// TODO: Make sure lorry stays on mountains.
// Place some coniferous trees, but only up to 2/3 of the mountain.
Tree_Coniferous->Place(16 + Random(5), Rectangle(0, LandscapeHeight() / 3, LandscapeWidth(), 2 * LandscapeHeight() / 3));
// Some mushrooms as source of food.
Mushroom->Place(30 + Random(10));
// Set time of day to evening and create some clouds and celestials.
Cloud->Place(20);
CreateObject(Environment_Celestial);
var time = CreateObject(Environment_Time);
time->SetTime(60 * 22);
time->SetCycleSpeed(0);
// A light blue hue, to indicate the cold climate.
var blue = 12;
SetGamma(RGB(0, 0, blue), RGB(128 - blue, 128 - blue, 128 + blue), RGB(255 - blue, 255 - blue, 255));
// Some natural disasters.
// Earthquake->SetChance(30);
// TODO: Rockfall.
// Initialize different parts of the scenario.
InitEnvironment();
InitVegetation(SCENOPT_MapSize);
InitAnimals();
InitMaterial(SCENOPT_Material);
return;
}
protected func InitializePlayer(int plr)
{
// Move clonks to location and give them a shovel.
var index = 0, crew;
while (crew = GetCrew(plr, index))
{
crew->SetPosition(mountain_location[0], mountain_location[1]);
// First clonk can construct, others can mine.
if (index == 0)
{
crew->CreateContents(Hammer);
crew->CreateContents(Axe);
}
else
{
crew->CreateContents(Shovel);
crew->CreateContents(Pickaxe);
}
if (SCENOPT_Material >= 2)
crew->CreateContents(Loam, 2);
if (SCENOPT_Material == 3)
crew->CreateContents(DynamiteBox);
index++;
}
// Harsh zoom range.
SetPlayerZoomByViewRange(plr, 500, 350, PLRZOOM_LimitMax);
SetPlayerZoomByViewRange(plr, 500, 350, PLRZOOM_Direct);
// Set player wealth.
SetWealth(plr, 20 + 20 * SCENOPT_Material);
return;
}
@ -87,6 +96,65 @@ private func FindMountainLocation()
return;
}
private func InitEnvironment()
{
// Cover the mountain in some snow already.
GiveMountainSnowCover();
// Add a snow storm effect, strong winds and lot's of snow.
AddEffect("SnowStorm", nil, 100, 5, nil);
// Set time of day to evening and create some clouds and celestials.
Cloud->Place(20);
CreateObject(Environment_Celestial);
var time = CreateObject(Environment_Time);
time->SetTime(60 * 22);
time->SetCycleSpeed(0);
// A light blue hue, to indicate the cold climate.
var blue = 12;
SetGamma(RGB(0, 0, blue), RGB(128 - blue, 128 - blue, 128 + blue), RGB(255 - blue, 255 - blue, 255));
// Some natural disasters.
Earthquake->SetChance(5 + 5 * SCENOPT_Difficulty);
// TODO: Rockfall.
return;
}
private func InitVegetation(int map_size)
{
// Place some coniferous trees, but only up to 2/3 of the mountain.
Tree_Coniferous->Place(16 + Random(5), Rectangle(0, LandscapeHeight() / 3, LandscapeWidth(), 2 * LandscapeHeight() / 3));
// Also some cave mushrooms as a source of wood.
LargeCaveMushroom->Place(5 + 2 * map_size + Random(5), nil, { terraform = false });
// Some mushrooms as source of food.
Mushroom->Place(30 + Random(10));
// Some objects in the earth.
PlaceObjects(Rock, 10 + 10 * map_size + Random(10),"Earth");
PlaceObjects(Firestone, 20 + 10 * map_size + Random(5), "Earth");
PlaceObjects(Loam, 20 + 10 * map_size + Random(5), "Earth");
return;
}
private func InitAnimals()
{
return;
}
private func InitMaterial(int amount)
{
// An abandoned lorry somewhere close to the highest point of the peak.
var lorry = CreateObject(Lorry, LandscapeWidth() / 2, FindHeight(LandscapeWidth() / 2));
lorry->CreateContents(Pickaxe, 2);
lorry->CreateContents(Shovel, 2);
lorry->CreateContents(Bread, 2 * amount);
lorry->CreateContents(Dynamite, 2 * amount);
lorry->CreateContents(DynamiteBox, amount);
lorry->CreateContents(Ropeladder, amount);
return;
}
private func GiveMountainSnowCover()
{
// Loop over the map horizontally.
@ -129,32 +197,6 @@ global func FxSnowStormTimer(object target, proplist effect)
return 1;
}
protected func InitializePlayer(int plr)
{
// Move clonks to location and give them a shovel.
var index = 0, crew;
while (crew = GetCrew(plr, index))
{
crew->SetPosition(mountain_location[0], mountain_location[1]);
// First clonk can construct, others can mine.
if (index == 0)
{
crew->CreateContents(Hammer);
crew->CreateContents(Axe);
crew->CreateContents(Dynamite, 2);
}
else
{
crew->CreateContents(Shovel);
crew->CreateContents(Pickaxe);
crew->CreateContents(Dynamite, 2);
}
index++;
}
SetPlayerZoomByViewRange(plr, 500, 350, PLRZOOM_LimitMax);
return;
}
/*-- Some helper functions --*/
global func LogMatCounts()