actor PowerParcelWep_NormalBar : NormalBar{args 84,229}
actor PowerParcelWep_ScriptBar : ScriptBar{}

actor PowerParcelWep : BaseMM8BDMWep
{
Weapon.AmmoUse 2
Weapon.AmmoGive 28
Weapon.SlotNumber 2
Inventory.Pickupmessage "$PU_POWERPARCEL"
Obituary "$OB_POWERPARCEL"
Tag "$TAG_POWERPARCEL"
weapon.ammotype "PowerParcelAmmo"
inventory.icon "PPRCICON"
States
{
SpawnLoop:
PPRC Z -1
loop
Ready:
PPRC A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_POWERPARCEL)
PPRC A 1 A_WeaponReady
Goto Ready+1
ReadyC: Goto Ready+1
Deselect:
PPRC A 0 
goto DeselectSwap
Select:
PPRC A 0 
goto SelectSwap
Fire:
Hold:
PPRC A 0 A_JumpIfNoAmmo("NoAmmo")
PPRC A 0 A_JumpIfInventory("WeaponCharge",9,"Hold1")
PPRC A 1 A_GiveInventory("WeaponCharge", 1 + CallACS("core_checkrune", RUNE_RAGE))
PPRC A 0 A_Refire
Goto Fire1
Hold1:
PPRC A 0 A_JumpIfInventory("WeaponCharge",11,"Charge1")
PPRC A 0 A_PlaySoundEx ("weapon/chargeup","Weapon")
PPRC A 2 A_GiveInventory("WeaponCharge", 1 + CallACS("core_checkrune", RUNE_RAGE))
Charge1:
PPRC A 0 A_JumpIfInventory("WeaponCharge",26,"Charge2Start")
PPRC D 1 ACS_NamedExecuteWithResult("core_chargecolor", COLOR_POWERPARCELCRG1,TCLR_CHARGE1)
PPRC A 0 A_Refire("Charge1.a")
Goto Fire1
Charge1.a:
PPRC A 0 ACS_NamedExecuteWithResult("core_chargecolor", COLOR_POWERPARCEL,TCLR_NONE)
PPRC A 1 A_GiveInventory("WeaponCharge", 1 + CallACS("core_checkrune", RUNE_RAGE))
PPRC A 0 A_Refire("Charge1")
Goto Fire1
Charge2Start:
PPRC G 0 A_GunFlash("Sound.BusterCharge", GFF_NOEXTCHANGE)
Goto Charge2
Charge2:
PPRC G 1 ACS_NamedExecuteWithResult("core_chargecolor", COLOR_POWERPARCELCRG3,TCLR_CHARGE2)
PPRC A 0 A_Refire("Charge2.a")
Goto Fire2
Charge2.a:
PPRC H 1 ACS_NamedExecuteWithResult("core_chargecolor", COLOR_POWERPARCELCRG2,TCLR_CHARGE1)
PPRC A 0 A_Refire("Charge2.b")
Goto Fire2
Charge2.b:
PPRC A 1 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_POWERPARCEL,1)
PPRC A 0 A_GiveInventory("WeaponCharge", 1 + CallACS("core_checkrune", RUNE_RAGE))
PPRC A 0 A_JumpIfInventory("IsBot", 1, "BotFire")
PPRC A 0 A_Refire("Charge2")
Goto Fire2
BotFire:
PPRC A 0 A_Jump(16, "Fire2")
PPRC A 0 A_Refire("Charge2.a")
Goto Fire2
Altfire:
PPRC A 0 A_JumpIfInventory("Vile_ClassAltfire", 1, "ClassAltfire")
PPRC A 0 A_JumpIf(CallACS("Vile_class_altfire"), "ClassAltfire")
PPRC A 1 A_JumpIfInventory("MM8BDMPlayer", 1, 1)
wait
PPRC A 0 A_JumpIfNoAmmo("NoAmmo")
Fire1:
PPRC A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_POWERPARCEL,1)
PPRC A 0 A_TakeInventory("WeaponCharge",500)
PPRC A 0 A_PlaySoundEx("weapon/powerparcel","Weapon")
PPRC A 0 A_FireCustomMissile("PowerParcel",0,1,8,0)
PPRC BC 3
PPRC A 10 
PPRC A 0 A_Refire
Goto Ready+1
Fire2:
PPRC A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_POWERPARCEL,1)
PPRC A 0 A_TakeInventory("WeaponCharge",500)
TNT1 A 0 A_StopSoundEx("SoundSlot5")
PPRC A 0 A_JumpIfInventory("PowerParcelAmmo", 5, "Fire2r")
Goto Fire1
Fire2r:
PPRC A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_POWERPARCEL,1)
PPRC A 0 A_TakeInventory("PowerParcelAmmo",5,TIF_NOTAKEINFINITE)
PPRC A 0 A_TakeInventory("WeaponCharge",500)
PPRC A 0 A_PlaySoundEx("weapon/powerparcel2","Weapon")
PPRC A 0 A_FireCustomMissile("PowerParcel2",0,0,8,0) //For the funny lighting, its meant to do 12 damage.
PPR0 ABCDEF 2
PPRC A 11
Goto Ready+1
ClassAltfire:
DATK A 0 
goto Super::Altfire
NoAmmo:
PPRC A 1 ACS_NamedExecuteAlways("core_noammo",0)
PPRC A 0 A_Refire
Goto Ready+1
}
}

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

actor PowerParcel : BasicProjectile
{
PROJECTILE
+BRIGHT
damagetype "PowerParcel"
Obituary "$OB_POWERPARCEL"
Radius 12
Height 12
+RIPPER
scale 2.5
damage (CallACS("vile_cbm_damage",6))
speed 35
States
{
Spawn:
PPRC IJ 2
loop
}
}

actor PowerParcel2 : BasicPRojectile
{
+RIPPER
PROJECTILE
+BRIGHT
damagetype "PowerParcel"
Obituary "$OB_POWERPARCEL"
Radius 32
Height 32
scale 2.5
damage (CallACS("vile_cbm_damage",18))
speed 25
States
{
Spawn:
PPRC KKLL 1 A_SpawnItemEx("ParcelTrail",-8,random(-24,24),random(-24,24))
loop
}
}

actor ParcelTrail : BasicGraphicEffect
{
+NOINTERACTION
+NOGRAVITY
+CLIENTSIDEONLY
+FORCEXYBILLBOARD
-SOLID
scale 0.75
height 0
radius 0
States
{
SpawnFrame:
TNT1 A 2
Spawn2:
PPRC IJ 2 bright A_Fadeout(0.1)
loop
}
}