def create_minion(self, player):
     def silence():
         minion.spell_targettable = lambda : True
     minion = Minion(3, 2, MINION_TYPE.DRAGON)
     minion.spell_targettable = lambda: False
     minion.bind("silenced", silence())
     return minion
Beispiel #2
0
    def create_minion(self, player):
        def did_damage(amount, target):
            target.freeze()

        minion = Minion(3, 6)
        minion.bind("did_damage", did_damage)
        return minion
Beispiel #3
0
    def create_minion(self, player):
        def first_secret_cost_zero(m):
            class Filter:
                def __init__(self):
                    #To make sure that no matter what the cost of a secret, it will be 0
                    self.amount = 100
                    self.filter = lambda c: type(c) in SecretCard.__subclasses__()
                    self.min = 0

            def card_used(card):
                if type(card) in SecretCard.__subclasses__():
                    player.unbind("card_used", card_used)
                    player.unbind("turn_ended", turn_ended)
                    player.mana_filters.remove(mana_filter)

            def turn_ended():
                player.unbind("card_used", card_used)
                player.mana_filters.remove(mana_filter)
            mana_filter = Filter()
            player.bind("card_used", card_used)
            player.bind_once("turn_ended", turn_ended)
            player.mana_filters.append(mana_filter)
        minion = Minion(4, 3)
        minion.bind("added_to_board", first_secret_cost_zero)
        return minion
    def create_minion(self, player):

        def add_effect(m, index):
            m.add_aura(2, 0, lambda mini: mini.index is m.index - 1 or mini.index is m.index + 1)

        minion = Minion(0, 3, MINION_TYPE.TOTEM)
        minion.bind("added_to_board", add_effect)
        return minion
Beispiel #5
0
    def create_minion(self, player):

        def add_effect(m, index):
            m.add_aura(1, 1, lambda mini: mini is not minion)

        minion = Minion(6, 6)
        minion.bind("added_to_board", add_effect)
        return minion
    def create_minion(self, player):

        def add_effect(m, index):
            m.add_aura(1, 0, lambda mini: mini is not minion and mini.minion_type is MINION_TYPE.BEAST)

        minion = Minion(1, 1, MINION_TYPE.BEAST)
        minion.bind("added_to_board", add_effect)
        return minion
Beispiel #7
0
    def create_minion(self, player):
        def poisonous(amount, target):
            if type(target) is Minion and not target.dead:
                target.die(self)

        minion = Minion(2, 3, MINION_TYPE.BEAST)
        minion.bind("did_damage", poisonous)
        minion.bind_once("silenced", lambda: minion.unbind("did_damage", poisonous))
        return minion
Beispiel #8
0
    def create_minion(self, player):
        def poisonous(amount, target):
            if type(target) is Minion and not target.dead:
                target.die(self)

        minion = Minion(1, 1)
        minion.stealth = True
        minion.bind("did_damage", poisonous)
        minion.bind_once("silenced", lambda: minion.unbind("did_damage", poisonous))
        return minion
Beispiel #9
0
    def create_minion(self, player):

        class Moonfire(Card):
            def __init__(self):
                super().__init__("Moonfire", 0, CHARACTER_CLASS.DRUID, CARD_RARITY.RARE, False)

        class Dispel(Card):
            def __init__(self):
                super().__init__("Dispel", 0, CHARACTER_CLASS.DRUID, CARD_RARITY.RARE, False)

        moonfire = Moonfire()
        dispell = Dispel()
        option = player.agent.choose_option(moonfire, dispell)
        minion = Minion(2, 4)
        if option == moonfire:
            minion.bind("added_to_board", deal_two_damage)
        else:
            minion.bind("added_to_board", silence)

        return minion
Beispiel #10
0
    def create_minion(self, player):
        def increase_attack():
            minion.change_attack(3)

        def decrease_attack():
            minion.change_attack(-3)

        def silenced():
            minion.unbind("enraged", increase_attack)
            minion.unbind("unenraged", decrease_attack)

        minion = Minion(2, 3)
        minion.bind("enraged", increase_attack)
        minion.bind("unenraged", decrease_attack)
        minion.bind("silenced", silenced)
        return minion
Beispiel #11
0
 def create_minion(self, player):
     minion = Minion(2, 1, MINION_TYPE.BEAST)
     minion.bind('added_to_board', silence)
     return minion
Beispiel #12
0
 def create_minion(self, player):
     minion = Minion(1, 1)
     minion.bind('added_to_board', draw_card)
     return minion
Beispiel #13
0
 def create_minion(self, player):
     minion = Minion(1, 1)
     minion.bind("added_to_board", deal_one_damage)
     return minion
Beispiel #14
0
 def create_minion(self, player):
     minion = Minion(2, 2)
     minion.bind("added_to_board", give_divine_shield)
     return minion
Beispiel #15
0
 def create_minion(self, player):
     minion = Minion(3, 3)
     minion.bind("added_to_board", change_attack_to_one)
     return minion