Skip to content

PutCounterAll: update cards with ValidCardsDesc#11148

Open
Hanmac wants to merge 2 commits into
masterfrom
validCardsDescCards
Open

PutCounterAll: update cards with ValidCardsDesc#11148
Hanmac wants to merge 2 commits into
masterfrom
validCardsDescCards

Conversation

@Hanmac

@Hanmac Hanmac commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

This adds ValidCardsDesc to PutCounterAll to make better StackDescription
(Spell and Activated Abilities)

@Hanmac Hanmac added the StackDesc Improvements to getStackDescription in effects label Jul 4, 2026
Comment thread forge-gui/res/cardsfolder/a/ajani_the_greathearted.txt
@Hanmac
Hanmac requested a review from tehdiplomat July 10, 2026 09:53
@Hanmac
Hanmac requested a review from tool4ever July 10, 2026 09:55
@tool4ever

Copy link
Copy Markdown
Contributor

a) I still think it's pointless teaching scripters to use something like ValidCardsDesc$ creature you control | ValidCardsDesc2$ other planeswalker you control instead of StackDescription$ SpellDescription for everything 👎

b) how many of these cards are actually dynamic?
the very few could also just use StackDescription$ REP X counters_{n:X}...

@Hanmac

Hanmac commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

a) I still think it's pointless teaching scripters to use something like ValidCardsDesc$ creature you control | ValidCardsDesc2$ other planeswalker you control instead of StackDescription$ SpellDescription for everything 👎

It's the same as using ValidTgtsDesc for the TargetDescription #8806

b) how many of these cards are actually dynamic?

You mean from the Valid Desc or from the Amount? For Amount, there are these examples:

  • Wild Onslaught for example does 1 or 2 counters
  • Vraska, Regal Gorgon does For each creature card in your graveyard

@tool4ever

Copy link
Copy Markdown
Contributor

It's the same as using ValidTgtsDesc for the TargetDescription #8806

But for target prompt we don't really have another script param we can just reuse...

You mean from the Valid Desc or from the Amount?

doesn't really matter, SpellAbilityEffect#tokenizeString can handle both

@Hanmac

Hanmac commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

But this is more ugly

StackDescription$ REP X counters_{n:X}

@tool4ever

Copy link
Copy Markdown
Contributor

well ok, then just use the special params for these cases?

@Hanmac

Hanmac commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

well ok, then just use the special params for these cases?

it is already used for this:

final StringBuilder sb = new StringBuilder();
final CounterType cType = CounterType.getType(sa.getParam("CounterType"));
final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParamOrDefault("CounterNum", "1"), sa);
final String zone = sa.getParamOrDefault("ValidZone", "Battlefield");
sb.append("Put ");
sb.append(Lang.nounWithNumeralExceptOne(amount, cType.getName().toLowerCase() + " counter"));
sb.append(" on each ");

@tehdiplomat

Copy link
Copy Markdown
Contributor

Yea i think I agree with the statement that this Desc field is kinda useless when StackDescription$ SpellDescription is cleaner. i.e. in cases where there's no variability. But i dont necessarily mind having the buildable description for those cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

StackDesc Improvements to getStackDescription in effects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants