actor Shademan_W : BaseMM8BDMWep_CBM 
{
tag "$TAGC_7G"
dropitem "NoiseCrushWep"
//Weapon.AmmoUse 28
Weapon.AmmoGive 56
Obituary "$OB_NOISECRUSH"
Inventory.Pickupmessage "Power up! Noise Crush!"
weapon.ammotype "MakeSomeNoiseAmmo"
States
{
Spawn:
C_07 G 1
loop

Deselect:
SHDW A 0
goto DeselectSwap
Select:
SHDW A 0
goto SelectSwap

Ready:
SHDW A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_SHADEMAN)
goto Ready1
Ready1:
SHDW A 0 A_JumpIfInventory("MakeSomeNoiseAmmo",4,"Ready2")
SHDW A 0 A_JumpIfInventory("NoiseCrushFlagB",1,"ReadyCharged")
SHDW A 2 A_WeaponReady(8)
SHDW A 0 A_JumpIfInventory("NoiseCrushFlagB",1,"ReadyCharged")
SHDW A 2 A_WeaponReady(8)
SHDW A 0 A_JumpIfInventory("ShadeNeedsLand",1,2)
SHDW A 0 A_GiveInventory("MakeSomeNoiseAmmo",1)
SHDW A 0
loop
Ready2:
SHDW A 0 A_JumpIfInventory("NoiseCrushFlagB",1,"ReadyCharged")
SHDW A 2 A_WeaponReady
SHDW A 0 A_JumpIfInventory("NoiseCrushFlagB",1,"ReadyCharged")
SHDW A 2 A_WeaponReady
SHDW A 0 A_JumpIfInventory("ShadeNeedsLand",1,2)
SHDW A 0 A_GiveInventory("MakeSomeNoiseAmmo",1)
SHDW A 0
loop
ReadyCharged:
SHDW E 0 A_PlaySoundEx("weapon/noisecrushcharge","Weapon")
SHDW E 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_SHADECHARGE1,TINT_TCLR2)
SHDW E 1 A_WeaponReady
SHDW D 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_SHADECHARGE2,TINT_TCLR3)
SHDW D 1 A_WeaponReady
SHDW E 0 A_JumpIfInventory("PlayerPropertyRage",1,5)
SHDW E 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_SHADECHARGE1,TINT_TCLR2)
SHDW E 1 A_WeaponReady
SHDW D 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_SHADECHARGE2,TINT_TCLR3)
SHDW D 1 A_WeaponReady
SHDW E 0 A_PlaySoundEx("weapon/noisecrushcharge","Weapon")
SHDW E 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_SHADECHARGE1,TINT_TCLR2)
SHDW E 1 A_WeaponReady
SHDW D 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_SHADECHARGE2,TINT_TCLR3)
SHDW D 1 A_WeaponReady
SHDW E 0 A_JumpIfInventory("PlayerPropertyRage",1,5)
SHDW E 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_SHADECHARGE1,TINT_TCLR2)
SHDW E 1 A_WeaponReady
SHDW D 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_SHADECHARGE2,TINT_TCLR3)
SHDW D 1 A_WeaponReady
SHDW D 0 A_JumpIfInventory("ShadeNeedsLand",1,2)
SHDW D 0 A_GiveInventory("MakeSomeNoiseAmmo",1)
SHDW D 0
loop

Fire:
SHDW A 0 A_JumpIfInventory("ShademanIsFlying",1,"Swoop")
SHDW A 0 A_JumpIfInventory("NoiseCrushFlagB",1,"Fire2")
SHDW A 0 A_PlaySoundEx("weapon/NoiseC1","Weapon")
SHDW A 0 A_FireCustomMissile("ShadeNoiseCrush",0,0,-8,0)
SHDW C 9
SHDW BA 4
SHDW A 0 A_Refire
goto Ready1
Fire2:
SHDW C 0 A_PlaySoundEx("weapon/NoiseC2","Weapon")
SHDW A 0 A_FireCustomMissile("ShadeNoiseCrush2",0,0,-8,0)
SHDW C 15 A_TakeInventory("NoiseCrushFlagB",1)
SHDW C 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_SHADEMAN,TCLR_NONE)
SHDW BA 5
SHDW A 0 A_Refire
Goto Ready1

