actor DiveMissileBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_4G"
dropitem "DiveSonarWepCDropped"
Weapon.AmmoUse 10
Weapon.AmmoGive 560
Weapon.AmmoUse2 45
Weapon.AmmoGive2 420
//Weapon.SlotNumber 1
Obituary "$OB_DIVEMISSILE"
Inventory.Pickupmessage "You found my battleship!"
weapon.ammotype "YouSunkMyAmmo"
weapon.ammotype2 "DiveTackleAmmo"
inventory.icon "DiveIco1"
States
{
Spawn:
C_04 G 1
loop
//DIVA Y 1
Ready:
DIVA A 0 ACS_ExecuteAlways(998,0,DYE_DIVEMAN)
DIVA A 0
goto Ready1
Ready1:
DIVA A 0 A_JumpIfInventory("YouSunkMyAmmo",60,"Ready2a")
DIVA A 0 A_JumpIfInventory("DiveTackleAmmo",45,"Ready2b")
DIVA A 2 A_WeaponReady(WRF_NOFIRE)
DIVA A 0 A_JumpIfInventory("DiveTackleCooldown",1,2)
DIVA A 0 A_GiveInventory("DiveTackleAmmo",4)
DIVA A 0 A_GiveInventory("YouSunkMyAmmo",5)
loop
Ready2a:
DIVA A 0 A_JumpIfInventory("DiveTackleAmmo",45,"Ready3")
DIVA A 2 A_WeaponReady(WRF_NOSECONDARY)
DIVA A 0 A_JumpIfInventory("DiveTackleCooldown",1,2)
DIVA A 0 A_GiveInventory("DiveTackleAmmo",4)
DIVA A 0 A_GiveInventory("YouSunkMyAmmo",5)
loop
Ready2b:
DIVA A 0 A_JumpIfInventory("YouSunkMyAmmo",60,"Ready3")
DIVA A 2 A_WeaponReady(WRF_NOPRIMARY)
DIVA A 0 A_JumpIfInventory("DiveTackleCooldown",1,2)
DIVA A 0 A_GiveInventory("DiveTackleAmmo",4)
DIVA A 0 A_GiveInventory("YouSunkMyAmmo",5)
loop
Ready3:
DIVA A 2 A_WeaponReady
DIVA A 0 A_JumpIfInventory("DiveTackleCooldown",1,2)
DIVA A 0 A_GiveInventory("DiveTackleAmmo",4)
DIVA A 0 A_GiveInventory("YouSunkMyAmmo",5)
loop

Deselect:
DIVA AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
DIVA A 1 A_Lower
Loop
Select:
DIVA AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
DIVA A 1 A_Raise
Loop
Fire:
DIVA A 0 A_PlaySoundEx("weapon/sakugarne","Body")
DIVA BCD 2
DIVA D 0 A_GiveInventory("VivifyDelay5",1)
DIVA D 0 A_Refire("FireL")
goto FireL
FireL:
DIVA D 0 A_JumpIfNoAmmo("FireEnd")
DIVA D 0 A_JumpIfInventory("DiveCounter",7,"ShootRed")
DIVA D 0 A_PlaySoundEx("weapon/needleDakka","Weapon")
DIVA D 0 A_GiveInventory("DivemanMain_CI",1)
DIVA D 4
DIVA D 0 A_GiveInventory("DiveCounter",1)
DIVA D 0 A_GiveInventory("VivifyDelay5",1)
DIVA D 0 A_Refire("FireL")
Goto FireEnd
FireEnd:
DIVA D 0 A_TakeInventory("DiveCounter",999)
DIVA DCB 2
Goto Ready1
ShootRed:
DIVA D 0 A_PlaySoundEx("weapon/needleDakka","Weapon")
DIVA D 0 A_GiveInventory("DivemanMain2_CI",1)
DIVA D 4
DIVA D 0 A_TakeInventory("DiveCounter",999)
DIVA D 0 A_GiveInventory("VivifyDelay5",1)
DIVA D 0 A_Refire("FireL")
Goto FireEnd

FireOld:
DIVA A 0 A_JumpIfNoAmmo("NoAmmo")
DIVA A 0 A_PlaySoundEx("weapon/mbuster","Weapon")
DIVA A 0 A_TakeInventory("YouSunkMyAmmo",60,1)
DIVA A 0 A_GiveInventory("DivemanMain_CI",1)
DIVA BCDCB 3
DIVA A 10
Goto Ready1
NoAmmo:
DIVA A 0
Goto Ready+1

AltFire:
DIVA A 0 A_JumpIfInventory("DiveTackleAmmo",45,"AltFireMines")
Goto Ready1
AltFireMines://22
DIVA B 2
AltFireMines2:
DIVA C 2
DIVA A 0 A_PlaySoundEx("weapon/BombThrow","Weapon")
DIVA A 0 A_TakeInventory("DiveTackleAmmo",45,1)//140
DIVA A 0 A_GiveInventory("DivemanAlt_CI",1)
DIVA D 4
DIVA C 2 A_JumpIfNoAmmo("NoAmmoA")
DIVA B 2 A_Refire("AltFireMines2")
DIVA A 1
Goto Ready1
NoAmmoA:
DIVA C 2
DIVA B 2
DIVA A 1
Goto Ready1

}
}

