actor Tenguman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_8A"
dropitem "TemgumanWepDroppedX"
Weapon.AmmoUse 1
Weapon.AmmoGive 252
Weapon.AmmoUse2 10
Weapon.AmmoGive2 252
Obituary "$OB_TENGUSMASH"
Inventory.Pickupmessage "Are you worthy of my challenge?!"
weapon.ammotype "FeelMyPowerAmmo"
weapon.ammotype2 "FeelMyPowerAmmo"
States
{
Spawn:
C_08 A 1
loop

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

Ready:
TGUH A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_TENGUMAN)
TGUH A 0 A_GunFlash("Flash",1)
goto Ready1
Ready1:
TGUH A 1 A_WeaponReady
wait

Fire:
TGUH H 0 //A_PlaySoundEx("","Weapon")
TGUH H 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEON)
TGUH H 1 A_RailWait
TGUH H 0 A_Refire(1)
goto Release
TGUH H 1 A_RailWait
TGUH H 0 A_Refire(1)
goto Release
TGUH H 1 A_RailWait
TGUH H 0 A_Refire("Hold1")
goto Release
Hold1:
TGUH H 0 A_PlaySoundEx("weapon/TenguM_Dash","Weapon")
TGUH H 0 A_GiveInventory("VivifyFlag1",1)
Hold2:
TGUH H 1 A_GiveInventory("TengumanDash_P",1)
//TGUH H 0 A_JumpIfNoAmmo("Release")
TGUH H 0 A_JumpIfInventory("FeelMyPowerAmmo",1,1)
goto Release
TGUH H 0 A_Refire("Hold2")
goto Release
Release:
TGUH I 0 A_TakeInventory("VivifyFlag1",1)
TGUH I 0
TGUH I 0 A_PlaySoundEx("weapon/slashclaw","Weapon")
TGUH I 0 A_FireCustomMissile("TenguSmash",0,0,-8,0)
TGUH I 3
TGUH J 1
TGUH J 1 Offset(12,40)
TGUH J 7 Offset(26,50)
TGUH J 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEOFF_DAMAGE,CallACS("core_getmaxhealth")/10)
TGUH J 18 Offset(26,50)//Offset(33,62)
TGUH J 2 Offset(16,44)
TGUH J 2 Offset(6,37)
TGUH J 2 Offset(-5,35)
TGUH A 2 Offset(39,26)
TGUH A 2 Offset(26,26)
TGUH A 2 Offset(13,29)
TGUH A 0 A_ClearRefire
Goto Ready1

AltFire:
TGUH A 0 A_JumpIfNoAmmo("NoAmmo")
TGUH C 0 A_GiveInventory("TemgumanAltPitch_P",1)
TGUH C 0 A_GiveInventory("VivifyDelay7",1)
TGUH C 0 A_Refire(1)
TGUH CDCB 3
TGUH B 13
TGUH EFGA 3
TGUH A 0 A_Refire
Goto Ready1

NoAmmo:
TGUH A 0
Goto Ready1

Flash:
TNT1 A 1 A_GiveInventory("TengumanFlashState_P")
TNT1 A 1 A_GiveInventory("TengumanFlashState_P2")
loop
}
}

actor FeelMyPowerAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 252
+INVENTORY.IGNORESKILL 
}

actor TenguHoverFlag : OnceC {}

actor TenguWasThrusted : OnceC {}

actor TenguTHeld_End : Powerup
{
powerup.duration 3
}

actor TenguHoverItem : BasicClassItem
{
inventory.pickupmessage "That ain't Falco."
inventory.icon "TenIcon"
Tag "Tengu Hover Toggle"
states
{
Spawn:
TGUH X 1
loop
UseCBM:
TNT1 A 0 A_PlaySoundEx("item/ItemUseMM9","SoundSlot7")
TNT1 A 0 A_JumpIfInventory("TenguHoverFlag",1,"Take")
TNT1 A 0 A_GiveInventory("TenguHoverFlag",1)
fail
Take:
TNT1 A 0 A_TakeInventory("TenguHoverFlag",999)
fail
}
}

actor TengumanFlashState_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("VivifyFlag1",1,"IsDashing")
TNT1 A 0 A_JumpIfInventory("TenguWasThrusted",1,"PickupAir")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,"GiveAmmo")
TNT1 A 0 A_JumpIfInventory("FeelMyPowerAmmo",1,"HoverCheck")
goto GiveAmmo
HoverCheck:
TNT1 A 0 A_JumpIfInventory("TenguHoverFlag",1,"HoverCheckFalling")
goto GiveAmmo
HoverCheckFalling:
TNT1 A 0 A_JumpIf(momz<0 && CallACS("cbm_GetPointerButtonInput",0,true) & BT_JUMP,"Hover")
goto GiveAmmo

