def test_unidentified_contract(): card = Card(4, None) assert not card.initial_card_id assert card.is_original_entity card.reveal("DAL_366", {}) assert card.card_id == "DAL_366" assert card.initial_card_id == "DAL_366" card.change("DAL_366t3", {}) assert card.card_id == "DAL_366t3" assert card.initial_card_id == "DAL_366"
def test_archthief_rafaam(): card = Card(4, None) assert not card.initial_card_id assert card.is_original_entity card.reveal("CS2_091", {GameTag.CREATOR_DBID: 52119}) assert card.card_id == "CS2_091" assert not card.initial_card_id assert not card.is_original_entity card.change("EX1_001", {}) assert card.card_id == "EX1_001" assert not card.initial_card_id assert not card.is_original_entity
def test_change_entity(): card = Card(4, "EX1_001") assert card.card_id == "EX1_001" assert card.initial_card_id == "EX1_001" assert card.is_original_entity card.change("NEW1_030", {}) assert card.card_id == "NEW1_030" assert card.initial_card_id == "EX1_001" assert not card.is_original_entity weapon = Card(4, None) assert not weapon.initial_card_id assert weapon.is_original_entity weapon.reveal("CS2_091", {GameTag.TRANSFORMED_FROM_CARD: 41420}) assert weapon.card_id == "CS2_091" assert weapon.initial_card_id == "UNG_929" assert not weapon.is_original_entity
def test_known_starting_deck_list_with_galakrond(self, game, player): GALAKROND = "DRG_600" GALAKROND_UPGRADE_1 = "DRG_600t2" GALAKROND_UPGRADE_2 = "DRG_600t3" galakrond = Card(13, None) galakrond.tags.update({ GameTag.ZONE: Zone.DECK, }) game.register_entity(galakrond) galakrond.reveal( GALAKROND, { GameTag.CARDTYPE: CardType.HERO, GameTag.CONTROLLER: player.player_id, }) galakrond.change(GALAKROND_UPGRADE_1, {}) galakrond.hide() assert player.known_starting_deck_list == [GALAKROND], \ "Galakrond should be known after it was upgraded, even if not played" galakrond.reveal( GALAKROND_UPGRADE_1, { GameTag.CARDTYPE: CardType.HERO, GameTag.CONTROLLER: player.player_id, }) galakrond.change(GALAKROND_UPGRADE_2, {}) galakrond.hide() galakrond.tags.update({ GameTag.ZONE: Zone.HAND, }) galakrond.reveal( GALAKROND_UPGRADE_2, { GameTag.CARDTYPE: CardType.HERO, GameTag.CONTROLLER: player.player_id, }) assert player.known_starting_deck_list == [GALAKROND]