AltFire:
SHDW A 0 A_JumpIfInventory("ShadeGrabFlight",1,"SwoopThrustEnd")
SHDW A 0 A_JumpIfInventory("ShademanIsFlying",1,"FlightMode")
SHDW A 0 A_JumpIfInventory("NoiseCrushFlagB",1,"Fire2")
//SHDW A 0 A_JumpIfInventory("MakeSomeNoiseAmmo",1,"Altfire2")
//Goto Ready1
Goto Altfire2

Altfire2:
SHDW A 0 A_TakeInventory("SuplexID",999)
SHDW A 0 A_GiveInventory("ShademanIsFlying",1)
SHDW A 0 A_PlaySound("weapon/shadewing",1,0.5)
SHDW A 3 OffSet(-22,34)
SHDW A 3 OffSet(-60,40)A_TakeInventory("ShadeIsDoneC",999)
SHDW A 2 OffSet(-110,54)
SHDW A 0 A_GiveInventory("ShademanIsFlying",1)
SHDW A 0 A_GiveInventory("ShadeNeedsLand",1)
SHDW A 0 A_GiveInventory("ShadeFDelay1",1)
SHDW A 1 OffSet(-110,54)//A_GunFlash("Flash",1)
TNT1 A 0 A_GiveInventory("CBM_130_SpeedPowerGiver",1)
Goto FlightMode

FlightMode:
TNT1 A 0 A_JumpIfInventory("MakeSomeNoiseAmmo",1,"Thrust")
Goto Flight
Thrust:
TNT1 A 0 A_TakeInventory("MakeSomeNoiseAmmo",2)
TNT1 A 0 A_TakeInventory("MakeSomeNoiseAmmo",2,1)
TNT1 A 0 A_GiveInventory("ShadeWing",1)
TNT1 A 0 ThrustThingZ(0,30,0,0)
TNT1 A 0 A_GiveInventory("ShadeFDelay2",1)
TNT1 A 0 A_GiveInventory("ShadeFlightGravPowerGiver",1)

Flight:
TNT1 A 0 A_TakeInventory("NoiseCrushFlagB")
TNT1 A 0 //A_TakeInventory("IsInvunFlag",999)
TNT1 A 0 //A_ChangeFlag("INVULNERABLE",0)

TNT1 A 4

//TNT1 AAAA 1
TNT1 A 0 A_TakeInventory("ShadeWing",1)
//TNT1 AAAAAAAAAAAAAAAA 1 A_JumpIf(floorz-z==0,"FlightEnd")

TNT1 A 0 A_JumpIfInventory("ShadeFDelay1",1,"Flight2")
goto Flight3
Flight2:
TNT1 A 0 A_JumpIf(floorz-z==0,"FlightEnd")
TNT1 A 1 A_WeaponReady(WRF_NOFIRE)
TNT1 A 0 A_JumpIfInventory("ShadeFDelay1",1,"Flight2")
goto Flight4
Flight3:
TNT1 A 0 A_JumpIf(floorz-z==0,"FlightEnd")
TNT1 A 1 A_WeaponReady(WRF_NOSECONDARY)
TNT1 A 0 A_JumpIfInventory("ShadeFDelay2",1,"Flight3")
goto Flight4
Flight4:
TNT1 A 0 A_JumpIf(floorz-z==0,"FlightEnd")
TNT1 A 1 A_WeaponReady
loop

Swoop:
TNT1 A 0 A_JumpIfInventory("MakeSomeNoiseAmmo",10,"SwoopStart")
TNT1 A 0 //A_GiveInventory("ShadeNeedsLand",1)
Goto FlightEnd

