Example #1
0
def arson_attack_target(game_control, user):
    def check_has_card(target):
        count_cards = game_control.player_cards_count_at(target, 'onhand')
        if user == target:
            return 1 < count_cards
        return 0 < count_cards
    all_players = game_control.players_from_current()
    targets = filter(check_has_card, all_players)
    return hints.fix_target_action(hints.target_filter('arson attack', user,
                                                       targets))
Example #2
0
File: duel.py Project: neuront/sgs
def duel_target(game_control, user):
    targets = game_control.succeeding_players()
    return fix_target_action(target_filter('duel', user, targets))
Example #3
0
File: steal.py Project: neuront/sgs
def steal_target(gc, user):
    players = filter(lambda p: gc.player_has_cards(p), gc.succeeding_players())
    players = range_filter(gc, user, 'steal', players)
    return fix_target_action(target_filter('steal', user, players))
Example #4
0
def sabotage_targets_h(gc, user):
    return fix_target_action(sabotage_targets(gc, user))
Example #5
0
File: slash.py Project: neuront/sgs
def slash_targets_h(gc, user):
    return fix_target_action(slash_targets(gc, user))