JDBumgardner / stone_ground_hearth_battles

Apache License 2.0
20 stars 2 forks source link

Deathrattle trigger order Attacker vs Defender #11

Open jeremysalwen opened 4 years ago

jeremysalwen commented 4 years ago

Who triggers the deathrattle first? Is it always attacker? Always defender? or is it based on order of play?

jeremysalwen commented 4 years ago

Proposed battle: Replicating Menace vs Unstable Ghoul

They will trade. Will the unstable ghoul always hit the tokens, never hit the tokens, or sometimes hit the tokens (based on order of play, attackers, etc?)

Note you will need to fight many times and perhaps resummon to change summon order of the cards relative to each other, in order to be sure, since it may not be a simple rule.

jeremysalwen commented 4 years ago

One case of defending deathrattle triggering first (damaging deathrattle) and summon happened later.

One case of attacking deathrattle triggering first (summoning deathrattle) and damage happened after.

jeremysalwen commented 4 years ago

Kaboom bot attacking scallyway, killed summoned scallywag.

jeremysalwen commented 4 years ago

replicating menace attacked kaboom bot, replicating menace triggered first.

jeremysalwen commented 4 years ago

unstable ghoul attacks replicating menace, ghoul triggers second and kills everything.

jeremysalwen commented 4 years ago

kaboom bot attacks menace, then kills token.

jeremysalwen commented 4 years ago

replicating menace attacks unstable ghoul, unstable ghoul triggers first, and hits no summoned tokens.

jeremysalwen commented 4 years ago

ghoul attacks ratpack, ghoul triggers first

jeremysalwen commented 4 years ago

my macaw attacked jeremy's replicating menace, my macaw's kaboom bot triggered first

(There was only a replicating menace on the other side, so the kaboom bot whiffed)

ethansaxenian commented 4 years ago

https://www.reddit.com/r/BobsTavern/comments/j1cidh/i_finally_got_it_after_about_a_week_of_trying/

Ok, this is pretty crazy, but I think it gives us some useful information. After Unstable Ghoul triggers, it looks like the attacking player's deathrattles trigger first, left-to-right, and then the defending player's deathrattles trigger. Note that the opponent's Selfless Hero doesn't give divine shield to either of the minions summoned by The Tide Razor, presumably because of left-to-right ordering.

Also note that board space opens up after the ghoul's deathrattle kills some stuff, but no board space opens up between Kaboom Bot triggers (and thus the pirate ship only summons 2 minions), which makes it seem like a queue of deathrattle triggers resolve before death is checked.

It does appear that the ship's deathrattle triggers before the opponent's kaboom bot based on the animation, which is weird.

jazzcs commented 4 years ago

This is one instance of an "exodia" deathrattle build, though the more common version was with Beasts, if you want to search for more videos like this.

ethansaxenian commented 4 years ago

Interesting, I will keep digging.

JDBumgardner commented 4 years ago

Good find!

It could be that the queue is emptied before death is resolved or it could be that when an action is put into the queue it is put in with the current game state. I think that these mean slightly different things if we think about whether a secondary event knows if the other creatures are dead. Like imagine that the kaboom bots were had killed something with a deathrattle, would that thing know what was dead when its deathrattle was triggered? Also this seems to make sense with what we had noticed before that kaboombot deathrattle triggers wouldn't target enemy summons that had been summoned after their death. Actually I'm not sure we confirmed that.

Also, the selfless hero deathrattle targets the kaboom bots that were summoned after the selfless hero died.

ethansaxenian commented 4 years ago

Well the Kaboom Bots did kill the opponent's Kaboom Bot, which dealt damage to a minion that was summoned afterwards, so there's our answer.

The Selfless Hero I was referring to is the opponent's.

JDBumgardner commented 4 years ago

I wasn't correcting you. I was saying that your selfless hero targets your own summoned bots, which is not what I would expect.

ethansaxenian commented 4 years ago

Got it, I misunderstood.

JDBumgardner commented 4 years ago

Yeah, ok. So, it probably isn't taking the state when it was killed with it.

JDBumgardner commented 4 years ago

The kaboom bots don't seem to overkill anything either. Maybe this is common knowledge.

JDBumgardner commented 4 years ago

Which guy does the summoning at the end in the opponent's board?

ethansaxenian commented 4 years ago

The Tide Razor (pirate ship)

ethansaxenian commented 4 years ago

https://youtu.be/9NNuJcal8vY?t=1091

This one seems like it's left-to-right as well.

JDBumgardner commented 4 years ago

Ok, I see what you're saying. It's like....

The unstable ghoul happens -> The tide razor deathrattle gets queued up along with a bunch of friendly triggers. Everything that died from the ghould gets wiped from the board Now we're in the queue of things that directly resulted from the ghoul All of the friendly effects happen left to right then the tide razor triggers then we resolve all the deaths that happened as a result of the second queue Then it's the third step where the kaboom bot that was killed by one of the friendly kaboom bots triggers

ethansaxenian commented 4 years ago

https://youtu.be/0-ux3G3Tq8A?t=1013

Left-to-right again.

ethansaxenian commented 4 years ago

Oh yeah that makes sense because the Tide Razor was queued before the Kaboom Bot died.

ethansaxenian commented 4 years ago

https://youtu.be/ecZvTirsoMo?t=72

Left-to-right all but confirmed by the devs. The only question now is ordering of player vs opponent simultaneous deathrattles. In all of these videos it seems like player resolves first, but in our in-game testing it wasn't consistent either way. Maybe this is just how Unstable Ghoul works. Are there any other cards/heroes that deal simultaneous damage to minions on both sides?

ethansaxenian commented 4 years ago

https://youtu.be/jbgRI-q-s5A?t=317 (watch at 0.25 speed!)

