actor WindStormBoss : BaseMM8BDMWep_CBM
{
dropitem "WindStormWepCDropped"
Weapon.AmmoUse 4
Weapon.AmmoUse2 4
Weapon.AmmoGive 28
Weapon.SlotNumber 1
Obituary "$OB_WINDQUAKE"
weapon.ammotype "WindClassAmmo"
weapon.ammotype2 "WindClassAmmo"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_06 G 1
loop
Ready:
WINB A 0 ACS_ExecuteAlways(998,0,826)
WINB A 0 A_GunFlash
goto Ready1
Ready1:
WINB A 0 A_JumpIfInventory("WindClassAmmo",4,"Ready2")
WINB A 6 A_WeaponReady(WRF_NOFIRE)
WINB A 0 A_GiveInventory("WindClassAmmo",2)
WINB A 0 A_JumpIfInventory("WindInAir",1,"Ready1")
WINB A 0 A_GiveInventory("FlyingKickAmmo",1)
loop
Ready2:
WINB A 6 A_WeaponReady
WINB A 0 A_GiveInventory("WindClassAmmo",2)
WINB A 0 A_JumpIfInventory("WindInAir",1,"Ready2")
WINB A 0 A_GiveInventory("FlyingKickAmmo",1)
loop

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
WINB A 0 SetPlayerProperty(0,0,3)
WINB A 0 A_TakeInventory("WindInAir",1)
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_GiveInventory("WindmanMain_CI",1)
goto FireAni

FireAni:
WINB B 5
WINB C 1
WINB C 0 A_JumpIfInventory("WindInAir",1,2)
WINB C 0 A_GiveInventory("FlyingKickAmmo",1)
WINB C 5
WINB A 1
WINB A 0 A_JumpIfInventory("WindInAir",1,2)
WINB A 0 A_GiveInventory("FlyingKickAmmo",1)
WINB A 6
WINB A 0 A_JumpIfInventory("WindInAir",1,2)
WINB A 0 A_GiveInventory("FlyingKickAmmo",1)
WINB A 0
goto Ready1

AltFire:
WINB A 0 A_JumpIfNoAmmo("NoAmmo")
WINB B 0 A_PlaySoundEx("weapon/mbuster","Weapon")
WINB B 0 A_GiveInventory("WindmanAlt_CI",1)
goto FireAni
NoAmmo:
WINB A 0
goto Ready1

Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("IBeFlyin",1,"FlyFlash1")
TNT1 A 0 SetPlayerProperty(0,0,3)
TNT1 A 0 A_JumpIfInventory("WindInAir",1,"NeedGround0")
TNT1 A 1
loop
FlyFlash1:
TNT1 A 0 A_JumpIfInventory("WindInAir",1,3)
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",28,"FlyFlash2s")
TNT1 A 0 A_TakeInventory("IBeFlyin",1)
goto Flash+1
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",1,"FlyFlash2")
TNT1 A 0 A_TakeInventory("IBeFlyin",1)
goto Flash+1
FlyFlash2s:
TNT1 A 0 A_PlaySoundEx("class/windstart","Body")
FlyFlash2:
TNT1 A 0 A_GiveInventory("WindInAir",1)
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 0 SetPlayerProperty(0,1,3)
TNT1 A 0 A_TakeInventory("FlyingKickAmmo",1)
TNT1 A 0 A_PlaySoundEx("class/windloop","SoundSlot6")
TNT1 AAAAA 1 A_JumpIfInventory("HatinFlyin",1,"Flash")
goto Flash
NeedGroundS:
//359-304 software up 359-270 opengl
//1-55 software down 1-89 opengl
TNT1 A 0 A_GiveInventory("WindStompFlag",1)
goto NeedGround
NeedGround0:
TNT1 A 0 A_JumpIf(pitch>45 && pitch<=90,"NeedGroundS")
TNT1 A 0 A_TakeInventory("FlyingKickAmmo",1)
NeedGround:
TNT1 A 0 A_JumpIf(z-floorz==0, "FoundGround")
TNT1 A 0 A_JumpIf(momz==0, "MomZVerify")
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("WindStompFlag",1,"NeedQuake")
TNT1 A 1
loop
MomZVerify:
TNT1 A 1
TNT1 A 0 A_JumpIf(z-floorz==0, "FoundGround")
TNT1 A 0 A_JumpIf(momz==0, "FoundGround")
goto NeedGround+2
NeedQuake:
TNT1 A 0 A_GiveInventory("WindQuakeHalfPickup",1)
TNT1 A 0 ThrustThingZ(0,5,1,0)
NeedQuake2:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_Recoil(-0.5)
TNT1 A 0 ThrustThingZ(0,5,1,1)
TNT1 A 0 A_GiveInventory("PullCharge",1)
TNT1 A 0 A_GiveInventory("Quaking",1)
TNT1 A 0 A_JumpIf(z-floorz==0,"QuakeCrash")
TNT1 A 0 A_JumpIfInventory("Quaking",999,"QuakeCrash")
TNT1 A 0 A_SpawnItemEx("WindQuakeCrush",0,0,-10,0,0,-10)
TNT1 A 1 A_PlaySoundEx("weapon/blizzbowl","SoundSlot6")
loop
QuakeCrash:
TNT1 A 0 A_GiveInventory("WindQuakeSoundPickup",1)
TNT1 A 1 A_GiveInventory("WindQuakePickup",1)
TNT1 AAA 1
TNT1 A 0 A_TakeInventory("PullCharge",50)
TNT1 A 0 A_TakeInventory("Quaking",999)
goto FoundGround
FoundGround:
TNT1 A 1 A_TakeInventory("WindInAir",1)
Goto Flash
}
}