GiveAmmo:
TNT1 A 0 A_GiveInventory("FeelMyPowerAmmo",2+CallACS("core_checkrune",RUNE_RAGE)*2)
goto ResetSpeed

ResetSpeed:
TNT1 A 0 A_TakeInventory("CBM_200_SpeedPower")
stop

IsDashing:
TNT1 A 0 A_GiveInventory("TenguWasThrusted",1)
goto ResetSpeed

Hover:
TNT1 A 0 A_TakeInventory("FeelMyPowerAmmo",1,1)
TNT1 A 0 A_GiveInventory("CBM_IsHovering",1)
TNT1 A 0 A_GiveInventory("TenguWasThrusted",1)
TNT1 A 0 ThrustThingZ(0,0,1,0)//2
TNT1 A 0 A_GiveInventory("CBM_200_SpeedPowerGiver",1)
stop

FoundGround:
TNT1 A 0 A_TakeInventory("TenguWasThrusted",1)
goto Pickup+2

PickupAir:
TNT1 A 0 A_JumpIf(z-floorz<=0,"FoundGround")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,"TakeHover")
TNT1 A 0 A_JumpIfInventory("FeelMyPowerAmmo",1,"HoverCheck2")
goto TakeHover
HoverCheck2:
TNT1 A 0 A_JumpIfInventory("TenguHoverFlag",1,"HoverCheckFalling2")
goto TakeHover
HoverCheckFalling2:
TNT1 A 0 A_JumpIf(momz<0 && CallACS("cbm_GetPointerButtonInput",0,true) & BT_JUMP,"Hover")
goto TakeHover

TakeHover:
TNT1 A 0 A_TakeInventory("CBM_IsHovering",1)
goto ResetSpeed
}
}
actor TengumanFlashState_P2 : TengumanFlashState_P
{
States
{
Hover:
TNT1 A 0 A_TakeInventory("FeelMyPowerAmmo",1)
goto TengumanFlashState_P::Hover+1
}
}

actor TengumanDash_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("FeelMyPowerAmmo",2)
TNT1 A 0 A_TakeInventory("FeelMyPowerAmmo",4,1)
TNT1 A 0 A_JumpIf(CallACS("cbm_IsDashingDisabled"),"NoDash")
TNT1 A 0 A_JumpIf(pitch<345 && pitch>=270, "UpLimit")
//TNT1 A 0 A_JumpIf(pitch<315 && pitch>=270, "UpLimit")
//TNT1 A 0 A_JumpIf(pitch>45 && pitch<=90, "DownLimit")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,"PickupR")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 A_ChangeVelocity(cos(pitch)*24,0,-sin(pitch)*24,3)
stop
TNT1 A 0 A_ChangeVelocity(cos(pitch)*24,0,momz,3)
stop
PickupR:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 A_ChangeVelocity(cos(pitch)*32,0,-sin(pitch)*32,3)
stop
TNT1 A 0 A_ChangeVelocity(cos(pitch)*32,0,momz,3)
stop

UpLimit:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,"UpLimitR")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 A_ChangeVelocity(cos(345)*24,0,-sin(345)*24,3)
stop
TNT1 A 0 A_ChangeVelocity(cos(345)*24,0,momz,3)
stop
UpLimitR:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 A_ChangeVelocity(cos(345)*32,0,-sin(345)*32,3)
stop
TNT1 A 0 A_ChangeVelocity(cos(345)*32,0,momz,3)
stop

DownLimit:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,"DownLimitR")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 A_ChangeVelocity(cos(45)*24,0,-sin(45)*24,3)
stop
TNT1 A 0 A_ChangeVelocity(cos(45)*24,0,momz,3)
stop
DownLimitR:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 A_ChangeVelocity(cos(45)*32,0,-sin(45)*32,3)
stop
TNT1 A 0 A_ChangeVelocity(cos(45)*32,0,momz,3)
stop

NoDash:
TNT1 A 0
stop
}
}

