# Path: Chains/smashattack.py
# class SMASH_DIRECTION(Enum):
#     UP = 0
#     DOWN = 1
#     LEFT = 2
#     RIGHT = 3
# 
# Path: Chains/shffl.py
# class SHFFL_DIRECTION(Enum):
#     UP = 0
#     DOWN = 1
#     FORWARD = 2
#     BACK = 3
#     NEUTRAL = 4
# 
# Path: Chains/tilt.py
# class TILT_DIRECTION(Enum):
#     UP = 0
#     DOWN = 1
#     FORWARD = 2


import melee
import Chains
from melee.enums import Action, Character, Stage, ProjectileType
from Tactics.tactic import Tactic
from Chains.smashattack import SMASH_DIRECTION
from Chains.shffl import SHFFL_DIRECTION
from Chains.tilt import TILT_DIRECTION
        if opponent_state.position.x > smashbot_state.position.x:
            bufferzone *= -1

        side_plat_height, side_plat_left, side_plat_right = melee.side_platform_position(opponent_state.position.x > 0, gamestate.stage)
        on_side_plat = False
        if side_plat_height is not None:
            on_side_plat = opponent_state.on_ground and abs(opponent_state.position.y - side_plat_height) < 5

        if on_side_plat:
            bufferzone = 0

        # Falling spacies
        falling_spacie = False
        if opponent_state.character in [Character.FOX, Character.FALCO]:
            if not opponent_state.on_ground and opponent_state.speed_y_self < 0:
                bufferzone = 0
                falling_spacie = True

        pivotpoint += bufferzone

        # Don't run off the stage though, adjust this back inwards a little if it's off
        edgebuffer = 10
        pivotpoint = min(pivotpoint, edge - edgebuffer)
        pivotpoint = max(pivotpoint, (-edge) + edgebuffer)

        if self.logger:
            self.logger.log("Notes", "pivotpoint: " + str(pivotpoint) + " ", concat=True)

        if on_side_plat and abs(smashbot_state.position.x - pivotpoint) < 2 and smashbot_state.action == Action.TURNING:
            if opponent_state.action_frame < 6:

# Path: Chains/smashattack.py
# class SMASH_DIRECTION(Enum):
#     UP = 0
#     DOWN = 1
#     LEFT = 2
#     RIGHT = 3
# 
# Path: Chains/shffl.py
# class SHFFL_DIRECTION(Enum):
#     UP = 0
#     DOWN = 1
#     FORWARD = 2
#     BACK = 3
#     NEUTRAL = 4
# 
# Path: Chains/tilt.py
# class TILT_DIRECTION(Enum):
#     UP = 0
#     DOWN = 1
#     FORWARD = 2


# Path: Tactics/challenge.py
import melee
import Chains
from melee.enums import Action, Character, Stage, ProjectileType
from Tactics.tactic import Tactic
from Chains.smashattack import SMASH_DIRECTION
from Chains.shffl import SHFFL_DIRECTION
from Chains.tilt import TILT_DIRECTION

        if opponent_state.position.x > smashbot_state.position.x:
            bufferzone *= -1

        side_plat_height, side_plat_left, side_plat_right = melee.side_platform_position(opponent_state.position.x > 0, gamestate.stage)
        on_side_plat = False
        if side_plat_height is not None:
            on_side_plat = opponent_state.on_ground and abs(opponent_state.position.y - side_plat_height) < 5

        if on_side_plat:
            bufferzone = 0

        # Falling spacies
        falling_spacie = False
        if opponent_state.character in [Character.FOX, Character.FALCO]:
            if not opponent_state.on_ground and opponent_state.speed_y_self < 0:
                bufferzone = 0
                falling_spacie = True

        pivotpoint += bufferzone

        # Don't run off the stage though, adjust this back inwards a little if it's off
        edgebuffer = 10
        pivotpoint = min(pivotpoint, edge - edgebuffer)
        pivotpoint = max(pivotpoint, (-edge) + edgebuffer)

        if self.logger:
            self.logger.log("Notes", "pivotpoint: " + str(pivotpoint) + " ", concat=True)

        if on_side_plat and abs(smashbot_state.position.x - pivotpoint) < 2 and smashbot_state.action == Action.TURNING:
            if opponent_state.action_frame < 6:

                self.pickchain(Chains.Shffl, [SHFFL_DIRECTION.UP])