actor WindInAir : OnceC {}

actor WindStompFlag : Powerup
{
Powerup.Duration 3
}

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

actor WindFlightItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "WindIcon"
inventory.pickupmessage "At least I can fly compared to Airman."
scale 2.0
+INVBAR
states
{
Spawn:
WINI A 1
loop
Use:
TNT1 A 0 A_JumpIfInventory("IBeFlyin",1,"Use3")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",28,"Use2")
fail
Use2:
TNT1 A 0 A_TakeInventory("HatinFlyin",1)
TNT1 A 0 A_GiveInventory("IBeFlyin",1)
fail
Use3:
TNT1 A 0 A_GiveInventory("HatinFlyin",1)
TNT1 A 0 A_TakeInventory("IBeFlyin",1)
fail
}
}


actor WindQuakeHalfPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",27,"P_14")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",25,"P_13")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",23,"P_12")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",21,"P_11")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",19,"P_10")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",17,"P_9")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",15,"P_8")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",13,"P_7")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",11,"P_6")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",9,"P_5")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",7,"P_4")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",5,"P_3")
TNT1 A 0 A_JumpIfInventory("FlyingKickAmmo",3,"P_2")
goto P_2
P_2:
TNT1 A 0 A_TakeInventory("FlyingKickAmmo",2)
stop
P_3:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",3)stop
P_4:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",4)stop
P_5:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",5)stop
P_6:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",6)stop
P_7:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",7)stop
P_8:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",8)stop
P_9:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",9)stop
P_10:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",10)stop
P_11:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",11)stop
P_12:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",12)stop
P_13:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",13)stop
P_14:TNT1 A 0 A_TakeInventory("FlyingKickAmmo",14)stop
}
}


actor WindQuakeSoundPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_RETURN_APROP,1)==2,"Bonus")
TNT1 A 0 A_PlaySoundEx("weapon/blizzstrike","SoundSlot6")
stop
Bonus:
TNT1 A 0 A_PlaySoundEx("BaBH/Fart","SoundSlot6")
stop
}
}

actor WindQuakePickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("Quaking",40,"Pickup6")
TNT1 A 0 A_JumpIfInventory("Quaking",32,"Pickup5")
TNT1 A 0 A_JumpIfInventory("Quaking",24,"Pickup4")
TNT1 A 0 A_JumpIfInventory("Quaking",16,"Pickup3")
TNT1 A 0 A_JumpIfInventory("Quaking",8,"Pickup2")
goto Pickup1
Pickup6:
TNT1 A 0 A_FireCustomMissile("WindQuakeDamage6",0,0,0,0)
goto PickupE
Pickup5:
TNT1 A 0 A_FireCustomMissile("WindQuakeDamage5",0,0,0,0)
goto PickupE
Pickup4:
TNT1 A 0 A_FireCustomMissile("WindQuakeDamage4",0,0,0,0)
goto PickupE
Pickup3:
TNT1 A 0 A_FireCustomMissile("WindQuakeDamage3",0,0,0,0)
goto PickupE
Pickup2:
TNT1 A 0 A_FireCustomMissile("WindQuakeDamage2",0,0,0,0)
goto PickupE
Pickup1:
TNT1 A 0 A_FireCustomMissile("WindQuakeDamage",0,0,0,0)
goto PickupE
PickupE:
TNT1 A 0
stop
}
}