Ok in this one the opponent's Nadina clearly triggers before the player's Kaboom Bot. Very strange.

JDBumgardner commented 4 years ago

Oh, no, you know what it was. It was that kaboom bot wont target anything with <= 0 life even though death isn't resolved yet.

I think that we should come up with an architecture and invalidate it.

Right now were thinking something like: Something happens that causes multiple events. those events go into a queue. those events resolve as they resolve their consequential events (sub events?) go into another queue. the first queue finishes death is checked the next queue begins to resolve
its sub events are put into another queue to be resolved after the deaths of the second queue are resolved etc.

ethansaxenian commented 4 years ago

Which video are you talking about?

JDBumgardner commented 4 years ago

I'm just saying abstractly this structure could explain the behavior we're seeing.

Which one is the Nadia?

ethansaxenian commented 4 years ago

I mean which Kaboom Bot

Nadina is the furthest-left opponent minion. It gives divine shield to friendly dragons as a deathrattle.

JDBumgardner commented 4 years ago

Any kaboom bot. Like, in the first video the two golden kaboom bots with a golden Rivendare fire a total of 8 bombs instead of 12. because everything has run out of health. Like they have been marked for death with those little jolly rogers at the bottom of their cards and just haven't been cleared away yet.

Ok, I see, that is kind of weird. It's like one player just has first priority or something.

ethansaxenian commented 4 years ago

Yeah, so minions can be 'dead' but still on the board while events resolve.

JDBumgardner commented 4 years ago

Yeah.

ethansaxenian commented 4 years ago

It seems to me that instead of a resolve_death function for each individual card, we should just have one function that checks both boards for dead minions from left-to-right and marks deaths all at once.

JDBumgardner commented 4 years ago

We need two separate attributes. One for being dead and another for being in play.

ethansaxenian commented 4 years ago

I think just checking health <= 0 works for being dead.

JDBumgardner commented 4 years ago

What if some other effect heals them?

JDBumgardner commented 4 years ago

Wait, I actually don't know.

ethansaxenian commented 4 years ago

Well we have seen that a buff effect can revive a minion with < 0 health. Macaw/Goldrinn, for example.

jeremysalwen commented 4 years ago

I think we can have a queue for deathrattles. So instead of resolving deathrattles immediately, we add the card to the queue, and resolve it once everyone else who has priority is resolved.

JDBumgardner commented 4 years ago

Jeremy it's more than just that. Read the comment chain.

jeremysalwen commented 4 years ago

Ok, I read through everything.

A few notes:

  1. The enemy selfless hero in the first video does trigger on the 0 health kaboom bot, but the kaboom bot still dies: https://www.reddit.com/r/BobsTavern/comments/j1cidh/i_finally_got_it_after_about_a_week_of_trying/
  2. In this one, a dead murloc at -2 health gets buffed to 0 health by a deathrattle: https://www.youtube.com/watch?v=ecZvTirsoMo&feature=youtu.be&t=72 We have seen this before. I think basically if you are not yet removed from the board, anything that triggers can buff you back to life and revive you. I'm creating another issue to track this experiment, but I believe kaboom bot will not trigger someone because they are dead, even though they are about to be revived by zznoth.
  3. In this one, https://www.youtube.com/watch?v=9NNuJcal8vY&feature=youtu.be&t=1091 we can see that the selfless hero deathrattle triggers first, even though the highmane is dead and to the left of it. But the highmane is in a different generation of deathrattles, so this makes sense.
  4. I agree with jake's model that when there are chains of deathrattles, we clear the board after each generation of deathrattles fires.
  5. I don't think we have enough evidence that deathrattles trigger from left to right. All the evidence for this comes from unstable ghoul. But the rule could be that the deathrattle triggers in the order you got damaged, and unstable ghoul just damages from left to right. To actually understand the behavior, we need to look at cards killed by kaboom bots in a different order than their order on the board.
  6. This thread is technically about the order of attacker vs defender deathrattles after a regular attack, which we don't seem to have any information about (#8 is about cleave damage order, which is conceptually similar to ghoul damage order). Even the related question of whether attacker/defender ghoul-triggered deathrattles happen first we don't know about. From the examples posted in this thread, there are examples where the ghoul owner and the opponent deathrattles trigger first, and there are examples where the attacking and defending player trigger first. I'm guessing it's based on some hidden variable like the player id, or maybe the order of the players when they are paired up.
ethansaxenian commented 4 years ago
  1. Good eye. I've noticed that there is always a Selfless Hero deathrattle animation even if there are no valid targets. This could potentially be useful as a 1-toughness minion to track ordering.

  2. Here is the list of minions that can deal damage to multiple minions at once: Red Whelp, Kaboom Bot, Unstable Ghoul, Soul Juggler, Cave Hydra (via cleave, which may or may not work the same way), Herald of Flame, Foe Reaper (via cleave). I think it should be easy enough to devise experiments for most of these. I'll also note that in a couple of the videos I posted the players talked about positioning as they were setting up their boards.

  3. This seemed to me like the best place to put this example; should we make a new issue for general simultaneous deathrattle ordering?

Weird, my bullet points should be 1, 5, and 6 here but github keeps updating them to 1,2,3.

jeremysalwen commented 3 years ago

https://www.youtube.com/watch?v=_vJQTJVzfws 7:10, at least attacker defender seems to be pure coin flip.

JDBumgardner commented 3 years ago

One thing I realize now is that even though the unstable ghoul from before may damage everything from left to right that's not the order that they actually die in.

ethansaxenian commented 3 years ago

Which video are you referring to?

JDBumgardner commented 3 years ago

I'm responding to Jeremy's fifth point which refers to the first exodia video.