Skip to content

[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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

balazskristof
Copy link
Contributor

@github-actions github-actions bot added the cards label May 15, 2025


// 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)
Copy link
Contributor

@Susucre Susucre May 15, 2025

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.

Copy link
Contributor

@Susucre Susucre May 15, 2025

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?

Copy link
Contributor

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.

Copy link
Contributor

@Jmlundeen Jmlundeen May 15, 2025

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)

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

@Jmlundeen Jmlundeen May 15, 2025

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

Copy link
Member

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).

Copy link
Member

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);

Copy link
Contributor

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?

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

Successfully merging this pull request may close these issues.

6 participants