actor DiveTackleBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_4G2"
dropitem "DiveSonarWepCDropped"
Weapon.AmmoUse 10
Weapon.AmmoGive 560
Weapon.AmmoUse2 210
Weapon.AmmoGive2 420
//Weapon.SlotNumber 2
Obituary "$OB_DIVETACKLE"
Inventory.Pickupmessage "Oooooooooga! Oooooooooga! Oooooooooga! Dive! Dive! Dive!"
weapon.ammotype "YouSunkMyAmmo"
weapon.ammotype2 "DiveTackleAmmo"
inventory.icon "DiveIco2"
States
{
Spawn:
C_04 G 1
loop
//DIVA Z 1
Ready:
DIVA E 0 ACS_ExecuteAlways(998,0,DYE_DIVEMAN)
DIVA E 0
goto Ready1
Ready1:
DIVA E 0 A_JumpIfInventory("YouSunkMyAmmo",60,"Ready2a")
DIVA E 0 A_JumpIfInventory("DiveTackleAmmo",140,"Ready2b")
DIVA E 2 A_WeaponReady(WRF_NOFIRE)
DIVA E 0 A_JumpIfInventory("DiveTackleCooldown",1,2)
DIVA E 0 A_GiveInventory("DiveTackleAmmo",4)
DIVA E 0 A_GiveInventory("YouSunkMyAmmo",5)
loop
Ready2a:
DIVA E 0 A_JumpIfInventory("DiveTackleAmmo",140,"Ready3")//210
DIVA E 2 A_WeaponReady(WRF_NOSECONDARY)
DIVA E 0 A_JumpIfInventory("DiveTackleCooldown",1,2)
DIVA E 0 A_GiveInventory("DiveTackleAmmo",4)
DIVA E 0 A_GiveInventory("YouSunkMyAmmo",5)
loop
Ready2b:
DIVA E 0 A_JumpIfInventory("YouSunkMyAmmo",60,"Ready3")
DIVA E 2 A_WeaponReady(WRF_NOPRIMARY)
DIVA E 0 A_JumpIfInventory("DiveTackleCooldown",1,2)
DIVA E 0 A_GiveInventory("DiveTackleAmmo",4)
DIVA E 0 A_GiveInventory("YouSunkMyAmmo",5)
loop
Ready3:
DIVA E 2 A_WeaponReady
DIVA E 0 A_JumpIfInventory("DiveTackleCooldown",1,2)
DIVA E 0 A_GiveInventory("DiveTackleAmmo",4)
DIVA E 0 A_GiveInventory("YouSunkMyAmmo",5)
loop
Deselect:
DIVA EEEEEEEEEEEEEEEEEEEEEE 0 A_Lower
DIVA E 1 A_Lower
Loop
Select:
DIVA EEEEEEEEEEEEEEEEEEEEEE 0 A_Raise
DIVA E 1 A_Raise
Loop

Fire:
DIVA F 0 A_PlaySoundEx("weapon/sakugarne","Body")
DIVA FGH 2
DIVA H 0 A_GiveInventory("VivifyDelay5",1)
DIVA H 0 A_Refire("FireL")
goto FireL
FireL:
DIVA H 0 A_JumpIfNoAmmo("FireEnd")
DIVA H 0 A_JumpIfInventory("DiveCounter",7,"ShootRed")
DIVA H 0 A_PlaySoundEx("weapon/needleDakka","Weapon")
DIVA H 0 A_GiveInventory("DivemanMain_CI",1)
DIVA H 4
DIVA H 0 A_GiveInventory("DiveCounter",1)
DIVA H 0 A_GiveInventory("VivifyDelay5",1)
DIVA H 0 A_Refire("FireL")
Goto FireEnd
FireEnd:
DIVA H 0 A_TakeInventory("DiveCounter",999)
DIVA HGF 2
Goto Ready1
ShootRed:
DIVA H 0 A_PlaySoundEx("weapon/needleDakka","Weapon")
DIVA H 0 A_GiveInventory("DivemanMain2_CI",1)
DIVA H 4
DIVA H 0 A_TakeInventory("DiveCounter",999)
DIVA H 0 A_GiveInventory("VivifyDelay5",1)
DIVA H 0 A_Refire("FireL")
Goto FireEnd

AltFire:
DIVA E 0 A_JumpIfInventory("DiveTackleAmmo",140,"AltFire2")
goto Ready1
AltFire2:
DIVA F 2
DIVA F 0 A_TakeInventory("DiveTackleHitFlag",999)
DIVA GH 2
DIVA H 0 SetPlayerProperty(0,1,0)
DIVA H 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_JumpZ,0,1)

