def test_complicated_eater_logic(): card_holder = Player() card_holder.add_card(EaterOfTheDead()) playerA = Player() playerB = Player() playerC = Player() game = BoardGame() game.add_player(card_holder) game.add_player(playerA) game.add_player(playerB) game.add_player(playerC) game.start_game() playerA.update_health_by(-playerA.current_health) game.players.apply_eater_of_dead_action() assert card_holder.victory_points == EaterOfTheDead.victory_points_reward_value playerB.update_health_by(-playerB.current_health) playerC.update_health_by(-playerC.current_health) game.players.apply_eater_of_dead_action() assert card_holder.victory_points == EaterOfTheDead.victory_points_reward_value * 3
def test_eater_of_the_dead_player_add_card(player): EaterOfTheDead().immediate_effect(player, None) assert player.has_instance_of_card(EaterOfTheDead())
def test_eater_of_the_dead_costs_4_energy(): assert EaterOfTheDead().cost == 4
def apply_eater_of_dead_action(self): card_holders = self.check_for_eater_of_dead_holders() newly_dead = self.check_for_newly_dead_players() for _ in newly_dead: for player in card_holders: EaterOfTheDead().special_effect(player)
def check_for_eater_of_dead_holders(self): return [ player for player in self.get_alive_players() if player.has_instance_of_card(EaterOfTheDead()) ]
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