SwoopStart:
TNT1 A 0 A_TakeInventory("CBM_130_SpeedPower")
TNT1 A 0 A_PlaySound("weapon/shadedive",1)
TNT1 A 0 A_GiveInventory("SwoopSafeGuard",1)
TNT1 A 0 A_TakeInventory("ZangiefAngle",255)
TNT1 A 0 A_TakeInventory("MakeSomeNoiseAmmo",5)
TNT1 A 0 A_TakeInventory("MakeSomeNoiseAmmo",5,1)
SHDW F 2 OffSet(0,70)//A_Stop
SHDW F 2 OffSet(0,36)A_GiveInventory("CBM_Ratio1JumpPowerGiver",1)
Swooping:
SHDW F 0 //A_GiveInventory("IsInvunFlag",1)
SHDW F 0 //A_ChangeFlag("INVULNERABLE",1)
SHDW F 0 A_Recoil(-3)
SHDW F 0 ThrustThingZ(0,6,1,1)
SHDW F 0 A_SpawnItemEx("SwoopDamagerZ",40,0,-16,momx*1.05,momy*1.05,momz-1,0,8,0)
SHDW F 0 A_JumpIfInventory("SwoopSafeGuard",100,"SwoopFail")
SHDW F 1 OffSet(0,2)A_JumpIf(floorz-z==0,"SwoopFail")
SHDW F 0 A_JumpIfInventory("SuplexID",1,"SwoopSuplex")
SHDW F 0 A_GiveInventory("SwoopSafeGuard",1)
loop

SwoopSuplex:
SHDW F 0 A_TakeInventory("SwoopSafeGuard",999)
SHDW F 0 //A_TakeInventory("IsInvunFlag",99)
SHDW F 0 //A_ChangeFlag("INVULNERABLE",0)
SHDW F 0 A_GiveInventory("IsPerformingSuplex",1)
SHDW F 0 A_GiveInventory("ShadeInvulnerability",1)
SHDW F 0 A_GiveInventory("ShadeM_BasicArmor_P",1)
SHDW F 0 A_GiveInventory("SetDynamicArmorDosage",1)
SHDW F 0 A_SpawnItemEx("ShadeArmorHelper")
SHDW F 0 A_GiveInventory("ShadeGrabFlight",1)

SHDW F 0 A_PlaySoundEx("KirbyNES/FoeGrab","SoundSlot7")

SHDW F 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEON)
SHDW F 0 A_Stop

SHDW F 0 A_GiveInventory("ShadeM_DrainRune",1)
SHDW F 0 ACS_NamedExecuteWithResult("core_runeplayer",0,1,RUNE_DRAIN)

SHDW F 0 A_GiveInventory("ShadeSuckDelayZ",1)
SHDW F 0 A_GiveInventory("ShadeSuckDelay_RC",1)
SHDW F 0 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,true)



SHDW F 0 A_GiveInventory("ZangiefAngle",CallACS("cbm_ZangiefFaceTarget",CallACS("cbm_ZangiefCountInv",2)+999))
SHDW F 0 A_SetAngle(CallACS("cbm_ZangiefCountInv",1)*360/256)

SHDW F 1 OffSet(0,19)ACS_NamedExecuteAlways("cbm_ZangiefStartGrab",0,CallACS("cbm_ZangiefCountInv",2)+999)

SHDW F 0 A_JumpIf(CallACS("cbm_TeamCompare",CallACS("cbm_ZangiefCountInv",2)+999,0,true),"SwoopSuplexTeam1")
//SHDW E 0 A_LOG("TIME FOR PAIN")
goto SwoopSuplex2
SwoopSuplex2:
SHDW F 0 A_Jumpif(CallACS("cbm_ZangiefGrab",25,CallACS("cbm_ZangiefCountInv",1),80)==0,"FlightEnd")
SHDW F 0 ThrustThingZ(0,12,0,0)
SHDW F 0 A_JumpIfInventory("ShadeIsDoneC",1,"SwoopThrustEnd")
SHDW F 0 A_JumpIfInventory("ShadeSuckDelay",1,"SwoopSuplex3")
goto SwoopSuplexSuck