//DIVA H 0 A_ChangeFlag("THRUSPECIES",1)
//DIVA H 0 A_ChangeFlag("SOLID",0)
//DIVA H 0 A_TakeInventory("UnSolid",1)

DIVA H 0 A_GiveInventory("DiveTackleFrame",1)
DIVA H 0 A_PlaySoundEx("weapon/GrenadeShot","Weapon")
DIVA H 0 A_TakeInventory("DiveTackleAmmo",40)//A_TakeInventory("DiveTackleAmmo",105)
DIVA H 0 //A_JumpIf(pitch<340 && pitch>=270,"AltFire2UpLimit")
goto AltFireH
AltFireH:
DIVA H 0 A_JumpIfInventory("DiveTackleAmmo",1,"AltFireH2")
goto AltTackleE
AltFireH2:
DIVA H 0 A_JumpIfInventory("DiveTackleHitFlag",1,"AltCollide")
DIVA H 0 A_PlaySound("weapon/BRGSpin",4,0.75)
DIVA H 0 A_TakeInventory("DiveTackleAmmo",3,1)
DIVA H 1 A_GiveInventory("DiveTackle_P",1)
DIVA H 0 A_Refire(1)
goto AltTackleE
DIVA H 0 A_JumpIfInventory("DiveTackleHitFlag",1,"AltCollide")
DIVA H 0 A_TakeInventory("DiveTackleAmmo",3,1)
DIVA H 1 A_GiveInventory("DiveTackle_P",1)
DIVA H 0 A_Refire(1)
goto AltTackleE
DIVA H 0 A_JumpIfInventory("DiveTackleHitFlag",1,"AltCollide")
DIVA H 0 A_TakeInventory("DiveTackleAmmo",3,1)
DIVA H 1 A_GiveInventory("DiveTackle_P",1)
DIVA H 0 A_Refire("AltFireH")
goto AltTackleE
AltCollide:
DIVA H 0 A_PlaySoundEx("weapon/blizzstrike","Body")
DIVA H 0 A_GiveInventory("DivemanAlt2_CI",1)
DIVA H 0 A_ChangeVelocity(-15,0,16,3)
goto AltTackleE+2
AltTackleE:
DIVA H 0 //A_ScaleVelocity(0.8)
DIVA H 0 //ThrustThingZ(0,40,0,0)
DIVA H 0 SetPlayerProperty(0,0,0)
DIVA G 0 A_TakeInventory("DiveTackleFrame",999)
DIVA G 3
DIVA F 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_JumpZ,10,1)
//DIVA F 0 A_ChangeFlag("THRUSPECIES",0)
//DIVA F 3 A_SpawnItemEx("ResolidifyPlayer_H")
DIVA F 3
DIVA E 15 A_GiveInventory("DiveTackleCooldown",1)
Goto Ready1
}
}

actor YouSunkMyAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 560
+INVENTORY.IGNORESKILL
}

actor DiveTackleAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 420
+INVENTORY.IGNORESKILL
}