actor TemgumanAltPitch_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 //A_JumpIf(ACS_NamedExecuteWithResult("cbm_RenderCheck")==0, "Pick_Software")
goto Pick_OpenGL
Pick_Software:
TNT1 A 0 A_JumpIf(pitch>47 && pitch<=55 && z-floorz<=0, "Pick_Pitch")
goto Pick_Norm
Pick_OpenGL:
TNT1 A 0 A_JumpIf(pitch>80 && pitch<=90 && z-floorz<=0, "Pick_Pitch")
goto Pick_Norm
Pick_Norm:
TNT1 A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
TNT1 A 0 A_FireCustomMissile("TenguTHoldPod",0,1,-8,0)
stop
Pick_Pitch:
TNT1 A 0 A_PlaySoundEx("weapon/DustBit","Weapon")
TNT1 A 0 A_FireCustomMissile("TenguTHoldPod2",0,1,0,0)
stop
}
}

actor TenguSmash : ProjSpawnFuncActor
{
PROJECTILE
damagetype "TenguM_Slam"
Obituary "$OB_TENGUSMASH"
+DONTBLAST
+THRUACTORS
+DONTREFLECT
+NOEXPLODEFLOOR
damage (0)
Radius 2
Height 2
speed 40
scale 2.5
states
{
Spawn:
TGUH O 0
TGUH O 1
TGUH P 1 A_Explode(50,80,0,0,80)
TGUH P 0 A_SpawnItemEx("Kamaitachi",0,0,0,momx,momy,momz,0,8)
stop
}
}

actor PainTenguM_SlamHit : BasicPain_SlamHit
{
States
{
Collide:
TNT1 A 2 A_SpawnItemEX("G_TenguSlamCollide",0,0,28,0,0,0,0,SXF_TRANSFERSPECIAL)
stop
CollideX:
TNT1 A 2 A_SpawnItemEX("G_TenguSlamCollideX",0,0,28,0,0,0,0,SXF_TRANSFERSPECIAL)
stop
}
}

actor G_TenguSlamCollide : BasicCollideSlam
{
damagetype "TenguM_Dunked"
Obituary "$OB_TENGUSMASH"
}

actor G_TenguSlamCollideX : BasicCollideSlam
{
damagetype "TenguM_Dunked"
Obituary "$OB_TENGUSMASHX"
}

actor Kamaitachi : ProjSpawnFuncActor
{
PROJECTILE
damagetype "TenguM_Shot"
Obituary "$OB_KAMAITACHI"
+SKYEXPLODE
+THRUACTORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+NOEXPLODEFLOOR
+DONTSPLASH//+CANBOUNCEWATER
BounceFactor 0.75
WallBounceFactor 0.95
BounceCount 1//3
damage (0)
Radius 7
Height 7
Speed 40
scale 2.5
states
{
Spawn:
TGUH K 0
TGUH K 0 A_JumpIf( momx*momx + momy*momy < 324 && momz == 0, "Death")
TGUH K 1 A_PlaySoundEx("weapon/tengushot","Weapon")
goto Spawn2+1
Spawn2:
TGUH KKKLLLMMM 1 A_GiveInventory("Kamaitachi_P",1)
loop
Death:
TNT1 A 0
stop
}
}

actor Kamaitachi_P : CustomInventory
{
States
{
Pickup:
//TNT1 A 0 A_LogInt(sqrt(momx*momx + momy*momy + momz*momz)/7+1)
TNT1 A 0 A_Explode(sqrt(momx*momx + momy*momy)/0.7+10,48,0,0,24)//56/28
TNT1 A 0 ThrustThingZ(0,4-(momz >= 0),0,1)
stop
}
}

actor TenguTHoldPod : ProjSpawnFuncActor
{
PROJECTILE
damagetype "TenguM_Pod"
Obituary "$OB_TORNADOHOLD"
-NOGRAVITY
+SKYEXPLODE
+FIXMAPTHINGPOS
+DONTREFLECT
+EXPLODEONWATER
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
Bouncecount 2
Bouncefactor 0.01
WallBounceFactor 0.01
ReactionTime 1
Damage (150)
Radius 20
Height 5
speed 28
Scale 2.5

states
{
Spawn:
TGUH Q 0
TGUH Q 0 A_ChangeVelocity(0,0,1)
TGUH Q 1 ThrustThing(angle*256/360,4,1,0)
TGUH Q 1
wait
SpawnD:
TGUH Q 1 A_CountDown
wait
Death:
TNT1 A 0 A_Stop
TNT1 A 1 A_SpawnItemEx("TenguTHoldFloor")
stop
XDeath:
TGUH Q 0 A_Stop
TGUH Q 0 ThrustThingZ(0,120,1,0)
TGUH QQQQQQQQQQ 1 A_CheckFloor("Death")
goto Death
}
}

actor TenguTHoldPod2 : TenguTHoldPod
{
states
{
Spawn:
TGUH Q 0
TGUH Q 0 A_ChangeVelocity(0,0,-1)
TGUH Q 1
wait
Death:
TNT1 A 0 A_Stop
TNT1 A 1 A_SpawnItemEx("TenguTHoldFloorSit")
stop
}
}

