actor KnightCrushBoss : BaseMM8BDMWep_CBM
{
dropitem "KnightCrushWepCDropped"
Weapon.AmmoUse 0
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Obituary "$OB_KNIGHTCRUSH"
weapon.ammotype "KnightmanAmmo"
States
{
Spawn:
C_06 D 1
loop
Ready:
KNIA A 0 ACS_ExecuteAlways(998,0,823)
KNIA A 0 A_JumpIfInventory("KnightmanAmmo",28,"Ready2")
KNIA A 0 A_TakeInventory("KnightFlag",999)
KNIA A 0 A_SpawnItemEx("KnightShieldX",23,17,8,momx,momy,momz,0,8,0)
KNIA A 1 A_WeaponReady(WRF_NOSECONDARY)
KNIA A 0 A_SpawnItemEx("KnightShieldX",23,17,8,momx,momy,momz,0,8,0)
KNIA A 1 A_WeaponReady(WRF_NOSECONDARY)
KNIA A 0 A_SpawnItemEx("KnightShieldX",23,17,8,momx,momy,momz,0,8,0)
KNIA A 1 A_WeaponReady(WRF_NOSECONDARY)
KNIA A 0 A_GiveInventory("KnightmanAmmo", 1)
Goto Ready+1
Ready2:
KNIA A 0 A_TakeInventory("KnightFlag",999)
KNIA A 0 A_SpawnItemEx("KnightShieldX",23,17,8,momx,momy,momz,0,8,0)
KNIA A 1 A_WeaponReady
loop
Deselect:
KNIA A 0 A_TakeInventory("KnightFlag",999)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
KNIA A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
KNIA A 1 A_Raise
Loop
Fire:
KNIA B 0 A_PlaySoundEx("weapon/KnightShot","Weapon")
KNIA B 3 A_GiveInventory("KnightFlag",1)
KNIA C 3 A_GiveInventory("KnightmanMain_CI",1)
KNIA D 6
Goto Check
Check:
KNIA D 0 A_JumpIfInventory("KnightFlag",50,"Return")
KNIA D 1 A_GiveInventory("KnightFlag",1)
Goto Check
Return:
KNIA D 3 A_TakeInventory("KnightFlag",999)
KNIA C 2
KNIA B 0 A_Refire
Goto Ready+1
AltFire:
KNIA A 0 A_JumpIfInventory("KnightmanAmmo",28,"ShieldCharge")
goto Ready+1
ShieldCharge:
KNIA A 0 A_SpawnItemEx("KnightShieldX",23,17,8,momx,momy,momz,0,8,0)
KNIA G 1 SetPlayerProperty(0,1,0)
KNIA G 1 A_SpawnItemEx("KnightShieldX",23,17,8,momx,momy,momz,0,8,0)
KNIA G 0 A_PlaySoundEx("weapon/chargekick","Weapon")
KNIA G 0 A_TakeInventory("KnightmanAmmo",70)
KNIA G 0 A_GiveInventory("IsInvunFlag",1)
KNIA G 0 A_ChangeFlag("INVULNERABLE",1)
KNIA H 1 A_Recoil(-6)
KNIA H 0 A_FireCustomMissile("KnightRush")
KNIA H 0 A_GiveInventory("Repulsion",1)
KNIA H 1 A_Recoil(-6)
KNIA H 0 A_FireCustomMissile("KnightRush")
KNIA H 0 A_GiveInventory("Repulsion",1)
KNIA H 1 A_Recoil(-6)
KNIA H 0 A_FireCustomMissile("KnightRush")
KNIA H 0 A_GiveInventory("Repulsion",1)
KNIA H 1 A_Recoil(-6)
KNIA H 0 A_FireCustomMissile("KnightRush")
KNIA H 0 A_GiveInventory("Repulsion",1)
KNIA G 1 SetPlayerProperty(0,0,0)
KNIA G 0 A_TakeInventory("IsInvunFlag",99)
KNIA G 0 A_ChangeFlag("INVULNERABLE",0)
KNIA GGG 1 A_SpawnItemEx("KnightShieldX",23,17,8,momx, momy, momz, 0, 8, 0)
KNIA A 0 A_Refire
Goto Ready+1
NoAmmo:
KNIA B 0
//KNIA B 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor KnightmanAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}

actor KnightmanCrusher
{
Translation "198:198=75:75"
PROJECTILE
damagetype "KnightCrush"
Obituary "$OB_KNIGHTCRUSH"
+RIPPER
+DONTSPLASH
+HEXENBOUNCE
+SKYEXPLODE
+THRUGHOST
BounceFactor 1.0
WallBounceFactor 1.0
damage (0)
Radius 8
Height 8
speed 40
scale 2.5
States
{
Spawn:
KNIA I 0
KNIA II 1 A_SpawnItemEx("KnightmanCrusherDamager",0,0,0,momx,momy,momz,0,8,0)
KNIA I 0 A_ChangeFlag("THRUGHOST",0)
KNIA IIIIIIIIIIIIIIII 1 A_SpawnItemEx("KnightmanCrusherDamager",0,0,0,momx,momy,momz,0,8,0)
KNIA I 0 A_SpawnItemEx("KnightmanCrusherReturn",0,0,0,0,0,0,0,1)
stop
Death:
KNIA I 0 A_GiveToTarget("KnightFlag",999)
KNIA I 0 A_TakeFromTarget("KnightDouble",1)
stop
}
}

actor KnightmanCrusherB : KnightmanCrusher{translation "198:198=74:74"}
actor KnightmanCrusherR : KnightmanCrusher{translation "198:198=41:41"}
actor KnightmanCrusherO : KnightmanCrusher{translation "198:198=128:128"}
actor KnightmanCrusherP : KnightmanCrusher{translation "198:198=232:232"}

actor KnightReturnerSound : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_PlaySoundEx("weapon/KnightReturn","Weapon")
stop
}
}

actor KnightmanCrusherReturn : KnightmanCrusher
{
+NOINTERACTION
+SEEKERMISSILE
ReactionTime 87//about 10 seconds
States
{
Spawn:
KNIA I 0
KNIA I 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)//Target >> Tracer
KNIA I 0 A_FaceTarget
goto Spawn2
Spawn2:
KNIA I 0 A_TakeFromTarget("KnightFlag",50)
KNIA I 0 A_JumpIfCloser(46,"Death")
KNIA I 0 A_SpawnItemEx("KnightReturnerSound")
KNIA II 0 A_SeekerMissile(90,90,SMF_PRECISE)
KNIA I 1 A_SpawnItemEx("KnightmanCrusherDamager",0,0,0,momx,momy,momz,0,8)
KNIA I 0 A_JumpIfCloser(46,"Death")
KNIA I 1 A_SpawnItemEx("KnightmanCrusherDamager",0,0,0,momx,momy,momz,0,8)
KNIA I 0 A_JumpIfCloser(46,"Death")
KNIA I 1 A_SpawnItemEx("KnightmanCrusherDamager",0,0,0,momx,momy,momz,0,8)
KNIA I 0 A_JumpIfCloser(46,"Death")
KNIA I 1 A_SpawnItemEx("KnightmanCrusherDamager",0,0,0,momx,momy,momz,0,8)
KNIA I 0 A_JumpIfCloser(46,"Death")

KNIA I 0 A_CountDown
KNIA I 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
loop
}
}

actor KnightmanCrusherDamager
{
PROJECTILE
damagetype "KnightCrush"
Obituary "$OB_KNIGHTCRUSH"
+RIPPER
+DONTBLAST
damage (8)//11
radius 10
height 10
States
{
Spawn:
TNT1 A 2
stop
}
}

actor KnightShieldX : ProtoShieldX
{
+DONTBLAST
+NOTIMEFREEZE
damagefactor "ProtoBuster", 1.0
//damagefactor "Yamato", 0.0
//-GHOST
states
{
//"Fire" is the damagetype seekermissiles inflict on things that are not their tracer
pain.Fire:
TNT1 A 0 A_GiveToTarget("SeekerBlocked",1)
goto Super::Pain
}
}

actor SeekerBlocked : PowerProtection
{
Powerup.Duration 2
damagefactor "Buster", 0.0
damagefactor "DiveMissile", 0.0
damagefactor "MagnetMissile", 0.0
damagefactor "BlizzardAttack", 0.0
damagefactor "HomingSniper", 0.0
}

actor KnightRush : BasicExplosion
{
Damagetype "KnightRush"
Obituary "$OB_KNIGHTRUSH"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(5,120,0,0,16)
stop
}
}


actor KnightmanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("KnightmanCrusher",0,-8,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("KnightmanCrusherB",0,-8,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("KnightmanCrusherR",0,-8,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("KnightmanCrusherO",0,-8,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("KnightmanCrusherP",0,-8,0,0)
goto Done
}
}


