Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can_use Not Matching Requirements #89

Open
randomflyingtaco opened this issue Feb 4, 2015 · 5 comments
Open

can_use Not Matching Requirements #89

randomflyingtaco opened this issue Feb 4, 2015 · 5 comments

Comments

@randomflyingtaco
Copy link
Collaborator

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?

@danielyule
Copy link
Owner

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.

@randomflyingtaco
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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?

@danielyule
Copy link
Owner

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.

@randomflyingtaco
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants