Exemplo n.º 1
0
 def create_minion(self, player):
     return Minion(8,
                   4,
                   deathrattle=[
                       Deathrattle(Bounce(), SelfSelector()),
                       Deathrattle(Summon(Nerubian()), PlayerSelector())
                   ])
Exemplo n.º 2
0
 def create_minion(self, player):
     return Minion(9,
                   7,
                   deathrattle=[
                       Deathrattle(
                           AddCard(ObjectSource(SelfSelector()),
                                   add_to_deck=True), PlayerSelector()),
                       Deathrattle(Remove(), SelfSelector())
                   ])
Exemplo n.º 3
0
 def create_minion(self, player):
     return Minion(9,
                   7,
                   deathrattle=[
                       Deathrattle(
                           AddCard(CardQuery(source=CARD_SOURCE.MINION,
                                             minion=SelfSelector()),
                                   add_to_deck=True), PlayerSelector()),
                       Deathrattle(Remove(), SelfSelector())
                   ])
Exemplo n.º 4
0
 def create_minion(self, player):
     return Minion(6,
                   6,
                   divine_shield=True,
                   taunt=True,
                   deathrattle=Deathrattle(Equip(Ashbringer()),
                                           PlayerSelector()))
Exemplo n.º 5
0
 def create_minion(self, player):
     return Minion(
         1,
         1,
         deathrattle=Deathrattle(
             AddCard(CardQuery(conditions=[IsType(MINION_TYPE.BEAST)])),
             PlayerSelector()))
Exemplo n.º 6
0
        def create_minion(self, player):
            create_dict = {
                'attack': card_def['attack'],
                'health': card_def['health']
            }
            if "impl" in card_def:
                impl = card_def['impl']
                if 'effects' in impl:
                    create_dict['effects'] = [
                        Effect.from_json(**effect)
                        for effect in impl['effects']
                    ]

                if 'auras' in impl:
                    create_dict['auras'] = [
                        Aura.from_json(**aura) for aura in impl['auras']
                    ]

                if 'buffs' in impl:
                    create_dict['buffs'] = [
                        Buff.from_json(**buff) for buff in impl['buffs']
                    ]

            if 'enrage' in card_def:
                create_dict['enrage'] = [
                    Aura.from_json(**enrage) for enrage in card_def['enrage']
                ]

            if 'deathrattle' in card_def:
                create_dict['deathrattle'] = [
                    Deathrattle.from_json(**deathrattle)
                    for deathrattle in card_def['deathrattle']
                ]

            return Minion(**create_dict)
Exemplo n.º 7
0
 def use(self, player, game):
     super().use(player, game)
     from hearthbreaker.cards.minions.druid import Treant
     # Can stack as many deathrattles as we want, so no need to check if this has already been given
     # See http://hearthstone.gamepedia.com/Soul_of_the_Forest
     for minion in player.minions:
         minion.deathrattle.append(Deathrattle(Summon(Treant()), PlayerSelector()))
Exemplo n.º 8
0
        def create_minion(self, player):
            create_dict = {
                'attack': card_def['attack'],
                'health': card_def['health']
            }
            if 'effects' in card_def:
                create_dict['effects'] = [
                    Effect.from_json(player.game, **effect)
                    for effect in card_def['effects']
                ]

            if 'auras' in card_def:
                create_dict['auras'] = [
                    Aura.from_json(**aura) for aura in card_def['auras']
                ]

            if 'enrage' in card_def:
                create_dict['enrage'] = [
                    Action.from_json(**action) for action in card_def['enrage']
                ]

            if 'deathrattle' in card_def:
                create_dict['deathrattle'] = Deathrattle.from_json(
                    **card_def['deathrattle'])

            return Minion(**create_dict)
