actor CurseThunderWep_NormalBar : NormalBar{args 117,245}
actor CurseThunderWep : BaseMM8BDMWep 
{
Weapon.AmmoUse 3
Weapon.AmmoGive 27
Weapon.SlotNumber 2
Inventory.Pickupmessage "$PU_CURSETHUNDER"
Obituary "$OB_CURSETHUNDER"
Tag "$TAG_CURSETHUNDER"
weapon.ammotype "CurseThunderAmmo"
inventory.pickupsound "weapon/weaponup"
inventory.icon "CTHNICON"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
SpawnLoop:
CTHN Z 1
loop
Ready:
CTHN A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_CURSETHUNDER)
CTHN A 1 A_WeaponReady
Goto Ready+1
ReadyC: Goto Ready+1
Deselect:
CTHN A 0 
goto DeselectSwap
Select:
CTHN A 0 
goto SelectSwap
Fire:
CTHN A 0 A_JumpIfNoAmmo("NoAmmo")
CTHN A 0 A_PlaySoundEx("Weapon/FireballShot","Weapon")
CTHN A 0 A_FireCustomMissile("CurseThunder",0,1,8,0)
CTHN BC 3
CTHN A 18
goto Ready+1
NoAmmo:
CTHN A 0 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
}
}

actor CurseThunderAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 27
+INVENTORY.IGNORESKILL
}



actor CurseThunder : BasicProjectile
{
var int user_TranslateBlackColors;
+NOEXPLODEFLOOR
+RIPPER
var int user_PierceRipper;
Radius 24
Height 24
damage (CallACS("vile_cbm_damage",10))
speed 17
damagetype "CurseThunder"
Obituary "$OB_CURSETHUNDER"
States
{
Spawn:
TNT1 A 0 
CTHN E 1 ThrustThingZ(0, 1, 0, 1)
CTHN DD 1 ThrustThingZ(0, 1, 0, 1)
SpawnLoop:
CTHN G 0 A_PlaySoundEx("Weapon/CurseThunderDrop","Weapon")
CTHN F 0 A_SpawnItemEx("CurseThunderStrike",0,0,0,0,0,-27,0,SXF_NOCHECKPOSITION)
CTHN DD 1 ThrustThingZ(0, 1, 0, 1)
CTHN EE 1 ThrustThingZ(0, 2, 0, 1)
CTHN FFF 1 ThrustThingZ(0, 1, 0, 1)
loop
Death:
TOMA B 1
stop
}
}


Actor CurseThunderStrike : BasicProjectile
{
var int user_TranslateBlackColors;
PROJECTILE
Radius 16
Height 16
Scale 2.5
Speed 0
Damage (CallACS("vile_cbm_damage",14))
damagetype "CurseThunder"
Obituary "$OB_CURSETHUNDER"
States
{
Spawn:
CTHN G 0
CTHN G 0 A_PlaySoundEx("Weapon/CurseThunderStrike","Weapon")
CTHN X 3
CTHN X 0 A_Jump(256,"SpawnLoop","SpawnLoop2")
goto SpawnLoop
SpawnLoop:
CTHN G 2 A_ScaleVelocity(1.2)
CTHN H 2 A_ScaleVelocity(1.2)
SpawnLoop2:
CTHN I 2 A_ScaleVelocity(1.2)
CTHN J 2 A_ScaleVelocity(1.2)
goto SpawnLoop
Death:
TNT1 A 0
TNT1 A 0 A_Explode(CallACS("vile_cbm_damage",22),60,0,0,60)
TNT1 AAAAAAAA 0 A_SpawnItemEX("CaveStoryExplosionSmoke",0,0,0,random(-2,2),random(-2,2),random(-2,2))
TNT1 A 1
stop
}
}
