Major rebalance and other changes:

- Tweaked health item values.
 - Allow Sandwich to save you from the Ynykron (usually).
 - Tweaked ammo availability again.
 - Disable ammo and weapon drops from enemies (can be re-enabled).
 - Adjusted refire behaviour of Biospark Carbine.
 - Tweaked the sizes of some pickup models.
 - Wallbuster gives only 5 ammo on pickup.
 - Tweaked score values for more balanced progression.
 - Overkill bonus also includes enemies that take twice their base health in damage (as was intended)
 - Add a reminder for myself to add wall collision to dashing.
This commit is contained in:
Mari the Deer 2020-09-08 22:47:29 +02:00
commit 4af07111f1
18 changed files with 155 additions and 131 deletions

View file

@ -23,14 +23,16 @@ Mixin Class SWWMAmmo
override bool SpecialDropAction( Actor dropper )
{
if ( Amount != default.Amount )
if ( swwm_enemydrops )
{
// needed for positioning to work
Owner = dropper;
if ( Amount == default.Amount ) return false;
// subdivide
Owner = dropper; // needed for positioning to work
CreateTossable(Amount);
return true;
}
return false;
// no ammo drops from enemies
return true;
}
private bool CmpAmmo( Class<Ammo> a, Class<Ammo> b )
@ -200,14 +202,16 @@ Class MagAmmo : Inventory abstract
override bool SpecialDropAction( Actor dropper )
{
if ( Amount != default.Amount )
if ( swwm_enemydrops )
{
// needed for positioning to work
Owner = dropper;
if ( Amount == default.Amount ) return false;
// subdivide
Owner = dropper; // needed for positioning to work
CreateTossable(Amount);
return true;
}
return false;
// no ammo drops from enemies
return true;
}
override void DoEffect()
@ -332,7 +336,7 @@ Class RedShell : Ammo
Inventory.Icon "graphics/HUD/Icons/A_ShellsNormal.png";
Inventory.Amount 1;
Inventory.MaxAmount 50;
Ammo.BackpackAmount 8;
Ammo.BackpackAmount 3;
Ammo.DropAmount 3;
+FLOATBOB;
FloatBobStrength 0.25;
@ -393,7 +397,7 @@ Class GreenShell : Ammo
Inventory.Icon "graphics/HUD/Icons/A_ShellsSlug.png";
Inventory.Amount 1;
Inventory.MaxAmount 48;
Ammo.BackpackAmount 4;
Ammo.BackpackAmount 2;
Ammo.DropAmount 2;
+FLOATBOB;
FloatBobStrength 0.25;
@ -447,7 +451,7 @@ Class WhiteShell : Ammo
Inventory.Icon "graphics/HUD/Icons/A_ShellsDragon.png";
Inventory.Amount 1;
Inventory.MaxAmount 32;
Ammo.BackpackAmount 2;
Ammo.BackpackAmount 1;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
@ -494,7 +498,7 @@ Class BlueShell : Ammo
Inventory.Icon "graphics/HUD/Icons/A_ShellsKinylum.png";
Inventory.Amount 1;
Inventory.MaxAmount 40;
Ammo.BackpackAmount 4;
Ammo.BackpackAmount 2;
Ammo.DropAmount 2;
+FLOATBOB;
FloatBobStrength 0.25;
@ -541,7 +545,7 @@ Class BlackShell : Ammo
Inventory.Icon "graphics/HUD/Icons/A_ShellsFuck.png";
Inventory.Amount 1;
Inventory.MaxAmount 20;
Ammo.BackpackAmount 2;
Ammo.BackpackAmount 0;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
@ -581,7 +585,7 @@ Class PurpleShell : Ammo
Inventory.Icon "graphics/HUD/Icons/A_ShellsBall.png";
Inventory.Amount 1;
Inventory.MaxAmount 32;
Ammo.BackpackAmount 4;
Ammo.BackpackAmount 2;
Ammo.DropAmount 2;
+FLOATBOB;
FloatBobStrength 0.25;
@ -691,7 +695,7 @@ Class EvisceratorShell : Ammo
Inventory.Icon "graphics/HUD/Icons/A_Eviscerator.png";
Inventory.Amount 1;
Inventory.MaxAmount 48;
Ammo.BackpackAmount 3;
Ammo.BackpackAmount 2;
Ammo.DropAmount 2;
+FLOATBOB;
FloatBobStrength 0.25;
@ -757,7 +761,7 @@ Class HellblazerMissiles : Ammo
Inventory.Icon "graphics/HUD/Icons/A_HellblazerMissile.png";
Inventory.Amount 1;
Inventory.MaxAmount 48;
Ammo.BackpackAmount 3;
Ammo.BackpackAmount 2;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
@ -817,7 +821,7 @@ Class HellblazerCrackshots : Ammo
Inventory.Icon "graphics/HUD/Icons/A_HellblazerCrackshot.png";
Inventory.Amount 1;
Inventory.MaxAmount 30;
Ammo.BackpackAmount 2;
Ammo.BackpackAmount 1;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
@ -856,7 +860,7 @@ Class HellblazerRavagers : Ammo
Inventory.Icon "graphics/HUD/Icons/A_HellblazerRavager.png";
Inventory.Amount 1;
Inventory.MaxAmount 18;
Ammo.BackpackAmount 1;
Ammo.BackpackAmount 0;
Ammo.DropAmount 1;
+FLOATBOB;
FloatBobStrength 0.25;
@ -1373,7 +1377,7 @@ Class FabricatorTier1 : AmmoFabricator
Tag "$T_FABRICATOR1";
Inventory.Icon "graphics/HUD/Icons/I_Fabricator1.png";
Inventory.PickupMessage "$T_FABRICATOR1";
Inventory.MaxAmount 30;
Inventory.MaxAmount 20;
AmmoFabricator.Budget 5000;
AmmoFabricator.PerType 2;
AmmoFabricator.MaxUnitPrice 2500;
@ -1389,7 +1393,7 @@ Class FabricatorTier2 : AmmoFabricator
Tag "$T_FABRICATOR2";
Inventory.Icon "graphics/HUD/Icons/I_Fabricator2.png";
Inventory.PickupMessage "$T_FABRICATOR2";
Inventory.MaxAmount 20;
Inventory.MaxAmount 15;
AmmoFabricator.Budget 15000;
AmmoFabricator.PerType 4;
AmmoFabricator.MaxUnitPrice 10000;

