actor BreakDashBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_VH"
Dropitem "BreakDashWepCDropped"
weapon.ammouse 0
weapon.ammogive 112
obituary "$OB_PLUTOCLOSE"
Inventory.Pickupmessage "Power up! IN ME POWER!"
weapon.ammotype "OwO_NoticesUrAmmo"
weapon.ammotype2 "BreakingIntoADashAmmo"
States
{
Spawn:
C_0V H 1
loop

Ready:
PLUH A 0 ACS_ExecuteAlways(998,0,DYE_PLUTO)
PLUH A 0 A_GunFlash
Goto Ready1

Ready1:
PLUH A 4 A_WeaponReady
PLUH A 0 A_GiveInventory("OwO_NoticesUrAmmo",2)
loop

Deselect:
PLUH AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
PLUH A 1 A_Lower
Loop
Select:
PLUH AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
PLUH A 1 A_Raise
Loop

Fire:
PLUH B 0 A_JumpIfInventory("BreakingIntoADashAmmo",784,"FireFast")
PLUH B 1
PLUH B 2 offset(-10,22)
PLUH B 2 offset(-15,18)
PLUH B 2 offset(-20,12)
PLUH C 0 A_Refire(1)
PLUH C 0 A_PlaySoundEx("weapon/GameBoyFire2","Weapon")
PLUH C 4 offset(-20,12)A_GiveInventory("PlutoMain_CI")
PLUH C 0 A_Refire("Fire2")
goto FireEnd
Fire2:
PLUH C 0 A_PlaySoundEx("weapon/GameBoyFire2","Weapon")
PLUH C 4 offset(-20,12)A_GiveInventory("PlutoMain_CI")
PLUH C 0 A_Refire("Fire3")
goto FireEnd
Fire3:
PLUH C 0 A_PlaySoundEx("weapon/GameBoyFire2","Weapon")
PLUH C 4 offset(-20,12)A_GiveInventory("PlutoMain_CI")
goto FireEnd
FireEnd:
PLUH B 2 offset(-20,12)
PLUH B 2 offset(-15,18)
PLUH B 2 offset(-10,22)
Goto Ready1


FireFast:
PLUH B 1
PLUH B 1 offset(-10,22)A_JumpIfInventory("PowerRage_ST",1,1)
PLUH B 1 offset(-13,19)
PLUH B 1 offset(-16,16)A_JumpIfInventory("PowerRage_ST",1,1)
PLUH B 1 offset(-20,12)
PLUH C 0 A_Refire(1)
PLUH C 0 A_PlaySoundEx("weapon/GameBoyFire2","Weapon")
PLUH C 3 offset(-20,12)A_GiveInventory("PlutoMain2_CI")
PLUH C 0 A_Refire("Fire2Fast")
goto FireFastEnd
Fire2Fast:
PLUH C 0 A_PlaySoundEx("weapon/GameBoyFire2","Weapon")
PLUH C 3 offset(-20,12)A_GiveInventory("PlutoMain2_CI")
PLUH C 0 A_Refire("Fire3Fast")
goto FireFastEnd
Fire3Fast:
PLUH C 0 A_PlaySoundEx("weapon/GameBoyFire2","Weapon")
PLUH C 3 offset(-20,12)A_GiveInventory("PlutoMain2_CI")
goto FireFastEnd
FireFastEnd:
PLUH B 1 offset(-20,12)A_JumpIfInventory("PowerRage_ST",1,1)
PLUH B 1 offset(-16,16)
PLUH B 1 offset(-13,19)A_JumpIfInventory("PowerRage_ST",1,1)
PLUH B 1 offset(-10,22)
Goto Ready1

Altfire:
PLUH D 0 A_JumpIfInventory("BreakDashAirFlag",2,"AltfireClaw")
PLUH D 0 A_JumpIfInventory("OwO_NoticesUrAmmo",56,"DasherStart")
goto AltfireClaw

AltfireClaw:
PLUH D 2 offset(32,32)A_PlaySoundEx("weapon/slashclaw","Weapon")
PLUH D 2 offset(2,57)A_GiveInventory("PlutoAlt2_CI")
PLUH D 2 offset(-23,88)A_GiveInventory("OwO_NoticesUrAmmo",2)
PLUH E 2 offset(62,22)
PLUH E 2 offset(41,46)
PLUH E 1 offset(29,74)
PLUH E 0 A_Refire("AltfireClaw2")
PLUH E 1 offset(25,92)
TNT1 A 2
goto AltfireClawEnd
AltfireClaw2:
PLUH F 2 offset(-32,32)A_PlaySoundEx("weapon/slashclaw","Weapon")
PLUH F 2 offset(-2,57)A_GiveInventory("PlutoAlt_CI")
PLUH F 2 offset(23,88)A_GiveInventory("OwO_NoticesUrAmmo",2)
PLUH G 2 offset(-62,22)
PLUH G 2 offset(-41,46)
PLUH G 1 offset(-29,74)
PLUH G 0 A_Refire("AltfireClaw")
PLUH G 1 offset(-25,92)
TNT1 A 2
goto AltfireClawEnd
AltfireClawEnd:
PLUH A 2 offset(-15,86)
PLUH A 2 offset(-8,68)
PLUH A 2 offset(-3,50)
Goto Ready1

DasherStart:
PLUH B 0 A_GiveInventory("PlutoIsDashing",1)
PLUH B 0 A_Refire(1)
PLUH B 1
PLUH B 2 offset(10,42)A_GunFlash("Flash")
PLUH B 2 offset(20,52)
PLUH B 2 offset(30,62)
PLUH B 0 //A_TakeInventory("CanWallJump",999)

PLUH B 0 A_GiveInventory("PlutoDashStarter_P",1)
PLUH B 0 A_ChangeFlag("NOGRAVITY",1)
PLUH B 0 A_TakeInventory("UnSolid",1)
PLUH B 0 A_ChangeFlag("SOLID",0)
PLUH B 0 A_ChangeFlag("THRUSPECIES",1)
PLUH B 0 A_GiveInventory("BreakDashAirFlag",1)
PLUH B 0 SetPlayerProperty(0,1,0)
PLUH B 0 A_SetArg(4,momz*100000)
PLUH B 0 A_SetArg(3,momy*100000)
PLUH B 0 A_SetArg(2,momx*100000)

PLUH BBBBBBBBBBBBBBBBBB 1 A_GiveInventory("PlutoBreakDashing_P",1)
//18
PLUH B 0 A_GiveInventory("VivifyDelay4",1)
PLUH B 0 A_TakeInventory("PlutoIsDashing",999)
PLUH B 0 //A_GiveInventory("CanWallJump")
PLUH B 0 A_ChangeFlag("NOGRAVITY",0)
PLUH B 0 A_ChangeFlag("THRUSPECIES",0)
PLUH B 0 A_SpawnItemEx("ResolidifyPlayer_H")
PLUH B 0 SetPlayerProperty(0,0,0)
PLUH B 2 offset(30,62)
PLUH B 0 A_GunFlash("Flash.LandStart")
PLUH B 2 offset(20,52)A_Refire("AltfireClaw")
PLUH B 2 offset(10,42)
goto Ready1

Flash:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_GiveInventory("PlutoDashFlash_P",1)
loop

Flash.LandStart:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_GiveInventory("PlutoDashFlash_P",1)
goto Flash.Land
Flash.Land:
TNT1 A 0 A_JumpIf(z-floorz==0,"Flash.LandEnd")
TNT1 A 0 A_JumpIf(momz==0,"Flash.LandZ")
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_GiveInventory("PlutoDashFlash_P",1)
loop
Flash.LandZ:
TNT1 A 1 A_GiveInventory("PlutoDashFlash_P",1)
TNT1 A 0 A_JumpIf(z-floorz==0,"Flash.LandEnd")
TNT1 A 0 A_JumpIf(momz==0,"Flash.LandEnd")
goto Flash.Land+2
Flash.LandEnd:
TNT1 A 0 A_TakeInventory("BreakDashAirFlag",999)
goto Flash

}
}

