etayn

old gzdoom project
git clone git://moonbender.net/etayn
Log | Files | Refs | README

armor.zsc (1069B)


      1 //	0 = UNARMORED
      2 //	1 = BRIGANDINE (backpack replacement, 50% damage reduction)
      3 //	2 = MARISKULL	(radsuit replacement)
      4 
      5 class DBArmorBase : Actor
      6 {
      7 	int armortype;
      8 	Property ArmorType : armortype;
      9 	Default
     10 	{
     11 		Radius 30;
     12 		Height 30;
     13 		DBArmorBase.ArmorType 0;
     14 	}
     15 	
     16 	override void Tick()
     17 	{
     18 		let bun  = DevilbunnyPlayer(players[consoleplayer].mo);
     19 		if (bun)
     20 		{
     21 			if(Distance3d(bun) < 64)
     22 			{
     23 				bun.A_Print("Press your 'don armor' binding to wear this shit");
     24 				if (bun.inDonArmor && bun.hasArmorType == 0)
     25 				{
     26 					bun.hasArmorType = armortype;
     27 					A_StartSound("swordland", CHAN_BODY);
     28 					SetStateLabel("Poof");
     29 				}
     30 			}
     31 		}
     32 		Super.Tick();
     33 	}
     34 	
     35 	States
     36 	{
     37 		Poof:
     38 			TNT1 A 1;
     39 			stop;
     40 	}
     41 }
     42 
     43 class Brigandine : DBArmorBase replaces Backpack
     44 {
     45 	Default
     46 	{
     47 		DBArmorBase.ArmorType 1;
     48 	}
     49 	
     50 	States
     51 	{
     52 		Spawn:
     53 			BRIG A -1;
     54 			stop;
     55 	}
     56 }
     57 
     58 
     59 class MariSkull : Brigandine replaces RadSuit
     60 {
     61 	Default
     62 	{
     63 		DBArmorBase.ArmorType 2;
     64 	}
     65 
     66 	States
     67 	{
     68 		Spawn:
     69 			MARI A -1;
     70 			stop;
     71 	}
     72 
     73 }