
actor NoTeleportFX_Flag : PowerUp 
{
powerup.duration 3
}
actor TeleportFX_Flag6 : NoTeleportFX_Flag{}

actor CBM_TeleportFogGiver : TeleportFogGiver replaces TeleportFogGiver
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_StopSound(4)
TNT1 A 0 A_JumpIfInTargetInventory("NoTeleportFX_Flag",1,"Death")
TNT1 A 0 ACS_NamedExecuteWithResult("map_teleportfog")
stop
Death:
TNT1 A 0
stop
}
}

ACTOR CBM_TeleportFogFX : TeleportFogFX replaces TeleportFogFX
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("JumpCancler",1,"CheckDist")
Goto Destination
Destination:
TNT1 A 0 A_JumpIfInTargetInventory("TeleportFX_Flag6",1,"Destination6")
TNT1 A 0 A_SpawnItemEx("TeleportFogNormal",0,0,0,0,0,0,0,1)
Stop
Destination6:
TNT1 A 0 A_SpawnItemEx("CBM_TeleportFogNormal_6",0,0,0,0,0,0,0,1)
Stop
CheckDist:
TNT1 A 0 A_JumpIfCloser(128,"Destination")
Goto Teleport
Teleport:
TNT1 A 0 A_JumpIfInTargetInventory("TeleportFX_Flag6",1,"Teleport6")
TNT1 A 0 A_SpawnItemEx("TeleportFogFancy",0,0,0,0,0,0,0,1)
stop
Teleport6:
TNT1 A 0 A_SpawnItemEx("CBM_TeleportFogFancy_6",0,0,0,0,0,0,0,1)
stop
Death:
TNT1 A 0
stop
}
}

actor CBM_TeleportFogNormal_6 : TeleportFogNormal
{
states
{
Spawn:
TNT1 A 0
TNT1 A 1 //Thing_SetTranslation(0,CallACS("core_copytranslation"))
TNT1 A 0 A_PlaySoundEx("misc/teleport66","body")
TFOG CBA 2
stop
}
}
actor CBM_TeleportFogFancy_6 : TeleportFogFancy
{
states
{
Spawn:
TNT1 A 0
TNT1 A 1 //Thing_SetTranslation(0,CallACS("core_copytranslation"))
TNT1 A 0 A_PlaySoundEx("misc/teleport66","body")
TFOG CB 3
TFOG A 65 A_ChangeVelocity(0,0,13,3)
stop
}
}


/////////////////////////////////////////////////
//Stage Props Damage/Pain
/////////////////////////////////////////////////

/*
actor CBM_WilyBarrel1 : WilyBarrel1 replaces WilyBarrel1
{
Species "DumbBarrel"
+THRUSPECIES
}
actor CBM_WilyBarrel2 : WilyBarrel2 replaces WilyBarrel2
{
Species "DumbBarrel"
+THRUSPECIES
}
*/

//Runs edited script so Clownman weapon gets its flags
Actor CBM_ThunderClawPeg : ThunderClawPeg replaces ThunderClawPeg
{
damagefactor "ClownM_Claw", 1.0
States
{
Pain.ClownM_Claw:
Pain.ThunderClaw:
Pain.ThunderClawPegHelp:
THOO A 0 A_ChangeFlag(SHOOTABLE,0)
THOO A 2 ACS_NamedExecuteAlways("cbm_thunderclawpeg",0,70)//core_thunderclawpeg
THOO A 0 A_ClearTarget
THOO A 0 A_ChangeFlag(SHOOTABLE,1)
Goto Spawn2
}
}

/////////////////////////////////////////////////
//Core Weapon Actors
/////////////////////////////////////////////////

/*
actor CBM_PlantBarrierWarper2 : PlantBarrierWarper
{
Translation "202:202=4:4","199:199=39:39"
//Translation "248:248=4:4","41:41=39:39"
States
{
Shield:
Y_6F ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
Y_6F EFGHIJ 1 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
//PLAB ABCDEFGHIJKLMNOPQRSTUVWXYZ
//PBUS RSTUVW
loop
}
}
*/

actor CBM_CopyVision : CopyVision replaces CopyVision
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("weapons/mmb/copyvisionactivate", "weapon")
TNT1 A 0 ACS_NamedExecuteAlways("core_targetyawpitch", 0, 0)
COPY FGHI 2
COPY I 0 A_JumpIf(CheckClass("DocRobot",AAPTR_TARGET),"SpawnBuff")
COPY I 0 A_JumpIf(CheckClass("Duo",2),"SpawnBuff")
COPY I 0 A_JumpIf(CheckClass("Trio",2),"SpawnBuff")
Goto Shooting+1
SpawnBuff:
COPY I 0
goto ShootingBuff+1

ShootingBuff:
COPY L 0 A_Countdown
COPY L 0 A_PlaySoundEx("weapons/mmb/copyvisionshoot", "body")
COPY L 0 A_CustomMissile("CopyShot",32,0,0,2,-pitch)
COPY LLLLLL 1 A_JumpIfInTargetInventory("CopyVisionRedirect",1,"RedirectBuff")
COPY L 0 A_JumpIfInTargetInventory("IsDead",1,"Death")
Loop
RedirectBuff:
COPY L 3 A_GiveToTarget("TargetMarker",1)
COPY L 0 ACS_NamedExecuteAlways("core_aimattargetcursor",0,CallACS("core_gettarget")+PLN_TARGETPOINT_OFFSET,32)
COPB L 0 A_TakeFromTarget("CopyVisionRedirect",1)
goto ShootingBuff
}
}

actor CBM_MirrorBuster1 : MirrorBuster1 replaces MirrorBuster1
{
Health 1050
Stamina 1050
States
{
Pain:
TNT1 A 0 A_ChangeFlag("INVULNERABLE",1)
TNT1 A 0 A_SpawnItemEx("MirrorBusterReflectSound")
TNT1 A 0 A_JumpIfInventory("WeaponCharge",10,"ShotStrong")
TNT1 A 0 A_GiveToTarget("MirrorBusterFlag", WEPC_KMB_CHARGEMAX-health/10)
//TNT1 A 0 A_JumpIfHealthLower(Stamina*61/100,"ShotStrong")//610
//TNT1 A 0 A_JumpIfHealthLower(Stamina*88/100,"ShotMid")//880
//TNT1 A 0 A_JumpIfHealthLower(Stamina,"ShotWeak")//1000
stop
}
}

actor CBM_MirrorBuster2 : MirrorBuster2 replaces MirrorBuster2
{
Health 1050
Stamina 1050
States
{
Pain:
TNT1 A 0 A_ChangeFlag("INVULNERABLE",1)
TNT1 A 0 A_SpawnItemEx("MirrorBusterReflectSound")
TNT1 A 0 A_JumpIfInventory("WeaponCharge",10,"ShotStrong")
TNT1 A 0 A_GiveToTarget("MirrorBusterFlag", WEPC_KMB_CHARGEMAX-health/10)
stop
}
}






/////////////////////////////////////////////////
//Core Assist Actors
/////////////////////////////////////////////////

actor RushTeleportCopy : RushTeleport{}
actor RushMarineTeleportCopy : RushMarineTeleport{}
actor RushJetTeleportCopy : RushJetTeleport{}
actor EddieTeleportCopy : EddieTeleport{}

actor CBM_RushTeleport : BasicWatcher replaces RushTeleport
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(CheckClass("Protoman",AAPTR_TARGET),"Proto")
TNT1 A 0 A_JumpIf(CheckClass("Bass",2),"Bass")
TNT1 A 0 A_SpawnItemEx("RushTeleportCopy",0,0,32,0,0,-32,0,32)
stop
Proto://Protoman Class file
TNT1 A 0 A_SpawnItemEx("ProtoCoilTeleport",0,0,32,0,0,-32,0,32)
stop
Bass://Bass Class file
TNT1 A 0 A_SpawnItemEx("BassCoilTeleport",0,0,32,0,0,-32,0,32)
stop
}
}
actor CBM_RushMarineTeleport : BasicWatcher replaces RushMarineTeleport
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(CheckClass("Protoman",2),"Proto")
TNT1 A 0 A_JumpIf(CheckClass("Bass",2),"Bass")
TNT1 A 0 A_SpawnItemEx("RushMarineTeleportCopy",0,0,32,0,0,-32,0,32)
stop
Proto:
TNT1 A 0 A_SpawnItemEx("ProtoMarineTeleport",0,0,32,0,0,-32,0,32)
stop
Bass:
TNT1 A 0 A_SpawnItemEx("BassMarineTeleport",0,0,32,0,0,-32,0,32)
stop
}
}
actor CBM_RushJetTeleport : BasicWatcher replaces RushJetTeleport
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(CheckClass("Protoman",2),"Proto")
TNT1 A 0 A_JumpIf(CheckClass("Bass",2),"Bass")
TNT1 A 0 A_SpawnItemEx("RushJetTeleportCopy",0,0,32,0,0,-32,0,32)
stop
Proto:
TNT1 A 0 A_SpawnItemEx("ProtoJetTeleport",0,0,32,0,0,-32,0,32)
stop
Bass:
TNT1 A 0 A_SpawnItemEx("BassJetTeleport",0,0,32,0,0,-32,0,32)
stop
}
}
actor CBM_EddieTeleport : BasicWatcher replaces EddieTeleport
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(CheckClass("Bass",2),"Bass")
TNT1 A 0 A_SpawnItemEx("EddieTeleportCopy",0,0,24,0,0,-24,0,32)
stop
Bass:
TNT1 A 0 A_SpawnItemEx("EddieTrebleTeleport",0,0,24,0,0,-24,0,32)
stop
}
}


actor CBM_BeatBoostUp_H : BeatBoostUp_H replaces BeatBoostUp_H
{
+SERVERSIDEONLY//
ReactionTime 2100//
States
{
SpawnEnd:
TNT1 A 0 A_TakeFromTarget("PowerBeatBoostUpSpeed",1)
TNT1 A 0 A_GiveToTarget("PowerBeatBoostSpeed",1)
SpawnWatch:
TNT1 A 0 A_CountDown//
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertyGrounded",1,"SpawnDead")//
TNT1 A 0 A_JumpIfInTargetInventory("BeatBoosterHasLanded",1,"SpawnDead")
TNT1 A 0 A_JumpIfInTargetInventory("IsDead",1,"SpawnDead")
TNT1 A 1 A_GiveToTarget("CBM_BeatBoostFall_P",1)
loop
Death://
TNT1 A 0
goto SpawnDead
}
}

actor CBM_BeatBoostRemoveCheck_P : CustomInventory
{//Duo, Dive, Centaur, Slash, Clown, Magic, Quint
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BeatBoostIsActive",1,1)
stop
TNT1 A 0 A_GiveInventory("BeatBoosterHasLanded",1)
stop
}
}

actor CBM_BeatBoostFall_P : BeatBoostFall_P
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz<=0,"FoundGround")
TNT1 A 0 A_JumpIf(CallACS("core_checkforjump")==1,"FoundGround")

TNT1 A 0 A_CheckFlag("NOGRAVITY","FoundGround")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,"FoundGround")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyFlight",1,"FoundGround")
TNT1 A 0 A_JumpIfInventory("PlayerPropertyNoGravity",1,"FoundGround")

TNT1 A 0 A_JumpIfInventory("CBM_IsHovering",1,"FoundGround")

//TNT1 A 0 A_JumpIfInventory("PowerBeatBoostUpSpeed",1,"GOING_BEAT")
//TNT1 A 0 A_JumpIf(momz==0,"GOING_NOWHERE")
//TNT1 A 0 A_JumpIf(momz>0,"GOING_UP")
TNT1 A 0 A_JumpIf(momz<0,"Hover")
stop//goto ResetSpeed
}
}

