demilich1 / metastone

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

ChangeHeroPowerSpell doesn't work if used in a Hero Power. #354

Closed Watermelon86 closed 6 years ago

Watermelon86 commented 7 years ago

{ "name": "Frostwolf Primalist", "baseManaCost": 2, "type": "MINION", "baseAttack": 2, "baseHp": 3, "heroClass": "SHAMAN", "rarity": "RARE", "description": "Battlecry: The next time you use your Hero Power, you can choose what Totem it summons.", "battlecry": { "spell": { "class": "ChangeHeroPowerSpell", "targetPlayer": "SELF", "card": "hero_power_primal_call" } }, "attributes": { "BATTLECRY": true }, "collectible": true, "set": "CUSTOM", "fileFormatVersion": 1 }

{ "name": "Primal Call", "baseManaCost": 2, "type": "HERO_POWER", "heroClass": "SHAMAN", "rarity": "FREE", "description": "Summon a Totem of your choice.", "targetSelection": "NONE", "options": [ "spell_summon_searing_totem", "spell_summon_healing_totem", "spell_summon_wrath_of_air_totem", "spell_summon_stoneclaw_totem" ], "condition": { "class": "MinionCountCondition", "operation": "LESS", "value": 7 }, "spell": { "class": "ChangeHeroPowerSpell", "targetPlayer": "SELF", "card": "hero_power_totemic_call" }, "collectible": false, "set": "CUSTOM", "fileFormatVersion": 1 }

I tried to make a custom card for Shaman that lets you pick what totem your Hero Power summons the next time you use it. The minion worked, but part of the hero power doesn't. I used the Justicar Hero Power "Totemic Slam" for a base. It will let you choose what totem you summon like the justicar one does, but it won't change the hero power back to Totemic Call after.

Is there any work around for this? did i do something wrong?

PS: I'd also like to add a filter to the minion that only makes the Hero Power change if you have Totemic Call as your hero power.

webadict commented 7 years ago

You are using a ChooseOneHeroPower incorrectly. You cannot use the spell inside of it. Instead it will only use the options given to it, and ignore the spell key. That can be an enhancement later on, though.

Watermelon86 commented 7 years ago

Would it work if I put ChangeHeroPowerSpell in each of the summon totem spells?

webadict commented 7 years ago

That should work.

webadict commented 6 years ago

Closing, as this appears to be resolved.