Esempio n. 1
0
    def clickable(game):
        try:
            act = game.action_stack[-1]
            if isinstance(act, actions.ActionStage):
                return True

            if act.cond([build_handcard(cards.AttackCard)]):
                return True

            if act.cond([build_handcard(cards.GrazeCard)]):
                return True

        except:
            pass

        return False
Esempio n. 2
0
    def clickable(game):
        try:
            act = game.action_stack[-1]
            if isinstance(act, actions.ActionStage):
                return True

            if act.cond([build_handcard(cards.AttackCard)]):
                return True

            if act.cond([build_handcard(cards.GrazeCard)]):
                return True

        except:
            pass

        return False
Esempio n. 3
0
    def sound_effect(act):
        if isinstance(act, actions.LaunchCard):
            if act.card.is_card(cards.AttackCard):
                l = ['1', '2']
            else:
                l = ['_graze']

        elif isinstance(act, actions.AskForCard):
            atk = act.cond([build_handcard(cards.AttackCard, act.target)])
            graze = act.cond([build_handcard(cards.GrazeCard, act.target)])
            if atk and not graze:
                l = ['1', '2']
            else:
                l = ['_graze']
        else:
            l = None

        return l and 'thb-cv-nitori_craftsman%s' % random.choice(l)
Esempio n. 4
0
    def sound_effect(act):
        if isinstance(act, actions.LaunchCard):
            if act.card.is_card(cards.AttackCard):
                l = ['1', '2']
            else:
                l = ['_graze']

        elif isinstance(act, actions.AskForCard):
            atk = act.cond([build_handcard(cards.AttackCard, act.target)])
            graze = act.cond([build_handcard(cards.GrazeCard, act.target)])
            if atk and not graze:
                l = ['1', '2']
            else:
                l = ['_graze']
        else:
            l = None

        return l and 'thb-cv-nitori_craftsman%s' % random.choice(l)
Esempio n. 5
0
    def clickable(game):
        me = game.me
        if my_turn():
            return False

        if not (me.cards or me.showncards):
            return False

        try:
            act = game.action_stack[-1]
            return act.cond([build_handcard(cards.AttackCard)])
        except:
            pass

        return False
Esempio n. 6
0
    def clickable(game):
        me = game.me
        if my_turn():
            return False

        if not (me.cards or me.showncards):
            return False

        try:
            act = game.action_stack[-1]
            return act.cond([build_handcard(cards.AttackCard)])
        except:
            pass

        return False