-
Notifications
You must be signed in to change notification settings - Fork 816
[FIC] Implement Lifestream's Blessing #13635
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
base: master
Are you sure you want to change the base?
[FIC] Implement Lifestream's Blessing #13635
Conversation
|
||
|
||
// Draw X cards, where X is the greatest power among creatures you controlled as you cast this spell. If this spell was cast from exile, you gain twice X life. | ||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(GreatestPowerAmongControlledCreaturesValue.instance) |
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.
X needs to be frozen at time of cast. i.e. If you cast Giant Growth or your biggest creature gets removed in response, it should not change how many cards are drawn.
This is definitively something that already got resolved in the past, I'll search for an example of implementation.
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.
Uhm most of the examples I find are different as they have X alter targetting or damage distribution.
Maybe do something similar to [[Steer Clear]] or [[Lethal Exploit]], storing with a Watcher the greatest power at time of cast?
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 that's not true, it would matter for effects that care about X targets or distributing X damage, but here it just checks on resolution.
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 should be snapshot at the time of cast, not resolution. Monstrous Onslaught is similar and the rules notes
You divide the damage among the target creatures as you cast Monstrous Onslaught. Each target must be assigned at least 1 damage.
(2020-11-10)
The value of X is determined at the time you divide damage. It won't change later, even if the greatest power among creatures you control changes.
(2020-11-10)
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.
That's different as it's using the X value for targeting, whereas here it only checks on resolution. Here's a ruling for [[Intelligence Bobblehead]]:
The value of X is determined only once, as Intelligence Bobblehead’s last ability resolves.
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.
oh lol no I'm making fun of myself we're good
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.
Edit: ok I'm not sure anymore, should the list of creatures to look at be snapshotted at time of cast, or the greatest power among they on time of cast?
It should snapshot the greatest power, not list of creatures
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's auto-announce value. Instead watcher (also good solution btw) you can use CostAdjuster
and override prepareX
to calculate and set X value in the time of cast. See example with ImprintedManaValueXCostAdjuster
.
Also there are special LockedInDynamicValue
that can save calculation value, but I'm not sure about good usage (only one card support it).
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.
X value must be stored in cost or directly in getSourceCostsTagsMap
, so useful methods:
CardUtil.getSourceCostsTag(game, source, "X", 0)
Map<String, Object> tagsMap = CardUtil.getSourceCostsTagsMap(game, needObject.getSpellAbility());
tagsMap.put("X", 123);
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.
CostsTagsMap
is for values that get copied when the spell does, primarily for storing how costs were paid. Going by the ruling on [[Orator of Ojutai]], I think that copying this spell should mean the copy has X=0?
Implements Lifestream's Blessing