actor DiveTackleHitFlag : OnceC{}
actor DiveTackleCooldown : Powerup{powerup.Duration 35}

actor DiveTackleFrame : Inventory
{
inventory.amount 1
inventory.maxamount 8
}

actor DiveBossLockon : Powerup
{
powerup.duration 8
}

actor DiveLockonCleanse : Powerup
{
powerup.duration 6
}

actor DiveTackle_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"PickupR")
TNT1 A 0 A_ChangeVelocity(22*cos(pitch),0,22*-sin(pitch),3)
goto PickupEnd
PickupR:
TNT1 A 0 A_ChangeVelocity(33*cos(pitch),0,33*-sin(pitch),3)
goto PickupEnd
PickupEnd:
TNT1 A 0 A_GiveInventory("DiveTackleFrame",1)
TNT1 A 0 A_SpawnItemEx("DiveTackleHitbox",0,0,-10,cos(-pitch)*30,0,sin(-pitch)*30,0,0)
TNT1 A 0 A_SpawnItemEx("DiveTackleHitboxCheck",0,0,0,momx,momy,momz,0,9)
stop
}
}

actor DivemanLockonACS_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_PlaySound("wep_L/DiveSonar",7,1.0)//SoundSlot7
TNT1 A 0 ACS_ExecuteAlways(C_DIVELOCKDISPLAY,0)
stop
}
}

actor DiveMissileUseItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "DiveIcon"
scale 2.0
inventory.pickupmessage "R.I.P. homing Diveman."
Tag "Clear Lock-on"
+INVBAR
states
{
Spawn:
DIVA X 1
loop
Use:
TNT1 A 0 A_JumpIfInventory("SuplexID",1,"Cancel")
fail
Cancel:
TNT1 A 0 A_PlaySoundEx("item/ItemUseMM9","SoundSlot7")
TNT1 A 0 A_GiveInventory("DiveLockonCleanse",1)
TNT1 A 0 A_TakeInventory("SuplexID",9999)
fail
}
}


actor DiveMineClass
{
Translation "192:192=4:4", "198:198=194:194", "202:202=210:210"

damagetype "DiveM_Mine"
Obituary "$OB_DIVEMINE"
+MISSILE
+NOGRAVITY
+NOTELEPORT
//+SHOOTABLE
+DONTDRAIN
+NOBLOOD
+DONTREFLECT
+RIPPER
+BOUNCEONWALLS
+BOUNCEONFLOORS
+BOUNCEONCEILINGS
+ALLOWBOUNCEONACTORS
+BOUNCEONACTORS
+CANBOUNCEWATER
+NOTARGETSWITCH
+CANTSEEK
//+NOPAIN
+THRUSPECIES
Species "DumbDiveMine"
+FLOATBOB

damagefactor "DiveMissile", 0.2
damagefactor "DiveM_Torpedo", 0.2
damagefactor "DiveM_Mine", 1.0
PainChance "Normal", 0
PainChance "DiveMissile", 256
PainChance "DiveM_Torpedo", 256
PainChance "DiveM_Mine", 256

Health 200
mass 99999
reactiontime 1
damage (0)
Radius 18
Height 32
speed 30
scale 2.5
States
{
Spawn:
DIVA M 0
DIVA M 7 A_SetArg(4,19)
DIVA M 0 A_ChangeFlag("ALLOWBOUNCEONACTORS",0)//BOUNCEONACTORS
DIVA M 0 A_ChangeFlag("RIPPER",0)
DIVA M 0 A_ChangeFlag("SHOOTABLE",1)
DIVA MMM 1 A_Stop
Floating:
DIVA M 25
DIVA N 1 bright A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"DeathC")
DIVA M 0 A_CountDownArg(4)
loop
DeathC:
DIVA N 1 bright A_CountDown
wait
Pain.DiveMissile:
Pain.DiveM_Torpedo:
Pain.DiveM_Mine:
DIVA N 0 A_ChangeFlag("SHOOTABLE",0)
DIVA N 0 A_ChangeFlag("FLOATBOB",0)
DIVA N 1 bright A_Stop
DIVA M 1
DIVA N 1 bright
DIVA M 1
DIVA N 1 bright
goto DeathC
Death:
DIVA N 0
DIVA N 0 //A_ChangeFlag("SHOOTABLE",0)//Bug that was supposed to be fixed
DIVA N 0 A_ChangeFlag("FLOATBOB",0)//Persists
DIVA N 0 //A_ChangeFlag("NOGRAVITY",1)//A_CountDown makes it fall down
DIVA N 0 A_Stop//1
DIVA N 0 A_PlaySoundEx("weapon/drillexplode", "Weapon")
DIVA N 0 A_SpawnItemEx("DiveMineExplode",0,0,16,0,0,0,0,1)
TNT1 A 1
stop
}
}

