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

[DSK] Implement Acrobatic Cheerleader #13232

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

markort147
Copy link
Contributor

Part of #12534

I have tested the functionality of Acrobatic Cheerleader and other per-turn limited triggered abilities by directly running the Game server and client.

Since this update involves modifications to the TriggeredAbility feature, please let me know if you think additional or more in-depth testing is necessary.

@tiera3
Copy link
Contributor

tiera3 commented Jan 14, 2025

You need to change the name of the PR [DSK] not [DKS].

@Grath
Copy link
Contributor

Grath commented Jan 15, 2025

I mean, it's nice to spell correctly, but nothing actually relies on the names of pull requests.

@Grath Grath changed the title [DKS] Implement Acrobatic Cheerleader [DSK] Implement Acrobatic Cheerleader Jan 15, 2025
Copy link
Member

@JayDi85 JayDi85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s fine with new triggers code modification. If you can write simple unit test to check a working and disabled trigger/counters by a game limit then it will be good.

}
String keyAlreadyTriggered = getKeyAlreadyTriggered(game);
Boolean alreadyTriggered = (Boolean) game.getState().getValue(keyAlreadyTriggered);
if (alreadyTriggered != null && alreadyTriggered.equals(Boolean.TRUE)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need in boolean param at all (save and load). Just use count param > 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I'll optimize.

@@ -71,6 +71,7 @@ public void trigger(Game game, UUID controllerId, GameEvent triggeringEvent) {
//20091005 - 603.4
if (checkInterveningIfClause(game)) {
setLastTrigger(game);
updateTriggerCount(game);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use same naming for both stats methods like:

  • setLastTrigger: updateTurnCounts
  • updateTriggerCount: updateGameCounts


// Survival -- At the beginning of your second main phase, if Acrobatic Cheerleader is tapped, put a flying counter on it. This ability triggers only once.
TriggeredAbility ability = new SurvivalAbility(new AddCountersSourceEffect(CounterType.FLYING.createInstance()))
.setTriggersLimitEachGame(1)
Copy link
Member

@JayDi85 JayDi85 Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW you can improve UX by auto-adding default card hints to the ability (one for turn limit, one for game limit). It can help to show limit info and close #12680. See lands card hint example (it allow to show hints for limited abilities only, not for all): a5c354f

Maybe improved here or by another PR.

Copy link
Member

@JayDi85 JayDi85 Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are possible multiple/diff triggers per card (see #12300), so card hint must contain simple info about related ability (cause hints goes after all abilities and must be unique by design). Example:

  • [good/bad icon] Can trigger more times that turn (1 of 2, [some part of the ability text like CardUtil.substring(this, 50, …) + this.getoriginalid().tostring().substring(1,3)])

Copy link
Contributor Author

@markort147 markort147 Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW you can improve UX by auto-adding default card hints to the ability (one for turn limit, one for game limit). It can help to show limit info and close #12680. See lands card hint example (it allow to show hints for limited abilities only, not for all): a5c354f

Maybe improved here or by another PR.

Maybe I can work on it by another PR linked to that issue. What do you think?

@markort147
Copy link
Contributor Author

I'm writing some unit tests.

@github-actions github-actions bot added the tests label Jan 15, 2025
@markort147
Copy link
Contributor Author

The Travis CI build fails because of this error: "Error: (rarity) mismatched. MtgJson has Common while set file has Uncommon for DSC - Falkenrath Noble - 140". It has not been introduced by this PR.

@JayDi85 JayDi85 merged commit b58fbbd into magefree:master Jan 15, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants