Skip to main content

✅ Get effective ap cost general ap cost always applies

CategoryAbility
StatusPassing
Testtests/test_operations.py::test_get_effective_ap_cost_general_ap_cost_always_applies

Murmur's "-2 AP Cost" (no qualifier) applies to both basic and

Preconditions

  • Lane 0: P1's Murmur (#002) — READIED

  • Murmur has passive: -2 AP Cost (all actions)

  • ACTION 1: get_effective_ap_cost for basic action, base=2

  • ACTION 2: get_effective_ap_cost for custom action, base=2

Action

See code below.

import importlib
import engine.abilities_passive
from engine.abilities import clear_registries
clear_registries()
importlib.reload(engine.abilities_passive)

from engine.operations import get_effective_ap_cost
state = make_game_state()
murmur = make_demon("002", lane=0, owner=Side.PLAYER_1)
state = place_demon(state, murmur)
placed = state.demons[0]

basic_cost = get_effective_ap_cost(state, placed, 2, is_basic_action=True)
custom_cost = get_effective_ap_cost(state, placed, 2, is_basic_action=False)

Expected Postconditions

  • Both calls: max(0, 2 - 2) = 0

Assertions

assert basic_cost == 0, f"Murmur -2 applies to basic. Got {basic_cost}."
assert custom_cost == 0, f"Murmur -2 applies to custom. Got {custom_cost}."