actor OwO_NoticesUrAmmo : Ammo
{
Inventory.amount 1
Inventory.Maxamount 112
+INVENTORY.IGNORESKILL
}

actor BreakingIntoADashAmmo : Ammo
{
Inventory.amount 1
Inventory.Maxamount 896
+INVENTORY.IGNORESKILL
}

actor PlutoIsDashing : Powerup
{
Powerup.Duration 8
}

actor PlutoPowerTrail : PowerSpeed
{
Speed 1.0
Powerup.Duration 5
}

actor BreakDashAirFlag : Inventory
{
inventory.amount 1
inventory.maxamount 2
}

actor PlutoDashStarter_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BreakingIntoADashAmmo",784,"PickupBoost")
TNT1 A 0 A_ChangeVelocity(33*cos(pitch),0,33*-sin(pitch),3)
stop
PickupBoost:
TNT1 A 0 A_ChangeVelocity(44*cos(pitch),0,44*-sin(pitch),3)
stop
}
}

actor PlutoBreakDashing_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("OwO_NoticesUrAmmo",3,1)
TNT1 A 0 A_FireCustomMissile("PlutoBreakDashDamager",0,0,0,0)
TNT1 A 0 A_GiveInventory("PlutoIsDashing",1)
TNT1 A 0 A_JumpIfInventory("VivifyDelay3",1,"No")
TNT1 A 0 A_GiveInventory("VivifyDelay3",1)
TNT1 A 0 A_ChangeVelocity(Args[2]*0.00001,Args[3]*0.00001,Args[4]*0.00001,2)
TNT1 A 0 A_PlaySound("weapon/plutobreakdash",4)
stop
No:
TNT1 A 0
stop
}
}


