Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Implement delayed event triggering for Heal
- Loading branch information
1 parent
15f3bd2
commit e6832a8
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from utils import * | ||
|
||
|
||
def test_event_queue_heal(): | ||
""" | ||
Test the event queue for mass hits. | ||
Events are supposed to be processed in two phases: | ||
1. Event queuing | ||
2. Triggers (in order of play) | ||
This means that playing a Refreshment Vendor on a board with a | ||
Shadowboxer, and two heroes damaged by 1 will result in the enemy | ||
hero being damaged by 28. Shadowboxer will trigger twice, after | ||
both heals have triggered. | ||
""" | ||
game = prepare_game() | ||
game.player1.give(MOONFIRE).play(target=game.player1.hero) | ||
game.player1.give(MOONFIRE).play(target=game.player2.hero) | ||
shadowboxer = game.player1.give("GVG_072") | ||
shadowboxer.play() | ||
vendor = game.player1.give("AT_111") | ||
vendor.play() | ||
assert game.player1.hero.health == 30 | ||
assert game.player2.hero.health == 28 |