actor TenguTHoldFloor : ProjSpawnFuncActor
{
damagetype "TenguM_Pod"
Obituary "$OB_TORNADOHOLD"
+MISSILE
+RIPPER
+THRUACTORS
+THRUGHOST
+DONTBLAST
+DONTREFLECT
//+FIXMAPTHINGPOS
+NOEXPLODEFLOOR
+STEPMISSILE
maxstepheight 2400
+SKYEXPLODE
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+BOUNCEONACTORS
+ALLOWBOUNCEONACTORS
BounceFactor 0.25
WallBounceFactor 1.0
BounceCount 9
reactiontime 30
Damage (0)
Radius 20
Height 48
Speed 0
Scale 2.5
states
{
Spawn:
TGUH Q 0
TGUH QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ 1 A_CheckFloor("SpawnLand")
stop
SpawnLand:
//TGUH Q 1 A_Recoil(-5)
TGUH R 1
TGUH S 0 A_ChangeFlag("THRUACTORS",0)
TGUH S 0 A_PlaySoundEx("weapon/TenguTHold","Weapon")
TGUH S 0 A_Recoil(-6)
goto FloorSlide
FloorSlide:
TGUH S 0 ThrustThing(angle*256/360,0)
TGUH S 0 A_SpawnItemEx("TenguHoldingTornado",0,0,15,0,0,0,0,32)
TGUH ST 2
TGUH S 0 A_CountDown
loop
FloorSit:
TGUH S 2 A_SpawnItemEx("TenguHoldingTornado",0,0,15,0,0,0,0,32)
TGUH T 2 A_CountDown
loop
Death:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("TenguTHoldFloorFX",0,0,8,0,0,0,0,1)
stop
}
}


actor TenguTHoldFloorFX : BasicGraphicEffect
{
states
{
SpawnFrame:
OMFX E 0
OMFX ECBAL 1
stop
}
}

actor TenguTHoldFloorSit : TenguTHoldFloor
{
states
{
SpawnLand:
TGUH R 1
TGUH S 0 A_PlaySoundEx("weapon/TenguTHold","Weapon")
goto FloorSit
}
}

actor TenguHoldingTornado : ProjSpawnFuncActor
{
PROJECTILE
damagetype "TenguM_THold"
Obituary "$OB_TORNADOHOLD"
+DONTREFLECT
damage(120) 
radius 18
height 6
Speed 0
Scale 2.5
states
{
Spawn:
TGUH U 0
TGUH U 0 ThrustThingZ(0,28,0,0)
Loop1:
TGUH U 0 A_JumpIf(z-floorz>=288,"Death")
TGUH UUU 1 A_JumpIfCloser(40,"Lift1")
Loop2:
TGUH V 0 A_JumpIf(z-floorz>=288,"Death")
TGUH VVV 1 A_JumpIfCloser(40,"Lift2")
Loop3:
TGUH W 0 A_JumpIf(z-floorz>=288,"Death")
TGUH WWW 1 A_JumpIfCloser(40,"Lift3")
goto Loop1
Lift1:
TGUH U 1 A_GiveToTarget("TenguTornadoThruster_P",1)
TGUH UU 1
goto Loop2
Lift2:
TGUH V 1 A_GiveToTarget("TenguTornadoThruster_P",1)
TGUH VV 1
goto Loop3
Lift3:
TGUH W 1 A_GiveToTarget("TenguTornadoThruster_P",1)
TGUH WW 1
goto Loop1
Death:
TNT1 A 1 A_SpawnItemEx("TenguHoldingTornadoEndFX",0,0,0,0,0,0,0,1)
stop
XDeath:
TGUH W 0 
TGUH W 0 A_SpawnItemEx("TenguHoldingTornado2",0,0,0,0,0,momz,0,1)
stop
}
}

actor TenguHoldingTornadoEndFX : BasicGraphicEffect
{
States
{
SpawnFrame:
TGUH WUYZ 3
stop
}
}

actor TenguHoldingTornado2 : TenguHoldingTornado
{
+RIPPER
DAMAGE (0)
States
{
Death:
TGUH W 0 
stop
XDeath:
TGUH W 0 
stop
}
}

actor TenguTornadoThruster_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 //A_JumpIfInventory("PlayerPropertyGrounded",1,3)
TNT1 A 0 A_GiveInventory("TenguWasThrusted",1)
TNT1 A 0 ThrustThingZ(0,40,0,0)//28
TNT1 A 0
stop
}
}