Exemplo n.º 9
0
        def create_weapon(self, player):
            create_dict = {
                'attack_power': card_def['attack'],
                'durability': card_def['durability']
            }
            if "impl" in card_def:
                impl = card_def['impl']
                if 'effects' in impl:
                    create_dict['effects'] = [
                        Effect.from_json(**effect)
                        for effect in impl['effects']
                    ]

                if 'auras' in impl:
                    create_dict['auras'] = [
                        Aura.from_json(**aura) for aura in impl['auras']
                    ]

                if 'buffs' in impl:
                    create_dict['buffs'] = [
                        Buff.from_json(**buff) for buff in impl['buffs']
                    ]

            if 'deathrattle' in card_def:
                create_dict['deathrattle'] = Deathrattle.from_json(
                    **card_def['deathrattle'])

            return Weapon(**create_dict)
Exemplo n.º 10
0
 def create_minion(self, player):
     return Minion(3,
                   4,
                   deathrattle=Deathrattle(
                       Summon(
                           CardQuery(conditions=[IsType(MINION_TYPE.DEMON)],
                                     source=CARD_SOURCE.MY_HAND)),
                       PlayerSelector()))
Exemplo n.º 11
0
 def create_weapon(self, player):
     return Weapon(3,
                   2,
                   deathrattle=Deathrattle(
                       Give([Buff(ChangeHealth(2)),
                             Buff(ChangeAttack(2))]),
                       MinionSelector(IsType(MINION_TYPE.MECH),
                                      picker=RandomPicker())))
Exemplo n.º 12
0
 def create_minion(self, player):
     return Minion(3,
                   4,
                   deathrattle=Deathrattle(
                       Summon(
                           HandSource(FriendlyPlayer(),
                                      [IsType(MINION_TYPE.DEMON)])),
                       PlayerSelector()))
Exemplo n.º 13
0
    def create_weapon(self, player):
        def deal_one_to_all(weapon):
            targets = copy.copy(weapon.player.minions)
            targets.extend(weapon.player.opponent.minions)
            for minion in targets:
                minion.damage(1, None)

        return Weapon(4,
                      2,
                      deathrattle=Deathrattle(
                          Damage(1), MinionSelector(players=BothPlayer())))
Exemplo n.º 14
0
 def __from_json__(md, player, game):
     from hearthbreaker.engine import card_lookup
     minion = Minion(md['attack'], md['max_health'])
     GameObject.__from_json__(minion, **md)
     minion.health = md['max_health'] - md['damage']
     minion.exhausted = md['exhausted']
     minion.attacks_performed = not md['attacks_performed']
     minion.born = md['sequence_id']
     if 'enrage' in md:
         minion.enrage = [Aura.from_json(**enrage) for enrage in md['enrage']]
     minion.deathrattle = []
     for rattle in md['deathrattles']:
         minion.deathrattle.append(Deathrattle.from_json(**rattle))
     minion.card = card_lookup(md["name"])
     minion.game = game
     minion.player = player
     return minion
Exemplo n.º 15
0
        def create_minion(self, player):
            create_dict = {
                'attack': card_def['attack'],
                'health': card_def['health']
            }
            if 'effects' in card_def:
                create_dict['effects'] = [Effect.from_json(player.game, **effect) for effect in card_def['effects']]

            if 'auras' in card_def:
                create_dict['auras'] = [Aura.from_json(**aura) for aura in card_def['auras']]

            if 'enrage' in card_def:
                create_dict['enrage'] = [Action.from_json(**action) for action in card_def['enrage']]

            if 'deathrattle' in card_def:
                create_dict['deathrattle'] = Deathrattle.from_json(**card_def['deathrattle'])

            return Minion(**create_dict)
        def create_weapon(self, player):
            create_dict = {
                'attack_power': card_def['attack'],
                'durability': card_def['durability']
            }
            if 'effects' in card_def:
                create_dict['effects'] = [Effect.from_json(**effect) for effect in card_def['effects']]

            if 'auras' in card_def:
                create_dict['auras'] = [Aura.from_json(**aura) for aura in card_def['auras']]

            if 'buffs' in card_def:
                create_dict['buffs'] = [Buff.from_json(**buff) for buff in card_def['buffs']]

            if 'deathrattle' in card_def:
                create_dict['deathrattle'] = Deathrattle.from_json(**card_def['deathrattle'])

            return Weapon(**create_dict)
