actor CrashBombWep : BaseMM8BDMWep 10054
{
//$Category MM8BDM-Weapons
//$Title Crash Bomb
//$Sprite WEA2C0
Weapon.AmmoUse 3
Weapon.AmmoGive 28
Weapon.SlotNumber 5
Inventory.Pickupmessage "$PU_CRASHBOMB"
Obituary "$OB_CRASHBOMB"
Tag "$TAG_CRASHBOMB"
weapon.ammotype "CrashBombAmmo"
inventory.icon "CRASSI"
States
{
SpawnLoop:
WEA2 C -1
loop
Ready:
CRAS X 0 ACS_ExecuteAlways(998,0,23)
CRAS X 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
CRAS X 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
CRAS X 1 A_Raise
Loop
Fire:
CRAS X 0 A_JumpIfNoAmmo("NoAmmo")
CRAS X 0 A_PlaySoundEx("weapon/mbuster","Weapon")
CRAS X 0 A_FireCustomMissile("CrashBomb",0,1,8,0)
CRAS YZ 5
CRAS X 15
CRAS X 0 A_Refire
Goto Ready+1
NoAmmo:
CRAS X 1 ACS_Execute(979,0)
Goto Ready+1
}
}

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

actor CrashBomb
{
PROJECTILE
Radius 6
Height 6
+HITTRACER
DamageType "CrashBomb"
Obituary "$OB_CRASHBOMB"
scale 2.5
damage 0
speed 40
States
{
Spawn:
CRAS A 1
loop
Death:
CRAS A 0 A_JumpIf(z-floorz<5, "Floor")
CRAS A 0 A_JumpIf(z-ceilingz==0-6, "Ceiling")
CRAS B 3 A_PlaySound("weapon/crashland")
CRAS C 3
CRAS DCDCDCDCDCDCDC 3
Goto XDeath
Floor:
CRAS E 3 A_PlaySound("weapon/crashland")
CRAS F 3
CRAS GFGFGFGFGFGFGF 3
Goto XDeath
Ceiling:
CRAS H 3 A_PlaySound("weapon/crashland")
CRAS I 3
CRAS JIJIJIJIJIJIJI 3
Goto XDeath
XDeath:
CRAS A 0 A_PlaySound("weapon/crashexplode")
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
MMFX BC 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
MMFX DE 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
TNT1 AA 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
TNT1 AA 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
TNT1 AA 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
TNT1 AA 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
TNT1 AA 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
TNT1 AA 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
TNT1 AA 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")
TNT1 AA 1 A_Warp(AAPTR_TRACER,0,0,28,0,WARPF_COPYINTERPOLATION)
TNT1 A 0 A_SpawnItemEx("CrashBombFX")

TNT1 A 1
stop
}
}

actor CrashBombExplode : BasicGraphicEffect
{
    +FORCEXYBILLBOARD
    +BRIGHT
    States
    {
    Spawn:
        CRAS KKLMNNOPQQRSTTVWKKLMNNOPQQRSTTVW 1
        stop
    }
}


actor CrashBombFX
{
Speed 0
Damage 0
Scale 2.5
+NOINTERACTION
Height 0
Radius 0
+NOGRAVITY
-SOLID
DAMAGETYPE "CrashBomb"
Obituary "$OB_CRASHBOMB"
States
{
Spawn:
HARD B 0
TNT1 A 0 A_Explode(10,64,0,24)
TNT1 A 0 A_SpawnItemEx("CrashBombBit",random(40,-40),random(40,-40),random(40,-40),0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("CrashBombBit",random(40,-40),random(40,-40),random(40,-40),0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("CrashBombBit",random(40,-40),random(40,-40),random(40,-40),0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("CrashBombBit",random(40,-40),random(40,-40),random(40,-40),0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 1
stop
}
}


actor CrashBombBit
{
Speed 0
Damage 0
Scale 2.5
Height 0
Radius 0
+NOGRAVITY
-SOLID
States
{
Spawn:
HARD B 0
MMFX BCDE 1
stop
}
}