actor PlutoDashFlash_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteAlways("cbm_HealthDamageRage",0,27)

TNT1 A 0 A_JumpIfInventory("PlutoBoostCheckDelay",1,3)
TNT1 A 0 A_GiveInventory("PlutoBoostCheckDelay",1)
TNT1 A 0 A_GiveInventory("PlutoDashAmmoAdjust_P",1)
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("BreakingIntoADashAmmo",784,"BonusSpeed")
stop

BonusSpeed:
TNT1 A 0 A_JumpIfInventory("PlutoPowerTrail",1,2)
TNT1 A 0 A_PlaySound("weapon/plutoultraspeed",7,0.85)
TNT1 A 0 A_GiveInventory("PlutoPowerTrail",1)
stop
}
}

actor PlutoBoostCheckDelay : Powerup
{
Powerup.Duration 2
}

actor PlutoDashAmmoAdjust_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("BreakingIntoADashAmmo",1)
TNT1 A 0 //A_JumpIfInventory("BreakingIntoADashAmmo",896,"Pickup")

TNT1 A 0 A_JumpIfInventory("PlutoIsDashing",1,"P_SpeedCheckD")//PowerWallJumpSpeed
TNT1 A 0 A_JumpIfInventory("PowerWallJumpSpeed",1,"P_SpeedCheckD")
TNT1 A 0 A_JumpIf(CallACS("cbm_FetchMovementInput")>1,"P_SpeedCheck")//Is attempting to move!
goto P_Take50
P_SpeedCheck:
//TNT1 A 0 A_JumpIf( (MOMX*MOMX+MOMY*MOMY)*0.006 >= 1,"P_Give")
TNT1 A 0 A_JumpIf(sqrt(MOMX*MOMX+MOMY*MOMY)>=11,"P_Give")
goto P_Take35
P_SpeedCheckD:
TNT1 A 0 A_JumpIf(sqrt(MOMX*MOMX+MOMY*MOMY)>=11,"P_Give")
goto P_Take5

P_Give:
TNT1 A 0 A_JumpIfInventory("PlutoIsDashing",1,"P_GiveD")
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"P_Give_R")
//TNT1 A 0 A_GiveInventory("BreakingIntoADashAmmo",(MOMX*MOMX+MOMY*MOMY)*0.025)
TNT1 A 0 A_GiveInventory("BreakingIntoADashAmmo",sqrt(MOMX*MOMX+MOMY*MOMY)*0.5)
stop
P_Give_R:
//TNT1 A 0 A_GiveInventory("BreakingIntoADashAmmo",(MOMX*MOMX+MOMY*MOMY)*0.04)
TNT1 A 0 A_GiveInventory("BreakingIntoADashAmmo",sqrt(MOMX*MOMX+MOMY*MOMY)*1)
stop
P_GiveD:
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"P_GiveD_R")
TNT1 A 0 A_GiveInventory("BreakingIntoADashAmmo",sqrt(MOMX*MOMX+MOMY*MOMY)*0.75)
stop
P_GiveD_R:
TNT1 A 0 A_GiveInventory("BreakingIntoADashAmmo",sqrt(MOMX*MOMX+MOMY*MOMY)*1.5)
stop

P_Take5:
TNT1 A 0 A_TakeInventory("BreakingIntoADashAmmo",5,1)
stop
P_Take35:
TNT1 A 0 A_TakeInventory("BreakingIntoADashAmmo",35,1)
stop
P_Take50:
TNT1 A 0 A_TakeInventory("BreakingIntoADashAmmo",50,1)
stop
}
}


actor PlutoFireBall
{
translation "192:192=56:56", "198:198=60:60"
PROJECTILE
Obituary "$OB_PLUTOSHOT"
Damagetype "Pluto_Shot"
ReactionTime 1
damage (60)
Radius 10
Height 10
speed 40
scale 2.5
States
{
Spawn:
PLUH HIHIHIH 3
PLUH I 1 A_CountDown
wait
Death:
PLUH IHI 1 A_Fadeout
stop
}
}
actor PlutoFireBall2 : PlutoFireBall
{
speed 60
States
{
Spawn:
PLUH HIHIHIH 2
PLUH I 1 A_CountDown
wait
Death:
PLUH IHIHI 1 A_Fadeout
stop
}
}

