actor Tornadoman : SemiWeakArmorClass
{
Player.ScoreIcon "TORNMUGS"
player.startitem "BaseFlagPack", 1
player.displayname "Tornadoman"
player.soundclass "Tornadomanc"
player.startitem "TornadoBlowBoss"
player.startitem "UltimateAttackItem3"
player.startitem "UltSoundWatcherSpawn3"
player.startitem "Base28Ammo", 28
player.startitem "BaseAltfireAmmo", 112
player.startitem "IsFromMM9"
player.viewheight 51
player.forwardmove 0.85,0.85
player.sidemove 0.83,0.83
player.jumpz 12
States
{
Animation1:
Spawn:
TORM A 0
TORM L 1 A_JumpIf(z-floorz>0, "Jumping")
TORM A 1 A_JumpIf(z-floorz>0, "Jumping")
Goto Spawn+2

See:
TORM LLLLLMMMMMNNNNNOOOOO 1 A_JumpIf(z-floorz>0,"Jumping")
Goto Spawn+1

Jumping:
TORM R 1 A_JumpIf(z-floorz<=0,"Spawn")
loop

Missile:
TORM P 0 A_JumpIfInventory("BaseCustomFlag1",1,"Missile.Spin")
TORM PPQQPPQQPPQQPPQQPPQQPPQQ 1 A_JumpIf(z-floorz>0,"JumpingMissile")
goto Spawn+1

Missile.Spin:
TORM FFGGFFGGFFGGFFGGFFGGFFGG 1
goto Animation3

JumpingMissile:
TORM SSTTSSTTSSTTSSTTSSTTSSTT 1 A_JumpIf(z-floorz<=0,"Missile")
goto Jumping

Animation2:
TORM BC 2
loop

Animation3:
TORM FG 1
loop

ClassPain:
TORM HHHHHHHHHH 2 A_SpawnItem("PainFX",0,3)
TORM H 0 A_JumpIfInventory("BaseCustomFlag1",1,"Animation2")
Goto Spawn+1
ClassDeath:
TORM H 20 ACS_ExecuteAlways(999,0,0)
TORM H 0 A_PlayerScream
TORM H 0 A_SpawnItemEx("FakeDeathFXMM9", 0, 0, 32)
NOFX A 1 A_CheckPlayerDone
wait
WeaponGetM:
TORM H 0 A_JumpIfInTargetInventory("TornadoBlowWepM",1,2)
TORM H 0 A_GiveToTarget("WeaponGetter")
TORM H 0 A_GiveToTarget("TornadoBlowWepM")
goto ClassDeath
}
}


Actor TornadoBlowBoss : VCBaseWeapon
{
weapon.ammotype "Base28Ammo"
weapon.ammotype2 "BaseAltfireAmmo"
Obituary "$OB_TORNADOMAN1"
States
{
Ready:
TORG A 0 A_JumpIfInventory("BaseCustomFlag1",1,"Ready2")
TORG A 0 A_JumpIfInventory("BaseAltfireAmmo",28,"Ready2")
TORG A 1 A_WeaponReady(WRF_NOPRIMARY*CallACS("VC_AmmoCheck",0,7)|WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,56)) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 1 A_WeaponReady(WRF_NOPRIMARY*CallACS("VC_AmmoCheck",0,7)|WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,56)) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 0 A_GiveInventory("Base28Ammo",1)
TORG A 0 A_JumpIfInventory("BaseCustomFlag1",1,"Ready")
TORG A 0 A_GiveInventory("BaseAltfireAmmo",2)
loop
Ready2:
TORG A 1 A_WeaponReady(WRF_NOPRIMARY*CallACS("VC_AmmoCheck",0,7)|WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,56)) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack") TORG A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1")
TORG A 1 A_WeaponReady(WRF_NOPRIMARY*CallACS("VC_AmmoCheck",0,7)|WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,56)) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack") TORG A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1")
TORG A 0 A_GiveInventory("Base28Ammo",1)
TORG A 0 A_JumpIfInventory("BaseCustomFlag1",1,"Ready2")
TORG A 0 A_GiveInventory("BaseAltfireAmmo",2)
loop

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TORG A 1 A_Lower
Loop
Select:
TNT1 A 0 ACS_ExecuteAlways(991,0,881)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
TORG A 1 A_Raise
Loop

