peter1591 / hearthstone-ai

A Hearthstone AI based on Monte Carlo tree search and neural nets written in modern C++.
302 stars 49 forks source link

fix bug: minion enchantment listened to a event + become-of-a-minion #20

Closed peter1591 closed 7 years ago

peter1591 commented 7 years ago

the event listened by the enchantment should be registered after a new minion became a copy of the minion.

add a new test:

  1. minion: gain +1/+1 after turn end
  2. faceless manipulator: become the minion
  3. turn end
  4. check both gained +1/+1
peter1591 commented 7 years ago

Note: if this is implemented as an aura, then no bug exists

But remember, there are still some enchantments which listen to an event For example: when the minion attacks, draw a card

peter1591 commented 7 years ago

Fixed in commit: b2f0aac7