hearthbreaker icon indicating copy to clipboard operation
hearthbreaker copied to clipboard

can_use Not Matching Requirements

Open randomflyingtaco opened this issue 10 years ago • 5 comments

Currently, spells that summon minions don't have def can_use(self, player, game): return super().can_use(player, game) and len(game.current_player.minions) < 7

You don't need enemy minions to use AoE Starfall, you don't need any friendly minions to use Savage Roar, and apparently don't need any minions on board to use Equality.

I am bringing this up because I based Dark Wispers off of Starfall since it has an untargeted and a targeted option, but I keep running into an "AttributeError: 'NoneType' object has no attribute 'change_attack'" when I try to use the buff from Dark Wispers.

Edit: Apparently, I also broke every spare part?

randomflyingtaco avatar Feb 04 '15 09:02 randomflyingtaco

I believe that you can cast Feral Spirit, etc even if you don't have space on the board for them; they just won't have any effect. As discussed, you can play equality etc on an empty board as well. In terms of Dark Wispers, I don't know what the issue might be.

danielyule avatar Feb 04 '15 19:02 danielyule

I tried with both Mirror Image and the Panther option of Power of the Wild and neither one could be cast with a full board. You can cast Feral Spirits/Mirror Image/Dark Wispers with only 6 minions but not 7 afaik.

randomflyingtaco avatar Feb 04 '15 20:02 randomflyingtaco

Before I close the issue (Cabal still remains), with the new setup for Choice cards, does the main card need a can_use that is an "or" of the subcards' requirements or is just having the requirements on the subcards sufficient?

randomflyingtaco avatar Feb 13 '15 17:02 randomflyingtaco

I think that for most of the one of cards, the requirements are already taken care of. I think for any subcards which have different requirements, at least one can always go. For battlecries, it doesn't matter if they can go or not, since you can always play a minion.

danielyule avatar Feb 14 '15 00:02 danielyule

But that's the thing. Afaik you cannot play Cabal if there is a target for its battlecry but no space for the extra minion, there is an extra requirement put in to cover that case specifically. I do not own the card to test this but I trust Fireplace's source files and posts like this http://www.reddit.com/r/hearthstone/comments/2q9e4x/can_someone_explain_to_me_why_i_cant_play_the/ You are right that most "Choose One" cards will always have a valid option assuming the main card has a targeting function. The main exception I can think of is if all minions on the board are untargetable by spells (Faerie Dragon/Spectral Knight/Wee Spellstopper) and your side is full of minions, meaning you can use neither subcard of Dark Wispers.

randomflyingtaco avatar Feb 15 '15 16:02 randomflyingtaco