def create_minion(self, player): def buff_ally_health(): targets = copy.copy(player.game.current_player.minions) targets.remove(minion) if len(targets) > 0: target = targets[player.game.random(0, len(targets) - 1)] target.increase_health(1) minion = Minion(0, 1, MINION_TYPE.DEMON) minion.stealth = True player.bind("turn_ended", buff_ally_health) minion.bind_once("silenced", lambda: player.unbind("turn_ended", buff_ally_health)) return minion
def create_minion(self, player): def buff_ally_health(): targets = copy.copy(player.game.current_player.minions) targets.remove(minion) if len(targets) > 0: target = targets[player.game.random(0, len(targets) - 1)] target.increase_health(1) minion = Minion(0, 1) minion.stealth = True player.bind("turn_ended", buff_ally_health) minion.bind_once("silenced", lambda: player.unbind("turn_ended", buff_ally_health)) return minion