Exemplo n.º 17
0
 def __from_json__(md, player, game):
     from hearthbreaker.engine import card_lookup
     minion = Minion(md['attack'], md['max_health'])
     GameObject.__from_json__(minion, **md)
     minion.health = md['max_health'] - md['damage']
     minion.exhausted = md['exhausted']
     minion.attacks_performed = not md['attacks_performed']
     minion.born = md['sequence_id']
     if 'enrage' in md:
         minion.enrage = [
             Aura.from_json(**enrage) for enrage in md['enrage']
         ]
     minion.deathrattle = []
     for rattle in md['deathrattles']:
         minion.deathrattle.append(Deathrattle.from_json(**rattle))
     minion.card = card_lookup(md["name"])
     minion.game = game
     minion.player = player
     return minion
        def create_minion(self, player):
            create_dict = {
                'attack': card_def['attack'],
                'health': card_def['health']
            }
            if 'effects' in card_def:
                create_dict['effects'] = [Effect.from_json(**effect) for effect in card_def['effects']]

            if 'auras' in card_def:
                create_dict['auras'] = [Aura.from_json(**aura) for aura in card_def['auras']]

            if 'buffs' in card_def:
                create_dict['buffs'] = [Buff.from_json(**buff) for buff in card_def['buffs']]

            if 'enrage' in card_def:
                create_dict['enrage'] = Enrage.from_json(**card_def['enrage'])

            if 'deathrattle' in card_def:
                create_dict['deathrattle'] = Deathrattle.from_json(**card_def['deathrattle'])

            return Minion(**create_dict)
Exemplo n.º 19
0
        def create_minion(self, player):
            create_dict = {
                'attack': card_def['attack'],
                'health': card_def['health']
            }
            if "impl" in card_def:
                impl = card_def['impl']
                if 'effects' in impl:
                    create_dict['effects'] = [Effect.from_json(**effect) for effect in impl['effects']]

                if 'auras' in impl:
                    create_dict['auras'] = [Aura.from_json(**aura) for aura in impl['auras']]

                if 'buffs' in impl:
                    create_dict['buffs'] = [Buff.from_json(**buff) for buff in impl['buffs']]

            if 'enrage' in card_def:
                create_dict['enrage'] = [Aura.from_json(**enrage) for enrage in card_def['enrage']]

            if 'deathrattle' in card_def:
                create_dict['deathrattle'] = [Deathrattle.from_json(**deathrattle)
                                              for deathrattle in card_def['deathrattle']]

            return Minion(**create_dict)
Exemplo n.º 20
0
 def create_minion(self, player):
     return Minion(5,
                   5,
                   deathrattle=Deathrattle(
                       Bounce(), MinionSelector(picker=RandomPicker())))
Exemplo n.º 21
0
 def create_minion(self, player):
     return Minion(1,
                   1,
                   deathrattle=Deathrattle(
                       AddCard(CollectionSource([IsType(MINION_TYPE.BEAST)
                                                 ])), PlayerSelector()))
Exemplo n.º 22
0
 def create_weapon(self, player):
     return Weapon(4,
                   2,
                   deathrattle=Deathrattle(
                       Damage(1), MinionSelector(players=BothPlayer())))
Exemplo n.º 23
0
 def use(self, player, game):
     super().use(player, game)
     self.target.deathrattle.append(
         Deathrattle(Summon(self.target.card), PlayerSelector()))
Exemplo n.º 24
0
 def create_minion(self, player):
     return Minion(6,
                   5,
                   deathrattle=Deathrattle(Summon(Hyena(), 2),
                                           PlayerSelector()))
Exemplo n.º 25
0
 def create_minion(self, player):
     return Minion(3,
                   4,
                   deathrattle=Deathrattle(
                       Give(Add(CHARACTER_STATUS.HEALTH, 3)),
                       MinionSelector(picker=RandomPicker())))
Exemplo n.º 26
0
 def create_minion(self, player):
     return Minion(3,
                   4,
                   deathrattle=Deathrattle(
                       ChangeHealth(3),
                       MinionSelector(picker=RandomPicker())))