// All the armor items go here Class ArmorNugget : SWWMArmor { Default { Inventory.Icon "graphics/HUD/Icons/I_ArmorNugget.png"; Inventory.Amount 1; Inventory.MaxAmount 200; Inventory.InterHubAmount 200; SWWMArmor.ArmorPriority 3; SWWMArmor.GiverArmor "ArmorNuggetItem"; } override int HandleDamage( int damage, Name damageType, int flags ) { double factor = amount*.01; return int(ceil(damage*factor)); } } Class ArmorNuggetItem : SWWMSpareArmor { override Inventory CreateCopy( Actor other ) { // additional lore SWWMLoreLibrary.Add(other.player,"Nugget"); return Super.CreateCopy(other); } override void DoPickupSpecial( Actor toucher ) { Super.DoPickupSpecial(toucher); SWWMUtility.AchievementProgressInc("candy",1,toucher.player); } Default { //$Title Armor Nugget //$Group Armor //$Sprite graphics/HUD/Icons/I_ArmorNugget.png //$Icon armour Tag "$T_NUGGETA"; Stamina 400; Inventory.Icon "graphics/HUD/Icons/I_ArmorNugget.png"; Inventory.PickupMessage "$T_NUGGETA"; Inventory.MaxAmount 20; Inventory.InterHubAmount 20; Inventory.UseSound "misc/armor_pkup"; SWWMSpareArmor.GiveArmor "ArmorNugget"; +INVENTORY.ALWAYSPICKUP; Radius 4; Height 22; } States { Spawn: XZW1 # -1 NoDelay { frame = Random[Nugget](0,7); } Stop; Dummy: XZW1 ABCDEFGH -1; Stop; } } Class BlastSuit : SWWMArmor { Default { Inventory.Icon "graphics/HUD/Icons/I_BlastSuit.png"; Inventory.Amount 150; Inventory.MaxAmount 150; Inventory.InterHubAmount 150; Inventory.RestrictedTo "Demolitionist"; SWWMArmor.ArmorPriority 4; SWWMArmor.DrainMessage "$D_BLASTSUIT"; SWWMArmor.GiverArmor "BlastSuitItem"; } override int HandleDamage( int damage, Name damageType, int flags ) { double factor = .3; if ( flags&DMG_EXPLOSION ) factor = 1.-(1.-factor)*.5; return int(ceil(damage*factor)); } } Class BlastSuitItem : SWWMSpareArmor { override Inventory CreateCopy( Actor other ) { // additional lore SWWMLoreLibrary.Add(other.player,"BlastSuit"); return Super.CreateCopy(other); } Default { //$Title Blast Suit //$Group Armor //$Sprite graphics/HUD/Icons/I_BlastSuit.png //$Icon armour Tag "$T_BLASTSUIT"; Stamina 40000; Inventory.Icon "graphics/HUD/Icons/I_BlastSuit.png"; Inventory.PickupMessage "$T_BLASTSUIT"; Inventory.UseSound "armor/blastsuit"; Inventory.RestrictedTo "Demolitionist"; SWWMSpareArmor.GiveArmor "BlastSuit"; Radius 12; Height 30; } States { Spawn: XZW1 A -1; Stop; } } Class WarArmor : SWWMArmor { Default { Inventory.Icon "graphics/HUD/Icons/I_WarArmor.png"; Inventory.Amount 250; Inventory.MaxAmount 250; Inventory.InterHubAmount 250; Inventory.RestrictedTo "Demolitionist"; SWWMArmor.ArmorPriority 5; SWWMArmor.DrainMessage "$D_WARARMOR"; SWWMArmor.GiverArmor "WarArmorItem"; } override int HandleDamage( int damage, Name damageType, int flags ) { double factor; // should be enough "elemental" damage types I guess if ( (damageType == 'Fire') || (damageType == 'Ice') || (damageType == 'Slime') || (damageType == 'Electric') || (damageType == 'Plasma') || (damageType == 'Radiation') || (damageType == 'Wind') || (damageType == 'Water') || (damageType == 'Corroded') || (damageType == 'Lava') ) factor = .8; else factor = .5; if ( flags&DMG_EXPLOSION ) factor = 1.-(1.-factor)*.7; return int(ceil(damage*factor)); } } Class WarArmorItem : SWWMSpareArmor { override Inventory CreateCopy( Actor other ) { // additional lore SWWMLoreLibrary.Add(other.player,"WarArmor"); return Super.CreateCopy(other); } Default { //$Title War Armor //$Group Armor //$Sprite graphics/HUD/Icons/I_WarArmor.png //$Icon armour Tag "$T_WARARMOR"; Stamina 100000; Inventory.Icon "graphics/HUD/Icons/I_WarArmor.png"; Inventory.PickupMessage "$T_WARARMOR"; Inventory.UseSound "armor/wararmor"; Inventory.RestrictedTo "Demolitionist"; SWWMSpareArmor.GiveArmor "WarArmor"; Radius 16; Height 32; } States { Spawn: XZW1 A -1; Stop; } }