actor DiveM_MineProtect : PowerProtection
{
Powerup.Duration 12
DamageFactor "DiveM_Mine", 0.2
}

actor DiveMineExplode : BasicExplosion
{
Obituary "$OB_DIVEMINE"
damagetype "DiveM_Mine"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(220,128,0,0,18)
TNT1 A 0 A_SpawnItemEx("BasicBoom5FX_Y",0,0,0,0,0,0,0,1+32)
TNT1 A 2
stop
}
}

//DesignatedTeam 
actor DiveMineClassB : DiveMineClass{translation "192:192=205:205", "198:198=74:74", "202:202=205:205"}
actor DiveMineClassR : DiveMineClass{translation "192:192=171:171", "198:198=41:41", "202:202=171:171"}
actor DiveMineClassO : DiveMineClass{translation "192:192=104:104", "198:198=128:128", "202:202=104:104"}
actor DiveMineClassP : DiveMineClass{translation "192:192=229:229", "198:198=232:232", "202:202=229:229"}

actor DivemanMissileHelper1 : BasicHelper
{
Translation "199:199=194:194","202:202=210:210"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("DivemanMissileClass",0,0,0,random(8,10),random(-20,20),random(-4,4),0,1)
stop
}
}

actor DivemanMissileHelper1B : DivemanMissileHelper1{translation "199:199=74:74","202:202=205:205"}
actor DivemanMissileHelper1R : DivemanMissileHelper1{translation "199:199=41:41","202:202=171:171"}
actor DivemanMissileHelper1O : DivemanMissileHelper1{translation "199:199=128:128","202:202=104:104"}
actor DivemanMissileHelper1P : DivemanMissileHelper1{translation "199:199=232:232","202:202=229:229"}

actor DivemanMissileHelper2 : BasicHelper
{
Translation "250:250=227:227","249:249=0:0","202:202=210:210"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("DivemanMissileClass2",0,0,0,random(8,10),random(-20,20),random(-4,4),0,1)
stop
}
}

actor DivemanMissileHelper2B : DivemanMissileHelper2{translation "250:250=196:196","249:249=199:199","202:202=205:205"}
actor DivemanMissileHelper2R : DivemanMissileHelper2{translation "250:250=170:170","249:249=43:43","202:202=171:171"}
actor DivemanMissileHelper2O : DivemanMissileHelper2{translation "250:250=138:138","249:249=131:131","202:202=104:104"}
actor DivemanMissileHelper2P : DivemanMissileHelper2{translation "250:250=214:214","249:249=223:223","202:202=229:229"}