SwoopSuplexTeam1:
//SHDW F 0 A_LOG("TEAM TIME")
SHDW F 0 A_GiveInventory("ShadeTeamGrabFlag",1)
SHDW F 0 A_GiveInventory("CBM_120_SpeedPowerGiver",1)//115
goto SwoopSuplexTeam2
SwoopSuplexTeam2:
SHDW F 0 A_Jumpif(CallACS("cbm_ZangiefGrab",25,CallACS("cbm_ZangiefCountInv",1),80)==0,"FlightEnd")
SHDW F 0 ThrustThingZ(0,12,0,0)
SHDW F 0 A_JumpIfInventory("ShadeIsDoneC",1,"SwoopThrustEnd")
goto SwoopSuplexTeam3
SwoopSuplexTeam3:
SHDW F 0 A_JumpIfInventory("ShadeSuckDelayZ",1,"SwoopSuplexTeam4")
SHDW F 0 A_JumpIf(CallACS("cbm_GetPlayerButtonInput",CallACS("cbm_ZangiefCountInv",2)-1,false) & BT_JUMP,"SwoopThrustEnd")
SHDW F 1 A_WeaponReady(WRF_NOPRIMARY)
SHDW F 1 A_JumpIfInventory("ShadeGrabFlight",1,"SwoopSuplexTeam2")
Goto FlightEnd
SwoopSuplexTeam4:
SHDW F 1 A_WeaponReady(WRF_NOFIRE)
SHDW F 1 A_JumpIfInventory("ShadeGrabFlight",1,"SwoopSuplexTeam2")
Goto FlightEnd

SwoopSuplex3:
SHDW F 0 A_JumpIfInventory("ShadeSuckDelayZ",1,"SwoopSuplex4")
SHDW F 1 A_WeaponReady(WRF_NOPRIMARY)
SHDW F 1 A_JumpIfInventory("ShadeGrabFlight",1,"SwoopSuplex2")
Goto FlightEnd
SwoopSuplex4:
SHDW F 1 A_WeaponReady(WRF_NOFIRE)
SHDW F 1 A_JumpIfInventory("ShadeGrabFlight",1,"SwoopSuplex2")
Goto FlightEnd

SwoopSuplexSuck:
SHDW F 0 A_GiveInventory("ShadeSuckDelay_RC",1)
SHDW F 0 A_FireCustomMissile("ShadeSuckAtomicBuster",0,0,0,0)
goto SwoopSuplex3

SwoopThrustEnd:
SHDW F 0 ACS_NamedExecuteWithResult("cbm_ZangiefGiver",1,CallACS("cbm_ZangiefCountInv",2)+999)
SHDW F 0 ThrustThing(CallACS("cbm_ZangiefCountInv",1),-25,1,0)
SHDW F 0 ThrustThingZ(0,20,0,1)
goto FlightEnd

SwoopFail:
SHDW F 0 //A_TakeInventory("IsInvunFlag",999)
SHDW F 0 //A_ChangeFlag("INVULNERABLE",0)
SHDW F 0 A_SpawnItemEx("SwoopDamagerZ",40,0,-16,momx*1.05,momy*1.05,momz-1,0,8,0)
SHDW F 2 A_Recoil(-2)
SHDW F 0 A_JumpIfInventory("SuplexID",1,"SwoopSuplex")
SHDW F 0 A_SpawnItemEx("SwoopDamagerZ",40,0,-16,momx*1.05,momy*1.05,momz-1,0,8,0)
SHDW F 2 A_Recoil(-2)
SHDW F 0 A_JumpIfInventory("SuplexID",1,"SwoopSuplex")
SHDW F 0 A_SpawnItemEx("SwoopDamagerZ",40,0,-16,momx*1.05,momy*1.05,momz-1,0,8,0)
SHDW F 2 A_Recoil(-2)
SHDW F 0 A_JumpIfInventory("SuplexID",1,"SwoopSuplex")
SHDW F 0 A_TakeInventory("SwoopSafeGuard",999)
SHDW F 0 ThrustThingZ(0,16,0,1)
SHDW F 1 OffSet(0,18)A_Recoil(-2)
SHDW F 1 OffSet(0,18)A_GiveInventory("NoJumpCancel",1)
SHDW F 0 ThrustThingZ(0,16,0,1)
SHDW F 2 OffSet(0,34)A_Recoil(-2)
SHDW F 0 ThrustThingZ(0,6,0,1)
SHDW F 2 OffSet(0,50)A_Recoil(-2)
SHDW F 0 ThrustThingZ(0,6,0,1)
SHDW F 2 OffSet(0,66)
SHDW F 2 OffSet(0,82)
Goto FlightEnd+2

