Implement "dropped item magnet".
This commit is contained in:
parent
b518dfef64
commit
3fcab013b7
11 changed files with 215 additions and 47 deletions
|
|
@ -944,8 +944,6 @@ Class Chancebox : Actor
|
|||
// spawn another smaller chancebox
|
||||
// (chance increases for the inner box, up until a scale factor of 50% is reached)
|
||||
let a = Spawn("Chancebox",pos+(0,0,3*scale.y));
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.angle = angle;
|
||||
a.scale *= scale.x-.125;
|
||||
|
|
@ -964,7 +962,13 @@ Class Chancebox : Actor
|
|||
if ( !vipitemdrop ) vipitemdrop = "GrilledCheeseSandwich";
|
||||
let a = Spawn((!Random[Chancebox](0,2)&&vipammodrop)?vipammodrop:vipitemdrop,pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
}
|
||||
else if ( !Random[Chancebox](0,2) && SWWMUtility.CheckNeedsItem("ItamexHammer") )
|
||||
{
|
||||
// sometimes mapsets don't have chainsaw spawns for whatever reason
|
||||
let a = Spawn("ItamexHammer",pos);
|
||||
a.bDROPPED = false;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
}
|
||||
else if ( !Random[Chancebox](0,2) && SWWMUtility.ItemExists("CandyGun") )
|
||||
|
|
@ -972,8 +976,7 @@ Class Chancebox : Actor
|
|||
for ( int i=0; i<=6; i++ )
|
||||
{
|
||||
let a = Spawn((i==0)?"CandyGun":"CandyGunBullets",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = (i!=0);
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
if ( i > 0 ) a.vel.xy = (cos(i*60),sin(i*60))*FRandom[Chancebox](1,2);
|
||||
}
|
||||
|
|
@ -983,16 +986,14 @@ Class Chancebox : Actor
|
|||
for ( int i=0; i<3; i++ )
|
||||
{
|
||||
let a = Spawn("SilverBullets2",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*120),sin(i*120))*FRandom[Chancebox](1,2);
|
||||
}
|
||||
for ( int i=0; i<6; i++ )
|
||||
{
|
||||
let a = Spawn("SilverBullets",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*60),sin(i*60))*FRandom[Chancebox](3,4);
|
||||
}
|
||||
|
|
@ -1000,65 +1001,87 @@ Class Chancebox : Actor
|
|||
else if ( Random[Chancebox](0,1) && SWWMUtility.ItemExists("Hellblazer") )
|
||||
{
|
||||
let a = Spawn("HellblazerWarheads",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
for ( int i=0; i<3; i++ )
|
||||
{
|
||||
a = Spawn("HellblazerRavagers",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*120),sin(i*120))*FRandom[Chancebox](1,2);
|
||||
}
|
||||
for ( int i=0; i<5; i++ )
|
||||
{
|
||||
a = Spawn("HellblazerCrackshots",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*72),sin(i*72))*FRandom[Chancebox](3,4);
|
||||
}
|
||||
for ( int i=0; i<8; i++ )
|
||||
{
|
||||
a = Spawn("HellblazerMissiles",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*45),sin(i*45))*FRandom[Chancebox](5,6);
|
||||
}
|
||||
}
|
||||
else if ( Random[Chancebox](0,1) && SWWMUtility.ItemExists("HeavyMahSheenGun") )
|
||||
{
|
||||
let a = Spawn("SheenBigAmmo",pos);
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
for ( int i=0; i<5; i++ )
|
||||
{
|
||||
a = Spawn("SheenSmallAmmo",pos);
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*72),sin(i*72))*FRandom[Chancebox](3,4);
|
||||
}
|
||||
}
|
||||
else if ( Random[Chancebox](0,1) && SWWMUtility.ItemExists("Spreadgun") )
|
||||
{
|
||||
let a = Spawn("BlackShell",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
for ( int i=0; i<8; i++ )
|
||||
{
|
||||
a = Spawn((i%2)?"PurpleShell":"BlueShell",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*72),sin(i*72))*FRandom[Chancebox](2,3);
|
||||
a.vel.xy = (cos(i*45),sin(i*45))*FRandom[Chancebox](2,3);
|
||||
}
|
||||
for ( int i=0; i<12; i++ )
|
||||
{
|
||||
a = Spawn((i%2)?"RedShell":"GreenShell",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*30),sin(i*30))*FRandom[Chancebox](4,5);
|
||||
}
|
||||
}
|
||||
else if ( Random[Chancebox](0,1) && SWWMUtility.ItemExists("Wallbuster") )
|
||||
{
|
||||
for ( int i=0; i<12; i++ )
|
||||
{
|
||||
let a = Spawn((i%2)?"PurpleShell":"BlueShell",pos);
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*30),sin(i*30))*FRandom[Chancebox](2,3);
|
||||
}
|
||||
for ( int i=0; i<20; i++ )
|
||||
{
|
||||
let a = Spawn((i%2)?"RedShell":"GreenShell",pos);
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
a.vel.xy = (cos(i*18),sin(i*18))*FRandom[Chancebox](4,5);
|
||||
}
|
||||
}
|
||||
else if ( Random[Chancebox](0,1) )
|
||||
{
|
||||
Class<Actor> which = Random[Chancebox](1,0)?"HealthNuggetItem":"ArmorNuggetItem";
|
||||
for ( int i=0; i<20; i++ )
|
||||
{
|
||||
let a = Spawn(which,pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = true;
|
||||
a.vel.z = FRandom[Chancebox](2,8);
|
||||
a.vel.xy = (cos(i*18),sin(i*18))*FRandom[Chancebox](1,8);
|
||||
}
|
||||
|
|
@ -1068,8 +1091,7 @@ Class Chancebox : Actor
|
|||
for ( int i=0; i<=15; i++ )
|
||||
{
|
||||
let a = Spawn((i==0)?"RefresherItem":(i%3)?"HealthNuggetItem":"ArmorNuggetItem",pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.bDROPPED = (i!=0);
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
if ( i > 0 ) a.vel.xy = (cos(i*24),sin(i*24))*FRandom[Chancebox](1,2);
|
||||
}
|
||||
|
|
@ -1080,7 +1102,6 @@ Class Chancebox : Actor
|
|||
// pop one at random
|
||||
let a = Spawn(candidates[Random[Chancebox](0,candidates.Size()-1)],pos);
|
||||
a.bDROPPED = false;
|
||||
a.bNOGRAVITY = false;
|
||||
a.vel.z = FRandom[Chancebox](2,4);
|
||||
}
|
||||
int numpt = Random[ExploS](16,32);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue