How to use the melee.enums.Character function in melee

To help you get started, we’ve selected a few melee examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github altf4 / libmelee / melee / characterdata.py View on Github external
def maxjumps(character):
        if character == enums.Character.JIGGLYPUFF:
            return 5
        if character == enums.Character.KIRBY:
            return 5
        return 1
github altf4 / libmelee / melee / framedata.py View on Github external
def cleanupcsv(self):
        #Make a list of all the attacking action names
        attacks = []
        for row in self.rows:
            if row['hitbox_1_status'] or row['hitbox_2_status'] or \
                    row['hitbox_3_status'] or row['hitbox_4_status'] or \
                    row['projectile']:
                attacks.append(row['action'])
        #remove duplicates
        attacks = list(set(attacks))
        #Make a second pass, removing anything not in the list
        for row in list(self.rows):
            if row['action'] not in attacks and not self.isroll(Character(row['character']), Action(row['action'])) \
                    and not self.isbmove(Character(row['character']), Action(row['action'])):
                self.rows.remove(row)
github altf4 / libmelee / melee / framedata.py View on Github external
def maxjumps(character):
        if character == Character.JIGGLYPUFF:
            return 5
        if character == Character.KIRBY:
            return 5
        return 1
github altf4 / libmelee / melee / framedata.py View on Github external
def isbmove(self, character, action):
        # If we're missing it, don't call it a B move
        if action == Action.UNKNOWN_ANIMATION:
            return False

        # Don't consider peach float to be a B move
        #   But the rest of her float aerials ARE
        if character == Character.PEACH and action in [Action.LASER_GUN_PULL, \
                Action.NEUTRAL_B_CHARGING, Action.NEUTRAL_B_ATTACKING]:
            return False
        # Peach smashes also shouldn't be B moves
        if character == Character.PEACH and action in [Action.SWORD_DANCE_2_MID, Action.SWORD_DANCE_1, \
                Action.SWORD_DANCE_2_HIGH]:
            return False

        if Action.LASER_GUN_PULL.value <= action.value:
            return True

        return False
github altf4 / libmelee / melee / framedata.py View on Github external
def cleanupcsv(self):
        #Make a list of all the attacking action names
        attacks = []
        for row in self.rows:
            if row['hitbox_1_status'] or row['hitbox_2_status'] or \
                    row['hitbox_3_status'] or row['hitbox_4_status'] or \
                    row['projectile']:
                attacks.append(row['action'])
        #remove duplicates
        attacks = list(set(attacks))
        #Make a second pass, removing anything not in the list
        for row in list(self.rows):
            if row['action'] not in attacks and not self.isroll(Character(row['character']), Action(row['action'])) \
                    and not self.isbmove(Character(row['character']), Action(row['action'])):
                self.rows.remove(row)