Fire:
TORG A 0 A_PlaySoundEx("weapon/superboost","Weapon")
TORG FGHI 1 A_GiveInventory("WeaponCharge",1)
TornadoBlowing:
TORG I 0 A_JumpIfInventory("Base28Ammo",5,1)
Goto EndMain
TORG I 0 A_GiveInventory("CutterFlag",10)
TORG I 0 A_TakeInventory("Base28Ammo",7)
TORG I 0 A_FireCustomMissile("TornadoBlowRMStart",0,0,0,8)
TornadoBlowingContinue:
TORG J 1 A_TakeInventory("CutterFlag",1) TORG J 0 A_JumpIfInventory("CutterFlag",1,1) Goto EndBlowing
TORG J 1 A_TakeInventory("CutterFlag",1) TORG J 0 A_JumpIfInventory("CutterFlag",1,1) Goto EndBlowing
TORG K 1 A_TakeInventory("CutterFlag",1) TORG K 0 A_JumpIfInventory("CutterFlag",1,1) Goto EndBlowing
TORG K 1 A_TakeInventory("CutterFlag",1) TORG K 0 A_JumpIfInventory("CutterFlag",1,1) Goto EndBlowing
TORG KK 0
loop
EndBlowing:
TORG K 0 A_Refire("TornadoBlowing")
EndMain:
TORG J 0 A_GiveInventory("TornadoAnimHandler",1)
TORG JKIHGL 2 A_TakeInventory("WeaponCharge",99)
Goto Ready

Altfire:
RATU A 0 A_JumpIfInventory("NoAltfire",1,"Ready")
TORG A 0 A_PlaySoundEx("weapon/tornadodash","Body")
TORG A 0 A_PlaySoundEx("weapon/superboost","Weapon") TORG A 0 A_TakeInventory("BaseAltfireAmmo",56)
TORG A 0 A_GunFlash("NoFlash2")
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",2)
TORG A 0 A_TakeInventory("UnSolid",1) TORG A 0 A_ChangeFlag("SOLID",False)
TORG A 0 A_ChangeVelocity(CallACS("VC_XYMob",cos(pitch)*45),0,-sin(pitch)*45,CVF_RELATIVE|CVF_REPLACE)
TORG A 1 Offset( 5,37)A_SpawnItemEx("TornadoTackleDamager",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 1 Offset(10,42)A_SpawnItemEx("TornadoTackleDamager",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 1 Offset(15,47)A_SpawnItemEx("TornadoTackleDamager",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 1 Offset(20,52)A_SpawnItemEx("TornadoTackleDamager",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 1 Offset(25,57)A_SpawnItemEx("TornadoTackleDamager",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 1 Offset(30,62)A_SpawnItemEx("TornadoTackleDamager",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 1 Offset(35,67)A_SpawnItemEx("TornadoTackleDamager",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 1 Offset(40,72)A_SpawnItemEx("TornadoTackleDamager",0,0,0,momx,momy,momz,0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION) TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
TORG A 0 A_SpawnItemEx("ReSolidifier")
AltWait:
TORG A 1 Offset(40,72)A_JumpIf(z-floorz<=0, "EndAlt") TNT1 A 0 A_SpawnItemEx("TornadoFlightHitBox") TORG A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
loop
EndAlt:
TORG A 1 Offset(40,72) ACS_NamedExecuteWithResult("VC_SetState",1)
TORG A 1 Offset(35,67)
TORG A 1 Offset(30,62)
TORG A 1 Offset(25,57)
TORG A 1 Offset(20,52)
TORG A 1 Offset(15,47)
TORG A 1 Offset(10,42)
TORG A 1 Offset( 5,37)
Goto Ready

User1:
TORG A 0 A_JumpIfInventory("BaseCustomFlag1",1,"User1Take")
TORG A 0 A_PlaySoundEx("weapon/windloop","Weapon")
TORG A 0 A_GiveInventory("BaseCustomFlag1",1)
TORG A 0 A_SpawnItemEx("TornadoFlightWatcher")
TORG AA 0 A_GiveInventory("TornadoTFSpeed",1)
TORG A 0 ACS_NamedExecuteWithResult("VC_SetState",2)
TORG A 0 A_GunFlash
//TORG A 0 A_GiveInventory("TornadoFlySlow")
TORG A 0 A_JumpIf(z-floorz>0, 2)
TORG A 0 ThrustThingZ(0,200,0,0)
FANB B 0 ACS_Execute(191,0,APROP_JumpZ,0,1)
Goto User1Cont
User1Take:
TORG A 0 A_GunFlash("NoFlash")
TORG A 0 A_TakeInventory("BaseCustomFlag1",1)
User1Cont:
TORG A 1 Offset(0,37)
TORG A 1 Offset(0,42)
TORG A 1 Offset(0,47)
TORG A 1 Offset(0,52)
TORG A 1 Offset(0,52)
TORG A 1 Offset(0,47)
TORG A 1 Offset(0,42)
TORG A 1 Offset(0,37)
Goto Ready
UltimateAttack:
TORG J 0 A_WeaponReady(WRF_NOFIRE)
TORG A 0 A_SpawnItemEx("ReSolidifier")
TNT1 A 0 A_GunFlash("NoFlash2")
TNT1 A 0 A_Stop
TNT1 A 0 A_GiveInventory("NoSpeed",1)
TNT1 A 0 A_SetGravity(0.0)
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",3)
TORG A 0 ACS_NamedExecuteAlways("VC_UltimateText",0,85) TORG A 0 A_PlaySoundEx("classes/ultimateactivation","Auto")
TORG A 0 A_GiveInventory("WindUltCooldown",1) TORG A 0 A_TakeInventory("UltAttackFlag",1) TORG A 0 A_TakeInventory("BaseCustomFlag1",1)
TORG F 2
TORG I 0 A_PlaySoundEx("weapon/tornadoult","SoundSlot2")
TORG GHI 2
UltHold:
TNT1 A 0 A_Quake(2,7,0,100)
TNT1 A 0 A_PlaySoundEx("weapon/maxtornado","Weapon")
TNT1 A 0 A_ChangeVelocity(0,0,2,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("MaxTornadoDust") TORG J 1 Offset(-1,31) A_SpawnItemEx("MaxTornadoPositioner",0,0,0,0,0,-600)
TORG J 0 A_TakeInventory("MediumUltimateAmmo",4) TORG J 0 A_JumpIfInventory("MediumUltimateAmmo",1,1) Goto UltEnd TORG J 0 ACS_ExecuteAlways(247,0,1,600)
TNT1 A 0 A_ChangeVelocity(0,0,2,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("MaxTornadoDust") TORG K 1 Offset(2,29) A_SpawnItemEx("MaxTornadoPositioner2",0,0,0,0,0,-600)
TORG K 0 A_TakeInventory("MediumUltimateAmmo",4) TORG K 0 A_JumpIfInventory("MediumUltimateAmmo",1,1) Goto UltEnd TORG K 0 ACS_ExecuteAlways(247,0,1,600)
TNT1 A 0 A_ChangeVelocity(0,0,2,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("MaxTornadoDust") TORG J 1 Offset(-2,33) A_SpawnItemEx("MaxTornadoPositioner3",0,0,0,0,0,-600)
TORG J 0 A_TakeInventory("MediumUltimateAmmo",4) TORG J 0 A_JumpIfInventory("MediumUltimateAmmo",1,1) Goto UltEnd TORG J 0 ACS_ExecuteAlways(247,0,1,600)
TORG K 0 A_SpawnItemEx("MaxTornadoBlowRMStart",0,0,32,0,0,0,Random(0,360))
TORG K 0 A_SpawnItemEx("TornadoManUltFeetHitbox",0,0,10)
TNT1 A 0 A_PlaySoundEx("weapon/maxtornado","Weapon")
TNT1 A 0 A_ChangeVelocity(0,0,2,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("MaxTornadoDust") TORG K 1 Offset(-1,31) A_SpawnItemEx("MaxTornadoPositioner",0,0,0,0,0,-600)
TORG J 0 A_TakeInventory("MediumUltimateAmmo",4) TORG J 0 A_JumpIfInventory("MediumUltimateAmmo",1,1) Goto UltEnd TORG J 0 ACS_ExecuteAlways(247,0,1,600)
TNT1 A 0 A_ChangeVelocity(0,0,2,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("MaxTornadoDust") TORG J 1 Offset(2,29) A_SpawnItemEx("MaxTornadoPositioner2",0,0,0,0,0,-600)
TORG K 0 A_TakeInventory("MediumUltimateAmmo",4) TORG K 0 A_JumpIfInventory("MediumUltimateAmmo",1,1) Goto UltEnd TORG K 0 ACS_ExecuteAlways(247,0,1,600)
TNT1 A 0 A_ChangeVelocity(0,0,2,CVF_RELATIVE|CVF_REPLACE) TNT1 A 0 A_SpawnItemEx("MaxTornadoDust") TORG K 1 Offset(-2,33) A_SpawnItemEx("MaxTornadoPositioner3",0,0,0,0,0,-600)
TORG J 0 A_TakeInventory("MediumUltimateAmmo",4) TORG J 0 A_JumpIfInventory("MediumUltimateAmmo",1,1) Goto UltEnd TORG J 0 ACS_ExecuteAlways(247,0,1,600)
TORG K 0 A_SpawnItemEx("MaxTornadoBlowRMStart",0,0,32,0,0,0,Random(0,360))
TORG A 0 A_SpawnItemEx("TornadoBalloon",0,0,0,0,0,0,0,0,210)
Goto UltHold
UltEnd:
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",1)
TNT1 A 0 A_TakeInventory("NoSpeed",999)
TNT1 A 0 A_GiveInventory("GravityRestore")
TORG J 0 A_WeaponReady(WRF_NOFIRE)
TORG JKJKILA 2
Goto Ready

Flash:
TNT1 A 0 A_SetGravity(0.0)
FlashLoop:
TNT1 A 0 A_PlaySound("weapon/gyrofly",0,0.5)
TNT1 A 0 ThrustThingZ(0,0,0,0) TNT1 A 0 A_SpawnItemEx("TornadoFlightHitBox") TNT1 A 1 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 ThrustThingZ(0,0,0,0) TNT1 A 0 A_SpawnItemEx("TornadoFlightHitBox") TNT1 A 1 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 ThrustThingZ(0,0,0,0) TNT1 A 0 A_SpawnItemEx("TornadoFlightHitBox") TNT1 A 1 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("BaseCustomFlag1",1,"FlashLoop")
NoFlash:
TNT1 A 0 A_JumpIfInventory("WeaponCharge",1,"NoFlash2") //Skip reset if using M1 -Fr3ak
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",1)
NoFlash2:
TNT1 A 0 A_TakeInventory("BaseCustomFlag1")
TNT1 A 0 A_TakeInventory("NoSpeed",999)
TORG A 0 A_TakeInventory("TornadoFlySlow")
TNT1 A 0 A_GiveInventory("GravityRestore")
TNT1 A 0 ACS_Execute(191,0,APROP_JumpZ,12,1)
stop
}
}

actor TornadoBlowRMStart : FastProjectile
{
PROJECTILE
+SPECTRAL
Radius 1
Height 1
-DONTBLAST
+RIPPER
+SKYEXPLODE
+DONTREFLECT
speed 600
damage (0)
States
{
Spawn:
TNT1 AA 1
TNT1 A 0 A_Stop
Death:
TNT1 A 0 A_CheckFloor("FloorSpawn")
TNT1 A 0 A_CheckCeiling("CeilingSpawn")
Goto NormalSpawn
FloorSpawn:
TNT1 A 0 A_SpawnItemEx("TornadoBlowRM",0,0,48)
TNT1 AAAA 0 A_SpawnItemEx("TornadoBlowRMPuffFX",random(0,4),0,0,random(0,6),0,random(0,5),random(0,359),1)
Goto End
CeilingSpawn:
TNT1 A 0 A_SpawnItemEx("TornadoBlowRepositioner",0,0,-16,0,0,-600)
Goto End
NormalSpawn:
TNT1 A 0 A_SpawnItemEx("TornadoBlowRepositioner",-16,0,0,0,0,-600)
Goto End
End:
TNT1 A 1
stop
}
}

actor TornadoBlowRepositioner : TornadoBlowRMStart
{
States
{
Spawn:
TNT1 AAA 1
TNT1 A 0 A_Stop
Death:
TNT1 A 0 A_SpawnItemEx("TornadoBlowRM",0,0,48)
TNT1 AAAA 0 A_SpawnItemEx("TornadoBlowRMPuffFX",random(0,4),0,0,random(0,6),0,random(0,5),random(0,359),1)
stop
}
}

actor TornadoBlowRM
{
PROJECTILE
+DONTBLAST
+NOINTERACTION
+DONTREFLECT
damagetype "TornadoManM1"
Obituary "$OB_TORNADOMAN1"
damage 0
radius 1
height 1
Scale 2.5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
TNT1 A 0 A_PlaySound("weapon/tornadoblow",0,0.6)
TBLO B 0 ThrustThingZ(0,5,0,0)
TBLO BBCC 1 A_SpawnItemEx("TornadoDamagerRM")
TBLO B 0 ThrustThingZ(0,10,0,1)
TBLO DDEE 1 A_SpawnItemEx("TornadoDamagerRM")
TBLO B 0 ThrustThingZ(0,10,0,1)
TBLO BBCC 1 A_SpawnItemEx("TornadoDamagerRM")
TBLO B 0 ThrustThingZ(0,15,0,1)
TBLO DDEE 1 A_SpawnItemEx("TornadoDamagerRM")
TBLO B 0 ThrustThingZ(0,15,0,1)
TBLO BBCCDDEEBBCCDDEEBBCCDDEEBBCCDDEEBBCCDDEE 1 A_SpawnItemEx("TornadoDamagerRM")
stop
}
}

actor TornadoDamagerRM : TornadoBlowRM
{
damagetype "TornadoManM1"
-NOINTERACTION
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(5,64,0,0,64)
stop
}
}

actor TornadoManM1Protect : PowerProtection
{
powerup.duration 6
damagefactor "TornadoManM1", 0.0
}

actor TornadoBlowRMPuffFX : BasicClientSide
{
Translation "192:192=168:168", "198:198=128:128"
renderstyle add
alpha 1.0
+BRIGHT
Scale 3.0
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
TBLO QRS 2
stop
}
}

actor TornadoTackleDamager : BasicExplosion
{
damagetype "TornadoManAlt"
Obituary "$OB_TORNADOMAN2"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(20,64,0,0,64)
stop
}
}

actor TornadoManAltProtect : PowerProtection
{
powerup.duration 12
damagefactor "TornadoManAlt", 0.0
}

actor TornadoFlightHitBox : BasicExplosion
{
Damagetype "TornadoManFlight"
Obituary "$OB_TORNADOMAN3"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(1,24,0,0,24)
stop
}
}

actor TornadoFlightWatcher
{
PROJECTILE
+NOINTERACTION
+NOCLIP
Damage(0)
Height 1
Radius 1
Speed 0
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_TakeFromTarget("BaseAltFireAmmo",1)
TNT1 A 0 A_JumpIfInTargetInventory("BaseAltFireAmmo",1,1)
Goto End
TNT1 A 0 A_JumpIfInTargetInventory("BaseCustomFlag1",1,"Spawn")
Goto End
End:
TNT1 A 0 A_TakeFromTarget("TornadoTFSpeed",1)
TNT1 AAA 1 A_TakeFromTarget("BaseCustomFlag1",1)
stop
}
}

actor TornadoTFSpeed : PowerSpeed
{
+POWERSPEED.NOTRAIL
Speed 2.2//3.0
Powerup.Duration 999
}
actor MaxTornadoDust
{
Translation "192:192=168:168", "198:198=128:128"
PROJECTILE
+NOINTERACTION
+DONTREFLECT
Height 8
Radius 8
scale 2.5
var int User_X;
var int User_Z;
var int User_Deg;
var int User_Spd;
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 0 A_SetUserVar("User_X",Random(32,320))
TNT1 A 0 A_SetUserVar("User_Z",Random(-320,320))
TNT1 A 0 A_SetUserVar("User_Deg",Random(0,359))
TNT1 A 0 A_SetUserVar("User_Spd",Random(8,24))
TNT1 A 0 A_JumpIf(z-floorz<=0,"Death")
TNT1 AA 1 A_Warp(AAPTR_TARGET,User_X,0,User_Z,User_Deg,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
Spawn2:
TNT1 A 0 A_JumpIf(z-floorz<=0,"Death")
TBLO Q 1 A_Warp(AAPTR_TARGET,User_X,0,User_Z,User_Deg,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_SetUserVar("User_Deg",User_Deg-User_Spd)
TNT1 A 0 A_JumpIfInTargetInventory("IsDead", 1, "End")
TNT1 A 0 A_JumpIf(z-floorz<=0,"Death")
TBLO R 1 A_Warp(AAPTR_TARGET,User_X,0,User_Z,User_Deg,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_SetUserVar("User_Deg",User_Deg-User_Spd)
TNT1 A 0 A_JumpIfInTargetInventory("IsDead", 1, "End")
TNT1 A 0 A_JumpIf(z-floorz<=0,"Death")
TBLO S 1 A_Warp(AAPTR_TARGET,User_X,0,User_Z,User_Deg,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_SetUserVar("User_Deg",User_Deg-User_Spd)
TNT1 A 0 A_JumpIfInTargetInventory("IsDead", 1, "End")
TBLO S 0 A_JumpIfInTargetInventory("MediumUltimateAmmo",1,"Spawn2")
End:
TBLO Q 0 A_SetAngle(random(0,359))
TBLO Q 6 A_Recoil(-40)
TBLO RS 3
stop
Death:
TNT1 A 0
stop
}
}

actor MaxTornadoPositioner : TornadoBlowRMStart
{
States
{
Spawn:
TNT1 AAAAA 1
TNT1 A 0 A_Stop
Death:
TNT1 A 0 A_SpawnItemEx("MaxTornadoBlowFX")
stop
}
}

actor MaxTornadoPositioner2 : TornadoBlowRMStart
{
States
{
Spawn:
TNT1 AAAAA 1
TNT1 A 0 A_Stop
Death:
TNT1 A 0 A_SpawnItemEx("MaxTornadoBlowFX2")
stop
}
}

actor MaxTornadoPositioner3 : TornadoBlowRMStart
{
States
{
Spawn:
TNT1 AAAAA 1
TNT1 A 0 A_Stop
Death:
TNT1 A 0 A_SpawnItemEx("MaxTornadoBlowFX3")
stop
}
}

actor MaxTornadoBlowFX
{
PROJECTILE
+THRUACTORS
Obituary "$OB_TORNADOMAN4"
Damagetype "TornadoManUlt2"
Damage (0)
Speed 0
Height 1
Radius 1
Scale 2.5
const int Z_OFS = 32;
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 0 A_JumpIf(z-floorz<=600,"Spawn2")
stop

Spawn2:
TNT1 A 0 A_SpawnItemEx("MaxTornadoBlowFX",0,0,Z_OFS,momx,momy,momz,0,SXF_ABSOLUTEANGLE|SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERPOINTERS)
TORG X 1 A_SpawnItemEx("MaxTornadoDamager")
stop

Death:
TNT1 A 0
TNT1 A 1
stop
}
}

actor MaxTornadoBlowFX2 : MaxTornadoBlowFX
{
States
{
Spawn2:
TNT1 A 0 A_SpawnItemEx("MaxTornadoBlowFX2",0,0,Z_OFS,momx,momy,momz,0,SXF_ABSOLUTEANGLE|SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERPOINTERS)
TORG Y 1 A_SpawnItemEx("MaxTornadoDamager")
stop
}
}

actor MaxTornadoBlowFX3 : MaxTornadoBlowFX
{
States
{
Spawn2:
TNT1 A 0 A_SpawnItemEx("MaxTornadoBlowFX3",0,0,Z_OFS,momx,momy,momz,0,SXF_ABSOLUTEANGLE|SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERPOINTERS)
TORG Z 1 A_SpawnItemEx("MaxTornadoDamager")
stop
}
}

actor MaxTornadoDamager
{
PROJECTILE
Obituary "$OB_TORNADOMAN4"
Damagetype "TornadoManUlt2"
+RIPPER
+NOINTERACTION
+DONTBLAST
damage (0)
radius 1
height 1
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(2,96,0,0,96)
stop
}
}

actor MaxTornadoBlowRMStart
{
PROJECTILE
+THRUACTORS
Obituary "$OB_TORNADOMAN4"
Damagetype "TornadoManUlt"
Radius 6
Height 6
damage (0)
speed 40
scale 2.5
States
{
Spawn:
TNT1 AAA 1 A_ChangeVelocity(60,0,0,CVF_RELATIVE|CVF_REPLACE)
Death:
TNT1 A 0 A_SpawnItemEx("MaxTornadoBlowRepositioner",-16,0,0,0,0,-600,0,SXF_TRANSFERPOINTERS)
stop
}
}

actor MaxTornadoBlowRepositioner : TornadoBlowRMStart
{
States
{
Spawn:
TNT1 AAA 1
TNT1 A 0 A_Stop
Death:
TNT1 A 0 A_SpawnItemEx("MaxTornadoBlowRM",0,0,48,0,0,0,0,SXF_TRANSFERPOINTERS)
TNT1 AAAA 0 A_SpawnItemEx("TornadoBlowRMPuffFX",random(0,4),0,0,random(0,6),0,random(0,5),random(0,359),1)
stop
}
}

actor MaxTornadoBlowRM
{
PROJECTILE
+DONTBLAST
+NOINTERACTION
Obituary "$OB_TORNADOMAN4"
Damagetype "TornadoManUlt"
damage (0)
radius 1
height 1
Scale 2.0
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
TNT1 A 0 A_PlaySoundEx("weapon/maxtornadoblow","Weapon")
TBLO B 0 ThrustThingZ(0,5,0,0)
TBLO B 0 A_SpawnItemEx("MaxTornadoDamagerRM")
TBLO BC 2 A_GiveToTarget("TornadoUltCooldown")
TBLO B 0 ThrustThingZ(0,10,0,1)
TBLO DE 2 A_GiveToTarget("TornadoUltCooldown")
TBLO B 0 ThrustThingZ(0,10,0,1)
TBLO B 0 A_SpawnItemEx("MaxTornadoDamagerRM")
TBLO BC 2 A_GiveToTarget("TornadoUltCooldown")
TBLO B 0 ThrustThingZ(0,15,0,1)
TBLO DE 2 A_GiveToTarget("TornadoUltCooldown")
TBLO B 0 ThrustThingZ(0,15,0,1)
TBLO BCDE 2 A_GiveToTarget("TornadoUltCooldown")
TBLO B 0 A_SpawnItemEx("MaxTornadoDamagerRM")
TBLO BCDE 2 A_GiveToTarget("TornadoUltCooldown")
TBLO B 0 A_SpawnItemEx("MaxTornadoDamagerRM")
TBLO BCDE 2 A_GiveToTarget("TornadoUltCooldown")
TBLO B 0 A_SpawnItemEx("MaxTornadoDamagerRM")
TBLO BCDE 2 A_GiveToTarget("TornadoUltCooldown")
TBLO B 0 A_SpawnItemEx("MaxTornadoDamagerRM")
TBLO BCDE 2 A_GiveToTarget("TornadoUltCooldown")
TBLO B 0 A_SpawnItemEx("MaxTornadoDamagerRM")
stop
}
}

actor MaxTornadoDamagerRM : TornadoDamagerRM
{
Obituary "$OB_TORNADOMAN4"
Damagetype "TornadoManUlt"
}

actor MaxTornadoProtect : PowerProtection
{
powerup.duration 2
damagefactor "TornadoManUlt2", 0.0
}

actor TornadoUltCooldown : UltBuildCooldownGiver
{
Powerup.Duration 10
}

actor TornadoAnimHandler : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BaseCustomFlag1",1,"Pickup2")
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",1)
stop

Pickup2:
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",2)
stop
}
}

actor TornadoFlySlow : PowerSpeed
{
	+POWERSPEED.NOTRAIL
	Powerup.Duration 999
	Speed  0.75
}

actor TornadoBalloon
{
PROJECTILE
Height 1
Radius 1
scale 2.5
+THRUACTORS
+NOGRAVITY
+NOINTERACTION
+DONTREFLECT
var int user_angle;
var int user_weave;
var int user_z;
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 1
MX04 EDCBA 1
TNT1 A 0 A_PlaySoundEx("weapon/ballonboo","Body")
TNT1 A 0 A_SetUserVar("user_weave",Random(-200,200))
TNT1 A 0 A_SetUserVar("user_z",Random(-200,200))
Spawn2:
BLBO B 0 A_Warp(AAPTR_TARGET,200,0,user_z,user_angle,WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
BLBO B 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0, "Death")
BLBO B 0 A_SetUserVar("user_angle",user_angle+6)
BLBO B 0 A_SetAngle(angle+90)
BLBO B 1 A_Weave(0,1,0,user_weave)
BLBO B 0 A_Warp(AAPTR_TARGET,200,0,user_z,user_angle,WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
BLBO B 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0, "Death")
BLBO B 0 A_SetUserVar("user_angle",user_angle+6)
BLBO B 0 A_SetAngle(angle+90)
BLBO B 1 A_Weave(0,1,0,user_weave)
BLBO C 0 A_Warp(AAPTR_TARGET,200,0,user_z,user_angle,WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
BLBO C 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0, "Death")
BLBO C 0 A_SetUserVar("user_angle",user_angle+6)
BLBO B 0 A_SetAngle(angle+90)
BLBO C 1 A_Weave(0,1,0,user_weave)
BLBO C 0 A_Warp(AAPTR_TARGET,200,0,user_z,user_angle,WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)
BLBO C 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0, "Death")
BLBO C 0 A_SetUserVar("user_angle",user_angle+6)
BLBO B 0 A_SetAngle(angle+90)
BLBO C 1 A_Weave(0,1,0,user_weave)
BLBO C 0 A_JumpIfInTargetInventory("MediumUltimateAmmo",1,"Spawn2")
End:
BLBO BBCC 1 A_Recoil(-2)
BLBO B 0 A_SetAngle(angle+random(15,60))
BLBO B 0 A_GiveInventory("CutterFlag",1)
BLBO B 0 A_JumpIfInventory("CutterFlag",32,"Death")
loop
Death:
MX04 ABCDE 1 A_Stop
stop
}
}


Actor TornadoManUltFeetHitbox : QuakeDamage
{
Obituary "$OB_TORNADOMAN5"
damageType "Tornadoman"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(200,40,0,0,40)
stop
}
}


Actor TornadoManAntiJuggle : PowerSpeed
{
	Powerup.Duration 20
	Speed 2.0
	+POWERSPEED.NOTRAIL
}