actor Diveman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_4G"
dropitem "DiveSonarWep"
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

Deselect:
DIVA A 0
goto DeselectSwap
Select:
DIVA A 0
goto SelectSwap

Ready:
DIVA A 0 ACS_NamedExecuteWithResult("core_weaponcolor",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

Fire:
DIVA A 0 A_PlaySoundEx("weapon/sakugarne","Body")
DIVA BCD 2
DIVA D 0 A_GiveInventory("VivifyDelay5",1)
DIVA D 0 A_Refire(1)
DIVA D 4 A_GiveInventory("Diveman_Fire_P0")
goto FireL+2
FireL:
DIVA D 0 A_JumpIfNoAmmo("FireEnd")
DIVA D 4 A_GiveInventory("Diveman_Fire_P")
DIVA D 0 
DIVA D 0 A_GiveInventory("VivifyDelay5",1)
DIVA D 0 A_Refire("FireL")
FireEnd:
DIVA D 0 A_TakeInventory("DiveCounter")
DIVA DCB 2
Goto Ready1

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_FireCustomMissile("DivemanMissileClassOld",0,1,0,0)
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_FireCustomMissile("DiveMineClass",0,0,0,0)
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 Diveman_W2 : BaseMM8BDMWep_CBM
{
tag "$TAGC_4G2"
dropitem "DiveSonarWep"
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

Deselect:
DIVA E 0
goto DeselectSwap
Select:
DIVA E 0
goto SelectSwap


Ready:
DIVA E 0 ACS_NamedExecuteWithResult("core_weaponcolor",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

Fire:
DIVA F 0 A_PlaySoundEx("weapon/sakugarne","Body")
DIVA FGH 2
DIVA H 0 A_GiveInventory("VivifyDelay5",1)
DIVA H 0 A_Refire(1)
DIVA H 4 A_GiveInventory("Diveman_Fire_P0")
goto FireL+2
FireL:
DIVA H 0 A_JumpIfNoAmmo("FireEnd")
DIVA H 4 A_GiveInventory("Diveman_Fire_P")
DIVA H 0 
DIVA H 0 A_GiveInventory("VivifyDelay5",1)
DIVA H 0 A_Refire("FireL")
FireEnd:
DIVA H 0 A_TakeInventory("DiveCounter")
DIVA HGF 2
Goto Ready1

AltFire:
DIVA E 0 A_JumpIfInventory("DiveTackleAmmo",140,"AltFire2")
goto Ready1
AltFire2:
DIVA F 2
DIVA F 0 A_TakeInventory("DiveTackleHitFlag")
DIVA GH 2
DIVA H 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
DIVA H 0 A_GiveInventory("CBM_DisableJumpPowerGiver",1)

//DIVA H 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEON)

DIVA H 0 A_GiveInventory("CBM_BeatBoostRemoveCheck_P")
DIVA H 0 A_GiveInventory("VivifyCycle1",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 1 A_GiveInventory("DiveTackle_P",1)
DIVA H 0 A_Refire(1)
goto AltTackleE
DIVA H 0 A_JumpIfInventory("DiveTackleHitFlag",1,"AltCollide")
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 1 A_GiveInventory("DiveTackle_P",1)
DIVA H 0 A_Refire("AltFireH")
goto AltTackleE
AltCollide:
DIVA H 0 A_GiveInventory("Diveman_AltCollide_P")
goto AltTackleE+2
AltTackleE:
DIVA H 0 //A_ScaleVelocity(0.8)
DIVA H 0 //ThrustThingZ(0,40,0,0)
DIVA H 0 A_GiveInventory("VivifyDelay3",1)
DIVA H 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
DIVA G 0 A_TakeInventory("VivifyCycle1")
DIVA G 3
DIVA F 0 A_TakeInventory("CBM_DisableJumpPower")
//DIVA F 3 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEOFF_DAMAGE,CallACS("core_getmaxhealth")/10)
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 : Inventory{}
actor DiveTackleCooldown : Powerup{powerup.Duration 35}

actor DiveBossLockon : Powerup
{
powerup.duration 8
}

actor DiveLockonCleanse : Powerup
{
powerup.duration 6
}

actor Diveman_Fire_P0 : CustomInventory
{
States
{
Pickup:
//TNT1 A 0 A_FireCustomMissile("DivemanMissileClass3",0,1,0,0)
TNT1 A 0 A_GiveInventory("DiveCounter",1)
TNT1 A 0 A_SpawnItemEX("DivemanMissile0_H",0,0,32,0,0,0,0,SXF_TRANSFERPITCH)//512
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",1,1)
goto Daka
TNT1 A 0 A_SpawnItemEX("DivemanMissile0_H",0,0,32,0,0,0,15,512)
TNT1 A 0 A_SpawnItemEX("DivemanMissile0_H",0,0,32,0,0,0,-15,512)
goto Daka
Daka:
TNT1 A 0 A_PlaySoundEx("weapon/needleDakka","Weapon")
TNT1 A 0 A_TakeInventory("YouSunkMyAmmo",10,1)
stop
}
}

actor Diveman_Fire_P : Diveman_Fire_P0
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("DiveCounter",7,"Dive2")
TNT1 A 0 A_GiveInventory("DiveCounter",1)
TNT1 A 0 A_SpawnItemEX("DivemanMissile1_H",0,0,32,0,0,0,0,SXF_TRANSFERPITCH)//512
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",1,1)
goto Daka
TNT1 A 0 A_SpawnItemEX("DivemanMissile1_H",0,0,32,0,0,0,15,512)
TNT1 A 0 A_SpawnItemEX("DivemanMissile1_H",0,0,32,0,0,0,-15,512)
goto Daka
Dive2:
TNT1 A 0 A_TakeInventory("DiveCounter")
TNT1 A 0 A_SpawnItemEX("DivemanMissile2_H",0,0,32,0,0,0,0,512)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",1,1)
goto Daka
TNT1 A 0 A_SpawnItemEX("DivemanMissile2_H",0,0,32,0,0,0,15,512)
TNT1 A 0 A_SpawnItemEX("DivemanMissile2_H",0,0,32,0,0,0,-15,512)
goto Daka
}
}

actor DiveTackle_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("DiveTackleAmmo",1)
TNT1 A 0 A_TakeInventory("DiveTackleAmmo",2,1)
TNT1 A 0 A_JumpIf(CallACS("cbm_IsDashingDisabled"),"PickupEnd")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",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("VivifyCycle1",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,8)
stop
}
}


