- All items now have vanilla hitbox sizes for compatibility. - Removed extended hitboxes (no longer needed). - Blob shadows are now exclusive to players (and eventually monsters). - Glows and sparkles are no longer toggleable. - Glows and sparkles have fixed size/radius. - Item sparkles are now handled by the glows, rather than the player.
211 lines
4.7 KiB
Text
211 lines
4.7 KiB
Text
// all the healing items go here
|
|
Class HealthNugget : Health
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 2;
|
|
Inventory.MaxAmount 200;
|
|
}
|
|
}
|
|
|
|
Class TetraHealth : Health
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 10;
|
|
Inventory.MaxAmount 100;
|
|
}
|
|
}
|
|
|
|
Class CubeHealth : Health
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 20;
|
|
Inventory.MaxAmount 100;
|
|
}
|
|
}
|
|
|
|
Class RefresherHealth : Health
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 100;
|
|
Inventory.MaxAmount 500;
|
|
}
|
|
}
|
|
Class RefresherRegen : Powerup
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Icon "graphics/HUD/Icons/I_Refresher.png";
|
|
Powerup.Duration -50;
|
|
Powerup.Strength 10;
|
|
+INVENTORY.ADDITIVETIME;
|
|
}
|
|
|
|
override void EndEffect()
|
|
{
|
|
Super.EndEffect();
|
|
if ( (EffectTics <= 0) && Owner && Owner.CheckLocalView() ) Console.Printf(StringTable.Localize("$D_REFRESHER"));
|
|
}
|
|
|
|
override void DoEffect()
|
|
{
|
|
Super.DoEffect();
|
|
if ( !Owner || (Owner.health <= 0) || ((EffectTics-5)%175) ) return;
|
|
if ( !Owner.GiveBody(int(Strength),500) ) return;
|
|
SWWMHandler.DoFlash(Owner,Color(32,224,128,255),10);
|
|
Owner.A_StartSound("powerup/refresher",CHAN_ITEMEXTRA,CHANF_LOCAL|CHANF_OVERLAP,.4);
|
|
if ( Owner is 'Demolitionist' )
|
|
Demolitionist(Owner).lastbump *= 0.99;
|
|
}
|
|
}
|
|
|
|
Class HealthNuggetItem : SWWMHealth
|
|
{
|
|
override bool Use( bool pickup )
|
|
{
|
|
// additional lore
|
|
SWWMLoreLibrary.Add(Owner.player,"Nugget");
|
|
bool bUsed = Super.Use(pickup);
|
|
// sell excess
|
|
if ( !bUsed )
|
|
{
|
|
int sellprice = abs(Stamina)/2;
|
|
SWWMScoreObj.Spawn(sellprice,level.Vec3Offset(Owner.pos,SWWMUtility.Vec3FromAngles(FRandom[ScoreBits](0,360),FRandom[ScoreBits](-90,90))*8.+(0,0,Owner.Height/2)));
|
|
SWWMCredits.Give(Owner.player,sellprice);
|
|
if ( Owner.player )
|
|
{
|
|
if ( Owner.player == players[consoleplayer] ) Console.Printf(StringTable.Localize(SWWMUtility.SellFemaleItem(self)?"$SWWM_SELLEXTRA_FEM":"$SWWM_SELLEXTRA"),GetTag(),sellprice);
|
|
else Console.Printf(StringTable.Localize(SWWMUtility.SellFemaleItem(self)?"$SWWM_SELLEXTRAREM_FEM":"$SWWM_SELLEXTRAREM"),Owner.player.GetUserName(),GetTag(),sellprice);
|
|
}
|
|
}
|
|
return bUsed;
|
|
}
|
|
override void DoPickupSpecial( Actor toucher )
|
|
{
|
|
Super.DoPickupSpecial(toucher);
|
|
SWWMUtility.AchievementProgressInc("candy",1,toucher.player);
|
|
}
|
|
Default
|
|
{
|
|
Tag "$T_NUGGETH";
|
|
Stamina -500;
|
|
Inventory.PickupMessage "$T_NUGGETH";
|
|
Inventory.MaxAmount 0;
|
|
Inventory.InterHubAmount 0;
|
|
SWWMHealth.GiveHealth "HealthNugget";
|
|
+INVENTORY.ALWAYSPICKUP;
|
|
-INVENTORY.INVBAR;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 # -1 NoDelay
|
|
{
|
|
frame = Random[Nugget](0,7);
|
|
}
|
|
Stop;
|
|
Dummy:
|
|
XZW1 ABCDEFGH -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class TetraHealthItem : SWWMHealth
|
|
{
|
|
override Inventory CreateCopy( Actor other )
|
|
{
|
|
// additional lore
|
|
SWWMLoreLibrary.Add(other.player,"HealthGeom");
|
|
return Super.CreateCopy(other);
|
|
}
|
|
Default
|
|
{
|
|
Tag "$T_TETRAHEALTH";
|
|
Stamina 2000;
|
|
Inventory.Icon "graphics/HUD/Icons/I_HealthTetra.png";
|
|
Inventory.PickupMessage "$T_TETRAHEALTH";
|
|
Inventory.MaxAmount 15;
|
|
Inventory.InterHubAmount 15;
|
|
SWWMHealth.GiveHealth "TetraHealth";
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
Class CubeHealthItem : SWWMHealth
|
|
{
|
|
override Inventory CreateCopy( Actor other )
|
|
{
|
|
// additional lore
|
|
SWWMLoreLibrary.Add(other.player,"HealthGeom");
|
|
return Super.CreateCopy(other);
|
|
}
|
|
Default
|
|
{
|
|
Tag "$T_CUBEHEALTH";
|
|
Stamina 4000;
|
|
Inventory.Icon "graphics/HUD/Icons/I_HealthCube.png";
|
|
Inventory.PickupMessage "$T_CUBEHEALTH";
|
|
Inventory.MaxAmount 10;
|
|
Inventory.InterHubAmount 10;
|
|
SWWMHealth.GiveHealth "CubeHealth";
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
Class RefresherItem : SWWMHealth
|
|
{
|
|
override Inventory CreateCopy( Actor other )
|
|
{
|
|
// additional lore
|
|
SWWMLoreLibrary.Add(other.player,"Refresher");
|
|
return Super.CreateCopy(other);
|
|
}
|
|
override void AutoUseExtra( bool recursive )
|
|
{
|
|
SWWMUtility.AchievementProgressInc("refresh",1,Owner.player);
|
|
// regen effect doesn't stack if we autoactivated recursively
|
|
if ( recursive ) return;
|
|
let p = Powerup(Owner.FindInventory("RefresherRegen"));
|
|
if ( p ) p.EffectTics += p.default.EffectTics;
|
|
else Owner.GiveInventory("RefresherRegen",1);
|
|
SWWMHandler.DoFlash(Owner,Color(80,224,128,255),20);
|
|
if ( Owner is 'Demolitionist' )
|
|
Demolitionist(Owner).lastbump *= 0.95;
|
|
}
|
|
override bool Use( bool pickup )
|
|
{
|
|
// never get auto-used on pickup unless we're in deathmatch
|
|
if ( pickup && !deathmatch ) return false;
|
|
return Super.Use(pickup);
|
|
}
|
|
Default
|
|
{
|
|
Tag "$T_REFRESHER";
|
|
Stamina 160000;
|
|
Inventory.Icon "graphics/HUD/Icons/I_Refresher.png";
|
|
Inventory.PickupMessage "$T_REFRESHER";
|
|
Inventory.PickupSound "misc/p_pkup";
|
|
Inventory.UseSound "powerup/refresheruse";
|
|
SWWMHealth.GiveHealth "RefresherHealth";
|
|
+COUNTITEM;
|
|
+INVENTORY.BIGPOWERUP;
|
|
+INVENTORY.ALWAYSPICKUP;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1;
|
|
Stop;
|
|
}
|
|
}
|