Esempio n. 1
0
 def react(self, args):
     cards = args['discard']
     if len(cards) > 0:
         targets_ids = args['targets']
         checking.only_one_target(targets_ids)
         checking.forbid_target_self(self.player.player_id, targets_ids[0])
     return DiscardCards.react(self, args)
Esempio n. 2
0
    def react(self, args):
        if args['action'] == 'abort':
            return self.done(args)

        args['discard'] = args['use']
        if len(args['discard']) == 0:
            raise ValueError('wrong cards')
        targets_ids = args['targets']
        checking.only_one_target(targets_ids)
        checking.forbid_target_self(self.player.player_id, targets_ids[0])
        return DiscardCards.react(self, args)
Esempio n. 3
0
 def __init__(self, gc, damage):
     DiscardCards.__init__(
           self, gc, damage.victim,
           lambda cards_ids: _check_one_heart_card(gc, cards_ids))
Esempio n. 4
0
 def __init__(self, game_control, damage):
     DiscardCards.__init__(
           self, game_control, damage.victim,
           lambda cards_ids: _check_one_heart_card(game_control, cards_ids),
           lambda gc, a: _damage_transfer(gc, a, damage))