Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demon Hunter Prologue: The Xavius encounter does not end if an extra Energy minion dies in the death phase after the thirtieth one #1326

Open
Jetz72 opened this issue Apr 4, 2020 · 0 comments

Comments

@Jetz72
Copy link

Jetz72 commented Apr 4, 2020

Original report here: https://www.reddit.com/r/hearthstone/comments/fu1f2l/turns_out_giving_xavius_armour_breaks_the_game/
Actual cause is a bit more elaborate though.

Example setup: The portal has 29/30 minions dead. Enemy board has one Fel Unstable Energy (Deathrattle: 2 damage AoE) and one Dark Unstable Energy (3/1 Taunt). You Frostbolt the Fel Energy. It dies, bringing the portal to 30/30. Its Deathrattle then kills the Dark Energy. The counter on the portal doesn't seem affected. However, after the end cutscene plays out, the victory screen does not appear. The game continues.

That doesn't happen normally. Usually the portal seems to summon minions and give you cards in a way such that you'll be able to Flamestrike the board and have exactly 30 kills at the end. But if you pass up that opportunity, you can cause this.

Hearthstone Screenshot 04-03-20 18 33 09

You're healed to 30, but have no hero power. Xavius' stats are hidden and the Immune overlay on him during your turn is invisible, but he otherwise continues where he left off. As in the normal game, his death will be considered a victory. His scripted draws come to an end and he begins playing random cards from his deck. I've yet to manage to keep him alive long enough to see the whole thing though. The portal also runs out of scripted sets of energy minions and begins spawning one of each every turn, infinitely. The game effectively becomes a cool survival mode.

So as for why this apparently happens: After an energy dies, the portal triggers, increases its counter. Upon reaching the requisite number of kills, the Portal sets TAG_SCRIPT_DATA_NUM_1 on the GameEntity to 1. That's evidently the flag to end the mission. Any excess kills normally won't be a problem; it's already 1, being set to 1 again. When the GameEntity sees that tag, it triggers, queues some dialog, and bumps it to 2. It then starts another trigger, which meddles with Xavius to make him look nice for the final cutscene, does the hero replacement, and sets that tag to 3. That tag being 3 causes the final trigger which sets the player's PLAYSTATE to "WINNING".

Where that all seems to go wrong then is between the tag being set to 3 and that final trigger. Apparently if you split it into two death phases, the order of triggers come out like this:

  • Remove dying minions 1.
  • Process Portal Triggers and Deathrattles 1.
    • GameEntity TAG_SCRIPT_DATA_NUM_1 = 1
  • Remove dying minions 2.
  • Trigger from GameEntity tag = 1. (Apparently since it's the same thing responsible for deaths, this happens at a really odd time)
    • GameEntity TAG_SCRIPT_DATA_NUM_1 = 2
  • Second trigger from GameEntity.
    • GameEntity TAG_SCRIPT_DATA_NUM_1 = 3
    • Illidan is now a Demon Hunter, Xavius is now weird.
  • Process Portal Triggers and Deathrattles 2
    • GameEntity TAG_SCRIPT_DATA_NUM_1 = 1 (Uh oh)
  • Trigger from GameEntity tag = 3, deciding the game (Does not happen)

The triggers seem to be flagged as one time only so the cutscene doesn't repeat. That or there's a check to make sure you're not Demon Hunter Illidan in the first one.

Replay of a turn where it happened:
https://hsreplay.net/replay/PTUj2sX5uhMjkhAarQJ9aa#turn=10a

Log of that: https://gist.github.com/Jetz72/f5c31bb821c7093b681076fb91ef0b74

Another replay of it: https://hsreplay.net/replay/4sPChb6thiWZdCGvX6o6SY#turn=9b

Replay of it not happening when the minions all die in the same death phase:
https://hsreplay.net/replay/EyBYRmgLQUzsgGX3uLXvam#turn=9b

Log of that: https://gist.github.com/Jetz72/585bfb37ddcc677f41c9fb7107ad4e86

@Jetz72 Jetz72 added this to the 17.0.0.44222 milestone Apr 4, 2020
@Jetz72 Jetz72 modified the milestones: 17.0.0.44222, 17.0.2.45932 Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant