demilich1 / metastone

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

PutMinionOnBoardSpell #370

Open percy896 opened 7 years ago

percy896 commented 7 years ago

Hi there, I can't seem to get PutMinionOnBoardSpell working with SpecificCardFilter. Here is the code:

"battlecry": {
        "targetSelection": "NONE",
        "spell": {
            "class": "PutMinionOnBoardSpell",
            "value": 2,
            "targetPlayer": "SELF",
            "cardLocation": "DECK",
            "cardFilter": {
                "class": "SpecificCardFilter",
                "card": "minion_imp"
            }
        }
    },

Metastone doesn't say there's an error with the card, but when the card is played, it doesn't summon 2 Imps from my deck like it's supposed to. Thoughts?

Thank you!

Muhframos commented 7 years ago
 "battlecry": {
    "spell": {
            "class": "PutRandomMinionOnBoardSpell",
            "targetPlayer": "SELF",
            "value": 2,
            "cardLocation": "DECK",
            "cardFilter": {
            "class": "SpecificCardFilter",
            "cardId": "minion_imp"
        }
        }
    },
    "attributes": {
        "BATTLECRY": true
    },

Try this one.

percy896 commented 7 years ago

Thank you! So I guess "cardId" has to be there instead of "card", and also "PutRandomMinionOnBoardSpell" is the only one that works, instead of "PutMinionOnBoardSpell". Just trying to understand why this worked and mine didn't.

Thanks again!