fireplace icon indicating copy to clipboard operation
fireplace copied to clipboard

[Test]Sometimes test for test_silvermoon_portal() fails

Open tonyyyye opened this issue 6 years ago • 6 comments

When the ("KAR_077") silvermoon portal summons dire_wolf_alpha the attack value of the designated minion will not be as expected.

tonyyyye avatar May 12 '18 16:05 tonyyyye

assert whelp.atk == 3 E AssertionError: assert 4 == 3 E + where 4 = <Minion ('Whelp')>.atk

This is how my case fails

Probably some related cases may fail due to the same reason. Will check when go through cases.

tonyyyye avatar May 12 '18 16:05 tonyyyye

Yeah I'm aware of the failure mode. Maybe you can remove the other minion from the board after you've checked for it, I think there's a way to do it that doesn't trigger deathrattles (remove_from_game() was it?)

jleclanche avatar May 12 '18 16:05 jleclanche

Currently I haven't found remove_from_game(). All related operations are implemented as set: target.zone = Zone.GRAVEYARD

And I think it is a good idea to add this to Minion and Weapon.

tonyyyye avatar May 12 '18 17:05 tonyyyye

@tonyyyye Make sure you're on Discord at https://discord.gg/hearthsim-devs -- We can chat there more easily and you can ask anything you like :)

jleclanche avatar May 12 '18 17:05 jleclanche

Besides Dire_wolf_alpha, Flametongue_Totem, Wild_Pyromancer will also cause the problem. While all minions related could be solved by game.current_player.field[-1].bounce(), Wild_Pyromancer is another problem, which was caused by modification of spell cycle in patch 9.2 .

Hearthstone Mechanics Update – We’ve changed some underlying rules to prevent Wild Pyromancer from triggering off of Mindgames

tonyyyye avatar May 25 '18 10:05 tonyyyye

There are no more after-spell-damages when summon a Wild Pyromancer, including this silvermoon portal. The rest of the excetion cases are tested with like a 10k times without error, so I think it can be modified by that way.

The Wild Pyromancer("NEW1_020") problem will be mentioned by another issue.

tonyyyye avatar May 25 '18 10:05 tonyyyye