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

Secret Deduction #1522

Conversation

joshtab
Copy link

@joshtab joshtab commented Sep 28, 2015

This patches some of the edge cases surrounding combat.

When a "fast secret" gets triggered, sometimes it can disrupt combat (freezing trap, for example, will prevent the attack from going through). Any secrets older than the triggered secret need to be narrowed down based on the proposed combat.

On hero->hero combat, misdirection was being hidden even if there were no other targets. There needs to be a minion in play for misdirection to trigger.

misdirection can't fire unless there's a minion in play
when a secret modifies combat (e.g. minion dissapears), need to determine which fast secrets
would have triggered and zero them
@culinko
Copy link

culinko commented Sep 28, 2015

Also, misdirection doesn't trigger if all of the targets have stealth (with hero->hero attacks). However, if you choose to attack with one of the stealthed minions, it can activate, because your minion lost stealth with the attack.

@joshtab
Copy link
Author

joshtab commented Oct 3, 2015

@culinko Can't repo.

I attacked with heroic strike into opponent. Only one minion in play, stealthed. Misdirection triggered

misdirection

@culinko
Copy link

culinko commented Oct 4, 2015

Yeah, they have changed misdirection in 3.1. Now it triggers every time there is 1 or more minions, doesn't matter if they have stealth or not. Blizzard made it easier for you to implement ;)

@azeier
Copy link
Member

azeier commented Oct 7, 2015

That's the status on this?

What's working / needs to be fixed?

@Eldenroot
Copy link

I would like to see this in the next release :) My life in HS would be much easier :)

@joshtab
Copy link
Author

joshtab commented Oct 9, 2015

Only known issue to my knowledge:

Minion deaths when the minion has a deathrattle which puts a new minion in play. Redemption and Effigy will not trigger if there are 7 minions in play after the deathrattle. The code as written assumes these secrets always trigger on minion death.

Not sure how to fix. Could create a list of minions with "deathrattle: add minion to play", but sounds annoying to maintain. We listen for the Tag change to identify minion death, but I couldn't identify where the "minion deathrattle about to happen" state is stored. Any ideas?

@culinko
Copy link

culinko commented Oct 9, 2015

I think if you play effigy before the deathrattle minion, the secret triggers before the minion's deathrattle. If you play it after the minion, the minion's deathrattle will trigger first and effigy won't trigger. I might be wrong, though.

@azeier
Copy link
Member

azeier commented Oct 9, 2015

Checking the card text for "Deathrattle: Summon" might work. I think the only cards not matching that would be feugen/stalagg.

@joshtab joshtab changed the title Secret Deduction - Combat Fixes Secret Deduction Oct 10, 2015
@joshtab
Copy link
Author

joshtab commented Oct 10, 2015

Think I'll just list the cards - number of minions summoned matters as well. (e.g. haunted creeper)

Will test @culinko's hypothesis about ordering

@joshtab
Copy link
Author

joshtab commented Oct 10, 2015

For ordering, effigy and redemption behave differently. Redemption is "slower" (it always waits for deathrattles to go first). Effigy happens like culinko said.

I think this whole feature is in pretty good shape. I know of some edge cases but think the game situations will be quite rare:

  • In a single turn, Opponent plays plays mystery secret followed by a deathrattle minion. If Opponent has 7 minions in play and you kill the deathrattle minion on your turn, the secret will not properly be eliminated as effigy. (If the secret was played on a previous turn, it would be properly eliminated).
  • Cross class scenarios: Ancestral Spirit + Effigy + Full Board
  • Stalagg/Feugen Trigger + Effigy + Full Board
  • Miscalculating "Full Board" /w Baron Rivendare + Deathrattles + Effigy

I'm more worried there's a common scenario I've failed to anticipate (with the hunter combat secrets, for example), but don't know of any problems.

Perhaps it's time to get it in front of people and see how it works?

One visual change I'd like but don't know how to implement: when there are multiple secrets in play, mousing over the individual secret bubbles would change the "possible secrets" overlay to list the possibilities for the individual secret. For example, you might know secret 1 is Counterspell or Ice Block. Your Mage opponent plays a second secret, there's useful information which basically disappears.