actor Diveman_AltCollide_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/blizzstrike","Body")
TNT1 A 0 A_ChangeVelocity(-15,0,16,3)
TNT1 A 0 A_FireCustomMissile("DiveTackleExplode",0,0,0,0)
TNT1 A 0 A_TakeInventory("DiveTackleAmmo",80,1)
stop
}
}

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

actor DiveMissileUseItem : BasicClassItem
{
inventory.icon "DiveIcon"
inventory.pickupmessage "R.I.P. homing Diveman."
Tag "Clear Lock-on"
states
{
Spawn:
DIVA X 1
loop
UseCBM:
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 : CBM_ShootableActor//ProjSpawnFuncActor
{

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

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(!CallACS("cbm_PointerExists",AAPTR_TARGET),"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_SetGravity(0.0)//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)
TNT1 A 1
stop
}
}

actor DiveM_MineProtect : PowerProtection
{
Powerup.Duration 8
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_4_210",0,0,0,0,0,0,0,1)
TNT1 A 2
stop
}
}

actor DivemanMissile0_H : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetArg(1,Angle*100000.0)
TNT1 A 0 A_SpawnItemEx("DivemanMissileClass",0,0,0,cos(pitch)*9,0,-sin(pitch)*9,0,512+SXF_TRANSFERSPECIAL)//32768
stop
}
}
actor DivemanMissile1_H : DivemanMissile0_H
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetArg(1,Angle*100000.0)
TNT1 A 0 A_SpawnItemEx("DivemanMissileClass",0,0,0,cos(pitch)*9+random(-4,4),random(-20,20),-sin(pitch)*9+random(-4,4),0,512+32768)
stop
}
}

actor DivemanMissile2_H : DivemanMissile0_H
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetArg(1,Angle*100000.0)
TNT1 A 0 A_SpawnItemEx("DivemanMissileClass2",0,0,0,cos(pitch)*9+random(-4,4),random(-20,20),-sin(pitch)*9+random(-4,4),0,512+32768)
stop
}
}