View file

@ -28,7 +28,7 @@ Class ArmorNuggetItem : SWWMSpareArmor
Default
{
Tag "$T_NUGGETA";
Stamina 1000;
Stamina 300;
Inventory.Icon "graphics/HUD/Icons/I_ArmorNugget.png";
Inventory.PickupMessage "$T_NUGGETA";
Inventory.MaxAmount 20;

View file

@ -916,10 +916,10 @@ Class Wallbuster : SWWMWeapon
Super.AttachToOwner(other);
if ( !initialized )
{
// first wallbuster is fully loaded
// first wallbuster has five barrels loaded
initialized = true;
for ( int i=0; i<25; i++ )
loaded[i] = "RedShell";
loaded[i] = (i<5)?(Class<Ammo>)("RedShell"):null;
for ( int i=0; i<25; i++ )
fired[i] = false;
}
@ -1474,7 +1474,7 @@ Class Wallbuster : SWWMWeapon
Weapon.SelectionOrder 400;
Weapon.UpSound "wallbuster/select";
Weapon.AmmoType1 "RedShell";
Weapon.AmmoGive1 25;
Weapon.AmmoGive1 5;
Stamina 35000;
+SWWMWEAPON.NOFIRSTGIVE;
}

View file

@ -328,7 +328,15 @@ Class YnykronImpact : Actor
// voodoo dolls just get erased (how convenient)
// otherwise instantly vaporize the fucker
if ( tracer.player && (tracer.player.mo != tracer) ) tracer.Destroy();
else tracer.DamageMobj(self,target,int.max,'Ynykron',DMG_FORCED|DMG_THRUSTLESS);
else if ( tracer.CountInv("GrilledCheeseSandwich") > 0 )
{
// force use the sandwich
let gc = GrilledCheeseSandwich(tracer.FindInventory("GrilledCheeseSandwich"));
tracer.A_StartSound(gc.UseSound,CHAN_ITEMEXTRA);
gc.DoTheThing(true);
gc.Amount--;
}
else if ( !tracer.FindInventory("GrilledCheeseSafeguard") ) tracer.DamageMobj(self,target,int.max,'Ynykron',DMG_FORCED|DMG_THRUSTLESS);
if ( tracer && (tracer.Health <= 0) )
{
if ( tracer.player ) PlayerGone.FeckOff(tracer);
@ -1430,7 +1438,24 @@ Class YnykronSingularity : Actor
// voodoo dolls just get erased (how convenient)
// otherwise instantly vaporize the fucker
if ( a.player && (a.player.mo != a) ) a.Destroy();
else a.DamageMobj(self,a,int.max,'Ynykron',DMG_FORCED|DMG_THRUSTLESS);
else if ( a.CountInv("GrilledCheeseSandwich") > 0 )
{
// force use the sandwich, warp to safe spot
let gc = GrilledCheeseSandwich(a.FindInventory("GrilledCheeseSandwich"));
Spawn("SWWMItemFog",a.Vec3Offset(0,0,a.Height/2));
Vector3 safepos;
int safeangle;
if ( deathmatch ) [safepos, safeangle] = level.PickDeathmatchStart();
else [safepos, safeangle] = level.PickPlayerStart(a.PlayerNumber());
a.vel *= 0.;
a.SetOrigin(safepos,false);
a.angle = safeangle;
a.pitch = 0;
a.A_StartSound(gc.UseSound,CHAN_ITEMEXTRA);
gc.DoTheThing(true);
gc.Amount--;
}
else if ( !a.FindInventory("GrilledCheeseSafeguard") ) a.DamageMobj(self,a,int.max,'Ynykron',DMG_FORCED|DMG_THRUSTLESS);
if ( a && (a.Health <= 0) )
{
if ( a.player ) PlayerGone.FeckOff(a);

View file

@ -696,12 +696,12 @@ Class SWWMHandler : EventHandler
if ( !playeringame[i] ) continue;
if ( players[i].itemcount > lastitemcount[i] )
{
int score = 25*(players[i].itemcount-lastitemcount[i]);
int score = 10*(players[i].itemcount-lastitemcount[i]);
if ( (level.total_items == level.found_items) && !allitems )
{
allitems = true;
Console.Printf(StringTable.Localize("$SWWM_LASTITEM"),players[i].GetUserName(),2500);
score += 2475;
Console.Printf(StringTable.Localize("$SWWM_LASTITEM"),players[i].GetUserName(),500);
score += 490;
}
SWWMCredits.Give(players[i],score);
SWWMScoreObj.Spawn(score,players[i].mo.Vec3Offset(0,0,players[i].mo.Height/2));
@ -909,14 +909,14 @@ Class SWWMHandler : EventHandler
s.mkill = multilevel[pnum]+1;
lastkill[pnum] = level.maptime;
// scoring
int score = min(1000,int(ceil(e.Thing.SpawnHealth()*.25)*10));
int score = min(1000,int(ceil(e.Thing.SpawnHealth()*.05)*10));
SWWMScoreObj scr = null;
if ( e.DamageSource.player == players[consoleplayer] )
scr = SWWMScoreObj.Spawn(score,e.Thing.Vec3Offset(0,0,e.Thing.Height/2));
int ofs = 0;
if ( e.DamageType == 'Push' )
{
score += 1000;
score += 500;
if ( scr )
{
scr.xscore[ofs] = 0;
@ -925,9 +925,9 @@ Class SWWMHandler : EventHandler
scr.xcnt = ++ofs;
}
}
if ( ((e.Thing.Health <= e.Thing.GetGibHealth()) || (e.DamageSource.bEXTREMEDEATH) || (e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.DamageType == 'Extreme')) && !e.DamageSource.bNOEXTREMEDEATH && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH) )
if ( (e.Damage >= e.Thing.GetSpawnHealth()*2) || (((e.Thing.Health <= e.Thing.GetGibHealth()) || (e.DamageSource.bEXTREMEDEATH) || (e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.DamageType == 'Extreme')) && !e.DamageSource.bNOEXTREMEDEATH && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH)) )
{
score = int(score*1.25);
score *= 2;
if ( scr )
{
scr.xscore[ofs] = 0;
@ -963,7 +963,7 @@ Class SWWMHandler : EventHandler
}
if ( e.Thing.bBOSS )
{
score += 5000;
score += 2000;
if ( scr )
{
scr.xscore[ofs] = 0;
@ -977,9 +977,9 @@ Class SWWMHandler : EventHandler
if ( (level.killed_monsters+1 == level.total_monsters) && !allkills )
{
allkills = true;
SWWMCredits.Give(e.DamageSource.player,2000);
Console.Printf(StringTable.Localize("$SWWM_LASTMONSTER"),e.DamageSource.player.GetUserName(),2000);
SWWMScoreObj.Spawn(2000,e.DamageSource.Vec3Offset(0,0,e.DamageSource.Height/2));
SWWMCredits.Give(e.DamageSource.player,1000);
Console.Printf(StringTable.Localize("$SWWM_LASTMONSTER"),e.DamageSource.player.GetUserName(),1000);
SWWMScoreObj.Spawn(1000,e.DamageSource.Vec3Offset(0,0,e.DamageSource.Height/2));
}
spreecount[pnum]++;
if ( s && (spreecount[pnum] > s.skill) && !tookdamage[pnum] )
@ -1195,29 +1195,8 @@ Class SWWMHandler : EventHandler
}
else if ( e.Replacee is 'CWeaponPiece2' ) e.Replacement = 'CandyGun';
else if ( e.Replacee is 'MWeaponPiece1' ) e.Replacement = 'Ynykron';
else if ( (e.Replacee == 'Clip') || (e.Replacee == 'GoldWandAmmo') || (e.Replacee == 'GoldWandHefty') || (e.Replacee is 'ArtiPoisonBag') )
{
switch( Random[Replacement](0,14) )
{
case 0:
case 1:
case 2:
e.Replacement = redpool[Random[Replacement](0,1)];
break;
case 4:
case 5:
case 6:
e.Replacement = greenpool[Random[Replacement](0,1)];
break;
case 7:
case 8:
e.Replacement = purplepool[0];
break;
default:
e.Replacement = 'SWWMNothing';
break;
}
}
else if ( (e.Replacee == 'Clip') || (e.Replacee == 'GoldWandAmmo') || (e.Replacee == 'GoldWandHefty') )
e.Replacement = 'SWWMNothing';
else if ( (e.Replacee == 'Shell') || (e.Replacee is 'CrossbowAmmo') )
{
switch( Random[Replacement](0,13) )
@ -1285,14 +1264,14 @@ Class SWWMHandler : EventHandler
}
else if ( e.Replacee == 'ClipBox' )
{
if ( Random[Replacements](0,2) ) e.Replacement = 'EvisceratorShell';
if ( Random[Replacements](0,3) ) e.Replacement = 'EvisceratorShell';
else if ( Random[Replacements](0,4) ) e.Replacement = 'EvisceratorTrioSpawn';
else e.Replacement = 'EvisceratorSixPack';
}
else if ( e.Replacee == 'BlasterAmmo' ) e.Replacement = 'EvisceratorShell';
else if ( e.Replacee == 'BlasterHefty' )
{
if ( Random[Replacements](0,3) ) e.Replacement = 'EvisceratorTrioSpawn';
if ( Random[Replacements](0,4) ) e.Replacement = 'EvisceratorTrioSpawn';
else e.Replacement = 'EvisceratorSixPack';
}
else if ( (e.Replacee == 'RocketAmmo') || (e.Replacee == 'PhoenixRodAmmo') || (e.Replacee == 'MaceAmmo') )
@ -1321,7 +1300,7 @@ Class SWWMHandler : EventHandler
case 2:
case 3:
case 4:
if ( Random[Replacements](0,2) ) e.Replacement = 'HellblazerMissiles';
if ( Random[Replacements](0,3) ) e.Replacement = 'HellblazerMissiles';
else if ( Random[Replacements](0,2) ) e.Replacement = 'HellblazerMissileTrioSpawn';
else e.Replacement = 'HellblazerMissileMag';
break;
@ -1329,7 +1308,7 @@ Class SWWMHandler : EventHandler
case 6:
case 7:
case 8:
if ( Random[Replacements](0,3) ) e.Replacement = 'HellblazerCrackshots';
if ( Random[Replacements](0,4) ) e.Replacement = 'HellblazerCrackshots';
else e.Replacement = 'HellblazerCrackshotMag';
break;
case 9:
@ -1346,7 +1325,7 @@ Class SWWMHandler : EventHandler
else if ( (e.Replacee == 'Cell') || (e.Replacee == 'SkullRodAmmo') )
{
if ( Random[Replacements](0,3) ) e.Replacement = 'SparkUnit';
else if ( !Random[Replacements](0,2) ) e.Replacement = 'CandyGunBullets';
else if ( !Random[Replacements](0,3) ) e.Replacement = 'CandyGunBullets';
else e.Replacement = Random[Replacements](0,2)?'SilverBullets':'SilverBullets2';
}
else if ( (e.Replacee == 'ArtiTeleport') || (e.Replacee == 'ArtiTeleportOther') )
@ -1358,7 +1337,7 @@ Class SWWMHandler : EventHandler
{
if ( !Random[Replacements](0,2) )
{
if ( Random[Replacements](0,2) ) e.Replacement = Random[Replacements](0,2)?'SilverBulletsBundleSpawn':'SilverBullets2BundleSpawn';
if ( Random[Replacements](0,3) ) e.Replacement = Random[Replacements](0,2)?'SilverBulletsBundleSpawn':'SilverBullets2BundleSpawn';
else e.Replacement = Random[Replacements](0,2)?'SilverBulletAmmo':'SilverBulletAmmo2';
}
else if ( Random[Replacements](0,2) ) e.Replacement = 'CandyGunBulletsBundleSpawn';
@ -1377,7 +1356,7 @@ Class SWWMHandler : EventHandler
else if ( Random[Replacements](0,5) ) e.Replacement = 'HammerspaceEmbiggener';
else e.Replacement = 'GoldShell';
}
else if ( (e.Replacee == 'ArmorBonus') || (e.Replacee == 'ArtiTimeBomb') || (e.Replacee == 'ArtiBlastRadius') ) e.Replacement = 'ArmorNuggetItem';
else if ( (e.Replacee == 'ArmorBonus') || (e.Replacee == 'ArtiTimeBomb') || (e.Replacee == 'ArtiBlastRadius') || (e.Replacee is 'ArtiPoisonBag') ) e.Replacement = 'ArmorNuggetItem';
else if ( (e.Replacee == 'HealthBonus') || (e.Replacee == 'CrystalVial') ) e.Replacement = 'HealthNuggetItem';
else if ( e.Replacee == 'Stimpack' ) e.Replacement = 'TetraHealthItem';
else if ( e.Replacee == 'Medikit' ) e.Replacement = 'CubeHealthItem';

View file

@ -3,7 +3,7 @@ Class HealthNugget : Health
{
Default
{
Inventory.Amount 5;
Inventory.Amount 1;
Inventory.MaxAmount 200;
}
}
@ -12,7 +12,7 @@ Class TetraHealth : Health
{
Default
{
Inventory.Amount 15;
Inventory.Amount 10;
Inventory.MaxAmount 100;
}
}
@ -21,7 +21,7 @@ Class CubeHealth : Health
{
Default
{
Inventory.Amount 30;
Inventory.Amount 20;
Inventory.MaxAmount 100;
}
}
@ -30,7 +30,7 @@ Class RefresherHealth : Health
{
Default
{
Inventory.Amount 500;
Inventory.Amount 200;
Inventory.MaxAmount 500;
}
override bool TryPickup( in out Actor other )
@ -53,7 +53,7 @@ Class RefresherRegen : Powerup
{
Inventory.Icon "graphics/HUD/Icons/I_Refresher.png";
Powerup.Duration -60;
Powerup.Strength 5;
Powerup.Strength 10;
}
override void EndEffect()
@ -65,7 +65,7 @@ Class RefresherRegen : Powerup
override void DoEffect()
{
Super.DoEffect();
if ( Owner && (Owner.health > 0) && !(EffectTics%70) )
if ( Owner && (Owner.health > 0) && !(EffectTics%175) )
{
if ( Owner.GiveBody(int(Strength),500) )
{
@ -88,7 +88,7 @@ Class HealthNuggetItem : SWWMHealth
Default
{
Tag "$T_NUGGETH";
Stamina 1200;
Stamina 200;
Inventory.Icon "graphics/HUD/Icons/I_HealthNugget.png";
Inventory.PickupMessage "$T_NUGGETH";
Inventory.MaxAmount 20;

View file

@ -1312,6 +1312,12 @@ Class SWWMWeapon : Weapon abstract
if ( (AmmoGive2 <= 0) && (default.AmmoGive2 > 0) )
AmmoGive2 = 1;
}
override bool SpecialDropAction( Actor dropper )
{
if ( swwm_enemydrops ) return false;
// no weapon drops from enemies
return true;
}
override Inventory CreateTossable( int amt )
{
// disallow dropping if weapon isn't ready for switching

View file

@ -640,6 +640,7 @@ Class Demolitionist : PlayerPawn
dir = dir/spd;
Vector3 viewdir = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
// look for things we could potentially bump into
// TODO check for wall/ceiling collision
let bi = BlockThingsIterator.Create(self,500);
bool bumped = false;
bool raging = FindInventory("RagekitPower");
@ -1385,13 +1386,13 @@ Class Demolitionist : PlayerPawn
override bool OnGiveSecret( bool printmsg, bool playsound )
{
if ( !player ) return false;
int score = 500;
int score = 100;
// last secret (this is called before counting it up, so have to subtract)
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
if ( (level.found_secrets == level.total_secrets-1) && (!hnd || !hnd.allsecrets) )
{
if ( hnd ) hnd.allsecrets = true;
score = 5000;
score = 1000;
Console.Printf(StringTable.Localize("$SWWM_LASTSECRET"),player.GetUserName(),score);
}
else Console.Printf(StringTable.Localize("$SWWM_FINDSECRET"),player.GetUserName(),score);
@ -1411,10 +1412,10 @@ Class Demolitionist : PlayerPawn
if ( (item is 'Key') && !key_reentrant && !deathmatch )
{
// score
int score = 250;
int score = 100;
Console.Printf(StringTable.Localize("$SWWM_FINDKEY"),player.GetUserName(),item.GetTag(),score);
SWWMCredits.Give(player,score);
SWWMScoreObj.Spawn(250,Vec3Offset(0,0,Height/2));
SWWMScoreObj.Spawn(100,Vec3Offset(0,0,Height/2));
if ( !swwm_sharekeys ) return;
// share all keys in mp
for ( int i=0; i<MAXPLAYERS; i++ )

View file

@ -24,7 +24,7 @@ Class GrilledCheeseSandwich : Inventory
SWWMLoreLibrary.Add(other.player,"GCSandwich");
return Super.CreateCopy(other);
}
private void DoTheThing()
void DoTheThing( bool extrasafe = false )
{
SWWMHandler.DoFlash(Owner,Color(64,255,255,64),10);
Owner.A_QuakeEx(9,9,9,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:1.);
@ -52,6 +52,10 @@ Class GrilledCheeseSandwich : Inventory
SWWMLoreLibrary.Add(Owner.player,"Nugget");
SWWMLoreLibrary.Add(Owner.player,"BlastSuit");
SWWMLoreLibrary.Add(Owner.player,"WarArmor");
if ( !extrasafe ) return;
let s = Owner.FindInventory("GrilledCheeseSafeguard");
if ( !s ) Owner.GiveInventory("GrilledCheeseSafeguard",1);
else Powerup(s).EffectTics = Powerup(s).default.EffectTics;
}
override bool Use( bool pickup )
{
@ -80,10 +84,7 @@ Class GrilledCheeseSandwich : Inventory
{
newdamage = 0;
if ( (Owner.player == players[consoleplayer]) || bBigPowerup ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA);
DoTheThing();
let s = Owner.FindInventory("GrilledCheeseSafeguard");
if ( !s ) Owner.GiveInventory("GrilledCheeseSafeguard",1);
else Powerup(s).EffectTics = Powerup(s).default.EffectTics;
DoTheThing(true);
Amount--;
}
}

View file

@ -2115,32 +2115,37 @@ Class Sparkster : SWWMWeapon
XZW4 Y 12;
XZW4 Y 1 A_FireSpark(0);
XZW2 NOPQ 2;
XZW2 A 1 A_JumpIf(!(player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK))||(invoker.ClipCount<=0),"Vent");
XZW4 Y 3;
XZW4 Y 0
{
if ( player.cmd.buttons&BT_ALTATTACK )
return ResolveState("AltFire")+3;
return ResolveState("Fire")+3;
}
Goto Ready;
Goto PreVent;
AltFire:
XZW2 A 0 A_JumpIf(invoker.ClipCount<=0,"Reload");
XZW2 A 1 A_StartSound("biospark/prefire",CHAN_WEAPON,CHANF_OVERLAP);
XZW4 Z 12;
XZW4 Z 1 A_FireSpark(1);
XZW2 RSTU 2;
XZW2 A 1 A_JumpIf(!(player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK))||(invoker.ClipCount<=0),"Vent");
XZW4 Y 3;
XZW4 Y 0
Goto PreVent;
PreVent:
XZW2 AAAAAAAA 1
{
if ( player.cmd.buttons&BT_ATTACK )
return ResolveState("Fire")+3;
return ResolveState("AltFire")+3;
if ( invoker.ClipCount > 0 )
{
if ( player.cmd.buttons&BT_ATTACK )
return ResolveState("Refire");
if ( player.cmd.buttons&BT_ALTATTACK )
return ResolveState("AltRefire");
}
return ResolveState(null);
}
Goto Ready;
Goto Vent;
Refire:
XZW2 A 1;
XZW4 Y 3;
Goto Fire+3;
AltRefire:
XZW2 A 1;
XZW4 Y 3;
Goto AltFire+3;
Vent:
XZW2 A 12
XZW2 A 8
{
A_Overlay(PSP_WEAPON+2,"VentFlash");
A_OverlayFlags(PSP_WEAPON+2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);