@culinko
Copy link

culinko commented Oct 10, 2015

Another scenarios that can screw things up:
*Sylvanas + Effigy (with Sylvanas played first). Maybe you could check for zone positions at some times? (e.g. if there is a minion in position 7 or deathrattle minion (creeper) on position 6 dying).
*Snake Trap+Noble Sacrifice - not sure how these 2 interact, but if you have 4 minions and 3 snakes spawn, they could block the spawn of Defender. If Noble Sacrifice triggers first, it will be fine, since Snakes can trigger on a full board (same with Bear Trap on full board - if they didn't fix it in 3.1).
*How do you deal with Noble Sacrifice interrupting a face attack? E.g. you have Noble Sacrifice and Bear Trap and opponent attacks your face, but it gets redirected. It should not gray out Bear Trap (I'm sure you have this one covered, mentioning it just in case). Similar with Bear Trap and Misdirection. Or does Bear Trap trigger in any of the scenarios I listed anyway?

Pretty sure there's more interactions that we're missing, but can't think of any right now.

Also I really like the idea of mousing over individual secrets and storing the information separately for each secret. I think hover things are possible to implement, see gold tracking in main menu.

@joshtab
Copy link
Author

joshtab commented Oct 11, 2015

I dealt with the Bear Trap + Misdirection case by looking at a "proposed attack" which is interrupted. There are Fast Secrets (which can disrupt combat by removing or redirecting the attacker) and Slow Traps (which only get triggered after the combat goes through). Bear Trap is Slow and can only get gray'ed if the attack goes through. Order of the traps matters for things like Freezing + Explosive, and that's handled as well.

Noble Sacrifice /w Bear Trap should be the same as Misdirection /w Bear Trap, but testing all of the cross-class combos is hard.

@azeier
Copy link
Member

azeier commented Oct 11, 2015

Perhaps it's time to get it in front of people and see how it works?

I plan on releasing v0.11.6 tomorrow. I would say we make this a beta (pre-)release a few days after.

@joshtab
Copy link
Author

joshtab commented Oct 11, 2015

Great, let me know if you need anything

@azeier azeier mentioned this pull request Oct 13, 2015
azeier pushed a commit that referenced this pull request Oct 21, 2015
split interactivity features into separate option
@azeier
Copy link
Member

azeier commented Oct 21, 2015

Merged into master.

@azeier azeier closed this Oct 21, 2015
@azeier
Copy link
Member

azeier commented Oct 21, 2015

@azeier
Copy link
Member

azeier commented Oct 21, 2015

System.ArgumentOutOfRangeException: El índice estaba fuera del intervalo. Debe ser un valor no negativo e inferior al tamaño de la colección.
Nombre del parámetro: index
   en System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   en Hearthstone_Deck_Tracker.OpponentSecrets.SecretRemoved(Int32 id, String cardId)
   en Hearthstone_Deck_Tracker.GameEventHandler.HandleOpponentSecretTrigger(Entity entity, String cardId, Int32 turn, Int32 otherId)
   en Hearthstone_Deck_Tracker.GameEventHandler.Hearthstone_Deck_Tracker.IGameHandler.HandleOpponentSecretTrigger(Entity entity, String cardId, Int32 turn, Int32 otherId)

Full log: http://pastebin.com/mv3DiBnE

un mago tenia 2 secretos y use bengala y el programa se crasheooo, tengo activado para reconocer los secretos automatico

Mage with 2 secrets => flare.

Not sure if this is an issue with the implementation or a special case, the logs contains some messages that should usually not appear: TMP ENTITY (mokko) NOW HAS A KEY, BUT GAME.ENTITIES DOES NOT CONTAIN THIS KEY. IIRC, this means there was never an entity id tagchange logged for that name.

azeier pushed a commit that referenced this pull request Oct 22, 2015
still need to find out what causes the id to not exist in the first place.
azeier pushed a commit that referenced this pull request Oct 22, 2015
a secret stolen from the player will now only show as one possible secret.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants