Added magical jar of wind + boomshire (testing scenario for two players [not yet tsted :<])

stable-5.2
MimmoO 2010-01-20 21:21:23 +01:00
parent 1cc30e5198
commit 52fff0a0fa
14 changed files with 309 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,59 @@
[Head]
Icon=26
Title=Boomshire
Version=4,10
Difficulty=10
Access=1
MaxPlayer=8
NoInitialize=0
ForcedGfxMode=1
[Definitions]
Definition1=Objects.c4d
[Game]
Goals=RACE=1
Rules=RSTR=1
[Player1]
Wealth=50,0,0,250
Crew=CLNK=1
[Player2]
Wealth=50,0,0,250
Crew=CLNK=1
[Player3]
Wealth=50,0,0,250
Crew=CLNK=1
[Player4]
Wealth=50,0,0,250
Crew=CLNK=1
[Landscape]
Vegetation=TRE1=1;TRE2=2;TRE3=1;TRE4=1
VegetationLevel=100,0,0,100
InEarth=ROCK=1;GOLD=1;DYNA=1;LOAM=1
InEarthLevel=65,0,0,100
Sky=Clouds2
BottomOpen=1
MapWidth=500,0,64,10000
MapHeight=100,0,40,10000
Amplitude=10,10,0,100
Phase=50,50,0,100
Period=10,10,0,100
Random=20,20,0,100
Liquid=Water-Smooth
LiquidLevel=20,30,0,100
Layers=Rock=7;Rock=7;Gold=7;Granite=4;Water=5;Earth-earth=50;Earth-earth_dry=50
SkyScrollMode=2
NewStyleLandscape=2
[Weather]
Climate=0,0,0,100
YearSpeed=20,10,0,100
Wind=1,100,-100,100
[Environment]
Objects=EGLN=1;EGRS=1

View File

@ -0,0 +1,38 @@
/* Sky race */
func Initialize()
{
}
func InitializePlayer(int plr)
{
return JoinPlayer(plr);
}
private func JoinPlayer(int plr)
{
var obj=GetCrew(plr);
obj->DoEnergy(100000);
obj->SetPosition(10+Random(50), LandscapeHeight()/2-30);
obj->CreateContents(MJOW);
return true;
}
/* Relaunch */
public func RelaunchPlayer(int plr)
{
var clnk=CreateObject(CLNK,0,0,plr);
clnk->MakeCrewMember(plr);
SetCursor(plr,clnk);
SelectCrew(plr, clnk, 1);
Log(RndRelaunchMsg(), GetPlayerName(plr));
return JoinPlayer(plr);
}
private func RndRelaunchMsg()
{
return Translate(Format("RelaunchMsg%d", Random(4)));
}

View File

@ -0,0 +1,4 @@
RelaunchMsg0=%s versucht es nochmal.
RelaunchMsg1=%s ist tot.
RelaunchMsg2=Eine Runde Gelaechter fuer %s.
RelaunchMsg3=Wir trauern um %s.

View File

@ -0,0 +1,4 @@
RelaunchMsg0=%s tries it again.
RelaunchMsg1=%s is dead.
RelaunchMsg2=Haha, %s!
RelaunchMsg3=We're mourning %s.

View File

@ -0,0 +1,5 @@
[Teams]
Active=false
Custom=false
AllowHostilityChange=true
AutoGenerateTeams=true

View File

@ -0,0 +1,2 @@
DE:OC Boomshire
US:OC Boomshire

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,17 @@
[Particle]
Name=Air
MaxCount=1500
InitFn=StdInit
ExecFn=StdExec
CollisionFn=Die
DrawFn=Std
Face=0,0,32,32,-16,-16
Delay=0
Repeats=1
GravityAcc=-15
VertexCount=1
VertexY=50
AlphaFade=8
Additive=1
RByV=1
Attach=1

View File

