All misc items implemented. Enhanced Shock Rifle implemented.
Going to focus on the HUD now while at the same time doing the remaining weapons.
This commit is contained in:
parent
5248ac8fd6
commit
d3da87cefe
310 changed files with 2236 additions and 77 deletions
|
|
@ -1,9 +1,43 @@
|
|||
Class UTArmorBonus : ArmorBonus replaces ArmorBonus
|
||||
Class UTArmor : Armor
|
||||
{
|
||||
int absorb;
|
||||
|
||||
Property ArmorAbsorption : absorb;
|
||||
|
||||
Default
|
||||
{
|
||||
+INVENTORY.AUTOACTIVATE;
|
||||
+INVENTORY.UNTOSSABLE;
|
||||
}
|
||||
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
|
||||
{
|
||||
int saved;
|
||||
if ( (amount > 0) && !DamageTypeDefinition.IgnoreArmor(damageType) )
|
||||
{
|
||||
saved = damage*absorb/100.;
|
||||
if ( amount <= saved ) saved = amount;
|
||||
newdamage -= saved;
|
||||
amount -= saved;
|
||||
damage = newdamage;
|
||||
}
|
||||
if ( damage > 0 ) newdamage = ApplyDamageFactors(GetClass(),damageType,damage,damage);
|
||||
if ( amount <= 0 ) Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Class UTArmorBonus : UTArmor replaces ArmorBonus
|
||||
{
|
||||
Default
|
||||
{
|
||||
Tag "Armor Bonus";
|
||||
Armor.SaveAmount 5;
|
||||
+COUNTITEM;
|
||||
+INVENTORY.AUTOACTIVATE;
|
||||
+INVENTORY.UNTOSSABLE;
|
||||
+INVENTORY.ALWAYSPICKUP;
|
||||
Inventory.Amount 5;
|
||||
Inventory.MaxAmount 50;
|
||||
Inventory.InterHubAmount 50;
|
||||
UTArmor.ArmorAbsorption 25;
|
||||
Inventory.PickupMessage "You picked up an Armor Bonus.";
|
||||
Inventory.PickupSound "misc/ut_shard";
|
||||
}
|
||||
|
|
@ -15,18 +49,15 @@ Class UTArmorBonus : ArmorBonus replaces ArmorBonus
|
|||
}
|
||||
}
|
||||
|
||||
// TODO system for separating the 4 armor pickups (like Hexen's, but not as strict)
|
||||
Class UTArmor : Inventory
|
||||
{
|
||||
}
|
||||
|
||||
Class UTThighPads : BasicArmorPickup replaces GreenArmor
|
||||
Class UTThighPads : UTArmor replaces GreenArmor
|
||||
{
|
||||
Default
|
||||
{
|
||||
Tag "Thigh Pads";
|
||||
Armor.SaveAmount 50;
|
||||
Armor.SavePercent 50;
|
||||
Inventory.Amount 50;
|
||||
Inventory.MaxAmount 50;
|
||||
Inventory.InterHubAmount 50;
|
||||
UTArmor.ArmorAbsorption 50;
|
||||
Inventory.PickupMessage "You got the Thigh Pads.";
|
||||
Inventory.PickupSound "misc/ut_armor";
|
||||
}
|
||||
|
|
@ -38,13 +69,15 @@ Class UTThighPads : BasicArmorPickup replaces GreenArmor
|
|||
}
|
||||
}
|
||||
|
||||
Class UTBodyArmor : BasicArmorPickup replaces BlueArmor
|
||||
Class UTBodyArmor : UTArmor replaces BlueArmor
|
||||
{
|
||||
Default
|
||||
{
|
||||
Tag "Body Armor";
|
||||
Armor.SaveAmount 100;
|
||||
Armor.SavePercent 75;
|
||||
Inventory.Amount 100;
|
||||
Inventory.MaxAmount 100;
|
||||
Inventory.InterHubAmount 100;
|
||||
UTArmor.ArmorAbsorption 75;
|
||||
Inventory.PickupMessage "You got the Body Armor.";
|
||||
Inventory.PickupSound "misc/ut_armor";
|
||||
}
|
||||
|
|
@ -56,29 +89,43 @@ Class UTBodyArmor : BasicArmorPickup replaces BlueArmor
|
|||
}
|
||||
}
|
||||
|
||||
Class UTShieldBelt : Inventory replaces Megasphere
|
||||
Class UTShieldBelt : UTArmor replaces Megasphere
|
||||
{
|
||||
override void ModifyDamage( int damage, Name damageType, out int newdamage, bool passive )
|
||||
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
|
||||
{
|
||||
if ( !passive || (damage <= 0) ) return;
|
||||
newdamage = max(0,damage-Amount);
|
||||
Owner.A_PlaySound("belt/absorb");
|
||||
if ( amount-damage <= 0 ) Owner.A_Print("The Shield Belt has depleted.");
|
||||
Owner.TakeInventory("UTShieldBelt",min(amount,damage));
|
||||
if ( (amount > 0) && !DamageTypeDefinition.IgnoreArmor(damageType) ) Owner.A_PlaySound("belt/absorb");
|
||||
Super.AbsorbDamage(damage,damageType,newdamage);
|
||||
}
|
||||
override void OnDestroy()
|
||||
{
|
||||
Super.OnDestroy();
|
||||
if ( amount <= 0 && Owner ) PrintPickupMessage(true,"The Shield Belt has depleted.");
|
||||
}
|
||||
override bool Use( bool pickup )
|
||||
{
|
||||
// removes thigh pads and body armor like in UT
|
||||
Owner.TakeInventory("UTThighPads",50);
|
||||
Owner.TakeInventory("UTBodyArmor",150);
|
||||
return false;
|
||||
}
|
||||
override bool HandlePickup( Inventory item )
|
||||
{
|
||||
if ( (item is 'UTThighPads') || (item is 'UTBodyArmor') ) return true;
|
||||
return Super.HandlePickup(item);
|
||||
}
|
||||
Default
|
||||
{
|
||||
Tag "Shield Belt";
|
||||
+COUNTITEM;
|
||||
+INVENTORY.AUTOACTIVATE;
|
||||
+Inventory.UNTOSSABLE;
|
||||
+INVENTORY.ALWAYSPICKUP;
|
||||
+INVENTORY.BIGPOWERUP;
|
||||
Inventory.Amount 150;
|
||||
Inventory.MaxAmount 150;
|
||||
Inventory.InterHubAmount 150;
|
||||
UTArmor.ArmorAbsorption 100;
|
||||
Inventory.PickupMessage "You got the Shield Belt.";
|
||||
Inventory.PickupSound "belt/pickup";
|
||||
Inventory.RespawnTics 2100;
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue