Add freezetics support to all actors that need it.

Remove Demoslayer fun option.
This commit is contained in:
Mari the Deer 2022-10-31 15:08:11 +01:00
commit ab9023d3ee
25 changed files with 312 additions and 291 deletions

View file

@ -225,62 +225,6 @@ extend Class SWWMHandler
onehpspree[pnum]++;
SWWMUtility.AchievementProgress("onehp",onehpspree[pnum],src.player);
}
// tasty treats
if ( swwm_demoslayer )
{
if ( src.Health < 100 )
{
int amt = clamp(e.Thing.SpawnHealth()/20,1,10);
if ( e.Thing.bBOSS || e.Thing.FindInventory("BossMarker") ) amt *= 2;
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 = Actor.AngleToVector(ang,FRandom[Junk](4,8));
}
}
if ( src.CountInv("ArmorNugget") < 100 )
{
int amt = clamp(e.Thing.SpawnHealth()/30,1,10);
if ( e.Thing.bBOSS || e.Thing.FindInventory("BossMarker") ) amt *= 2;
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 = Actor.AngleToVector(ang,FRandom[Junk](4,8));
}
}
bool needsammo = false;
for ( Inventory i=src.Inv; i; i=i.inv )
{
if ( !(i is 'SWWMAmmo') || (i.Stamina <= 0) || (i.Stamina > 50000) || (i.Amount >= i.MaxAmount) ) continue;
needsammo = true;
break;
}
if ( needsammo )
{
int amt = clamp(e.Thing.SpawnHealth()/40,1,10);
if ( e.Thing.bBOSS || e.Thing.FindInventory("BossMarker") ) amt *= 2;
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("AmmoOrb",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 = Actor.AngleToVector(ang,FRandom[Junk](4,8));
}
}
}
}
// no credits unless it's a counted kill or marine (that isn't friendly) or another player in DM
if ( e.Thing.IsFriend(src) || (!e.Thing.default.bCountKill && !(e.Thing is 'ScriptedMarine') && !(deathmatch && e.Thing.player)) )