actor WindStormBoss : MegaBuster
{
Weapon.AmmoUse 3
Weapon.AmmoUse2 1
Weapon.AmmoGive 28
Weapon.SlotNumber 1
Obituary "%k's Wind Gyros confused %o with unique movements."
weapon.ammotype "WindClassAmmo"
weapon.ammotype2 "WindClassAmmo"
inventory.pickupsound "weapon/weaponup"
Scale 2.0
States
{
Spawn:
TNT1 A 0
stop
Ready:
WINB A 0 ACS_ExecuteAlways(991,0,14)
WINB A 0 A_JumpIfInventory("Flycounter",1,"Flying3")
WINB A 0 A_JumpIfInventory("WindClassAmmo",3,"Ready2")
WINB A 4 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
WINB A 0 A_GiveInventory("WindClassAmmo",1)
goto Ready+1
Ready2:
WINB A 0 A_JumpIfInventory("WindClassAmmo",28,"FullAmmo")
WINB A 4 A_WeaponReady(WRF_NOSECONDARY|WRF_NOSWITCH)
WINB A 0 A_GiveInventory("WindClassAmmo",1)
loop
FullAmmo:
WINB A 1 A_WeaponReady(WRF_NOSWITCH)
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
WINB A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
WINB A 1 A_Raise
Loop
Fire:
WINB A 0 A_JumpIfNoAmmo("NoAmmo")
WINB A 0 A_PlaySoundEx("weapon/gyroattack","Weapon")
WINB B 0 A_FireCustomMissile("WindGyro",40,1,8,0)
WINB B 0 A_FireCustomMissile("WindGyro2",-40,1,8,0)
WINB BC 5
WINB A 12
//WINB A 0 A_Refire
goto Ready+1
AltFire:
WINB A 0 A_JumpIfInventory("Flycounter",1,"NoAmmo")
WINB A 1 A_JumpIfInventory("WindClassAmmo",7,"Fly")
goto Ready+1
Fly:
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
WINB A 1 A_ChangeFlag("NOGRAVITY",1)
WINB A 0 A_TakeInventory("WindClassAmmo",1)
WINB A 0 A_GiveInventory("Flycounter",1)
goto Flying
Flying:
WINB A 6 A_WeaponReady (WRF_NOSECONDARY)
WINB A 0 A_TakeInventory("WindClassAmmo",1)
WINB A 0 A_JumpIfInventory("WindClassAmmo",1,"Flying2")
goto NoAmmo
Flying2:
WINB A 6 A_WeaponReady (WRF_NOSECONDARY)
WINB A 0 A_TakeInventory("WindClassAmmo",1)
WINB A 0 A_JumpIfInventory("WindClassAmmo",1,"Flying3")
goto NoAmmo
Flying3:
WINB A 6 A_WeaponReady
WINB A 0 A_TakeInventory("WindClassAmmo",1)
WINB A 0 A_JumpIfInventory("WindClassAmmo",1,"Flying3")
goto NoAmmo
NoAmmo:
WINB A 0 A_TakeInventory("Flycounter",28)
WINB A 0 A_TakeInventory("WindClassAmmo",28)
WINB A 0 A_ChangeFlag("NOGRAVITY",0)
NeedGround:
GUTP A 0 A_JumpIf(z-floorz==0, "FoundGround")
GUTP A 0 A_JumpIf(momz==0, "MomZVerify")
WINB A 1
loop
MomZVerify:
WINB A 1
GUTP A 0 A_JumpIf(z-floorz==0, "FoundGround")
GUTP A 0 A_JumpIf(momz==0, "FoundGround")
goto NeedGround+2
FoundGround:
WINB A 0
Goto Ready+2
}
}

actor Flycounter : Inventory
{
inventory.amount 1
inventory.maxamount 28
}
actor WindClassAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
}

actor WindGyro
{
PROJECTILE
Damage (23)
damagetype "Windg"
Height 16
Radius 16
Scale 2.5
Speed 20
States
{
Spawn:
WING AB 2
goto Continue
Death:
TNT1 A 0
Stop
Continue:
TNT1 A 1 A_SpawnItemEx("WindGyro3",0,0,momz,20,0,momz,-90)
stop
}
}

actor WindGyro2 : WindGyro
{
States
{
Spawn:
WING AB 2
goto Continue
Continue:
TNT1 A 1 A_SpawnItemEx("WindGyro4",0,0,momz,20,0,momz,90)
stop
}
}

actor WindGyro3 : WindGyro2
{
States
{
Spawn:
WING ABABA 2
goto Continue
/*Continue:
TNT1 A 1 A_SpawnItemEx("WindGyro4",0,0,momz,20,0,momz,90)
stop*/
}
}

actor WindGyro4 : WindGyro
{
States
{
Spawn:
WING ABABA 2
goto Continue
/*Continue:
TNT1 A 1 A_SpawnItemEx("WindGyro3",0,0,momz,20,0,momz,-90)
stop*/
}
}

actor Flypower : PowerupGiver
{
 inventory.amount 1
 inventory.maxamount 1
 powerup.duration -9999
 powerup.type "Speed"
}