forked from Mirrors/openclonk
option to choose goal in scorched gardens
parent
d141f1a39f
commit
02252b31bd
|
@ -1,13 +0,0 @@
|
|||
[DefCore]
|
||||
id=Grass
|
||||
Version=6,0
|
||||
Category=C4D_StaticBack|C4D_Background
|
||||
Width=12
|
||||
Height=7
|
||||
Offset=-6,-3
|
||||
Vertices=1
|
||||
VertexY=1
|
||||
Mass=1
|
||||
Rotate=1
|
||||
StretchGrowth=1
|
||||
Oversize=1
|
Binary file not shown.
Before Width: | Height: | Size: 9.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.3 KiB |
|
@ -1,57 +0,0 @@
|
|||
/*-- Grass --*/
|
||||
|
||||
protected func Initialize()
|
||||
{
|
||||
DoCon(Random(50));
|
||||
if (Random(2))
|
||||
SetGraphics("1");
|
||||
}
|
||||
|
||||
|
||||
public func CanBeHitByShockwaves() { return true; }
|
||||
|
||||
protected func Damage()
|
||||
{
|
||||
if (GetDamage() > 80 && !Random(5))
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
private func Destroy()
|
||||
{
|
||||
var particles =
|
||||
{
|
||||
Prototype = Particles_Straw(),
|
||||
R = 200,
|
||||
G = 50,
|
||||
B = 50
|
||||
};
|
||||
CreateParticle("Grass", 0, 0, PV_Random(-20, 20), PV_Random(-20, 10), PV_Random(30, 100), particles, 30);
|
||||
RemoveObject();
|
||||
}
|
||||
|
||||
global func PlaceGrass(int amount, int start, int end)
|
||||
{
|
||||
if (!start)
|
||||
start = 0;
|
||||
if (!end)
|
||||
end = LandscapeWidth();
|
||||
|
||||
var x = start, y;
|
||||
while (x < end)
|
||||
{
|
||||
y = 0;
|
||||
while (y < LandscapeHeight())
|
||||
{
|
||||
if (GetMaterial(AbsX(x), AbsY(y)) == Material("Sky"))
|
||||
if (GetMaterial(AbsX(x), AbsY(y + 3)) == Material("Earth"))
|
||||
if (Random(100) < amount)
|
||||
CreateObjectAbove(Grass, AbsX(x), AbsY(y + 4), NO_OWNER);
|
||||
y += 3;
|
||||
}
|
||||
x += 9;
|
||||
}
|
||||
}
|
||||
|
||||
local Name = "Grass";
|
Binary file not shown.
Before Width: | Height: | Size: 5.5 KiB |
|
@ -0,0 +1,17 @@
|
|||
[ParameterDef]
|
||||
Name=$GoalType$
|
||||
Description=$DescGoalType$
|
||||
ID=GoalType
|
||||
Default=0
|
||||
|
||||
[Options]
|
||||
|
||||
[Option]
|
||||
Name=$GoalTypeLMS$
|
||||
Description=$DescGoalTypeLMS$
|
||||
Value=0
|
||||
|
||||
[Option]
|
||||
Name=$GoalTypeDM$
|
||||
Description=$DescGoalTypeDM$
|
||||
Value=1
|
|
@ -24,10 +24,3 @@ Crew=Clonk=1
|
|||
|
||||
[Landscape]
|
||||
Sky=Clouds1
|
||||
|
||||
[Weather]
|
||||
Climate=00,0,0,00
|
||||
StartSeason=0,0,0,00
|
||||
YearSpeed=0,0,0,000
|
||||
Wind=1,100,-100,100
|
||||
|
||||
|
|
|
@ -1,29 +1,31 @@
|
|||
/*--
|
||||
/**
|
||||
Scorches Gardens
|
||||
Author: Mimmo_O
|
||||
|
||||
A melee in a fiery setting.
|
||||
--*/
|
||||
|
||||
@author Mimmo_O
|
||||
*/
|
||||
|
||||
|
||||
|
||||
protected func Initialize()
|
||||
{
|
||||
SetMatAdjust(RGB(255,150,128));
|
||||
|
||||
// Goal.
|
||||
CreateObject(Goal_DeathMatch, 0, 0, NO_OWNER);
|
||||
if (SCENPAR_GoalType == 0)
|
||||
CreateObject(Goal_LastManStanding);
|
||||
else if (SCENPAR_GoalType == 1)
|
||||
CreateObject(Goal_DeathMatch);
|
||||
CreateObject(Rule_KillLogs);
|
||||
CreateObject(Rule_Gravestones);
|
||||
|
||||
//Enviroment.
|
||||
// Enviroment.
|
||||
CreateObject(Rule_ObjectFade)->DoFadeTime(10 * 36);
|
||||
SetSkyAdjust(RGB(255,128,0));
|
||||
SetSkyParallax(1, 20,20, 0,0, nil, nil);
|
||||
CreateObjectAbove(Column,160,304)->SetClrModulation(RGB(255,100,80));
|
||||
CreateObjectAbove(Column,448,272)->SetClrModulation(RGB(255,100,80));
|
||||
SetSkyAdjust(RGB(255, 128, 0));
|
||||
SetSkyParallax(1, 20, 20, 0, 0, nil, nil);
|
||||
CreateObjectAbove(Column, 160, 304)->SetClrModulation(RGB(255, 100, 80));
|
||||
CreateObjectAbove(Column, 448, 272)->SetClrModulation(RGB(255, 100, 80));
|
||||
SetMatAdjust(RGB(255, 150, 128));
|
||||
|
||||
AddEffect("RandomMeteor", nil, 100, 36-Min(GetPlayerCount()*3,20));
|
||||
AddEffect("RandomMeteor", nil, 100, 20);
|
||||
AddEffect("DangerousLava", nil, 100, 1);
|
||||
// Smooth brick edges.
|
||||
PlaceEdges();
|
||||
|
@ -31,21 +33,19 @@ protected func Initialize()
|
|||
return;
|
||||
}
|
||||
|
||||
// Lava hurts a lot.
|
||||
global func FxDangerousLavaTimer()
|
||||
{
|
||||
//uber effect abuse
|
||||
|
||||
for(var burning in FindObjects(Find_ID(Clonk),Find_OCF(OCF_OnFire)))
|
||||
{
|
||||
burning->DoEnergy(-3); //lava hurts a lot
|
||||
}
|
||||
|
||||
for (var burning in FindObjects(Find_ID(Clonk),Find_OCF(OCF_OnFire)))
|
||||
burning->DoEnergy(-3);
|
||||
}
|
||||
|
||||
global func FxRandomMeteorTimer()
|
||||
{
|
||||
if(!Random(10)) return ;
|
||||
LaunchMeteor(50+Random(LandscapeWidth()-100),-10, 40 + Random(40), RandomX(-20,20), 0);
|
||||
if (!Random(GetPlayerCount() + 2))
|
||||
return FX_OK;
|
||||
LaunchMeteor(50 + Random(LandscapeWidth() - 100), -10, 40 + Random(40), RandomX(-20, 20), 0);
|
||||
return FX_OK;
|
||||
}
|
||||
|
||||
private func PlaceEdges()
|
||||
|
@ -64,7 +64,7 @@ private func PlaceEdges()
|
|||
return;
|
||||
}
|
||||
|
||||
global func PlaceGras()
|
||||
private func PlaceGras()
|
||||
{
|
||||
var x=[502,468,530,525,548,560,555,551,461,483,354,425,348,343,338,420,412,405,300,315,310,305,290,193,198,169,181,176,127,137,142,133,122,147,35,45,41,30,122];
|
||||
var y=[225,221,201,206,191,178,181,185,228,220,190,234,190,188,188,231,226,221,229,218,221,228,229,262,260,261,261,259,227,227,230,228,237,240,221,221,219,222,224];
|
||||
|
@ -76,10 +76,10 @@ global func PlaceGras()
|
|||
edge->SetCategory(C4D_StaticBack);
|
||||
edge->SetR(r[i]);
|
||||
edge->Initialize();
|
||||
edge->SetClrModulation(RGB(200+Random(50),100+Random(60),100+Random(60)));
|
||||
edge->SetClrModulation(RGB(225+Random(30), Random(30), Random(30)));
|
||||
|
||||
}
|
||||
return 1;
|
||||
return;
|
||||
}
|
||||
|
||||
protected func OnPlayerRelaunch(int plr)
|
||||
|
@ -97,13 +97,21 @@ protected func OnPlayerRelaunch(int plr)
|
|||
return;
|
||||
}
|
||||
|
||||
func OnClonkLeftRelaunch(object clonk)
|
||||
public func OnClonkLeftRelaunch(object clonk)
|
||||
{
|
||||
clonk->CreateParticle("Fire", 0, 0, PV_Random(-20, 20), PV_Random(-40, 5), PV_Random(20, 90), Particles_Glimmer(), 30);
|
||||
clonk->SetYDir(-5);
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove contents of clonks on their death.
|
||||
public func OnClonkDeath(object clonk)
|
||||
{
|
||||
while (clonk->Contents())
|
||||
clonk->Contents()->RemoveObject();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
func WinKillCount() { return 5; }
|
||||
// Settings for LMS and DM.
|
||||
public func RelaunchCount() { return 5; }
|
||||
public func WinKillCount() { return 5; }
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
GoalType=Goal
|
||||
DescGoalType=Definiert das Ziel.
|
||||
GoalTypeLMS=Last Man Standing
|
||||
DescGoalTypeLMS=Bleibe als Letzter am Leben und gewinne.
|
||||
GoalTypeDM=Deathmatch
|
||||
DescGoalTypeDM=Erziele eine gewisse Menge an Kills und gewinne.
|
|
@ -0,0 +1,6 @@
|
|||
GoalType=Goal
|
||||
DescGoalType=Defines the goal of this round.
|
||||
GoalTypeLMS=Last Man Standing
|
||||
DescGoalTypeLMS=Be the last one alive to win.
|
||||
GoalTypeDM=Deathmatch
|
||||
DescGoalTypeDM=Score a given amount of kills to win.
|
|
@ -1,12 +0,0 @@
|
|||
#appendto Clonk
|
||||
// Lose all items on death.
|
||||
func StartDead()
|
||||
{
|
||||
PlayAnimation("Dead", 5, Anim_Linear(0, 0, GetAnimationLength("Dead"), 20, ANIM_Hold), Anim_Linear(0, 0, 1000, 5, ANIM_Remove));
|
||||
// Update carried items
|
||||
UpdateAttach();
|
||||
if(Contents(1))Contents(1)->RemoveObject();
|
||||
if(Contents(0))Contents(0)->RemoveObject();
|
||||
// Set proper turn type
|
||||
SetTurnType(1);
|
||||
}
|
|
@ -1,2 +1,2 @@
|
|||
DE:Versengte Gärten
|
||||
DE:Versengte Gärten
|
||||
US:Scorched Gardens
|
Loading…
Reference in New Issue