예제 #1
0
def test_player_not_allowed_to_yield_after_attacked_out_of_tokyo():
    attacker = Player()
    attacker.move_to_tokyo()
    yielder = Player()
    yielder.leave_tokyo()
    attack_actions.attack_players(attacker, [yielder])
    assert not yielder.allowed_to_yield
    assert not attacker.allowed_to_yield
예제 #2
0
def resolve_attack_dice(dice_counter, attacking_player, other_players):
    attack = calculate_attack_from_dice(dice_counter)
    if attacking_player.has_instance_of_card(Urbavore()):
        attack = Urbavore.attack_dice_special_effect(attacking_player, attack)
    if attacking_player.has_instance_of_card(SpikedTail()):
        attack = SpikedTail().attack_dice_special_effect(
            attacking_player, attack)
    attackable_players = get_attackable_players(attacking_player,
                                                other_players)
    attack_players(attacking_player, attackable_players, attack)
    if attack > 0:
        move_to_tokyo_if_empty(attacking_player, other_players)
예제 #3
0
def test_attacking_players_by_three():
    player_two = Player()
    player_three = Player()
    attackable_players = [player_two, player_three]
    attack_actions.attack_players(Player(), attackable_players, 3)
    assert player_two.current_health == 7 and player_three.current_health == 7