jleclanche / fireplace

A Hearthstone simulator in Python
https://hearthsim.info
GNU Affero General Public License v3.0
673 stars 150 forks source link

When the card is discarded, it will enter the Zone.GRAVEYARD #462

Closed shinoi2 closed 10 months ago

shinoi2 commented 6 years ago

when a card is milled, it should move to Zone.REMOVEDFROMGAME or Zone.SETASIDE when a card is discarded, "Cruel Dinomancer"(UNG_830) need a way to select them.

tonyyyye commented 6 years ago

Yes I think you are right. The GRAVEYARD should store and only store all the DEAD minion, or the Resurrect BRM_017 will have a wrong choice range.

I tested with EX1_306 which justified my guess.

now the discard() is working in card.py

  1. log()
  2. set tags -> DISCARDED
  3. set Zone -> GRAVEYARD

so if a card is discarded, it has tags(or method called) like wisp.discarded() which has a True value.

jleclanche commented 6 years ago

The problem is there is no such thing as the DISCARD zone, that was something I added later on. Hearthstone tracks a graveyard zone separately... we don't mimick that at this time. I dunno what to do about it.

tonyyyye commented 6 years ago

luckily we had preserved game.current_player.discarded. Maybe from this we can do something about it. When discarded, append this card to game.current_player.discarded[], or select/filter the ones that has method of discarded().

Also, if the mechanism 'discarded card always goes into graveyard' does not change, the Resurrect and its related cards needs modification.