actor Bass : ClassBase
{
Player.ScoreIcon "C_00F0X"
player.displayname "Bass"
player.soundclass "bassc"

player.maxhealth 900
health 900
player.jumpz 10
player.forwardmove 0.75, 0.75
player.sidemove 0.73, 0.73

player.startitem "CBM_BaseFlagPack"
player.startitem "ModeWeps"

player.startitem "IsBass_F"
player.startitem "Bass_W"
player.startitem "TrebleBoostAmmo", 30
player.startitem "EmulousDashAmmo", 500
player.startitem "AirJumpLimit", 1

player.startitem "CopyNerfGiver_P"

States
{
Spawn:
BASS A 0
BASS B 1
BASS A 1
BASS A 55
BASS I 5
goto Spawn+3
See:
BASS BCDE 5
Goto Spawn
Missile:
BASS F 0 A_JumpIfInventory("VivifyDelay7",1,"MissileKicker")
BASS F 0 A_JumpIfInventory("SlideVivifyFlag",1,"Dash")
BASS FG 5
goto Spawn
Dash:
BASS R 20
goto Spawn

MissileKicker:
BASS TUVWX 3
Goto Spawn+2

ClassPain:
BASS H 0
goto MegamanPain
ClassDeath:
BASS H 0
goto MegamanDeath
}
}


//Treble Zone

actor BassCoilTeleport : RushTeleport
{
states
{
Spawn:
TRBL F 0
TRBL F 6
TRBL F 0 A_ChangeFlag("NOINTERACTION",0)
TRBL FFFFFFFFFF 1 A_CheckFloor("Next")
Next:
TRBL F 0 //A_ChangeFlag("NOGRAVITY",0)
Goto Death
Death:
TNT1 A 0 A_SpawnItemEx("BassTrebleCoil",0,0,3,0,0,momz,0,32)
stop
}
}

actor BassTrebleCoil : Rush
{
states
{
Spawn:
TRBL F 0 
TRBL F 0 A_JumpIfInventory("Once",1,"Death")
TRBL F 0 A_GiveInventory("Once",1)
TRBL F 0 A_ChangeFlag("MISSILE",0)
TRBL F 0 A_ChangeVelocity(0,0,-32,CVF_REPLACE)
TRBL F 1 A_JumpIf(z-floorz<=0,"Look")
Goto Spawn+2

Look:
TRBL G 0 A_ChangeFlag("NOCLIP",0)
TRBL GFHH 1
LookLoop:
//TRBL AAAAAAAA 1
//TRBL BCBCBC 4
TRBL B 0 A_Chase("")
TRBL BBB 1 A_JumpIf(CallACS("core_getPlayersInRadius",80) > 0,"Melee")
TRBL C 0 A_Chase("")
TRBL CCC 1 A_JumpIf(CallACS("core_getPlayersInRadius",80) > 0,"Melee")
TRBL B 0 A_CountDown
loop

Melee:
TRBL E 0 A_PlaySoundEx("misc/polarroar","Voice")
TRBL E 0 A_JumpIfInTargetInventory("StrongSpring",1,"Melee2")
TRBL E 18 A_RadiusGive("SpringActivate",80+16,RGF_PLAYERS|RGF_NOSIGHT,1)
TRBL A 0 A_Die
Goto Death
Melee2:
TRBL E 18 A_RadiusGive("SpringActivate2",80+16,RGF_PLAYERS|RGF_NOSIGHT,1)
TRBL E 0 A_Die
Goto Death
Death:
TRBL E 0 A_SpawnItemEx("TrebleDeath",0,0,0,0,0,0,0,1+32)
stop
}
}

actor BassMarineTeleport : RushMarineTeleport
{
states
{
Spawn:
TRBL F 0
TRBL F 7 
TRBL F 0 A_SpawnItemEx("BassMarineGiver",0,0,0,0,0,0,0,32)
stop
}
}

actor BassMarineGiver : RushMarineGiver
{
states
{
Spawn:
TRBL F 0
TRBL F 0 A_JumpIfInventory("Once",1,"Death")
TRBL F 0 A_GiveInventory("Once",1)
TRBL F 0 A_ChangeFlag("MISSILE",0)
TRBL F 0 A_ChangeVelocity(0,0,-32,CVF_REPLACE)
TRBL F 1 A_JumpIf(z-floorz<=0,"Look")
Goto Spawn+2
Look:
TRBL G 0 A_ChangeFlag("NOCLIP",0)
TRBL GFHH 1
LookLoop:
TRBL R 0 //A_Chase("")
TRBL RRR 1 A_JumpIf(CallACS("core_getPlayersInRadius",80,PRF_CLOSESTPOINTER,AAPTR_TRACER) > 0,"Melee")
TRBL R 0 //A_Chase("")
TRBL RRR 1 A_JumpIf(CallACS("core_getPlayersInRadius",80,PRF_CLOSESTPOINTER,AAPTR_TRACER) > 0,"Melee")
TRBL R 0 A_CountDown
loop
Melee:
TRBL R 0 A_GiveInventory("BassMarineActivate",1,AAPTR_TRACER)
stop
Death:
TRBL R 0 A_SpawnItemEx("TrebleDeath",0,0,0,0,0,0,0,1+32)
stop
}
}