actor WindQuakeCrush
{
PROJECTILE
+DONTBLAST
damage (2)
Radius 15
Height 2
Obituary "$OB_WINDQUAKE"
damagetype "ClassPainLess2"
renderstyle none
States
{
Spawn:
TNT1 A 1
stop
}
}

actor WindQuakeDamage : QuakeDamage
{
damage (6)
Obituary "$OB_WINDQUAKE"
damagetype "WindStormPush"
}

actor WindQuakeDamage2 : WindQuakeDamage
{
damage (9)
radius 250
States
{
Spawn:
TNT1 A 0
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MMFX_XYZ",random(-250,250),random(-250,250),0,0,0,0,0,4)
goto Spawn2
}
}

actor WindQuakeDamage3 : WindQuakeDamage
{
damage (12)
radius 300
States
{
Spawn:
TNT1 A 0
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MMFX_XYZ",random(-300,300),random(-300,300),0,0,0,0,0,4)
goto Spawn2
}
}

actor WindQuakeDamage4 : WindQuakeDamage
{
damage (15)
radius 350
States
{
Spawn:
TNT1 A 0
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MMFX_XYZ",random(-350,350),random(-350,350),0,0,0,0,0,4)
goto Spawn2
}
}

actor WindQuakeDamage5 : WindQuakeDamage
{
damage (18)
radius 400
States
{
Spawn:
TNT1 A 0
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MMFX_XYZ",random(-400,400),random(-400,400),0,0,0,0,0,4)
goto Spawn2
}
}

actor WindQuakeDamage6 : WindQuakeDamage
{
damage (21)
radius 450
States
{
Spawn:
TNT1 A 0
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MMFX_XYZ",random(-450,450),random(-450,450),0,0,0,0,0,4)
goto Spawn2
}
}

actor WindGyro
{
translation "202:202=108:108"
PROJECTILE
Damage (10)
damagetype "WindGyro"
Obituary "$OB_WINDGYRO"
Height 16
Radius 16
Scale 2.5
Speed 20
States
{
Spawn:
WING A 0
WING AB 2
loop
Death:
TNT1 A 2
Stop
}
}

actor WindGyroB : WindGyro{translation "202:202=205:205"}
actor WindGyroR : WindGyro{translation "202:202=171:171"}
actor WindGyroO : WindGyro{translation "202:202=104:104"}
actor WindGyroP : WindGyro{translation "202:202=229:229"}

actor WindGyroX : WindGyro
{
var int user_P;
Damage(6+user_P)
States
{
Spawn:
WING A 0
WING AABB 1 A_Changevelocity(0,2.5,0,CVF_RELATIVE)
Spawn2:
WING AABBAA 1
WING BBAA 1 A_Changevelocity(0,-5,0,CVF_RELATIVE)
WING BBAABB 1
WING AABB 1 A_Changevelocity(0,5,0,CVF_RELATIVE)
WING A 0 A_SetUserVar("user_P",4)
Spawn3:
WING AABBAA 1
WING BBAA 1 A_Changevelocity(0,-5,0,CVF_RELATIVE)
WING BBAABB 1
WING AABB 1 A_Changevelocity(0,5,0,CVF_RELATIVE)
loop
}
}

actor WindGyroXB : WindGyroX{translation "202:202=205:205"}
actor WindGyroXR : WindGyroX{translation "202:202=171:171"}
actor WindGyroXO : WindGyroX{translation "202:202=104:104"}
actor WindGyroXP : WindGyroX{translation "202:202=229:229"}

