File size: 2,317 Bytes
bb3fbf9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import numpy as np
import pytest

from engine.game.game_state import initialize_game


class TestVerificationBatch20:
    @pytest.fixture
    def game_state(self):
        gs = initialize_game(use_real_data=True)
        if not gs.member_db:
            pytest.skip("Card data not loaded")
        gs.active_player.tapped_energy = np.zeros(20, dtype=bool)
        return gs

    def get_card_id(self, gs, card_no):
        for cid, card in gs.member_db.items():
            if card.card_no == card_no:
                return cid
        for cid, card in gs.live_db.items():
            if card.card_no == card_no:
                return cid
        pytest.fail(f"Card {card_no} not found")

    def _test_vanilla(self, game_state, card_no):
        """

        Generic test for Vanilla cards (No Abilities).

        """
        gs = game_state
        card_id = self.get_card_id(gs, card_no)

        if card_id in gs.member_db:
            card = gs.member_db[card_id]
        else:
            card = gs.live_db[card_id]

        assert not card.abilities, f"Card {card_no} should be vanilla, found abilities: {card.abilities}"

    def test_pln_bp1_016_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp1-016-N")

    def test_pln_bp1_017_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp1-017-N")

    def test_pln_bp1_018_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp1-018-N")

    def test_pln_bp1_020_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp1-020-N")

    def test_pln_bp1_021_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp1-021-N")

    def test_pln_bp1_022_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp1-022-N")

    def test_pln_bp1_023_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp1-023-N")

    def test_pln_bp1_024_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp1-024-N")

    def test_pln_bp3_016_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp3-016-N")

    def test_pln_bp3_018_n_vanilla(self, game_state):
        self._test_vanilla(game_state, "PL!N-bp3-018-N")