demilich1 / metastone

Hearthstone simulator written in Java with full GUI support
GNU General Public License v2.0
132 stars 80 forks source link

Echoing Ooze / SummonCopySpell creates broken event triggers when the summon fails #345

Open doctorpangloss opened 7 years ago

doctorpangloss commented 7 years ago

SummonCopySpell should check if the summon was successful before adding all the triggers.

This causes Echoing Ooze's original copy to double up on all its triggers, because:

  1. Minion clone = template.clone creates two entities with the same IDs.
  2. The summon fails, because, e.g., you have 7 minions.
  3. The triggers are added anyway. Since the clone has the same ID as the original Echoing Ooze, the triggers are still successfully added even though they're not really following the rules.