actor WindGyroX2 : WindGyro
{
var int user_P2;
Damage(6+user_P2)
States
{
Spawn:
WING A 0
WING AABB 1 A_Changevelocity(0,-2.5,0,CVF_RELATIVE)
Spawn2:
WING AABBAA 1
WING BBAA 1 A_Changevelocity(0,5,0,CVF_RELATIVE)
WING BBAABB 1
WING AABB 1 A_Changevelocity(0,-5,0,CVF_RELATIVE)
WING A 0 A_SetUserVar("user_P2",4)
Spawn3:
WING AABBAA 1
WING BBAA 1 A_Changevelocity(0,5,0,CVF_RELATIVE)
WING BBAABB 1
WING AABB 1 A_Changevelocity(0,-5,0,CVF_RELATIVE)
loop
}
}

actor WindGyroX2B : WindGyroX2{translation "202:202=205:205"}
actor WindGyroX2R : WindGyroX2{translation "202:202=171:171"}
actor WindGyroX2O : WindGyroX2{translation "202:202=104:104"}
actor WindGyroX2P : WindGyroX2{translation "202:202=229:229"}


actor WindClassStormStart : WindStormStart
{
Damage (0)
damagetype "WindStormPull"
translation "202:202=108:108"
//Speed 25
States
{
Spawn:
WING CCDDEEFF 2 A_SpawnItemEx("WindClassBlower2",0,0,14,momx,momy,momz,0,8,0)
loop
Death2:
TNT1 A 1 A_SpawnItemEx("WindClassStorm",0,0,0,18,0,0,0,1)
stop
}
}

actor WindClassStormStartB : WindClassStormStart{translation "202:202=205:205"}
actor WindClassStormStartR : WindClassStormStart{translation "202:202=171:171"}
actor WindClassStormStartO : WindClassStormStart{translation "202:202=104:104"}
actor WindClassStormStartP : WindClassStormStart{translation "202:202=229:229"}

actor WindClassStorm : WindStorm
{
damagetype "WindStormPull"
Damage (0)
Speed 30
States
{
Spawn:
WING C 4 A_SpawnItemEx("WindClassBlower",0,0,14,momx,momy,momz+2,0,8,0)
WING C 0 A_GiveInventory("Clip",1)
WING DEF 4 A_SpawnItemEx("WindClassBlower",0,0,14,momx,momy,momz+2,0,8,0)
loop
Death:
TNT1 A 0 A_JumpIfInventory("Clip",1,"Continue")
TNT1 A 1 A_SpawnItemEx("WindClassBlower2",0,0,14)
stop
Continue:
TNT1 A 0 A_SpawnItemEx("WindClassStorm",0,0,0,18,0,0,0,1)
TNT1 A 1
stop
}
}

actor WindClassBlower : BasicExplosion
{
damagetype "WindStormPull"
Obituary "$OB_WINDSTORM"
States
{
Spawn:
TNT1 A 0
TNT1 AA 2 A_Explode(5,56,0,0,8)
stop
}
}

actor WindClassBlower2 : WindClassBlower
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(5,56,0,0,8)
stop
}
}

actor WindmanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WindGyro",0,1,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroX",0,0,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroX2",0,0,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WindGyroB",0,1,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroXB",0,0,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroX2B",0,0,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WindGyroR",0,1,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroXR",0,0,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroX2R",0,0,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WindGyroO",0,1,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroXO",0,0,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroX2O",0,0,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WindGyroP",0,1,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroXP",0,0,-8,0)
TNT1 A 0 A_FireCustomMissile("WindGyroX2P",0,0,-8,0)
goto Done
}
}

actor WindmanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("WindClassStormStart",0,1,24,0)
TNT1 A 0 A_FireCustomMissile("WindClassStormStart",0,0,-40,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("WindClassStormStartB",0,1,24,0)
TNT1 A 0 A_FireCustomMissile("WindClassStormStartB",0,0,-40,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("WindClassStormStartR",0,1,24,0)
TNT1 A 0 A_FireCustomMissile("WindClassStormStartR",0,0,-40,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("WindClassStormStartO",0,1,24,0)
TNT1 A 0 A_FireCustomMissile("WindClassStormStartO",0,0,-40,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("WindClassStormStartP",0,1,24,0)
TNT1 A 0 A_FireCustomMissile("WindClassStormStartP",0,0,-40,0)
goto Done
}
}