actor BassMarineActivate : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEX("BassMarineActivater")
stop
}
}

actor BassMarineActivater : BasicWatcher
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("RushMarineCounter",1,"Reset")
TNT1 A 0 A_GiveToTarget("RushMarineCounter",20)
TNT1 A 0 A_GiveToTarget("BassMarineVisual",1)
stop
Reset:
TNT1 A 0 A_GiveToTarget("RushMarineCounter",20)
stop
}
}

actor BassMarineVisual : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("BassMarineWarper")
TNT1 A 0 ACS_NamedExecuteAlways("core_rushmarineflight",0)
stop
}
}

actor BassMarineWarper : BasicGraphicEffect
{
States
{
SpawnFrame:
TRBL S 1 A_JumpIFInTargetInventory("IsUnderwater",1,"Marine")
NotUnderwater:
TNT1 A 1 A_JumpIFInTargetInventory("IsUnderwater",1,"MarineStart")
TNT1 A 1 A_JumpIFInTargetInventory("RushMarineCounter",1,"NotUnderwater")
stop
MarineStart:
TNT1 A 1 A_Warp(AAPTR_TARGET,0,0,-16,0,WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE)//8+16
Marine:
TRBL TTTSSS 1 A_Warp(2,0,0,-16,0,8+16)
TRBL S 1 A_JumpIFInTargetInventory("RushMarineCounter",1,"SpawnLoop")
TRBL S 0 A_SpawnItemEx("TrebleDeath",0,0,0,0,0,0,0,SXF_WEPFXCOLOR)
stop
SpawnLoop:
TRBL S 0
goto SpawnFrame
}
}


actor BassJetTeleport : RushJetTeleport
{
states
{
Spawn:
TRBL F 0
TRBL F 6
TRBL F 0 A_ChangeFlag("NOINTERACTION",0)
TRBL FFFFFFFFFF 1 A_CheckFloor("Next")
Goto Next
Next:
TRBL F 0 //A_ChangeFlag("NOGRAVITY",0)
Goto Death
Death:
TNT1 A 0 A_SpawnItemEx("BassJetGiver",0,0,3,0,0,momz,0,32)
stop
}
}

actor BassJetGiver : RushJetGiver
{
states
{
Spawn:
TRBL F 0
TRBL F 0 A_JumpIfInventory("Once",1,"Death")
TRBL F 0 A_GiveInventory("Once",1)
TRBL F 0 A_ChangeFlag("MISSILE",0)
TRBL F 0 A_ChangeVelocity(0,0,-32,CVF_REPLACE)
TRBL F 1 A_JumpIf(z-floorz<=0,"Look")
Goto Spawn+2
Look:
TRBL G 0 A_ChangeFlag("NOCLIP",0)
TRBL GFHH 1
LookLoop:
TRBL O 0 //A_Chase("")
TRBL OOO 1 A_JumpIf(CallACS("core_getPlayersInRadius",80,PRF_CLOSESTPOINTER,AAPTR_TRACER) > 0,"Melee")
TRBL O 0 //A_Chase("")
TRBL OOO 1 A_JumpIf(CallACS("core_getPlayersInRadius",80,PRF_CLOSESTPOINTER,AAPTR_TRACER) > 0,"Melee")
TRBL O 0 A_CountDown
loop
Melee:
TRBL O 0 A_GiveInventory("BassJetActivate",1,AAPTR_TRACER)
stop
Death:
TRBL O 0 A_SpawnItemEx("TrebleDeath",0,0,0,0,0,0,0,1+32)
stop
}
}

actor BassJetActivate : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEX("BassJetActivater")
stop
}
}

actor BassJetActivater : BasicWatcher
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("RushJetCounter",1,"Reset")
TNT1 A 0 A_GiveToTarget("RushJetCounter",8)
TNT1 A 0 A_GiveToTarget("BassJetVisual",1)
stop
Reset:
TNT1 A 0 A_GiveToTarget("RushJetCounter",8)
stop
}
}