actor DivemanMissileClass : ProjSpawnFuncActor
{
PROJECTILE
damagetype "DiveM_Torpedo"
Obituary "$OB_DIVEMISSILE"
+SKYEXPLODE
+EXPLODEONWATER
+HEXENBOUNCE
+HITTRACER
BounceFactor 1.0
WallBounceFactor 1.0
damage (80)
Radius 6
Height 7
speed 20
scale 2.5
States
{
Spawn:
DIVA L 5
DIVA L 0 A_Stop
DIVA L 12
DIVA L 0 A_SpawnItemEx("DivemanMissileClass1",0,0,0,cos(pitch)*2,0,-sin(pitch)*2,Args[1]/100000.0,1+SXF_ABSOLUTEANGLE+SXF_MULTIPLYSPEED)//4+8192
stop
Spawn4:
DIVA L 2
DIVA L 0 //A_SpawnItemEx("DivemanMissileClassFX")
loop
Death:
//OMFX B 0 ACS_NamedExecuteWithResult("RFC_DiveLockOn",0)
TNT1 A 2 A_SpawnItemEx("DivemanMissileClassFXD",0,0,0,0,0,0,0,1)
stop

Crash:
XDeath:
TNT1 A 0 A_JumpIfInTargetInventory("SuplexID",1,"Death")
TNT1 A 0 A_JumpIf(CallACS("cbm_istracerenemy")==1, "DeathSetup")
goto Death
DeathSetup:
TNT1 A 0 A_GiveToTarget("SuplexID",(CallACS("core_getptrtid",8)-1000)+1)
TNT1 A 0 A_GiveToTarget("DivemanLockonACS_P",1)
TNT1 A 0 A_SpawnItemEx("Diveman_LockOn_H",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)//1024
goto Death
}
}
actor DivemanMissileClass1 : DivemanMissileClass
{
-HEXENBOUNCE
States
{
Spawn:
DIVA L 0
DIVA L 0 A_PlaySoundEx("weapon/solarshoot","Weapon")
goto Spawn4
}
}

actor Diveman_LockOn_H : BasicWatcher
{
ReactionTime 262
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySound("wep_L/DiveSonar",7,1.0)
goto SpawnL
SpawnL:
TNT1 A 1 A_GiveInventory("DiveBossLockon",1,8)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TRACER),"DeathT")
TNT1 A 0 A_JumpIfInTargetInventory("DiveLockonCleanse",1,"Death")
TNT1 A 1
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",2),"Death")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",8),"DeathT")
TNT1 A 0 A_JumpIfInTargetInventory("DiveLockonCleanse",1,"Death")
TNT1 A 0 A_CountDown
loop
Death:
TNT1 A 0 A_TakeFromTarget("SuplexID",999)
TNT1 A 1 A_TakeInventory("DiveBossLockon",9,0,8)
stop
DeathT:
TNT1 A 1 A_TakeFromTarget("SuplexID",999)
stop
}
}

actor DivemanMissileClassFXD : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
States
{
SpawnFrame:
OMFX BCD 2
stop
}
}

actor DivemanMissileClass2 : DivemanMissileClass
{
+SEEKERMISSILE
//Speed 30
Speed 20
States
{
Spawn:
DIVA P 4
DIVA P 0 A_Stop
DIVA P 12
DIVA P 0 A_SpawnItemEx("DivemanMissileClass3",0,0,0,cos(pitch)*2,0,-sin(pitch)*2,Args[1]/100000.0,1+4+8192)
stop
Spawn3:
DIVA P 0 //ACS_ExecuteAlways("RFC_DiveGetTracer",0)
DIVA P 0 ACS_NamedExecuteWithResult("core_setpointer",AAPTR_TRACER,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
}
}
actor DivemanMissileClass3 : DivemanMissileClass2
{
-HEXENBOUNCE
States
{
Spawn:
DIVA P 0
DIVA P 0 A_PlaySoundEx("weapon/solarshoot","Weapon")
goto SpawnOld
}
}

actor DivemanMissileClassFX : BasicGraphicEffect
{
var int user_TranslateWhiteColors;
renderstyle Add
alpha 0.8
States
{
SpawnFrame:
TNT1 A 1
DIVA QRS 3
stop
}
}

actor DivemanMissileClassOld : DivemanMissileClass2
{
-HITTRACER
States
{
Spawn:
DIVA P 4
DIVA P 10
DIVA P 2
Spawn4:
DIVA PP 1 A_SeekerMissile(2,10,1+2,50,4)
loop
}
}

actor DiveTackleHitboxCheck
{
PROJECTILE
damagetype "DiveM_Tackle"
Obituary "$OB_DIVETACKLE"
+DONTBLAST
+DONTREFLECT
+DONTSPLASH
//+NOCLIP
+THRUGHOST
+SKYEXPLODE
+EXPLODEONWATER
+STEPMISSILE
+THRUSPECIES
+NOEXPLODEFLOOR
+THRUACTORS
Species "DumbDiveMine"
+SERVERSIDEONLY
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"
+SERVERSIDEONLY
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
{
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")
stop
}
}

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 Diveman_W_NormalBar : NormalBar {Args 4,198}
actor Diveman_W_SecondBar : SecondBar {Args 196,197}
actor Diveman_W2_NormalBar : NormalBar {Args 4,198}
actor Diveman_W2_SecondBar : SecondBar {Args 196,197}