Esempio n. 1
0
    def apply_action(self):
        src, tgt = self.source, self.target
        g = Game.getgame()

        has_card = src.cards or src.showncards or src.equips

        if has_card and user_input([tgt], ChooseOptionInputlet(self, ('drop', 'draw'))) == 'drop':
            g.process_action(KanakoFaithCounteract(tgt, src))
        else:
            g.process_action(KanakoFaithCheers(tgt, src))

        return True
Esempio n. 2
0
    def apply_action(self):
        src, tgt = self.source, self.target
        g = Game.getgame()

        choice = user_input([tgt], ChooseOptionInputlet(self, ('duel', 'attack')))

        if choice == 'duel':
            cls = KanakoFaithDuel
        elif choice == 'attack':
            cls = KanakoFaithAttack
        else:
            cls = KanakoFaithAttack

        g.process_action(LaunchCard(tgt, [src], cls(tgt), bypass_check=True))

        return True
Esempio n. 3
0
    def apply_action(self):
        src, tgt = self.source, self.target
        g = Game.getgame()

        catnames = ('cards', 'showncards', 'equips')
        cats = [getattr(tgt, i) for i in catnames]

        card = user_input([src], ChoosePeerCardInputlet(self, tgt, catnames))
        card = card or random_choose_card(cats)

        assert card
        self.card = card

        g.players.reveal(card)
        g.process_action(DropCards(src, tgt, [card]))
        return True