546 lines
9.2 KiB
Text
546 lines
9.2 KiB
Text
// ============================================================================
|
|
// Spreadgun / Wallbuster ammo
|
|
// ============================================================================
|
|
|
|
Class RedShell : SWWMAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_REDSHELL";
|
|
SWWMAmmo.PickupTag "REDSHELL";
|
|
Stamina 500;
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 80;
|
|
Ammo.BackpackAmount 8;
|
|
Ammo.BackpackMaxAmount 200;
|
|
Ammo.DropAmount 2;
|
|
+FLOATBOB;
|
|
FloatBobStrength 0.25;
|
|
Radius 4;
|
|
Height 20;
|
|
Accuracy 50;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
Class RedShell2 : RedShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 2;
|
|
Radius 6;
|
|
}
|
|
}
|
|
Class RedShell4 : RedShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 4;
|
|
Radius 6;
|
|
}
|
|
}
|
|
Class RedShell8 : RedShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 8;
|
|
Radius 8;
|
|
}
|
|
}
|
|
Class RedShell12 : RedShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 12;
|
|
Radius 8;
|
|
}
|
|
}
|
|
Class RedShell16 : RedShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 16;
|
|
Radius 8;
|
|
}
|
|
}
|
|
|
|
Class GoldShellSparkle : Actor
|
|
{
|
|
override void PostBeginPlay()
|
|
{
|
|
Scale *= FRandom[Goldy](.5,1.5);
|
|
vel.z = FRandom[Goldy](.5,1.5);
|
|
}
|
|
override void Tick()
|
|
{
|
|
if ( isFrozen() ) return;
|
|
SetOrigin(Vec3Offset(0,0,vel.z),true);
|
|
alpha -= .02;
|
|
if ( alpha <= 0 ) Destroy();
|
|
}
|
|
Default
|
|
{
|
|
RenderStyle "Add";
|
|
Scale 0.05;
|
|
+NOGRAVITY;
|
|
+NOBLOCKMAP;
|
|
+NOINTERACTION;
|
|
+SYNCHRONIZED;
|
|
+DONTSPLASH;
|
|
+NOTELEPORT;
|
|
+FORCEXYBILLBOARD;
|
|
FloatBobPhase 0;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
BLPF A -1 Bright;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class GoldShell : SWWMAmmo
|
|
{
|
|
action void A_GoldShellTrail()
|
|
{
|
|
if ( Random[Goldy](0,2) ) return;
|
|
Spawn("GoldShellSparkle",Vec3Offset(FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](-radius,radius)/2.,FRandom[Goldy](10,18)));
|
|
}
|
|
|
|
Default
|
|
{
|
|
Tag "$T_GOLDSHELL";
|
|
SWWMAmmo.PickupTag "GOLDSHELL";
|
|
Inventory.PickupSound "misc/ammo_pkup_vip";
|
|
Stamina -1000000;
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 7;
|
|
Ammo.BackpackAmount 0;
|
|
Ammo.BackpackMaxAmount 7;
|
|
Ammo.DropAmount 1;
|
|
+FLOATBOB;
|
|
+DONTGIB; // don't crush these, they're valuable
|
|
FloatBobStrength 0.25;
|
|
Radius 4;
|
|
Height 20;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A 1 A_GoldShellTrail();
|
|
Wait;
|
|
}
|
|
}
|
|
Class GoldShell2 : GoldShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 2;
|
|
Radius 6;
|
|
}
|
|
}
|
|
Class GoldShell4 : GoldShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 4;
|
|
Radius 6;
|
|
}
|
|
}
|
|
|
|
// ============================================================================
|
|
// Eviscerator ammo
|
|
// ============================================================================
|
|
|
|
Class EvisceratorShell : SWWMAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_EVISHELL";
|
|
SWWMAmmo.PickupTag "EVISHELL";
|
|
Inventory.PickupMessage "$T_EVISHELL";
|
|
Stamina 3000;
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 20;
|
|
Ammo.BackpackAmount 3;
|
|
Ammo.BackpackMaxAmount 60;
|
|
Ammo.DropAmount 1;
|
|
+FLOATBOB;
|
|
+SWWMAMMO.USEPICKUPMSG;
|
|
FloatBobStrength 0.25;
|
|
Radius 8;
|
|
Height 22;
|
|
Accuracy 60;
|
|
}
|
|
override void ModifyDropAmount( int dropamount )
|
|
{
|
|
Ammo.ModifyDropAmount(dropamount);
|
|
Amount = min(Amount,3);
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
Class EvisceratorShell2 : EvisceratorShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.PickupMessage "$I_EVISHELLCLIP2";
|
|
Inventory.Amount 2;
|
|
Radius 16;
|
|
}
|
|
}
|
|
Class EvisceratorShell3 : EvisceratorShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.PickupMessage "$I_EVISHELLCLIP3";
|
|
Inventory.Amount 3;
|
|
Radius 16;
|
|
}
|
|
}
|
|
|
|
Class EvisceratorSixPack : EvisceratorShell
|
|
{
|
|
Default
|
|
{
|
|
Inventory.PickupMessage "$I_EVISHELLPAK";
|
|
Inventory.Amount 6;
|
|
Radius 20;
|
|
Height 24;
|
|
}
|
|
}
|
|
|
|
// ============================================================================
|
|
// Hellblazer ammo
|
|
// ============================================================================
|
|
|
|
Class HellblazerMissiles : SWWMAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_HELLMISSILE";
|
|
SWWMAmmo.PickupTag "HELLMISSILE";
|
|
Stamina 8000;
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 30;
|
|
Ammo.BackpackAmount 2;
|
|
Ammo.BackpackMaxAmount 90;
|
|
Ammo.DropAmount 1;
|
|
+FLOATBOB;
|
|
FloatBobStrength 0.25;
|
|
Radius 6;
|
|
Height 22;
|
|
Accuracy 70;
|
|
}
|
|
override void ModifyDropAmount( int dropamount )
|
|
{
|
|
Ammo.ModifyDropAmount(dropamount);
|
|
Amount = min(Amount,3);
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
Class HellblazerMissiles2 : HellblazerMissiles
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 2;
|
|
}
|
|
}
|
|
Class HellblazerMissiles3 : HellblazerMissiles
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 3;
|
|
}
|
|
}
|
|
Class HellblazerMissileMag : HellblazerMissiles
|
|
{
|
|
Default
|
|
{
|
|
Inventory.PickupMessage "$T_HELLMISSILEMAG";
|
|
Inventory.Amount 6;
|
|
+SWWMAMMO.USEPICKUPMSG;
|
|
Radius 12;
|
|
Height 26;
|
|
}
|
|
}
|
|
|
|
// ============================================================================
|
|
// Sparkster ammo
|
|
// ============================================================================
|
|
|
|
Class SparkUnit : SWWMAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_SPARKUNIT";
|
|
SWWMAmmo.PickupTag "SPARKUNIT";
|
|
Stamina 50000;
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 8;
|
|
Ammo.BackpackAmount 1;
|
|
Ammo.BackpackMaxAmount 24;
|
|
Ammo.DropAmount 1;
|
|
+FLOATBOB;
|
|
FloatBobStrength 0.25;
|
|
Radius 6;
|
|
Height 22;
|
|
Accuracy 70;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
Class SparkUnit2 : SparkUnit
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 2;
|
|
Radius 8;
|
|
}
|
|
}
|
|
|
|
// ============================================================================
|
|
// Silver Bullet ammo
|
|
// ============================================================================
|
|
|
|
Class SilverBulletAmmo : SWWMAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_XSBMAG";
|
|
SWWMAmmo.PickupTag "XSBMAG";
|
|
Stamina 70000;
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 5;
|
|
Ammo.BackpackAmount 0;
|
|
Ammo.BackpackMaxAmount 11;
|
|
Ammo.DropAmount 1;
|
|
SWWMAmmo.MagAmmoType "SilverBullets";
|
|
+FLOATBOB;
|
|
FloatBobStrength 0.25;
|
|
Radius 10;
|
|
Height 26;
|
|
Accuracy 75;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class SilverBullets : MagAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_XSBBULLET";
|
|
MagAmmo.PickupTag "XSBBULLET";
|
|
Stamina -12000;
|
|
MagAmmo.ParentAmmo "SilverBulletAmmo";
|
|
MagAmmo.ClipSize 5;
|
|
MagAmmo.BackpackAmount 2;
|
|
Inventory.MaxAmount 5;
|
|
+FLOATBOB;
|
|
FloatBobStrength 0.25;
|
|
Radius 4;
|
|
Height 22;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
Class SilverBullets2 : SilverBullets
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 2;
|
|
Radius 6;
|
|
Height 24;
|
|
}
|
|
}
|
|
Class SilverBullets3 : SilverBullets
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 3;
|
|
Radius 6;
|
|
Height 24;
|
|
}
|
|
}
|
|
|
|
// ============================================================================
|
|
// Candygun ammo
|
|
// ============================================================================
|
|
|
|
Class CandyGunAmmo : SWWMAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_CANDYMAG";
|
|
SWWMAmmo.PickupTag "CANDYMAG";
|
|
Stamina 100000;
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 1;
|
|
Ammo.BackpackAmount 0;
|
|
Ammo.BackpackMaxAmount 4;
|
|
Ammo.DropAmount 1;
|
|
SWWMAmmo.MagAmmoType "CandyGunBullets";
|
|
+FLOATBOB;
|
|
FloatBobStrength 0.25;
|
|
Radius 6;
|
|
Height 24;
|
|
Accuracy 90;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class CandyGunBullets : MagAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_CANDYBULLET";
|
|
MagAmmo.PickupTag "CANDYBULLET";
|
|
Stamina -14000;
|
|
MagAmmo.ParentAmmo "CandyGunAmmo";
|
|
MagAmmo.ClipSize 7;
|
|
MagAmmo.BackpackAmount 1;
|
|
Inventory.MaxAmount 7;
|
|
+FLOATBOB;
|
|
FloatBobStrength 0.25;
|
|
Radius 2;
|
|
Height 20;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
Class CandyGunBullets2 : CandyGunBullets
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 2;
|
|
Radius 2.5;
|
|
}
|
|
}
|
|
Class CandyGunBullets3 : CandyGunBullets
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 3;
|
|
Radius 3;
|
|
}
|
|
}
|
|
|
|
Class CandyGunSpares : SWWMAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_CANDYSPARE";
|
|
SWWMAmmo.PickupTag "CANDYSPARE";
|
|
Stamina 600000;
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 4;
|
|
Ammo.BackpackAmount 0;
|
|
Ammo.BackpackMaxAmount 4;
|
|
}
|
|
override Inventory CreateTossable( int amt )
|
|
{
|
|
if ( Amount > 0 )
|
|
{
|
|
// drop an empty spare
|
|
let spare = Inventory(Spawn('CandyGun',Owner.Pos,NO_REPLACE));
|
|
if ( !spare ) return null;
|
|
// spare with empty mag
|
|
CandyGun(spare).bInitialized = true;
|
|
CandyGun(spare).AmmoGive1 = 0;
|
|
CandyGun(spare).clipcount = 0;
|
|
CandyGun(spare).chambered = false;
|
|
spare.SetState(spare.SpawnState+1);
|
|
spare.DropTime = 30;
|
|
spare.bSpecial = spare.bSolid = false;
|
|
Amount--;
|
|
return spare;
|
|
}
|
|
return null;
|
|
}
|
|
override void DoEffect()
|
|
{
|
|
Super.DoEffect();
|
|
if ( !Owner ) return;
|
|
// auto-give an empty gun if the player does not own one
|
|
if ( Owner.FindInventory("CandyGun") || (Amount <= 0) ) return;
|
|
// don't do this if the player owns a Mortal Rifle and swapweapons are enabled
|
|
if ( Owner.FindInventory("MisterRifle") && swwm_swapweapons ) return;
|
|
Amount--;
|
|
let g = CandyGun(Spawn("CandyGun"));
|
|
g.bInitialized = true;
|
|
g.ammogive1 = 0;
|
|
g.ammogive2 = 0;
|
|
g.clipcount = 0;
|
|
g.chambered = false;
|
|
g.AttachToOwner(Owner);
|
|
// make sure it doesn't autoswitch if empty
|
|
if ( !g.ReportHUDAmmo() && (Owner.player.PendingWeapon == g) )
|
|
Owner.player.PendingWeapon = WP_NOCHANGE;
|
|
}
|
|
}
|
|
|
|
// ============================================================================
|
|
// Ynykron ammo
|
|
// ============================================================================
|
|
|
|
Class YnykronAmmo : SWWMAmmo
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_YNYKRONAMMO";
|
|
SWWMAmmo.PickupTag "YNYKRONAMMO";
|
|
Inventory.PickupSound "misc/ammo_pkup_vip";
|
|
Stamina -3000000;
|
|
Inventory.Amount 1;
|
|
Inventory.MaxAmount 1;
|
|
Ammo.BackpackAmount 0;
|
|
Ammo.BackpackMaxAmount 3;
|
|
Ammo.DropAmount 1;
|
|
+FLOATBOB;
|
|
FloatBobStrength 0.25;
|
|
Radius 8;
|
|
Height 24;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|