actor Napalmman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_5G"
dropitem "NapalmBombWep"
Weapon.AmmoUse 0
Weapon.AmmoGive 56
Obituary "$OB_NAPALMBOMB"
weapon.ammotype "MorningSmellAmmo"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_05 G 1
loop

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

Ready:
NPAR A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_NAPALMMAN)
NPAR A 0 A_JumpIfInventory("MorningSmellAmmo",2,"Ready2")
NPAR A 3 A_WeaponReady(WRF_NOFIRE)
NPAR A 0 A_GiveInventory("MorningSmellAmmo",1)
goto Ready+1
Ready2:
NPAR A 0 A_JumpIfInventory("MorningSmellAmmo",8,"Ready3")
NPAR A 3 A_WeaponReady(WRF_NOSECONDARY)
NPAR A 0 A_GiveInventory("MorningSmellAmmo",1)
loop
Ready3:
NPAR A 3 A_WeaponReady
NPAR A 0 A_GiveInventory("MorningSmellAmmo",1)
loop

Fire:
NPAR A 4 A_JumpIfInventory("MorningSmellAmmo",2,1)
goto NoAmmo
NPAR A 0 A_PlaySoundEx("weapon/dustbit","Weapon")
NPAR A 0 A_TakeInventory("MorningSmellAmmo",2,1)
NPAR A 0 A_JumpIfInventory("VivifyFlag1",1,"Fire2")
NPAR A 0 A_FireCustomMissile("NapalmBombClass",0,1,8,0)
NPAR B 3
NPAR C 2
NPAR A 2 A_GiveInventory("VivifyFlag1",1)
NPAR AA 2 A_Refire("Fire")
Goto Ready+1
Fire2:
NPAR A 0 A_FireCustomMissile("NapalmBombClass",0,1,-8,0)
NPAR D 3
NPAR E 2
NPAR A 2 A_TakeInventory("VivifyFlag1")
NPAR AA 2 A_Refire("Fire")
Goto Ready+1
Altfire:
NPAR A 0 A_JumpIfInventory("MorningSmellAmmo",8,"MissileLaunch")
goto NoAmmo
MissileLaunch:
NPAR A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
NPAR A 3 A_SpawnItemEx("HardKnuckleFX",0,0,64,0,0,0)
NPAR A 0 A_TakeInventory("MorningSmellAmmo",8,1)
NPAR A 0 A_PlaySoundEx("weapon/GrenadeShot","Weapon")
NPAR A 0 A_FireCustomMissile("NapalmMissileClass",0,0,0,32)
NPAR G 4
NPAR A 2
NPAR A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
NPAR AAA 2 A_Refire("Altfire")
Goto Ready+1
NoAmmo:
NPAR A 0
Goto Ready+1
}
}

actor MorningSmellAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 56
+INVENTORY.IGNORESKILL
}

actor NapalmMissileClass : ProjSpawnFuncActor
{
var int user_TranslateWhiteColors;
PROJECTILE
damagetype "NapalmM_Missile"
Obituary "$OB_NAPALMMISSILE"
+SKYEXPLODE
+EXPLODEONWATER
Damage (20)
Radius 12
Height 12
Speed 36//30
Scale 2.5
States
{
Spawn:
NAPC M 0
NAPC M 0 A_PlaySoundEx("weapon/drillfly","Weapon")
NAPC M 10
loop
Death:
TNT1 A 0 A_Explode(180,128,0,0,32)
TNT1 A 0 A_PlaySoundEx("weapon/drillexplode","Weapon")
TNT1 A 2 A_SpawnItemEx("BasicBoom5FX_4_210",0,0,0,0,0,0,0,1)
stop
}
}

actor NapalmBombClass : ProjSpawnFuncActor
{
PROJECTILE
damagetype "NapalmM_Bomb"
Obituary "$OB_NAPALMBOMB"
-NOGRAVITY
+SKYEXPLODE
+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
//+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
bouncefactor 0.7//0.6
wallbouncefactor 0.5
bouncecount 5
reactiontime 15
Damage (10)
Radius 11
Height 12
speed 28//25
scale 2.5
States
{
Spawn:
NAPC A 0
NAPC A 0 A_ChangeVelocity(0,0,6.25)
NAPC A 0 A_CountDown
NAPC ABCD 4
Goto Spawn+2
Death:
TNT1 A 0 A_Explode(130,128,0,0,16)
TNT1 A 0 A_PlaySoundEx("weapon/napalm","Weapon")
TNT1 A 0 A_SpawnItemEx("BasicBoom5FX_4_210",0,0,0,0,0,0,0,1)
TNT1 A 2
stop
}
}


actor Napalmman_W_NormalBar : NormalBar {Args 216,75}