FlightEnd:
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,false)
TNT1 A 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEOFF_DAMAGE,CallACS("core_getmaxhealth")/10)
TNT1 A 0 A_GiveInventory("ShadeNeedsLand",1)
TNT1 A 0 A_GunFlash("Flash",1)
TNT1 A 0 A_TakeInventory("CBM_Ratio1JumpPower")
TNT1 A 0 A_TakeInventory("CBM_130_SpeedPower")
TNT1 A 0 A_TakeInventory("CBM_120_SpeedPower")
TNT1 A 0 A_GiveInventory("Shademan_DrainDisable_P",1)
TNT1 A 0 A_GiveInventory("ShadeIsDoneC",1)
TNT1 A 0 //A_ChangeFlag("INVULNERABLE",0)
TNT1 A 0 //A_TakeInventory("IsInvunFlag",999)
TNT1 A 0 A_TakeInventory("ShadeGrabFlight",999)
TNT1 A 0 A_TakeInventory("IsPerformingSuplex",999)
TNT1 A 0 A_TakeInventory("ShadeFlightGravPower")
SHDW A 2 OffSet(-110,54)A_GiveInventory("ShadeIsDoneC",1)
SHDW A 3 OffSet(-60,40)A_GiveInventory("ShadeIsDoneC",1)
SHDW A 3 OffSet(-22,34)A_GiveInventory("ShadeIsDoneC",1)
SHDW A 0 A_TakeInventory("ShademanIsFlying",99)
SHDW A 0 A_TakeInventory("NoiseCrushFlagB",1)
SHDW A 0 A_TakeInventory("NoJumpCancel",1)
NoAmmo:
SHDW A 0
Goto Ready1


Flash:
TNT1 A 0 //A_LOG("IM FLYING")
TNT1 A 0 A_JumpIf(z-floorz==0,4)
TNT1 A 0 A_JumpIf(momz==0,3)
TNT1 A 1
loop
TNT1 A 1
TNT1 A 0 A_JumpIf(z-floorz==0,2)
TNT1 A 0 A_JumpIf(momz==0,1)
goto Flash+3
TNT1 A 1 A_TakeInventory("ShadeNeedsLand",99)
stop

}
}

actor MakeSomeNoiseAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 56
+INVENTORY.IGNORESKILL
}

actor ShademanFullReset_P : CustomInventory//Bearer
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("ShadeFlightGravPower")
TNT1 A 0 A_TakeInventory("NoiseCrushFlagB")
TNT1 A 0 A_TakeInventory("ShademanIsFlying")
TNT1 A 0 A_TakeInventory("ShadeWing")
TNT1 A 0 A_TakeInventory("ShadeNeedsLand")
TNT1 A 0 A_TakeInventory("SwoopSafeGuard")
TNT1 A 0 A_TakeInventory("ShadeFlightGravPower")
TNT1 A 0 A_TakeInventory("ShadeIsDoneC")
TNT1 A 0 A_GiveInventory("Shademan_DrainDisable_P")
stop
}
}

//0.15625 Gravity
actor ShadeFlightGravPowerGiver : PowerApropGiver {}
actor ShadeFlightGravPower : Base_CBM_PropertyPower {}

actor NoiseCrushFlagB : OnceC {}

actor ShademanIsFlying : OnceC {}

actor ShadeWing : OnceC {}

actor ShadeNeedsLand : OnceC {}

actor SwoopSafeGuard : Inventory
{
Inventory.amount 1
Inventory.maxamount 100
}

actor ShadeTeamGrabFlag : Powerup
{
Powerup.Duration 20
}

actor ShadeFDelay1 : PowerUp
{
Powerup.Duration 16
}

actor ShadeFDelay2 : ShadeFDelay1 {}

/*
actor ShadeDrainPower : Powerup//PowerDrain
{
Powerup.Duration -30
}

/*actor SwoopDamager : BasicExplosion
{
damagetype "ShadeM_Drain"
Speed 1
Obituary "$OB_SHADESWOOP"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(100,90,0)//150 80
stop
} 
}

actor ShadeProtection : PowerProtection
{
powerup.duration 12
damagefactor "normal", 0.2
}
*/

actor ShadeInvulnerability : PowerInvulnerable
{
powerup.duration 35
}

actor ShadeGrabFlight : PowerUp
{
Powerup.Duration -5//90
}

actor ShadeIsDoneC : Inventory {}

actor ShadeM_DrainRune : Inventory {}


actor Shademan_DrainDisable_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("ShadeM_DrainRune",1,1)
stop
TNT1 A 0 A_TakeInventory("ShadeM_DrainRune")
TNT1 A 0 ACS_NamedExecuteWithResult("core_runeplayer",0,0,RUNE_DRAIN)
stop
}
}

actor ShadeSuckDelay : Powerup
{
+INVENTORY.ADDITIVETIME
Powerup.Duration 10
}
actor ShadeSuckDelayZ : Powerup
{
Powerup.Duration 20
}

actor ShadeSuckDelay_RC : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
TNT1 AA 0 A_GiveInventory("ShadeSuckDelay",1)
stop
}
}

actor ShademanGrabRelease_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_Stop
TNT1 A 0 ThrustThingZ(0,12,0,0)
TNT1 A 0 A_GiveInventory("ShadeReleaseHastenGiver",1)
stop
}
}


actor ShadeReleaseHastenGiver : PowerApropGiver {}
actor ShadeReleaseHasten : PowerSpeed
{
Powerup.Duration 14
Speed 1.0//Speed 3.0
}


actor ShadeSuckAtomicBuster : BasicExplosion
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 Thing_Move(0,CallACS("cbm_ZangiefCountInv",2,2)+999,1)
TNT1 A 0 A_FaceTarget
TNT1 A 0 A_CustomMissile("ShadeSuckWallCheck",-8,0,0,0)
TNT1 A 4 A_SpawnItemEx("ShadeSuckAtomicSuck",0,0,28)
stop
}
}

actor ShadeSuckWallCheck
{
PROJECTILE
+THRUACTORS
+DONTBLAST
+DONTREFLECT
renderstyle none
radius 8
height 4
speed 10
states
{
Spawn:
PLAY A 0
PLAY A 1 A_GiveInventory("CutterFlag",1)
PLAY AAAAA 1
stop
Death:
PLAY F 35 A_JumpIfInventory("CutterFlag",1,"Detatch")
stop
Detatch:
//PLAY H 0 A_Log("\cgunhand him you fiend!")
PLAY H 35 A_GiveToTarget("ShadeIsDoneC",1)
stop
}
}

actor PainShadeM_DrainHit : BasicWatcher
{
States
{
Spawn:
TNT1 A 0 nodelay A_GiveToTarget("CBM_HealThing10_PU",1,AAPTR_TARGET)
stop
}
}
actor DeathShadeM_DrainHit : BasicWatcher
{
States
{
Spawn:
TNT1 A 0 nodelay A_GiveToTarget("CBM_HealThing50_PU",1,AAPTR_TARGET)
stop
}
}

actor ShadeSuckAtomicSuck : BasicExplosion
{
+NOCLIP
+NOTARGETSWITCH
Obituary "$OB_SHADESWOOP"
damagetype "ShadeM_Drain"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(50,15,0,1,15)
stop
}
}

actor SwoopDamagerZ
{
//+NOINTERACTION
+MISSILE
+NOBLOCKMAP
+NOGRAVITY
+NOEXPLODEFLOOR
+DONTBLAST
+DONTREFLECT
+HITTRACER
+THRUGHOST
+FORCEALLYCOLLISION
renderstyle none
height 64
radius 64
states
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
Crash:
TNT1 A 0 A_JumpIfInTargetInventory("NoSourcePushFlag",1,"DeathF")
TNT1 A 0 A_JumpIfInTargetInventory("SuplexID",1,"DeathI")
TNT1 A 0 A_JumpIfInventory("IsPerformingSuplex",1,"DeathJ",8)
TNT1 A 0 A_JumpIfInventory("NoPushFlag",1,"DeathP",8)
TNT1 A 1 A_JumpIf(ACS_NamedExecuteWithResult("cbm_istracerplayer")==1,"GiveSuplex")
stop
GiveSuplex:
TNT1 A 0 A_JumpIfInTargetInventory("NoSourcePushFlag",1,"DeathF")
TNT1 A 0 A_JumpIfInTargetInventory("SuplexID",1,"DeathI")
TNT1 A 0 A_JumpIfInventory("IsPerformingSuplex",1,"DeathJ",8)
TNT1 A 0 A_JumpIfInventory("NoPushFlag",1,"DeathP",8)
TNT1 A 0 A_GiveToTarget("IsPerformingSuplex",1)
TNT1 A 1 A_GiveToTarget("SuplexID",(CallACS("core_getptrtid",8)-1000)+1)
stop

DeathF:
TNT1 A 1 //A_LOG("FAILED, OWNER IS TOO FISHY")
stop
DeathI:
TNT1 A 1 //A_LOG("FAILED, OWNER HAS ID")
stop
DeathJ:
TNT1 A 1 //A_LOG("FAILED, CAN'T GRAB SOMEONE GRABBING!")
stop
DeathP:
TNT1 A 1 //A_LOG("FAILED, NOPUSHFLAG!")
stop
Death:
TNT1 A 1
stop
}
}

actor ShadeArmorHelper : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("ShadeTeamGrabFlag",1,"SpawnT")
TNT1 A 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_JumpIfInTargetInventory("ShadeIsDoneC",1,"DeathRelease")
TNT1 A 0 A_JumpIfInTargetInventory("BasicArmor",1,"Spawn")
goto Death
SpawnT:
TNT1 A 0
TNT1 A 1 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"DeathT")
TNT1 A 0 A_JumpIfInTargetInventory("ShadeIsDoneC",1,"DeathT")
TNT1 A 0 A_JumpIfInTargetInventory("BasicArmor",1,"SpawnT")
goto Death
DeathRelease:
TNT1 A 0 A_TakeFromTarget("MakeSomeNoiseAmmo",2,1)
goto Death+2
Death:
TNT1 A 0 A_JumpIfInTargetInventory("IsDead",1,"SuperDeath")
TNT1 A 0 A_TakeFromTarget("MakeSomeNoiseAmmo",20,1)
TNT1 A 1 A_GiveToTarget("ShadeIsDoneC",1)
TNT1 A 0 A_TakeFromTarget("DynamicArmorDosage")
TNT1 A 1
TNT1 A 1 A_TakeFromTarget("BasicArmor")
stop
DeathT:
TNT1 A 0 A_JumpIfInTargetInventory("IsDead",1,"SuperDeath")
goto Death+2
SuperDeath:
TNT1 A 1
stop
}
}