@ -0,0 +1,19 @@
[DefCore]
id=MJOW
Version=4,9,10,10
Category=C4D_Object
MaxUserSelect=30
Width=10
Height=10
Offset=-5,-5
Vertices=4
VertexX=0,5,0,-5
VertexY=-5,0,5,0
VertexFriction=50,50,50,50
Picture=22,0,20,21
Value=35
Mass=15
Collectible=1
Components=ROCK=6;METL=1;
Rebuy=1
Rotate=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -0,0 +1,159 @@
/*--
Jar of Winds
Author: MimmoO
Collect air until youre full, then release it with a blast.
--*/
#strict 2
local ReloadTimer;
local Loaded;
local Amount;
local MaxCap;
local yOffset;
local iBarrel;
protected func Initialize()
{
MaxCap=60; //Changes duration and power of the Jar
}
protected func HoldingEnabled() { return true; }
protected func ControlUse(object pClonk, ix, iy)
{
Amount=0;
return 1;
}
public func ControlUseHolding(object pClonk, ix, iy)
{
//Angle Finder
if(GBackSolid()) return -1;
if(GBackLiquid()) return -1;
//not in material
if(Amount<=MaxCap)
{
var R=RandomX(-25,25);
var D=RandomX(19,130);
var SX=Sin(180-Angle(0,0,ix,iy)+R,D,);
var SY=Cos(180-Angle(0,0,ix,iy)+R,D);
if(!GBackSolid(SX,SY)) //when on a random spot in frotn is air...
{
Amount++; //Air is sucked in.
Message("Loading...|%3.0d",pClonk,(Amount*100)/MaxCap);
CreateParticle("Air",
SX,SY,
Sin(180-Angle(0,0,ix,iy)+R,-D/2),
Cos(180-Angle(0,0,ix,iy)+R,-D/2),
RandomX(35,80),
RGBa(255,255,255,128)
);
}
}
else //were full? say it!
{
Message("Full!",pClonk);
}
}
protected func ControlUseStop(object pClonk, ix, iy)
{
if(CheckCanUse(pClonk)==true && Amount>(MaxCap/5)) //can fire, enough air in?
{
// Fire
FireWeapon(pClonk, ix, iy);
return 1;
}
else Message("Not Enough...",pClonk);
//Sound(" :-( ");
return 1;
}
private func FireWeapon(object pClonk,iX,iY)
{
var iAngle=Angle(0,0,iX,iY);
Message("Bang!", pClonk); //For debug.
//Find Victims to push
for(var i=10; i<32; i++)
{
var R=RandomX(-20,20);
var SX=Sin(180-Angle(0,0,iX,iY)+R,i);
var SY=Cos(180-Angle(0,0,iX,iY)+R,i);
if(!GBackSolid(SX,SY))
{
CreateParticle("Air",
SX,SY,
Sin(180-Angle(0,0,iX,iY)+(R),(Amount/2)+25),
Cos(180-Angle(0,0,iX,iY)+(R),(Amount/2)+25),
Max(i,60),
);
}
}
var sinspeed=Sin(180-Angle(0,0,iX,iY)+(R/2),(Amount)+15);
var cosspeed=Cos(180-Angle(0,0,iX,iY)+(R/2),(Amount)+15);
if(pClonk->GetAction() != "Walk")
{ //Makes the clonk be pushed backwards a bit
var x=pClonk->GetXDir();
var y=pClonk->GetYDir();
pClonk->SetXDir((x)-(sinspeed/4)+6);
pClonk->SetYDir((y)-(cosspeed/4)+6);
}
for( var obj in FindObjects(
Find_Or(
Find_Distance(10,Sin(180-Angle(0,0,iX,iY),20),Cos(180-Angle(0,0,iX,iY),20)),
Find_Distance(18,Sin(180-Angle(0,0,iX,iY),40),Cos(180-Angle(0,0,iX,iY),40)),
Find_Distance(25,Sin(180-Angle(0,0,iX,iY),70),Cos(180-Angle(0,0,iX,iY),70))
)
)
)
{
if(obj!=pClonk && PathFree(pClonk->GetX(),pClonk->GetY(),obj->GetX(),obj->GetY()))
{
var x=obj->GetXDir();
var y=obj->GetYDir();
obj->SetXDir((x/30)+sinspeed);
obj->SetYDir((y/30)+cosspeed);
//enemys are pushed back
}
}
}
private func CheckCanUse(object pClonk)
{
if(pClonk->GetOCF() & OCF_NotContained)
{
if(pClonk->GetAction() == "Walk" || pClonk->GetAction() == "Jump") return true;
}
return false;
}
func Definition(def) {
SetProperty("Name", "$Name$", def);
}

View File

@ -0,0 +1 @@
Name=Windkrug

View File

@ -0,0 +1 @@
Name=Jar of wind