actor TenguM_THold_Start_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("TenguM_THoldProtect",1,3)
TNT1 A 0 A_SpawnItemEx("TenguTornadoHeld_H")
TNT1 A 0 ACS_NamedExecuteWithResult("core_groundplayer",0,true)
TNT1 A 0 A_GiveInventory("TenguM_THoldProtect",1)
stop
}
}

actor TenguM_THoldProtect : PowerProtection
{
Powerup.Duration 4
DamageFactor "TenguM_THold", 0.1
}

actor TenguTornadoHeld_H : BasicWatcher
{
reactiontime 4
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P1",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P1",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P1",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P2",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P2",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P2",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P3",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P3",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P3",1)

TNT1 A 0 A_GiveInventory("CutterFlag",1)
TNT1 A 0 A_JumpIfInventory("CutterFlag",4,"Spawn2")
goto Spawn+1

Spawn2:
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P1C",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P1C",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P1C",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P2C",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P2C",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P2C",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P3C",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P3C",1)
TNT1 A 0 A_JumpIfInTargetInventory("TenguTHeld_End",1,"Death")
TNT1 A 1 A_GiveToTarget("TenguTornadoHeld_P3C",1)

TNT1 A 0 A_Countdown
loop
Death:
TNT1 A 0 A_GiveToTarget("PlayerPropertyGroundedOff",1)
stop
}
}

actor TenguTornadoHeldSlowGiver : PowerApropGiver {}
actor TenguTornadoHeldSlow : PowerSpeed
{
Speed 1.0//Speed 0.75
powerup.duration 4//3
}

actor TenguTornadoHeld_P1 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("GravSlammerPower",1,"Cancel")
TNT1 A 0 A_JumpIf(!(health>0),"Cancel")
TNT1 A 0 A_SpawnItemEx("TenguTornadoHeldFX1",0,0,0,momx,momy,momz,0,8)
Pickup2:
TNT1 A 0 //ThrustThingZ(0,2,0,0)
TNT1 A 0 //A_JumpIf(z-floorz>=320,2)
TNT1 A 0 ThrustThingZ(0,20,0,0)
TNT1 A 0 A_GiveInventory("TenguM_THoldProtect",1)
TNT1 A 0 A_GiveInventory("TenguTornadoHeldSlowGiver",1)
stop
Cancel:
TNT1 A 0 A_GiveInventory("TenguTHeld_End",1)
stop
}
}

actor TenguTornadoHeld_P2 : TenguTornadoHeld_P1
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("GravSlammerPower",1,"Cancel")
TNT1 A 0 A_JumpIf(!(health>0),"Cancel")
TNT1 A 0 A_SpawnItemEx("TenguTornadoHeldFX2",0,0,0,momx,momy,momz,0,8)
goto Pickup2
}
}

actor TenguTornadoHeld_P3 : TenguTornadoHeld_P1
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("GravSlammerPower",1,"Cancel")
TNT1 A 0 A_JumpIf(!(health>0),"Cancel")
TNT1 A 0 A_SpawnItemEx("TenguTornadoHeldFX3",0,0,0,momx,momy,momz,0,8)
goto Pickup2
}
}

actor TenguTornadoHeld_P1C : TenguTornadoHeld_P1
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz>=320,"Cancel")
goto "Super::Pickup"
}
}

actor TenguTornadoHeld_P2C : TenguTornadoHeld_P2
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz>=320,"Cancel")
goto "Super::Pickup"
}
}

actor TenguTornadoHeld_P3C : TenguTornadoHeld_P3
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz>=320,"Cancel")
goto "Super::Pickup"
}
}

actor TenguTornadoHeldFX1 : BasicGraphicEffect
{
States
{
Spawn:
TGUH U 0
TGUH U 1
stop
}
}
actor TenguTornadoHeldFX2 : TenguTornadoHeldFX1
{
States
{
Spawn:
TGUH V 0
TGUH V 1
stop
}
}
actor TenguTornadoHeldFX3 : TenguTornadoHeldFX1
{
States
{
Spawn:
TGUH W 0
TGUH W 1
stop
}
}

actor TemgumanWepDroppedX : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2)
TNT1 A 1 A_SpawnItemEx("TornadoHoldWep",0,0,0,momx,momy,momz,0,8)
stop
TNT1 A 1 A_SpawnItemEx("TenguBladeWep",0,0,0,momx,momy,momz,0,8)
stop
}
}

actor Tenguman_W_NormalBar : NormalBar {Args 236,194}
actor Tenguman_W_ScriptBar : ScriptBar {}