Cherrypicked changes from devel.
This commit is contained in:
parent
61824088ff
commit
30d53ef991
7 changed files with 122 additions and 32 deletions
|
|
@ -219,17 +219,35 @@ extend Class SWWMHandler
|
|||
SWWMUtility.AchievementProgress('swwm_progress_onehp',onehpspree[pnum],src.player);
|
||||
}
|
||||
// tasty treats
|
||||
if ( swwm_demoslayer && (src.Health < 100) )
|
||||
if ( swwm_demoslayer )
|
||||
{
|
||||
int amt = clamp(e.Thing.SpawnHealth()/20,1,10);
|
||||
if ( e.Thing.Health < (e.Thing.GetGibHealth()*2) ) amt *= 3;
|
||||
else if ( e.Thing.Health < e.Thing.GetGibHealth() ) amt *= 2;
|
||||
for ( int i=0; i<amt; i++ )
|
||||
if ( src.Health < 100 )
|
||||
{
|
||||
let a = Actor.Spawn("HealthOrb",e.Thing.Vec3Offset(0,0,e.Thing.Height/2));
|
||||
a.vel.z = FRandom[Junk](4,16);
|
||||
double ang = FRandom[Junk](0,360);
|
||||
a.vel.xy = (cos(ang),sin(ang))*FRandom[Junk](4,8);
|
||||
int amt = clamp(e.Thing.SpawnHealth()/20,1,10);
|
||||
if ( e.Thing.Health < (e.Thing.GetGibHealth()*2) ) amt *= 3;
|
||||
else if ( e.Thing.Health < e.Thing.GetGibHealth() ) amt *= 2;
|
||||
for ( int i=0; i<amt; i++ )
|
||||
{
|
||||
if ( !Random[Junk](0,2) ) continue;
|
||||
let a = Actor.Spawn("HealthOrb",e.Thing.Vec3Offset(0,0,e.Thing.Height/2));
|
||||
a.vel.z = FRandom[Junk](4,16);
|
||||
double ang = FRandom[Junk](0,360);
|
||||
a.vel.xy = (cos(ang),sin(ang))*FRandom[Junk](4,8);
|
||||
}
|
||||
}
|
||||
if ( src.CountInv("ArmorNugget") < 100 )
|
||||
{
|
||||
int amt = clamp(e.Thing.SpawnHealth()/40,1,5);
|
||||
if ( e.Thing.Health < (e.Thing.GetGibHealth()*2) ) amt *= 3;
|
||||
else if ( e.Thing.Health < e.Thing.GetGibHealth() ) amt *= 2;
|
||||
for ( int i=0; i<amt; i++ )
|
||||
{
|
||||
if ( Random[Junk](0,1) ) continue;
|
||||
let a = Actor.Spawn("ArmorOrb",e.Thing.Vec3Offset(0,0,e.Thing.Height/2));
|
||||
a.vel.z = FRandom[Junk](4,16);
|
||||
double ang = FRandom[Junk](0,360);
|
||||
a.vel.xy = (cos(ang),sin(ang))*FRandom[Junk](4,8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue