Esempio n. 1
0
    def __init__(self, logger, controller, framedata, difficulty):
        Tactic.__init__(self, logger, controller, framedata, difficulty)
        # Pick a random max number of shines
        self.shinemax = random.randint(0, 8)
        self.shinecount = 0

        self.waveshine = False
        self.shffl = False
        self.dashdance = False

        dashchance = 2
        # TODO Remove the dash dance from the random pool if we're in a spot where it would be bad
        # if self.smashbot_state.action not in [Action.STANDING, Action.TURNING, Action.DASHING]:
        #     dashchance = 0

        # What sort of shield pressure should this be? Pick one at random
        rand = random.choice([1]*5 + [2]*3 + [3]*dashchance)

        # On difficulty 1 and 2, only do dash dance
        if self.difficulty <= 2:
            rand = 3

        # 50% chance of being SHFFL style pressure
        if rand == 1:
            self.shffl = True
        # 30% chance of being waveshine style pressure
        if rand == 2:
            self.waveshine = True
        # 20% chance of being dashdance style pressure
        if rand == 3:
            self.dashdance = True
Esempio n. 2
0
 def __init__(self, logger, controller, framedata, difficulty):
     Tactic.__init__(self, logger, controller, framedata, difficulty)
     self.keep_running = False
Esempio n. 3
0
 def __init__(self, gamestate, smashbot_state, opponent_state, logger,
              controller, framedata, difficulty):
     Tactic.__init__(self, gamestate, smashbot_state, opponent_state,
                     logger, controller, framedata, difficulty)
     self.upbstart = 0
Esempio n. 4
0
 def __init__(self, logger, controller, framedata, difficulty):
     Tactic.__init__(self, logger, controller, framedata, difficulty)
     self.upbstart = 0
Esempio n. 5
0
 def __init__(self, logger, controller, framedata, difficulty):
     self.radius = 0
     self.stand_menacingly = False
     Tactic.__init__(self, logger, controller, framedata, difficulty)
Esempio n. 6
0
 def __init__(self, logger, controller, framedata, difficulty):
     Tactic.__init__(self, logger, controller, framedata, difficulty)
     # We need to decide how we want to recover
     self.useillusion = bool(random.randint(0, 1))
Esempio n. 7
0
 def __init__(self, logger, controller, framedata, difficulty):
     Tactic.__init__(self, logger, controller, framedata, difficulty)
     self.random_di = random.randint(0, 1)
Esempio n. 8
0
 def __init__(self, gamestate, smashbot_state, opponent_state, logger,
              controller, framedata, difficulty):
     Tactic.__init__(self, gamestate, smashbot_state, opponent_state,
                     logger, controller, framedata, difficulty)
     self.randomdi = random.randint(0, 1)
Esempio n. 9
0
 def __init__(self, logger, controller, framedata, difficulty):
     Tactic.__init__(self, logger, controller, framedata, difficulty)
     self.random_celebration = random.randint(0, 100)
Esempio n. 10
0
 def __init__(self, gamestate, smashbot_state, opponent_state, logger,
              controller, framedata, difficulty):
     Tactic.__init__(self, gamestate, smashbot_state, opponent_state,
                     logger, controller, framedata, difficulty)
     self.movingright = self.opponent_state.speed_x_attack + self.opponent_state.speed_ground_x_self > 0
Esempio n. 11
0
 def __init__(self, logger, controller, framedata, difficulty):
     Tactic.__init__(self, logger, controller, framedata, difficulty)
     self.random_approach = random.randint(0, 100)
     self.approach_crouch = False