actor PlutoFireBallB : PlutoFireBall{Translation"192:192=205:205","198:198=74:74"}
actor PlutoFireBallR : PlutoFireBall{Translation"192:192=171:171","198:198=41:41"}
actor PlutoFireBallO : PlutoFireBall{Translation"192:192=104:104","198:198=128:128"}
actor PlutoFireBallP : PlutoFireBall{Translation"192:192=229:229","198:198=232:232"}

actor PlutoFireBall2B : PlutoFireBall2{Translation"192:192=205:205","198:198=74:74"}
actor PlutoFireBall2R : PlutoFireBall2{Translation"192:192=171:171","198:198=41:41"}
actor PlutoFireBall2O : PlutoFireBall2{Translation"192:192=104:104","198:198=128:128"}
actor PlutoFireBall2P : PlutoFireBall2{Translation"192:192=229:229","198:198=232:232"}

actor PlutoFurySwipes
{
translation "202:202=210:210", "199:199=210:210"
PROJECTILE
damagetype "Pluto_Swipe"
Obituary "$OB_PLUTOSWIPE"
+THRUACTORS
+DONTBLAST
damage (0)
Radius 5
Height 5
speed 30
scale 2.5
States
{
Spawn:
//Y_7F ABCDE
PLUH K 0
PLUH KLM 1 A_Explode(40,70,0,0,24)
PLUH NO 1 A_Explode(30,70,0,0,24)
stop
}
}

actor PlutoFurySwipes2 : PlutoFurySwipes
{
States
{
Spawn:
//Y_7F FGHIJ
PLUH P 0
PLUH PQR 1 A_Explode(40,70,0,0,24)
PLUH ST 1 A_Explode(30,70,0,0,24)
stop
}
}

actor PlutoFurySwipesB : PlutoFurySwipes{Translation"202:202=205:205","199:199=74:74"}
actor PlutoFurySwipesR : PlutoFurySwipes{Translation"202:202=171:171","199:199=41:41"}
actor PlutoFurySwipesO : PlutoFurySwipes{Translation"202:202=104:104","199:199=128:128"}
actor PlutoFurySwipesP : PlutoFurySwipes{Translation"202:202=229:229","199:199=232:232"}

actor PlutoFurySwipes2B : PlutoFurySwipes2{Translation"202:202=205:205","199:199=74:74"}
actor PlutoFurySwipes2R : PlutoFurySwipes2{Translation"202:202=171:171","199:199=41:41"}
actor PlutoFurySwipes2O : PlutoFurySwipes2{Translation"202:202=104:104","199:199=128:128"}
actor PlutoFurySwipes2P : PlutoFurySwipes2{Translation"202:202=229:229","199:199=232:232"}

actor Pluto_Dash1Protect : PowerProtection
{
Powerup.Duration 20
DamageFactor "Pluto_Dash1", 0.04
}
actor Pluto_Dash2Protect : PowerProtection
{
Powerup.Duration 20
DamageFactor "Pluto_Dash2", 0.4
}

actor PlutoBreakDashDamager : BasicExplosion
{
obituary "$OB_PLUTODASH"
Damagetype "Pluto_Dash1"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(120,75,0,0,75)
TNT1 A 0 A_SetDamagetype("Pluto_Dash2")
TNT1 A 2 A_Explode(50,100,0,0,95)
stop
}
}


actor PlutoMain_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("PlutoFireBall",random(-1,1),1,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("PlutoFireBallB",random(-1,1),1,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("PlutoFireBallR",random(-1,1),1,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("PlutoFireBallO",random(-1,1),1,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("PlutoFireBallP",random(-1,1),1,8,0)
goto Done
}
}


actor PlutoMain2_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("PlutoFireBall2",random(-1,1),1,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("PlutoFireBall2B",random(-1,1),1,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("PlutoFireBall2R",random(-1,1),1,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("PlutoFireBall2O",random(-1,1),1,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("PlutoFireBall2P",random(-1,1),1,8,0)
goto Done
}
}

actor PlutoAlt_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipes",random(-1,1),1,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipesB",random(-1,1),1,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipesR",random(-1,1),1,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipesO",random(-1,1),1,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipesP",random(-1,1),1,-8,0)
goto Done
}
}
actor PlutoAlt2_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipes2",random(-1,1),1,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipes2B",random(-1,1),1,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipes2R",random(-1,1),1,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipes2O",random(-1,1),1,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("PlutoFurySwipes2P",random(-1,1),1,8,0)
goto Done
}
}