-
Notifications
You must be signed in to change notification settings - Fork 782
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
[LTR] Add Goldberry, River-Daughter #10524
Conversation
[[Goldberry, River-Daughter]] [[Resourceful Defense]] |
Goldberry, River-Daughter - (Gatherer) (Scryfall) (EDHREC)
Resourceful Defense - (Gatherer) (Scryfall) (EDHREC)
|
I made a few changes to make the |
Also modified ResourcefulDefense to use new multi amount api
Default list will properly make sure to stay within individual maximums If a player is asked for a choice that isn't actually a choice because each choice's min and max are equal, instead the default response is immediately returned. This helps with situations like moving a counter off of Goldberry when she only has one counter on her.
Right now the dialog defaults to all 0s, but I've half a mind to change it so that it instead calls |
Curious, does this improvement help with either |
No both of those seem to be targeting issues. This is more for choosing amounts among multiple different types of counters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me. I'll ask @JayDi85 to take a look at it as well.
if (movedCounters) { | ||
controller.drawCards(1, source, game); | ||
} | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should return true? though probably doesn't matter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to be honest, I don't know what the return value for effects is supposed to signify. It's always seemed nonsensical to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure the return value signifies whether the effect actually happened.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the return value is only used for effects which are part of mana abilities and special actions. In which case it isn't really clear to me when effects like this one should or should not return false (does it even matter?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is an inner custom effect that nothing else will call, it does not matter. But the convention is as Grath describes, to return true
if something happens and false
if nothing happens. It can matter for common effects that have their apply()
method called within the apply()
method of another effect (either a subclass calling super, or just creating a new effect to use its logic) and trying to take action based on whether or not that effect succeeded. Of course, whenever attempting this it is important to double check that the logic will work as intended. Because it so often doesn't matter, there are lots of effects that don't adhere properly to the convention with no ill effects other than confusing developers.
I've added the card. I've played a few games with her and she looks fine, but I'm gonna add some tests for some unhappy paths.
Also I borrowed the counter choosing interface from Resourceful Defense, which has you go through a dialog for each type of counter on Goldberry and choose the amount for each individual one. But this is a bit clunky and only enforces the 1+ counter rule on the card by forcing you to move the last counter if you haven't moved anything else. So I'd like to vamp up the
player.getMultiAmmount
UI a bit to support this card.