LovecaSim / engine /tests /cards /batches /test_verification_batch_19.py
trioskosmos's picture
Upload folder using huggingface_hub
bb3fbf9 verified
import numpy as np
import pytest
from engine.game.game_state import initialize_game
class TestVerificationBatch19:
@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_plhs_pr_008_pr_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!HS-PR-008-PR")
def test_plhs_pr_009_pr_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!HS-PR-009-PR")
def test_plhs_bp1_012_n_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!HS-bp1-012-N")
def test_plhs_bp1_012_pr_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!HS-bp1-012-PR")
def test_plhs_bp1_013_n_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!HS-bp1-013-N")
def test_plhs_bp1_015_n_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!HS-bp1-015-N")
def test_plhs_bp1_016_n_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!HS-bp1-016-N")
def test_plhs_bp1_017_n_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!HS-bp1-017-N")
def test_plhs_bp1_018_n_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!HS-bp1-018-N")
def test_pln_bp1_013_n_vanilla(self, game_state):
self._test_vanilla(game_state, "PL!N-bp1-013-N")