Esempio n. 1
0
def get_all_cards():
    """
    Serves as the master list of all cards to add to the deck.

    Create lists to reflect package structure and add individual cards to each list.
    If a new list is created extend it onto the full_list_of_cards
    """
    energy_manipulation_cards = [Energize()]

    health_manipulation_cards = [FireBlast(), HighAltitudeBombing()]

    multi_manipulation_cards = [GasRefinery(), JetFighters()]

    victory_point_manipulation_cards = [
        ApartmentBuilding(),
        CommuterTrain(),
        CornerStore(),
        EvacuationOrders(),
        Skyscraper()
    ]

    full_list_of_cards = []
    full_list_of_cards.extend(energy_manipulation_cards)
    full_list_of_cards.extend(health_manipulation_cards)
    full_list_of_cards.extend(multi_manipulation_cards)
    full_list_of_cards.extend(victory_point_manipulation_cards)

    return full_list_of_cards
Esempio n. 2
0
def test_discard_all_cards_removes_all_cards(player):
    player.add_card(Energize())
    player.add_card(FireBlast())
    player.discard_all_cards()
    assert not player.has_instance_of_card(
        Energize()) and not player.has_instance_of_card(FireBlast())
Esempio n. 3
0
def test_lose_all_stars_zeros_out_stars(player):
    player.add_card(Energize())
    player.add_card(FireBlast())
    player.discard_all_cards()
    assert not player.has_instance_of_card(
        Energize()) and not player.has_instance_of_card(FireBlast())
Esempio n. 4
0
def test_player_has_instance_of_card_sees_basic_card(player):
    player.add_card(Energize())
    # check player has Energize but not FireBlast to prove method isn't matching to Card or DiscardCard
    assert player.has_instance_of_card(
        Energize()) and not player.has_instance_of_card(FireBlast())
Esempio n. 5
0
def test_fire_blast_subtracts_2_health(player, five_players):
    FireBlast().immediate_effect(player, five_players)
    assert all(other_players.current_health == constants.DEFAULT_HEALTH - 2
               for other_players in five_players)
Esempio n. 6
0
def test_type_is_discard():
    assert FireBlast().card_type == "Discard"
Esempio n. 7
0
def test_fire_blast_costs_3_energy():
    assert FireBlast().cost == 3
Esempio n. 8
0
def get_all_cards():
    """
    Serves as the master list of all cards to add to the deck.

    Create lists to reflect package structure and add individual cards to each list.
    If a new list is created extend it onto the full_list_of_cards
    """
    energy_manipulation_cards = [Energize()]

    health_manipulation_cards = [FireBlast(), HighAltitudeBombing()]

    multi_manipulation_cards = [
        GasRefinery(),
        JetFighters(),
        NationalGuard(),
        NuclearPowerPlant(),
        Tanks(),
        VastStorm()
    ]

    victory_point_manipulation_cards = [
        ApartmentBuilding(),
        CommuterTrain(),
        CornerStore(),
        DropFromHighAltitude(),
        EvacuationOrders(),
        Skyscraper()
    ]

    turn_manipulation_cards = [Frenzy()]

    discard_cards = []
    discard_cards.extend(health_manipulation_cards)
    discard_cards.extend(energy_manipulation_cards)
    discard_cards.extend(multi_manipulation_cards)
    discard_cards.extend(victory_point_manipulation_cards)
    discard_cards.extend(turn_manipulation_cards)

    keep_cards = []

    keep_attack_manipulation_cards = [NovaBreath(), SpikedTail()]

    keep_energy_manipulation_cards = [
        EnergyHoarder(),
        FriendOfChildren(),
        SolarPowered(),
        WereOnlyMakingItStronger(),
        AlienMetabolism()
    ]

    keep_health_manipulation_cards = [
        ItHasAChild(),
        EvenBigger(),
        Regeneration(),
        ArmorPlating()
    ]

    keep_victory_point_manipulation_cards = [
        AlphaMonster(),
        CompleteDestruction(),
        DedicatedNewsTeam(),
        Gourmet(),
        Omnivore(),
        EaterOfTheDead()
    ]

    keep_turn_manipulation_cards = [GiantBrain()]

    keep_cards = []
    keep_cards.extend(keep_attack_manipulation_cards)
    keep_cards.extend(keep_energy_manipulation_cards)
    keep_cards.extend(keep_health_manipulation_cards)
    keep_cards.extend(keep_victory_point_manipulation_cards)
    keep_cards.extend(keep_turn_manipulation_cards)

    full_list_of_cards = []
    full_list_of_cards.extend(discard_cards)
    full_list_of_cards.extend(keep_cards)

    return full_list_of_cards