actor BassJetVisual : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("BassJetWarper")
TNT1 A 0 ACS_NamedExecuteAlways("core_rushjetflight",0)
stop
}
}

actor BassJetWarper : BasicGraphicEffect
{
States
{
SpawnFrame:
TNT1 A 0
TRBL QQQQPPPP 1 A_Warp(2,-10,0,0,0,8+16)
TRBL P 1 A_JumpIFInTargetInventory("RushJetCounter",1,"SpawnLoop")
TRBL P 0 A_SpawnItemEx("TrebleDeath",0,0,0,0,0,0,0,SXF_WEPFXCOLOR)
stop
SpawnLoop:
TRBL Q 0
goto SpawnFrame
}
}



actor EddieTrebleTeleport : EddieTeleport
{
states
{
Spawn:
TRBL F 0
TRBL F 9 
TRBL F 0 A_ChangeFlag("NOINTERACTION",0)
TRBL FFFFFFFFFF 1 A_CheckFloor("Next")
Goto Next
Next:
TRBL F 0
Goto Death
Death:
TNT1 A 0 A_SpawnItemEx("EddieTrebleI",0,0,3,0,0,momz,0,32) 
stop
}
}

actor EddieTrebleI : Eddie
{
speed 0
states
{
Spawn:
TRBL F 0
TRBL F 0 A_JumpIfInventory("Once",1,"Death")
TRBL F 0 A_GiveInventory("Once",1)
TRBL F 0 A_ChangeFlag("MISSILE",0)
TRBL F 0 A_ChangeVelocity(0,0,-32,CVF_REPLACE)
TRBL F 1 A_JumpIf(z-floorz<=0,"Search")
Goto Spawn+2

Search:
TRBL G 0 A_ChangeFlag("NOCLIP",0)
TRBL GH 2
TRBL B 0 A_PlaySound("misc/polarroar",1,1.0)
SearchLoop:
TRBL BBCCBBCCBBCCBBCCBBCC 1 A_Chase
TRBL A 0 A_CountDown
loop
Melee:
TRBL D 7 A_FaceTarget
TRBL E 18 A_SpawnItemEx("RandomWeapon",0,0,32,0,0,0)
TRBL E 0 A_Die
Goto Death
Death:
TRBL F 0 ThrustThingZ(0,34,0,1)
TRBL F 0 A_ChangeFlag("NOGRAVITY",1)
TRBL F 1 A_JumpIf(z-ceilingz==0-32,"Bye")
Goto Death+2
Bye:
TRBL F 1
stop
}
}


//Leftover Items

actor BassCoilItem : BasicItemPickup
{
inventory.pickupmessage "$PU_BASSCOIL"
Tag "$TAG_BASSCOIL"
inventory.icon "TrebCoil"
states
{
Spawn:
TRBB W 1
loop
Use:
WEAP B 0 A_PlaySoundEx("item/refill","Voice")
WEAP B 0 A_SpawnItemEx("BassCoilTeleport",40,0,256,0,0,-32,0,32)
stop
}
}

actor BassMarineItem : BasicItemPickup
{
inventory.pickupmessage "$PU_BASSMARINE"
Tag "$TAG_BASSMARINE"
inventory.icon "TrebSubM"
states
{
Spawn:
TRBB Y 1
loop
Use:
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_JumpIfInventory("RushmarineCounter",1,2)
TNT1 A 0 A_SpawnItemEx("BassMarineTeleport",40,0,256,0,0,-32,0,32)
stop
TNT1 A 0 A_GiveInventory("RushmarineCounter",20)
stop
}
}

actor BassJetItem : BasicItemPickup
{
inventory.pickupmessage "$PU_BASSJET"
Tag "$TAG_BASSJET"
inventory.icon "TrebJet"
states
{
Spawn:
TRBB V 1
loop
Use:
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_JumpIfInventory("RushJetCounter",1,2)
TNT1 A 0 A_SpawnItemEx("BassJetTeleport",40,0,256,0,0,-32,0,32)
stop
TNT1 A 0 A_GiveInventory("RushJetCounter",8)
stop
}
}

actor TrebleSummonItem : EddieSummon
{
inventory.pickupmessage "$PU_TREBLECALL"
Tag "$TAG_TREBLECALL"
inventory.icon "TrebEddy"
states
{
SpawnLoop:
TRB2 A 1
loop
Use:
WEAP Q 0 A_PlaySoundEx("item/refill","Voice")
WEAP Q 0 A_SpawnItemEx("EddieTrebleTeleport",80,0,256,0,0,-24,0,32)
stop
}
}