actor ShadeNoiseCrush : ProjSpawnFuncActor
{//107 130
PROJECTILE
damagetype "ShadeM_Shot"
Obituary "$OB_NOISECRUSH"
+SKYEXPLODE
+DONTREFLECT
+FORCEXYBILLBOARD
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
BounceFactor 1.0
WallBounceFactor 1.0
bouncecount 2
reactiontime 38
damage (150)
Radius 6
Height 6
speed 25
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX1",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX2",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX3",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX4",0,0,0,0,0,0,0,1)
TNT1 A 1 A_CountDown
Goto Look+1
Look:
TNT1 A 0 A_Jump(256,2,4,6,8)
TNT1 A 0 A_JumpIfCloser(40,"Give")
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX4",0,0,0,0,0,0,0,1)
TNT1 A 0 A_JumpIfCloser(40,"Give")
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX3",0,0,0,0,0,0,0,1)
TNT1 A 0 A_JumpIfCloser(40,"Give")
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX2",0,0,0,0,0,0,0,1)
TNT1 A 0 A_JumpIfCloser(40,"Give")
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX1",0,0,0,0,0,0,0,1)
TNT1 A 0 A_CountDown
Goto Look+1
Give:
TNT1 A 0 A_JumpIfInTargetInventory("ShademanIsFlying",1,"Look")
TNT1 A 2 A_GiveToTarget("NoiseCrushFlagB",1)
stop
}
}

actor ShadeNoiseCrush2 : ProjSpawnFuncActor
{
PROJECTILE
damagetype "ShadeM_Shot2"
Obituary "$OB_NOISECRUSH"
+FORCEXYBILLBOARD
damage (400)
Radius 22
Height 16
speed 40
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX8",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX7",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX6",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX5",0,0,0,0,0,0,0,1)
loop
}
}

actor ShadeNoiseCrush33 : ShadeNoiseCrush2
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX8",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX7",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX6",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX5",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX5",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX6",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX7",0,0,0,0,0,0,0,1)
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX8",0,0,0,0,0,0,0,1)
loop
}
}

actor ShadeNoiseCrush44 : ShadeNoiseCrush
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX10",0,0,0,0,0,0,0,1)
wait
}
}
actor ShadeNoiseCrush55 : ShadeNoiseCrush2
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("ShadeNoiseCrushFX20",0,0,0,0,0,0,0,1)
wait
}
}

actor ShadeNoiseCrushFX1 : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
States
{
SpawnFrame:
SHDW R 4
stop
}
}
actor ShadeNoiseCrushFX2 : ShadeNoiseCrushFX1
{
States
{
SpawnFrame:
SHDW S 4
stop
}
}
actor ShadeNoiseCrushFX3 : ShadeNoiseCrushFX1
{
States
{
SpawnFrame:
SHDW T 4
stop
}
}
actor ShadeNoiseCrushFX4 : ShadeNoiseCrushFX1
{
States
{
SpawnFrame:
SHDW U 4
stop
}
}
actor ShadeNoiseCrushFX5 : ShadeNoiseCrushFX1
{
States
{
SpawnFrame:
SHDW V 7
stop
}
}
actor ShadeNoiseCrushFX6 : ShadeNoiseCrushFX1
{
States
{
SpawnFrame:
SHDW W 7
stop
}
}
actor ShadeNoiseCrushFX7 : ShadeNoiseCrushFX1
{
States
{
SpawnFrame:
SHDW X 7
stop
}
}
actor ShadeNoiseCrushFX8 : ShadeNoiseCrushFX1
{
States
{
SpawnFrame:
SHDW Y 7
stop
}
}

actor ShadeNoiseCrushFX10 : ShadeNoiseCrushFX1
{
+FORCEXYBILLBOARD
States
{
SpawnFrame:
SHDW UTSR 1
stop
}
}
actor ShadeNoiseCrushFX20 : ShadeNoiseCrushFX1
{
+FORCEXYBILLBOARD
States
{
SpawnFrame:
SHDW YXWV 1
stop
}
}


actor Shademan_W_NormalBar : NormalBar {Args 204,61}
actor Shademan_W_ScriptBar : ScriptBar {}