forked from Mirrors/openclonk
New scenario: I am rich
parent
e6819bf020
commit
daf23b9b32
|
@ -0,0 +1,7 @@
|
|||
[DefCore]
|
||||
id=Goal_BeRich
|
||||
Version=8,0
|
||||
Category=C4D_StaticBack|C4D_Goal
|
||||
Width=64
|
||||
Height=64
|
||||
Offset=-32,-32
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,122 @@
|
|||
/*--
|
||||
Wealth
|
||||
Author: K-Pone, original by Maikel
|
||||
|
||||
Each player much reach the specified wealth to complete the goal.
|
||||
--*/
|
||||
|
||||
|
||||
#include Library_Goal
|
||||
|
||||
static stalematecheck_ok;
|
||||
|
||||
protected func Initialize()
|
||||
{
|
||||
stalematecheck_ok = false;
|
||||
GUI_Clock->CreateCountdown(60 * SCENPAR_GoalTime);
|
||||
return inherited(...);
|
||||
}
|
||||
|
||||
public func OnlyRichSurvives()
|
||||
{
|
||||
var mostwealth = 0;
|
||||
var teamwithmostwealth = -1;
|
||||
|
||||
// Check for the wealthiest player
|
||||
for(var i = 0; i < GetPlayerCount(); i++)
|
||||
{
|
||||
var pwealth = GetWealth(GetPlayerByIndex(i));
|
||||
if (pwealth > mostwealth)
|
||||
{
|
||||
mostwealth = pwealth;
|
||||
teamwithmostwealth = GetPlayerTeam(GetPlayerByIndex(i));
|
||||
}
|
||||
}
|
||||
|
||||
// Check if there's a stalemate
|
||||
// Players in another team than the winning one with most wealth means there's a stalemate
|
||||
var onlyoneteam = true;
|
||||
for(var i = 0; i < GetPlayerCount(); i++)
|
||||
{
|
||||
var pwealth = GetWealth(GetPlayerByIndex(i));
|
||||
if (pwealth == mostwealth)
|
||||
{
|
||||
if (GetPlayerTeam(GetPlayerByIndex(i)) != teamwithmostwealth)
|
||||
{
|
||||
// Stalemate detected
|
||||
stalematecheck_ok = false;
|
||||
GUI_Clock->CreateCountdown(10);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// No stalemate, eliminate Players that lost
|
||||
for(var i = 0; i < GetPlayerCount(); i++)
|
||||
{
|
||||
var pwealth = GetWealth(GetPlayerByIndex(i));
|
||||
if (pwealth < mostwealth)
|
||||
{
|
||||
EliminatePlayer(GetPlayerByIndex(i));
|
||||
}
|
||||
}
|
||||
|
||||
stalematecheck_ok = true;
|
||||
}
|
||||
|
||||
|
||||
/*-- Goal interface --*/
|
||||
|
||||
// The goal is fulfilled if all players have the specfied wealth.
|
||||
public func IsFulfilled()
|
||||
{
|
||||
if (g_timeover == false) return false;
|
||||
if (stalematecheck_ok == false) return false;
|
||||
// Goal fulfilled.
|
||||
return true;
|
||||
}
|
||||
|
||||
public func GetDescription(int plr)
|
||||
{
|
||||
var message;
|
||||
if (IsFulfilled())
|
||||
message = Format("$MsgGoalFulfilled$");
|
||||
else
|
||||
message = Format("$MsgGoalUnfulfilled$");
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
// Shows or hides a message window with information.
|
||||
public func Activate(int plr)
|
||||
{
|
||||
// If goal message open -> hide it.
|
||||
if (GetEffect("GoalMessage", this))
|
||||
{
|
||||
CustomMessage("", nil, plr, nil, nil, nil, nil, nil, MSG_HCenter);
|
||||
RemoveEffect("GoalMessage", this);
|
||||
return;
|
||||
}
|
||||
// Otherwise open a new message.
|
||||
AddEffect("GoalMessage", this, 100, 0, this);
|
||||
var message;
|
||||
if (IsFulfilled())
|
||||
message = Format("@$MsgGoalFulfilled$");
|
||||
else
|
||||
message = Format("@$MsgGoalUnfulfilled$");
|
||||
|
||||
CustomMessage(message, nil, plr, 0, 16 + 64, 0xffffff, GUI_MenuDeco, this, MSG_HCenter);
|
||||
return;
|
||||
}
|
||||
|
||||
protected func FxGoalMessageStart() {}
|
||||
|
||||
public func GetShortDescription(int plr)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
/*-- Proplist --*/
|
||||
|
||||
local Name = "$Name$";
|
||||
local Visibility = VIS_Editor;
|
|
@ -0,0 +1,5 @@
|
|||
Name=Werde Reich!
|
||||
|
||||
#Goal window
|
||||
MsgGoalFulfilled=Du bist reich!
|
||||
MsgGoalUnfulfilled=Werde reich, bevor es jemand anderes wird.\n\nDu kannst nahezu alle Gegenstände an der Flagge verkaufen, um Geld zu erhalten!
|
|
@ -0,0 +1,5 @@
|
|||
Name=Be Rich!
|
||||
|
||||
#Goal window
|
||||
MsgGoalFulfilled=You are rich!
|
||||
MsgGoalUnfulfilled=Be rich before someone else will.\n\nYou can sell nearly everything at the flagpole to make money!
|
|
@ -0,0 +1,4 @@
|
|||
Liefere dir einen Wettstreit mit deinen Mitspielern.
|
||||
Es gewinnt, wer am meisten Geld nach Ablauf der Zeit erwirtschaftet hat.
|
||||
|
||||
Es lassen sich nahezu alle Gegenstände in dieser Runde verkaufen.
|
|
@ -0,0 +1,4 @@
|
|||
Compete with your opponents.
|
||||
The player with most wealth will win.
|
||||
|
||||
Nearly every item can be sold.
|
|
@ -0,0 +1,112 @@
|
|||
/**
|
||||
Gold Rush
|
||||
Dynamic map with a few layers of materials below a flat shaped earth surface.
|
||||
|
||||
@author Maikel
|
||||
*/
|
||||
|
||||
#include Library_Map
|
||||
|
||||
|
||||
// Called be the engine: draw the complete map here.
|
||||
protected func InitializeMap(proplist map)
|
||||
{
|
||||
// Retrieve the settings according to the MapSize setting.
|
||||
var map_size = [400, 300];
|
||||
|
||||
// Set the map size.
|
||||
map->Resize(map_size[0], map_size[1]);
|
||||
|
||||
// Draw the main surface: a rectangle with some turbulence on top makes.
|
||||
var rect = {X = 0, Y = 4 * map.Hgt / 10, Wdt = map.Wdt, Hgt = 6 * map.Hgt / 10};
|
||||
var surface = {Algo = MAPALGO_Rect, X = rect.X, Y = rect.Y, Wdt = rect.Wdt, Hgt = 8 * rect.Hgt / 6};
|
||||
surface = {Algo = MAPALGO_Turbulence, Iterations = 5, Amplitude = [0, 18], Seed = Random(65536), Op = surface};
|
||||
Draw("Earth", surface);
|
||||
|
||||
// Draw materials inside the main surface.
|
||||
DrawMaterials(rect, surface);
|
||||
|
||||
// Return true to tell the engine a map has been successfully created.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Draws materials on the given surface.
|
||||
public func DrawMaterials(proplist rect, proplist surface)
|
||||
{
|
||||
var mask;
|
||||
var x = rect.X;
|
||||
var y = rect.Y;
|
||||
var wdt = rect.Wdt;
|
||||
var hgt = rect.Hgt;
|
||||
|
||||
// A bit of different types of earth all around the surface.
|
||||
mask = {Algo = MAPALGO_Rect, X = x, Y = y, Wdt = wdt, Hgt = hgt};
|
||||
mask = {Algo = MAPALGO_And, Op = [surface, mask]};
|
||||
DrawMaterial("Earth-earth", mask, 4, 12);
|
||||
DrawMaterial("Earth-earth_root", mask, 2, 16);
|
||||
DrawMaterial("Earth-earth_spongy", mask, 2, 16);
|
||||
DrawMaterial("Earth-earth", mask, 4, 12);
|
||||
|
||||
// Coal and surface in the first layer.
|
||||
mask = {Algo = MAPALGO_Rect, X = x, Y = y, Wdt = wdt, Hgt = hgt / 4};
|
||||
mask = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = mask};
|
||||
mask = {Algo = MAPALGO_And, Op = [surface, mask]};
|
||||
DrawMaterial("Firestone", mask, 5, 2);
|
||||
DrawMaterial("Coal", mask, 4, 5);
|
||||
DrawMaterial("Firestone", mask);
|
||||
DrawMaterial("Coal", mask);
|
||||
DrawMaterial("Rock", mask);
|
||||
|
||||
// Some small lakes as well in a second layer .
|
||||
mask = {Algo = MAPALGO_Rect, X = x, Y = y + 1 * hgt / 4, Wdt = wdt, Hgt = hgt / 4};
|
||||
mask = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = mask};
|
||||
mask = {Algo = MAPALGO_And, Op = [surface, mask]};
|
||||
DrawMaterial("Granite", mask, 4, 6);
|
||||
DrawMaterial("Coal", mask, 3, 8);
|
||||
DrawMaterial("Firestone", mask, 4, 5);
|
||||
DrawMaterial("Water", mask, 6, 12);
|
||||
DrawMaterial("Rock", mask, 4, 8);
|
||||
DrawMaterial("Ore", mask, 3, 6);
|
||||
|
||||
// Ore and rock in the third layer.
|
||||
mask = {Algo = MAPALGO_Rect, X = x, Y = y + 2 * hgt / 4, Wdt = wdt, Hgt = hgt / 4};
|
||||
mask = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = mask};
|
||||
mask = {Algo = MAPALGO_And, Op = [surface, mask]};
|
||||
DrawMaterial("Ore", mask, 3, 10);
|
||||
DrawMaterial("Coal", mask, 3, 3);
|
||||
DrawMaterial("Rock", mask, 2, 8);
|
||||
DrawMaterial("Granite", mask, 5, 6);
|
||||
DrawMaterial("Rock", mask);
|
||||
DrawMaterial("Ore", mask);
|
||||
|
||||
// Gold in the last layer.
|
||||
mask = {Algo = MAPALGO_Rect, X = x, Y = y + 3 * hgt / 4, Wdt = wdt, Hgt = hgt / 4};
|
||||
mask = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = mask};
|
||||
mask = {Algo = MAPALGO_And, Op = [surface, mask]};
|
||||
DrawMaterial("Firestone", mask, 5, 8);
|
||||
DrawMaterial("Gold", mask, 4, 5);
|
||||
DrawMaterial("Coal", mask, 4, 10);
|
||||
DrawMaterial("Granite", mask, 6, 5);
|
||||
DrawMaterial("Gold", mask, 2, 1);
|
||||
DrawMaterial("Rock", mask, 7, 10);
|
||||
|
||||
mask = {Algo = MAPALGO_Rect, X = x, Y = y + 1 * hgt / 2, Wdt = wdt, Hgt = hgt / 2};
|
||||
mask = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = mask};
|
||||
mask = {Algo = MAPALGO_And, Op = [surface, mask]};
|
||||
DrawMaterial("Ruby", mask, 4, 2);
|
||||
DrawMaterial("Amethyst", mask, 6, 3);
|
||||
|
||||
//mask = {Algo = MAPALGO_Rect, X = x, Y = y + 1 * hgt / 2, Wdt = wdt, Hgt = hgt / 2};
|
||||
//mask = {Algo = MAPALGO_Turbulence, Iterations = 4, Op = mask};
|
||||
//mask = {Algo = MAPALGO_And, Op = [surface, mask]};
|
||||
//DrawMaterial("Tunnel", mask, 12, 6);
|
||||
|
||||
// The top border consists of top soil and dry earth and a bit of sand.
|
||||
var border = {Algo = MAPALGO_Border, Top = 4, Op = surface};
|
||||
Draw("Earth", border);
|
||||
var rnd_checker = {Algo = MAPALGO_RndChecker, Ratio = 30, Wdt = 2, Hgt = 2};
|
||||
var rnd_border = {Algo = MAPALGO_And, Op = [border, rnd_checker]};
|
||||
Draw("Sand", rnd_border);
|
||||
Draw("Earth-earth_root", rnd_border);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,199 @@
|
|||
[ParameterDef]
|
||||
Name=$StartGold$
|
||||
Description=$DescStartGold$
|
||||
ID=StartGold
|
||||
Default=0
|
||||
|
||||
[Options]
|
||||
|
||||
[Option]
|
||||
Name=0
|
||||
Description=0
|
||||
Value=0
|
||||
|
||||
[Option]
|
||||
Name=25
|
||||
Description=25
|
||||
Value=25
|
||||
|
||||
[Option]
|
||||
Name=50
|
||||
Description=50
|
||||
Value=50
|
||||
|
||||
[Option]
|
||||
Name=100
|
||||
Description=100
|
||||
Value=100
|
||||
|
||||
[Option]
|
||||
Name=150
|
||||
Description=150
|
||||
Value=150
|
||||
|
||||
[Option]
|
||||
Name=200
|
||||
Description=200
|
||||
Value=200
|
||||
|
||||
[ParameterDef]
|
||||
Name=$BO_Clonks$
|
||||
Description=$DescBO_Clonks$
|
||||
ID=BO_Clonks
|
||||
Default=1
|
||||
|
||||
[Options]
|
||||
|
||||
[Option]
|
||||
Name=$No$
|
||||
Description=$No$
|
||||
Value=0
|
||||
|
||||
[Option]
|
||||
Name=$Yes$
|
||||
Description=$Yes$
|
||||
Value=1
|
||||
|
||||
[ParameterDef]
|
||||
Name=$BO_BuildingMaterial$
|
||||
Description=$DescBO_BuildingMaterial$
|
||||
ID=BO_BuildingMaterial
|
||||
Default=1
|
||||
|
||||
[Options]
|
||||
|
||||
[Option]
|
||||
Name=$No$
|
||||
Description=$No$
|
||||
Value=0
|
||||
|
||||
[Option]
|
||||
Name=$Yes$
|
||||
Description=$Yes$
|
||||
Value=1
|
||||
|
||||
[ParameterDef]
|
||||
Name=$BO_Tools$
|
||||
Description=$DescBO_Tools$
|
||||
ID=BO_Tools
|
||||
Default=0
|
||||
|
||||
[Options]
|
||||
|
||||
[Option]
|
||||
Name=$No$
|
||||
Description=$No$
|
||||
Value=0
|
||||
|
||||
[Option]
|
||||
Name=$Yes$
|
||||
Description=$Yes$
|
||||
Value=1
|
||||
|
||||
[ParameterDef]
|
||||
Name=$BO_Weapons$
|
||||
Description=$DescBO_Weapons$
|
||||
ID=BO_Weapons
|
||||
Default=0
|
||||
|
||||
[Options]
|
||||
|
||||
[Option]
|
||||
Name=$No$
|
||||
Description=$No$
|
||||
Value=0
|
||||
|
||||
[Option]
|
||||
Name=$Yes$
|
||||
Description=$Yes$
|
||||
Value=1
|
||||
|
||||
[ParameterDef]
|
||||
Name=$BO_Food$
|
||||
Description=$DescBO_Food$
|
||||
ID=BO_Food
|
||||
Default=0
|
||||
|
||||
[Options]
|
||||
|
||||
[Option]
|
||||
Name=$No$
|
||||
Description=$No$
|
||||
Value=0
|
||||
|
||||
[Option]
|
||||
Name=$Yes$
|
||||
Description=$Yes$
|
||||
Value=1
|
||||
|
||||
[ParameterDef]
|
||||
Name=$RuleNoEnergy$
|
||||
Description=$DescRuleNoEnergy$
|
||||
ID=NoEnergy
|
||||
Default=0
|
||||
|
||||
[Options]
|
||||
|
||||
[Option]
|
||||
Name=$No$
|
||||
Description=$DescNoEnergyNo$
|
||||
Value=0
|
||||
|
||||
[Option]
|
||||
Name=$Yes$
|
||||
Description=$DescNoEnergyYes$
|
||||
Value=1
|
||||
|
||||
[ParameterDef]
|
||||
Name=$GoalTime$
|
||||
Description=$DescGoalTime$
|
||||
ID=GoalTime
|
||||
Default=30
|
||||
|
||||
[Options]
|
||||
|
||||
[Option]
|
||||
Name=10
|
||||
Description=10
|
||||
Value=10
|
||||
|
||||
[Option]
|
||||
Name=15
|
||||
Description=15
|
||||
Value=15
|
||||
|
||||
[Option]
|
||||
Name=20
|
||||
Description=20
|
||||
Value=20
|
||||
|
||||
[Option]
|
||||
Name=30
|
||||
Description=30
|
||||
Value=30
|
||||
|
||||
[Option]
|
||||
Name=45
|
||||
Description=45
|
||||
Value=45
|
||||
|
||||
[Option]
|
||||
Name=60
|
||||
Description=60
|
||||
Value=60
|
||||
|
||||
[Option]
|
||||
Name=90
|
||||
Description=90
|
||||
Value=90
|
||||
|
||||
[Option]
|
||||
Name=120
|
||||
Description=120
|
||||
Value=120
|
||||
|
||||
[Option]
|
||||
Name=180
|
||||
Description=180
|
||||
Value=180
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
[Head]
|
||||
Icon=15
|
||||
Title=IAmRich
|
||||
Version=6,0
|
||||
Difficulty=10
|
||||
|
||||
[Definitions]
|
||||
Definition1=Objects.ocd
|
||||
|
||||
[Game]
|
||||
|
||||
[Player1]
|
||||
Crew=Clonk=2
|
||||
Buildings=Flagpole=1
|
||||
|
||||
[Player2]
|
||||
Crew=Clonk=2
|
||||
Buildings=Flagpole=1
|
||||
|
||||
[Player3]
|
||||
Crew=Clonk=2
|
||||
Buildings=Flagpole=1
|
||||
|
||||
[Player4]
|
||||
Crew=Clonk=2
|
||||
Buildings=Flagpole=1
|
||||
|
||||
[Landscape]
|
||||
Sky=Clouds2
|
||||
MapWidth=100
|
||||
MapHeight=75
|
||||
|
||||
[Weather]
|
||||
Climate=0
|
||||
YearSpeed=0
|
||||
Wind=0,100,-100,100
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
|
||||
/*
|
||||
|
||||
I am Rich
|
||||
|
||||
@author: K-Pone
|
||||
some parts reused from Maikel
|
||||
|
||||
*/
|
||||
|
||||
|
||||
static g_timeover;
|
||||
static g_goal;
|
||||
|
||||
local COL_Score = 1;
|
||||
|
||||
local updatescoreboardfx = new Effect
|
||||
{
|
||||
Timer = func()
|
||||
{
|
||||
GameCall("UpdateScoreboard");
|
||||
},
|
||||
};
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
Tree_Coniferous->Place(12);
|
||||
Tree_Coniferous2->Place(8);
|
||||
Tree_Coniferous3->Place(5);
|
||||
Tree_Coniferous4->Place(3);
|
||||
Tree_Deciduous->Place(4);
|
||||
Grass->Place(80);
|
||||
Flower->Place(20);
|
||||
Cotton->Place(20);
|
||||
Wheat->Place(50);
|
||||
|
||||
PlaceObjects(Rock, 75 + 10 * 2 + Random(10),"Earth");
|
||||
PlaceObjects(Firestone, 60 + 10 * 2 + Random(5), "Earth");
|
||||
PlaceObjects(Loam, 90 + 10 * 2 + Random(5), "Earth");
|
||||
PlaceObjects(Ore, 60 + 10 * 2 + Random(5), "Earth");
|
||||
PlaceObjects(Wood, 40 + 10 * 2 + Random(5), "Earth");
|
||||
PlaceObjects(Coal, 70 + 10 * 2 + Random(5), "Earth");
|
||||
PlaceObjects(Metal, 35 + 10 * 2 + Random(5), "Earth");
|
||||
|
||||
g_timeover = false;
|
||||
|
||||
g_goal = CreateObject(Goal_BeRich);
|
||||
|
||||
CreateObject(Rule_BuyAtFlagpole);
|
||||
CreateObject(Rule_BaseRespawn);
|
||||
CreateObject(Rule_KillLogs);
|
||||
CreateObject(Rule_TeamAccount);
|
||||
|
||||
if (SCENPAR_NoEnergy == 1) CreateObject(Rule_NoPowerNeed);
|
||||
|
||||
CreateEffect(updatescoreboardfx, 1, 35);
|
||||
}
|
||||
|
||||
func InitializePlayer(int plr)
|
||||
{
|
||||
var crew = GetCrew(plr);
|
||||
crew->CreateContents(Shovel);
|
||||
crew->CreateContents(Hammer);
|
||||
crew->CreateContents(Axe);
|
||||
|
||||
GivePlayerAllKnowledge(plr);
|
||||
BaseMats(plr);
|
||||
|
||||
DoWealth(plr, SCENPAR_StartGold);
|
||||
|
||||
SetScoreboardData(SBRD_Caption, SBRD_Caption, "Player", SBRD_Caption);
|
||||
SetScoreboardData(SBRD_Caption, COL_Score, "{{Nugget}}");
|
||||
|
||||
SetScoreboardData(plr, SBRD_Caption, GetTaggedPlayerName(plr));
|
||||
SetScoreboardData(plr, COL_Score, "0", 0);
|
||||
|
||||
UpdateScoreboard();
|
||||
}
|
||||
|
||||
func UpdateScoreboard()
|
||||
{
|
||||
for (var i = 0; i < GetPlayerCount(); i++)
|
||||
{
|
||||
var playerid = GetPlayerByIndex(i);
|
||||
var pscore = GetWealth(GetPlayerByIndex(i));
|
||||
SetScoreboardData(playerid, COL_Score, Format("%i", pscore), pscore);
|
||||
}
|
||||
}
|
||||
|
||||
func OnClonkDeath(object clonk, int killed_by)
|
||||
{
|
||||
var w1 = GetWealth(clonk->GetOwner()) / 10;
|
||||
DoWealth(clonk->GetOwner(), w1 * -1);
|
||||
DoWealth(killed_by, w1);
|
||||
}
|
||||
|
||||
func OnCountdownFinished()
|
||||
{
|
||||
g_goal->OnlyRichSurvives();
|
||||
g_timeover = true;
|
||||
}
|
||||
|
||||
func BaseMats(int plr)
|
||||
{
|
||||
var materials;
|
||||
|
||||
if (SCENPAR_BO_Clonks == 1)
|
||||
{
|
||||
materials =
|
||||
[
|
||||
[Clonk, 10, 2]
|
||||
];
|
||||
|
||||
for (var mat in materials)
|
||||
{
|
||||
SetBaseMaterial(plr, mat[0], mat[1]);
|
||||
SetBaseProduction(plr, mat[0], mat[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (SCENPAR_BO_BuildingMaterial == 1)
|
||||
{
|
||||
materials =
|
||||
[
|
||||
[Wood, 25, 2],
|
||||
[Metal, 20, 2],
|
||||
[Rock, 25, 2],
|
||||
[Loam, 10, 2]
|
||||
];
|
||||
|
||||
for (var mat in materials)
|
||||
{
|
||||
SetBaseMaterial(plr, mat[0], mat[1]);
|
||||
SetBaseProduction(plr, mat[0], mat[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (SCENPAR_BO_Tools == 1)
|
||||
{
|
||||
materials =
|
||||
[
|
||||
[Shovel, 2, 2],
|
||||
[Hammer, 2, 2],
|
||||
[Pickaxe, 2, 2],
|
||||
[Sickle, 2, 2],
|
||||
[Axe, 2, 2],
|
||||
[WindBag, 2, 2],
|
||||
[GrappleBow, 2, 2],
|
||||
[TeleGlove, 2, 2],
|
||||
[WallKit, 2, 2],
|
||||
[Ropeladder, 2, 2],
|
||||
[Bucket, 2, 2],
|
||||
[Barrel, 2, 2]
|
||||
];
|
||||
|
||||
for (var mat in materials)
|
||||
{
|
||||
SetBaseMaterial(plr, mat[0], mat[1]);
|
||||
SetBaseProduction(plr, mat[0], mat[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (SCENPAR_BO_Weapons == 1)
|
||||
{
|
||||
materials =
|
||||
[
|
||||
[Sword, 2, 2],
|
||||
[Club, 2, 2],
|
||||
[Axe, 2, 2],
|
||||
[Bow, 2, 2],
|
||||
[Arrow, 5, 2],
|
||||
[FireArrow, 2, 2],
|
||||
[BombArrow, 2, 2],
|
||||
[Blunderbuss, 2, 2],
|
||||
[LeadBullet, 2, 2],
|
||||
[GrenadeLauncher,2,2],
|
||||
[IronBomb, 5, 2],
|
||||
[Dynamite, 10, 2],
|
||||
[DynamiteBox, 2, 2],
|
||||
[Javelin, 2, 2],
|
||||
[SmokeBomb, 2, 2],
|
||||
[Lantern, 2, 2],
|
||||
[Shield, 2, 2],
|
||||
[Helmet, 2, 2],
|
||||
[Cannon, 2, 2],
|
||||
[Catapult, 2, 2],
|
||||
[Boompack, 5, 2],
|
||||
[PowderKeg, 5, 2]
|
||||
];
|
||||
|
||||
for (var mat in materials)
|
||||
{
|
||||
SetBaseMaterial(plr, mat[0], mat[1]);
|
||||
SetBaseProduction(plr, mat[0], mat[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (SCENPAR_BO_Food == 1)
|
||||
{
|
||||
materials =
|
||||
[
|
||||
[Bread, 10, 2],
|
||||
//[Mushroom, 20, 2], // Take out mushrooms because they have a value of 0. They can be bought for nothing.
|
||||
//[CookedMushroom,20,2],
|
||||
[Flour, 10, 2],
|
||||
[Sproutberry,10, 2]
|
||||
];
|
||||
|
||||
for (var mat in materials)
|
||||
{
|
||||
SetBaseMaterial(plr, mat[0], mat[1]);
|
||||
SetBaseProduction(plr, mat[0], mat[2]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
RuleNoEnergy=Kein Strombedarf
|
||||
DescRuleNoEnergy=Gebäuden benötigen keinen Strom
|
||||
DescNoEnergyNo=Gebäuden müssen mit Strom versorgt werden
|
||||
DescNoEnergyYes=Gebäuden müssen nicht mit Strom versorgt werden
|
||||
Yes=Ja
|
||||
No=Nein
|
||||
GoalTime=Spielzeit in Minuten
|
||||
DescGoalTime=Spielzeit in Minuten
|
||||
StartGold=Startgold pro Spieler
|
||||
DescStartGold=Gold zum Spielbeginn
|
||||
BO_Clonks=Kaufoption: Clonks
|
||||
DescBO_Clonks=Clonks können bei der Flagge gekauft werden
|
||||
BO_BuildingMaterial=Kaufoption: Baumaterial
|
||||
DescBO_BuildingMaterial=Baumaterial kann bei der Flagge gekauft werden
|
||||
BO_Weapons=Kaufoption: Waffen
|
||||
DescBO_Weapons=Waffen können bei der Flagge gekauft werden
|
||||
BO_Tools=Kaufoption: Werkzeug
|
||||
DescBO_Tools=Werkzeuge können bei der Flagge gekauft werden
|
||||
BO_Food=Kaufoption: Nahrungsmittel
|
||||
DescBO_Food=Nahrungsmittel können bei der Flagge gekauft werden
|
|
@ -0,0 +1,20 @@
|
|||
RuleNoEnergy=No energy consumption
|
||||
DescRuleNoEnergy=Buildings need no energy
|
||||
DescNoEnergyNo=Buildings need energy to work
|
||||
DescNoEnergyYes=Buildings need no energy to work
|
||||
Yes=Yes
|
||||
No=No
|
||||
GoalTime=Playtime in Minutes
|
||||
DescGoalTime=Playtime in Minutes
|
||||
StartGold=Startgold per player
|
||||
DescStartGold=Gold at round start
|
||||
BO_Clonks=Buy option: Clonks
|
||||
DescBO_Clonks=Clonks can be bought at the flagpole
|
||||
BO_BuildingMaterial=Buy option: Building Materials
|
||||
DescBO_BuildingMaterial=Building materials can be bought at the flagpole
|
||||
BO_Weapons=Buy option: Weapons
|
||||
DescBO_Weapons=Weapons can be bought at the flagpole
|
||||
BO_Tools=Buy option: Tools
|
||||
DescBO_Tools=Tools can be bought at the flagpole
|
||||
BO_Food=Buy option: Food
|
||||
DescBO_Food=Food can be bought at the flagpole
|
|
@ -0,0 +1,138 @@
|
|||
/**
|
||||
Knowdlege
|
||||
Provides global functions to give players knowledge for scenarios.
|
||||
|
||||
@author Maikel
|
||||
*/
|
||||
|
||||
|
||||
// Gives the player plans for all constructible or producible objects.
|
||||
global func GivePlayerAllKnowledge(int plr)
|
||||
{
|
||||
GivePlayerBasicKnowledge(plr);
|
||||
GivePlayerPumpingKnowledge(plr);
|
||||
GivePlayerFarmingKnowledge(plr);
|
||||
GivePlayerWeaponryKnowledge(plr);
|
||||
GivePlayerArtilleryKnowledge(plr);
|
||||
GivePlayerAdvancedKnowledge(plr);
|
||||
GivePlayerAirKnowledge(plr);
|
||||
return;
|
||||
}
|
||||
|
||||
// Gives the player specific knowledge as given in the knowledge array.
|
||||
global func GivePlayerSpecificKnowledge(int plr, array knowledge)
|
||||
{
|
||||
for (var plan in knowledge)
|
||||
SetPlrKnowledge(plr, plan);
|
||||
return;
|
||||
}
|
||||
|
||||
// Gives the player specific knowledge as given in the knowledge array.
|
||||
global func RemovePlayerSpecificKnowledge(int plr, array knowledge)
|
||||
{
|
||||
for (var plan in knowledge)
|
||||
SetPlrKnowledge(plr, plan, true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Gives the player plans according to basic knowledge.
|
||||
global func GivePlayerBasicKnowledge(int plr)
|
||||
{
|
||||
var knowledge = [
|
||||
// Basic structures for a settlement and production of tools and explosives.
|
||||
Flagpole, Basement, WindGenerator, SteamEngine, Compensator, Sawmill, Foundry, Elevator, ToolsWorkshop, ChemicalLab, Chest, WoodenBridge,
|
||||
// Basic tools for mining and tree chopping and loam production.
|
||||
Shovel, Hammer, Axe, Pickaxe, Barrel, Bucket, Torch, Lantern,
|
||||
// The basic resources.
|
||||
Metal, Loam, GoldBar,
|
||||
// Some of the basic explosives.
|
||||
Dynamite, DynamiteBox,
|
||||
// Some basic vehicles which aid in the settlement construction.
|
||||
Lorry
|
||||
];
|
||||
for (var plan in knowledge)
|
||||
SetPlrKnowledge(plr, plan);
|
||||
return;
|
||||
}
|
||||
|
||||
global func GivePlayerPumpingKnowledge(int plr)
|
||||
{
|
||||
var knowledge = [
|
||||
// Stuff needed for pumping.
|
||||
Pump, Pipe
|
||||
];
|
||||
for (var plan in knowledge)
|
||||
SetPlrKnowledge(plr, plan);
|
||||
return;
|
||||
}
|
||||
|
||||
global func GivePlayerFarmingKnowledge(int plr)
|
||||
{
|
||||
var knowledge = [
|
||||
// Structures needed to process farming materials.
|
||||
Kitchen, Loom,
|
||||
// Basic tools for farming.
|
||||
Sickle,
|
||||
// Processed goods.
|
||||
Cloth, Flour, Bread
|
||||
];
|
||||
for (var plan in knowledge)
|
||||
SetPlrKnowledge(plr, plan);
|
||||
return;
|
||||
}
|
||||
|
||||
global func GivePlayerWeaponryKnowledge(int plr)
|
||||
{
|
||||
var knowledge = [
|
||||
// Armory to construct the weapons.
|
||||
Armory,
|
||||
// Weapons and explosives.
|
||||
Bow, Arrow, FireArrow, BombArrow, Club, Sword, Javelin, Shield, Blunderbuss, LeadBullet, IronBomb, GrenadeLauncher, PowderKeg, Helmet, SmokeBomb,
|
||||
// Artillery vehicles.
|
||||
Catapult, Cannon
|
||||
];
|
||||
for (var plan in knowledge)
|
||||
SetPlrKnowledge(plr, plan);
|
||||
return;
|
||||
}
|
||||
|
||||
global func GivePlayerArtilleryKnowledge(int plr)
|
||||
{
|
||||
var knowledge = [
|
||||
// Stuff to set up artillery.
|
||||
Armory, PowderKeg, Catapult, Cannon
|
||||
];
|
||||
for (var plan in knowledge)
|
||||
SetPlrKnowledge(plr, plan);
|
||||
return;
|
||||
}
|
||||
|
||||
global func GivePlayerAdvancedKnowledge(int plr)
|
||||
{
|
||||
var knowledge = [
|
||||
// Inventors lab to construct the items.
|
||||
InventorsLab, Loom,
|
||||
// Advanced items in tools workshop and needed materials.
|
||||
Ropeladder, MetalBarrel, PowderKeg, WallKit, Cloth, DivingHelmet,
|
||||
// Advanced items in inventors lab.
|
||||
TeleGlove, WindBag, GrappleBow, Boompack, Balloon,
|
||||
];
|
||||
for (var plan in knowledge)
|
||||
SetPlrKnowledge(plr, plan);
|
||||
return;
|
||||
}
|
||||
|
||||
global func GivePlayerAirKnowledge(int plr)
|
||||
{
|
||||
var knowledge = [
|
||||
// Shipyard to construct the vehicles.
|
||||
Shipyard, Loom,
|
||||
// Materials needed.
|
||||
Cloth,
|
||||
// Airship and plane.
|
||||
Airship, Airplane
|
||||
];
|
||||
for (var plan in knowledge)
|
||||
SetPlrKnowledge(plr, plan);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
#appendto Ore
|
||||
#appendto Firestone
|
||||
#appendto Rock
|
||||
#appendto Loam
|
||||
#appendto Cloth
|
||||
#appendto Coal
|
||||
#appendto CottonSeed
|
||||
#appendto Metal
|
||||
#appendto Moss
|
||||
#appendto Seeds
|
||||
#appendto Wood
|
||||
|
||||
#appendto Axe
|
||||
#appendto Balloon
|
||||
#appendto Barrel
|
||||
#appendto Boompack
|
||||
#appendto Bucket
|
||||
#appendto Crate
|
||||
#appendto DivingHelmet
|
||||
#appendto Dynamite
|
||||
#appendto DynamiteBox
|
||||
#appendto GrappleBow
|
||||
#appendto Hammer
|
||||
#appendto Lantern
|
||||
#appendto Pickaxe
|
||||
#appendto Pipe
|
||||
#appendto PowderKeg
|
||||
#appendto Ropebridge
|
||||
#appendto Ropeladder
|
||||
#appendto Shovel
|
||||
#appendto Sickle
|
||||
#appendto TeleGlove
|
||||
#appendto Torch
|
||||
#appendto WallKit
|
||||
#appendto WindBag
|
||||
|
||||
#appendto Blunderbuss
|
||||
#appendto Bow
|
||||
#appendto Club
|
||||
#appendto GrenadeLauncher
|
||||
#appendto Helmet
|
||||
#appendto IronBomb
|
||||
#appendto Javelin
|
||||
#appendto Shield
|
||||
#appendto SmokeBomb
|
||||
#appendto Sword
|
||||
#appendto Arrow
|
||||
|
||||
#appendto Bread
|
||||
#appendto CookedMushroom
|
||||
#appendto Mushroom
|
||||
#appendto Flour
|
||||
#appendto Sproutberry
|
||||
|
||||
public func IsValuable(){ return true; }
|
||||
public func QueryRebuy(){ return true; }
|
|
@ -0,0 +1,22 @@
|
|||
[Teams]
|
||||
Active=1
|
||||
|
||||
[Team]
|
||||
id=1
|
||||
Name=Team 1
|
||||
PlrStartIndex=1
|
||||
|
||||
[Team]
|
||||
id=2
|
||||
Name=Team 2
|
||||
PlrStartIndex=2
|
||||
|
||||
[Team]
|
||||
id=3
|
||||
Name=Team 3
|
||||
PlrStartIndex=3
|
||||
|
||||
[Team]
|
||||
id=4
|
||||
Name=Team 4
|
||||
PlrStartIndex=4
|
|
@ -0,0 +1,2 @@
|
|||
DE:Ich bin reich!
|
||||
US:I am rich!
|
Loading…
Reference in New Issue