fireplace
fireplace copied to clipboard
[Test]Wild growth mana used issue.
After playing wildgrowth1, a test of this is written.
assert game.player1.used_mana == 2 + 1
Is it right?
Yes, "used mana" really means "how many of the crystals you have are empty"
This is what i concerned about:
def test_darnassus_aspirant():
game = prepare_game()
assert game.current_player.mana == 10
assert game.current_player.max_mana == 10
aspirant = game.current_player.give("AT_038")
aspirant.play()
assert game.current_player.mana == 8 # ‘E AssertionError: assert 7 == 8‘
assert game.current_player.max_mana == 10
assert game.current_player.used_mana == 2 # ‘E assert 3 == 2‘
aspirant.destroy()
assert game.current_player.mana == 8 # E AssertionError: assert 6 == 8
assert game.current_player.max_mana == 9
assert game.current_player.used_mana == 2 # E AssertionError: assert 3 == 2
since the GainEmptyMana is composed of GainMana and SpendMana which changes used_mana, the asserts fail. We need another attribute to convey the meaning of 'the actual SPENT mana'.
This may also relate to 0-cost forbidden cards, I guess.