actor DivemanMissileClass
{
PROJECTILE
damagetype "DiveM_Torpedo"
Obituary "$OB_DIVEMISSILE"
+HEXENBOUNCE
+HITTRACER
damage (80)
Radius 6
Height 7
speed 20
scale 2.5
States
{
Spawn:
DIVA L 5
DIVA L 0 A_Stop
Spawn2:
DIVA L 8
Spawn3:
DIVA L 2 A_GiveToTarget("CBM_TargetMarker2",1)
DIVA L 2 ACS_ExecuteAlways(989,0,ACS_ExecuteWithResult(257)+100)
DIVA L 0 A_ChangeVelocity(cos(pitch)*40,0,-sin(pitch)*40,CVF_RELATIVE)
DIVA L 0 A_PlaySoundEx("weapon/solarshoot","Weapon")
DIVA L 0 A_ChangeFlag("HEXENBOUNCE",0)
Spawn4:
DIVA L 2
DIVA L 0 A_SpawnItemEx("DivemanMissileClassFX")
loop
Death:
//UMFX J 0 ACS_NamedExecuteAlways("RFC_DiveLockOn",0)
UMFX JK 2 bright
XMFX D 2 bright
stop

Crash:
XDeath:
TNT1 A 0 A_JumpIfInTargetInventory("SuplexID",1,"Death")
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("cbm_istracerenemy")==1, "DeathWatcher1")
goto Death
DeathWatcher1:
TNT1 A 0 A_SpawnItemEx("DivemanMissileClassFXD",0,0,0,0,0,0,0,1)
TNT1 A 0 A_GiveToTarget("SuplexID",(CallACS("cbm_GetPointerTID_147",8)-1000)+1)
TNT1 A 0 A_GiveToTarget("DivemanLockonACS_P",1)
TNT1 A 0 A_PlaySound("wep_L/DiveSonar",7,1.0)
goto DeathWatcher2
DeathWatcher2:
TNT1 A 1 A_GiveInventory("DiveBossLockon",1,8)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"DeathTarget")
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TRACER_OOC)==0,"DeathTracer")
TNT1 A 0 A_JumpIfInTargetInventory("DiveLockonCleanse",1,"DeathTracer")
TNT1 A 1 A_GiveInventory("DiveBossLockon",1,8)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"DeathTarget")
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TRACER_OOC)==0,"DeathTracer")
TNT1 A 0 A_JumpIfInTargetInventory("DiveLockonCleanse",1,"DeathTracer")
TNT1 A 1 A_GiveInventory("DiveBossLockon",1,8)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"DeathTarget")
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TRACER_OOC)==0,"DeathTracer")
TNT1 A 0 A_JumpIfInTargetInventory("DiveLockonCleanse",1,"DeathTracer")
TNT1 A 1 A_GiveInventory("DiveBossLockon",1,8)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"DeathTarget")
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TRACER_OOC)==0,"DeathTracer")
TNT1 A 0 A_JumpIfInTargetInventory("DiveLockonCleanse",1,"DeathTracer")
TNT1 A 1 A_GiveInventory("DiveBossLockon",1,8)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"DeathTarget")
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TRACER_OOC)==0,"DeathTracer")
TNT1 A 0 A_JumpIfInTargetInventory("DiveLockonCleanse",1,"DeathTracer")
TNT1 A 0 A_JumpIfInventory("WeaponCharge",105,"DeathTarget")
TNT1 A 0 A_GiveInventory("WeaponCharge",1)
loop
DeathTarget:
TNT1 A 0 //A_LOG("DeathTarget")
TNT1 A 0 A_TakeFromTarget("SuplexID",999)
TNT1 A 1 A_TakeInventory("DiveBossLockon",9,0,8)
stop
DeathTracer:
TNT1 A 0 //A_LOG("DeathTracer")
TNT1 A 1 A_TakeFromTarget("SuplexID",999)
stop

}
}

actor DivemanMissileClassFXD : BasicClientSide
{
States
{
Spawn:
UMFX JK 2 bright
XMFX D 2 bright
stop
}
}

actor DivemanMissileClass2 : DivemanMissileClass
{
+SEEKERMISSILE
//Speed 30
States
{
Spawn:
DIVA P 4
DIVA P 0 A_Stop
Spawn2:
DIVA P 8 //A_SetSpeed(30)
Spawn3:
DIVA P 2 A_GiveToTarget("CBM_TargetMarker2",1)
DIVA P 2 ACS_ExecuteAlways(989,0,ACS_ExecuteWithResult(257)+100)
DIVA P 0 A_ChangeVelocity(cos(pitch)*40,0,-sin(pitch)*40,CVF_RELATIVE)
DIVA P 0 A_PlaySoundEx("weapon/solarshoot","Weapon")
DIVA P 0 A_ChangeFlag("HEXENBOUNCE",0)
DIVA P 0 //ACS_ExecuteAlways("RFC_DiveGetTracer",0)C_SET_POINTER
DIVA P 0 ACS_ExecuteAlways(C_SET_POINTER,0,8,CallACS("cbm_ZangiefCountInv",2,2)+999)
DIVA PP 1 A_SeekerMissile(0,0)
DIVA P 0 A_SpawnItemEx("DivemanMissileClassFX")
DIVA PP 1 A_SeekerMissile(0,0)
DIVA P 0 A_SpawnItemEx("DivemanMissileClassFX")
DIVA PP 1 A_SeekerMissile(0,0)
DIVA P 0 A_SpawnItemEx("DivemanMissileClassFX")
DIVA PP 1 A_SeekerMissile(0,0)
DIVA P 0 A_SpawnItemEx("DivemanMissileClassFX")
Spawn4:
DIVA PP 1 A_SeekerMissile(0,90)
DIVA P 0 A_SpawnItemEx("DivemanMissileClassFX")
loop
Death:
UMFX JK 2 bright
XMFX D 2 bright
stop
}
}

