actor AirShooterBoss : BaseMM8BDMWep_CBM
{
dropitem "AirShooterWepCDropped"
Weapon.AmmoUse 0
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Obituary "$OB_AIRSHOOTER"
weapon.ammotype "Can'tDefeatAmmo"
States
{
Spawn:
C_02 B 1
loop
Ready:
AIRA A 0 ACS_ExecuteAlways(998,0,741)
/*AIRA A 0 A_JumpIfInventory("Can'tDefeatAmmo",2,"Ready2")
AIRA A 10 A_WeaponReady(WRF_NOFIRE)
AIRA A 0 A_GiveInventory("Can'tDefeatAmmo",2)
Goto Ready+1
Ready2:*/
AIRA A 0 A_JumpIfInventory("Can'tDefeatAmmo",4,"Ready3")
AIRA A 10 A_WeaponReady(WRF_NOSECONDARY)
AIRA A 0 A_GiveInventory("Can'tDefeatAmmo",2)
//loop
Goto Ready+1
Ready3:
AIRA A 10 A_WeaponReady
AIRA A 0 A_GiveInventory("Can'tDefeatAmmo",2)
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
AIRA A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
AIRA A 1 A_Raise
Loop
Fire:
TNT1 A 0 A_JumpIfInventory("IsBot",1,"BotFire")
//AIRA A 0 A_JumpIfNoAmmo("NoAmmo")
AIRA A 0 A_PlaySoundEx("weapon/airshooter","Weapon")
AIRA A 0 A_GiveInventory("AirmanMain_CI",1)
AIRA BC 6
AIRA A 7
AIRA A 0 A_Refire
Goto Ready+1
AltFire:
AIRA A 0 A_JumpIfInventory("Can'tDefeatAmmo",4,"AirWall")
goto Ready+1
AirWall:
AIRA A 0 A_PlaySoundEx("weapon/airwall","Body")
AIRA A 0 A_TakeInventory("Can'tDefeatAmmo",4)
AIRA A 0 A_GiveInventory("AirmanAlt_CI",1)
AIRA BC 6
AIRA A 7
AIRA A 0 A_Refire
Goto Ready+1

NoAmmo:
AIRA A 0
//AIRA A 1 ACS_Execute(979,0)
Goto Ready+1

BotFire:
TNT1 A 0 A_JumpIfCloser(350,"BotFire2")
AIRA A 0 A_JumpIfInventory("Can'tDefeatAmmo",4,"AirWall")
AIRA A 10
AIRA A 0 A_GiveInventory("Can'tDefeatAmmo",2)
goto AltFire
BotFire2:
TNT1 A 0 A_Jump(192,"BotFire3")
goto BotFire+1
BotFire3:
AIRA A 0
goto Fire+1
}
}

actor Can'tDefeatAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}
/*
actor AirWind
{
PROJECTILE
Radius 32
Height 24
scale 2.5
speed 40
States
{
Spawn:
AIWI ABCD 3 A_RadiusThrust (740000, 1, 0)
loop
}
}
*/

actor AirShotB : AirShot
{
damage (15)
speed 28//22
}

actor AirShotBB : AirShotB{translation "198:198=74:74"}
actor AirShotBR : AirShotB{translation "198:198=41:41"}
actor AirShotBO : AirShotB{translation "198:198=128:128"}
actor AirShotBP : AirShotB{translation "198:198=232:232"}

actor AirWallSpawner
{
PROJECTILE
+NOINTERACTION
height 1
radius 1
States
{
Spawn:
AIRS A 0
AIRS A 0 A_SpawnItemEx("AirWall",2,0,0,15,0,0,0,1)
AIRS A 0 A_SpawnItemEx("AirWall",2,0,0,15,random(-16,16),random(0,0),0,1)
AIRS A 0 A_SpawnItemEx("AirWall",2,0,0,15,random(-16,16),random(0,0),0,1)
AIRS A 0 A_SpawnItemEx("AirWall",2,0,0,15,random(-32,32),random(-8,16),0,1)
AIRS A 0 A_SpawnItemEx("AirWall",2,0,0,15,random(-32,32),random(-8,16),0,1)
AIRS A 0 A_SpawnItemEx("AirWall",2,0,0,15,random(-64,64),random(-16,32),0,1)
AIRS A 0 A_SpawnItemEx("AirWall",2,0,0,15,random(-64,64),random(-16,32),0,1)
stop
}
}

actor AirWallSpawnerB : AirWallSpawner{translation "198:198=74:74"}
actor AirWallSpawnerR : AirWallSpawner{translation "198:198=41:41"}
actor AirWallSpawnerO : AirWallSpawner{translation "198:198=128:128"}
actor AirWallSpawnerP : AirWallSpawner{translation "198:198=232:232"}

actor AirWall : AirShotB
{
damage (5)
speed 0
States
{
Spawn:
AIRS A 0
AIRS A 0 ACS_ExecuteAlways(259, 0, 1)//Turns projectile to direction player was facing
AIRS AABBCC 1 A_Recoil(3)
AIRS A 0 A_Stop
AIRS ABC 2
//AIRS A 0 A_CustomMissile("AirWall2",0,0,0,2,-pitch)
AIRS A 0 A_SpawnItemEx("AirWall2",0,0,0,cos(-pitch)*22,0,sin(-pitch)*22,0,1)
stop
}
}

actor AirWall2 : AirWall
{
speed 22
damage (15)
States
{
Spawn:
AIRS AABBCC 1 A_ScaleVelocity(1.05)
loop
}
}

actor AirmanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("AirShotB",-18,0,-8,0)
TNT1 A 0 A_FireCustomMissile("AirShotB",18,0,-8,0)//15
TNT1 A 0 A_FireCustomMissile("AirShotB",0,1,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("AirShotBB",-18,0,-8,0)
TNT1 A 0 A_FireCustomMissile("AirShotBB",18,0,-8,0)
TNT1 A 0 A_FireCustomMissile("AirShotBB",0,1,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("AirShotBR",-18,0,-8,0)
TNT1 A 0 A_FireCustomMissile("AirShotBR",18,0,-8,0)
TNT1 A 0 A_FireCustomMissile("AirShotBR",0,1,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("AirShotBO",-18,0,-8,0)
TNT1 A 0 A_FireCustomMissile("AirShotBO",18,0,-8,0)
TNT1 A 0 A_FireCustomMissile("AirShotBO",0,1,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("AirShotBP",-18,0,-8,0)
TNT1 A 0 A_FireCustomMissile("AirShotBP",18,0,-8,0)
TNT1 A 0 A_FireCustomMissile("AirShotBP",0,1,-8,0)
goto Done
}
}



actor AirmanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("AirWallSpawner",0,1,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("AirWallSpawnerB",0,1,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("AirWallSpawnerR",0,1,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("AirWallSpawnerO",0,1,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("AirWallSpawnerP",0,1,-8,0)
goto Done
}
}
