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

Yawgmoth Demon not working #1918

Closed
fenhl opened this issue Apr 30, 2016 · 6 comments
Closed

Yawgmoth Demon not working #1918

fenhl opened this issue Apr 30, 2016 · 6 comments
Assignees
Labels
bug Bugs and errors

Comments

@fenhl
Copy link
Member

fenhl commented Apr 30, 2016

Yawgmoth Demon's upkeep ability doesn't do anything, at least if you control no artifacts.

@drmDev drmDev added the bug Bugs and errors label Apr 30, 2016
LevelX2 added a commit that referenced this issue May 1, 2016
@LevelX2
Copy link
Contributor

LevelX2 commented May 1, 2016

Sorry adidn't check the Assignee .

@LevelX2 LevelX2 closed this as completed May 1, 2016
@Marco-Marin
Copy link
Member

Marco-Marin commented May 1, 2016

Thanks LevelX2, but I'm confused by this fix.
the "sacrificed = true" is inside the if where I check whether no artifact exists for sacrifice ( <1) or if the player chooses not to (!chooseUse).
How does this work?

@LevelX2
Copy link
Contributor

LevelX2 commented May 3, 2016

Hmm, the boolean is set to false on init and only set to true, if an artifact was sacrificed.
So it seems very straight forward to me.
So the effect happens if you can't sacrifice or if you don't liek to sacrifice.

Where do you see a problem?

@fenhl
Copy link
Member Author

fenhl commented May 3, 2016

I have tested this on master and it's still not working. If I control an artifact and answer “yes”, Yawgmoth Demon becomes tapped and deals damage. If I answer “no”, I have to choose an artifact to sacrifice.

@fenhl fenhl reopened this May 3, 2016
@fenhl fenhl closed this as completed in 091bd62 May 3, 2016
@Marco-Marin
Copy link
Member

Where do you see a problem?

the if I coded was checking if there were no artifacts (<1), so it wouldn't be possible to sacrifice any (inside the if), but the boolean was inside the if.

Here is how I thought about it originally:

Count how many artifacts, if there isn't any, the IF would be true (short-circuit the choice) and damage would be caused.

Anyways, yours solution plus Fenhl last tweak basically inverted that IF (meaning, you guys coded the "else" clause from before inside the if, and "my" if now is the else clause.. in case you wanna remove the boolean altogether :)).

What I believe was happening was the call to:
"SacrificeControllerEffect(new FilterArtifactPermanent(), 1, "").apply(game, source))"

.. was always returning false, since the choice was short-circuited by having no artifacts to choose from (so there was nothing to sacrifice or filter).

Then the other IF(where the damage was applied), never got a change to happen.

It seems correct now tho : ) thanks guys.

@LevelX2
Copy link
Contributor

LevelX2 commented May 4, 2016

Yep, logical change. Sometimes your routine-blinded.
Thanks for fixing it.

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

No branches or pull requests

4 participants