示例#1
0
文件: player.py 项目: cvennel/kot
 def update_energy_by(self, change_integer):
     if self.has_instance_of_card(FriendOfChildren()):
         change_integer = FriendOfChildren.add_extra_energy(change_integer)
     self.energy += change_integer
     if self.energy < constants.DEFAULT_ENERGY_CUBE:
         self.energy = constants.DEFAULT_ENERGY_CUBE
示例#2
0
def test_friend_of_childrencosts_3_energy():
    assert FriendOfChildren().cost == 3
示例#3
0
def test_friend_of_children_gain_no_extra_energy(player):
    player.energy = 5
    player.add_card(FriendOfChildren())
    player.update_energy_by(0)
    assert player.energy == 5
示例#4
0
def test_friend_of_children_player_add_card(player):
    FriendOfChildren().immediate_effect(player, None)
    assert player.has_instance_of_card(FriendOfChildren())
示例#5
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