- Added Gravity Suppressor. - Adjusted Health Geodesic sizes. - Adjusted max amounts of nuggets (capped at 40 now). - Added secret combination to menu (nothing to find yet though, that will come later). - 6DOF movement when flying.
202 lines
3.8 KiB
Text
202 lines
3.8 KiB
Text
// all the healing items go here
|
|
Class HealthNugget : Health
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 5;
|
|
Inventory.MaxAmount 200;
|
|
}
|
|
}
|
|
|
|
Class TetraHealth : Health
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 15;
|
|
Inventory.MaxAmount 100;
|
|
}
|
|
}
|
|
|
|
Class CubeHealth : Health
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 30;
|
|
Inventory.MaxAmount 100;
|
|
}
|
|
}
|
|
|
|
Class RefresherHealth : Health
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Amount 500;
|
|
Inventory.MaxAmount 500;
|
|
}
|
|
override bool TryPickup( in out Actor other )
|
|
{
|
|
PrevHealth = other.player?other.player.health:other.health;
|
|
if ( other.GiveBody(Amount,MaxAmount) )
|
|
{
|
|
GoAwayAndDie();
|
|
let p = Powerup(other.FindInventory("RefresherRegen"));
|
|
if ( p ) p.EffectTics = p.default.EffectTics;
|
|
else other.GiveInventory("RefresherRegen",1);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
Class RefresherRegen : Powerup
|
|
{
|
|
Default
|
|
{
|
|
Inventory.Icon "graphics/HUD/Icons/I_Refresher.png";
|
|
Powerup.Duration -60;
|
|
Powerup.Strength 10;
|
|
}
|
|
|
|
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%175) )
|
|
{
|
|
if ( Owner.GiveBody(int(Strength),500) )
|
|
{
|
|
SWWMHandler.DoFlash(Owner,Color(32,224,128,255),10);
|
|
Owner.A_StartSound("powerup/refresher",CHAN_ITEM,CHANF_LOCAL,.4);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Class HealthNuggetItem : SWWMHealth
|
|
{
|
|
override Inventory CreateCopy( Actor other )
|
|
{
|
|
// additional lore
|
|
SWWMLoreLibrary.Add(other.player,"Nugget");
|
|
return Super.CreateCopy(other);
|
|
}
|
|
Default
|
|
{
|
|
Tag "$T_NUGGETH";
|
|
Stamina 1200;
|
|
Inventory.Icon "graphics/HUD/Icons/I_HealthNugget.png";
|
|
Inventory.PickupMessage "$T_NUGGETH";
|
|
Inventory.MaxAmount 40;
|
|
Inventory.InterHubAmount 40;
|
|
SWWMHealth.GiveHealth "HealthNugget";
|
|
+INVENTORY.ALWAYSPICKUP;
|
|
+COUNTITEM;
|
|
}
|
|
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 3000;
|
|
Inventory.Icon "graphics/HUD/Icons/I_HealthTetra.png";
|
|
Inventory.PickupMessage "$T_TETRAHEALTH";
|
|
Inventory.MaxAmount 20;
|
|
Inventory.InterHubAmount 20;
|
|
SWWMHealth.GiveHealth "TetraHealth";
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 # -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 5000;
|
|
Inventory.Icon "graphics/HUD/Icons/I_HealthCube.png";
|
|
Inventory.PickupMessage "$T_CUBEHEALTH";
|
|
Inventory.MaxAmount 10;
|
|
Inventory.InterHubAmount 10;
|
|
SWWMHealth.GiveHealth "CubeHealth";
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 # -1;
|
|
Stop;
|
|
}
|
|
}
|
|
Class RefresherItem : SWWMHealth
|
|
{
|
|
override Inventory CreateCopy( Actor other )
|
|
{
|
|
// additional lore
|
|
SWWMLoreLibrary.Add(other.player,"Refresher");
|
|
return Super.CreateCopy(other);
|
|
}
|
|
override void AutoUseExtra()
|
|
{
|
|
let p = Powerup(Owner.FindInventory("RefresherRegen"));
|
|
if ( p ) p.EffectTics = p.default.EffectTics;
|
|
else Owner.GiveInventory("RefresherRegen",1);
|
|
}
|
|
override bool Use( bool pickup )
|
|
{
|
|
if ( pickup && !deathmatch ) return false;
|
|
return Super.Use(pickup);
|
|
}
|
|
Default
|
|
{
|
|
Tag "$T_REFRESHER";
|
|
Stamina 60000;
|
|
Inventory.Icon "graphics/HUD/Icons/I_Refresher.png";
|
|
Inventory.PickupMessage "$T_REFRESHER";
|
|
Inventory.PickupSound "misc/p_pkup";
|
|
Inventory.MaxAmount 5;
|
|
Inventory.InterHubAmount 5;
|
|
SWWMHealth.GiveHealth "RefresherHealth";
|
|
+COUNTITEM;
|
|
+INVENTORY.BIGPOWERUP;
|
|
+INVENTORY.ALWAYSPICKUP;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 # -1;
|
|
Stop;
|
|
}
|
|
}
|