actor DivemanMissileClassFX : BasicClientSide
{
renderstyle Add
alpha 0.8
States
{
Spawn:
TNT1 A 2
DIVA QRS 3
stop
}
}

actor DiveTackleHitboxCheck
{
PROJECTILE
damagetype "DiveM_Tackle"
Obituary "$OB_DIVETACKLE"
+DONTBLAST
+DONTREFLECT
+DONTSPLASH
//+NOCLIP
+THRUGHOST
+SKYEXPLODE
+EXPLODEONWATER
+STEPMISSILE
+THRUSPECIES
+NOEXPLODEFLOOR
+THRUACTORS
Species "DumbDiveMine"
MaxStepHeight 24
damage (0)
Radius 16
Height 56
speed 2
States
{
Spawn:
TNT1 A 1
stop
Crash:
XDeath:
TNT1 A 0 A_GiveToTarget("DiveTackleHitFlag",1)
TNT1 A 2
stop
Death:
TNT1 A 0 A_GiveToTarget("DiveTackleHitFlag",1)
TNT1 A 2
stop
}
}

actor DiveTackleHitbox
{
PROJECTILE
damagetype "DiveM_Tackle"
Obituary "$OB_DIVETACKLE"
+DONTSPLASH
+DONTBLAST
+NOEXPLODEFLOOR
+THRUGHOST
+DONTREFLECT
+THRUSPECIES
Species "DumbDiveMine"
damage (0)
Radius 66
Height 76
scale 2.5
States
{
Spawn:
TNT1 A 1
stop
Crash:
XDeath:
TNT1 A 0 A_GiveToTarget("DiveTackleHitFlag",1)
TNT1 A 2
stop
Death:
TNT1 A 1
Stop
}
}


actor DiveTackleExplode
{
Translation"204:204=228:228","195:195=177:177"
PROJECTILE
damagetype "DiveM_Tackle"
Obituary "$OB_DIVETACKLE"
+THRUACTORS
+DONTBLAST
+DONTSPLASH
+DONTREFLECT
ReactionTime 1
damage (0)
Radius 4
Height 4
speed 60
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CountDown
wait
Death:
TNT1 A 0
TNT1 A 3 A_SpawnItemEx("DiveTackleExplodeEnd",0,0,0,0,0,0,0,1)
stop
}
}
actor DiveTackleExplodeB : DiveTackleExplode{translation"204:204=205:205","195:195=74:74"}
actor DiveTackleExplodeR : DiveTackleExplode{translation"204:204=171:171","195:195=41:41"}
actor DiveTackleExplodeO : DiveTackleExplode{translation"204:204=104:104","195:195=128:128"}
actor DiveTackleExplodeP : DiveTackleExplode{translation"204:204=229:229","195:195=232:232"}

actor DiveTackleExplodeEnd : BasicExplosion
{
damagetype "DiveM_Tackle"
Obituary "$OB_DIVETACKLE"
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(200,128,0,0,32)
DIVA TUV 2 bright
stop
}
}


actor DivemanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper1",0,1,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper1B",0,1,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper1R",0,1,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper1O",0,1,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper1P",0,1,0,0)
goto Done
}
}

actor DivemanMain2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper2",0,1,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper2B",0,1,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper2R",0,1,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper2O",0,1,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("DivemanMissileHelper2P",0,1,0,0)
goto Done
}
}

actor DivemanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("DiveMineClass",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("DiveMineClassB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("DiveMineClassR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("DiveMineClassO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("DiveMineClassP",0,0,0,0)
goto Done
}
}

actor DivemanAlt2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("DiveTackleExplode",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("DiveTackleExplodeB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("DiveTackleExplodeR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("DiveTackleExplodeO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("DiveTackleExplodeP",0,0,0,0)
goto Done
Done:
TNT1 A 0 A_TakeInventory("DiveTackleAmmo",80,1)
stop
}
}