Refactor duplicated enchanted counter removal effect - #15913
Open
Karthikeyan010 wants to merge 2 commits into
Open
Refactor duplicated enchanted counter removal effect#15913Karthikeyan010 wants to merge 2 commits into
Karthikeyan010 wants to merge 2 commits into
Conversation
muz
reviewed
Aug 9, 2026
muz
left a comment
Contributor
There was a problem hiding this comment.
Couple of minor changes to do, but thank you for the contribution!
| // When this Aura enters, tap enchanted creature and remove all counters from it. | ||
| Ability ability = new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()); | ||
| ability.addEffect(new EnchantedRiversGraspEffect()); | ||
| ability.addEffect(new RemoveAllCountersEnchantedEffect().setText("and remove all counters from it")); |
Contributor
There was a problem hiding this comment.
Suggested change
| ability.addEffect(new RemoveAllCountersEnchantedEffect().setText("and remove all counters from it")); | |
| ability.addEffect(new RemoveAllCountersEnchantedEffect().concatBy("and")); |
The effect has the correct rules text in it, it just needs appending with the correct string.
| // When this Aura enters, tap enchanted creature and remove all counters from it. | ||
| Ability ability = new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()); | ||
| ability.addEffect(new HonestWorkCountersEffect()); | ||
| ability.addEffect(new RemoveAllCountersEnchantedEffect().setText("and remove all counters from it")); |
| public class RemoveAllCountersEnchantedEffect extends OneShotEffect { | ||
| public RemoveAllCountersEnchantedEffect() { | ||
| super(Outcome.Benefit); | ||
| staticText ="remove all counters from it"; |
Contributor
There was a problem hiding this comment.
Suggested change
| staticText ="remove all counters from it"; | |
| staticText = "remove all counters from it"; |
Nit
muz
reviewed
Aug 9, 2026
|
|
||
| } | ||
|
|
||
| @override |
Contributor
There was a problem hiding this comment.
Suggested change
| @override | |
| @Override |
Your PR doesn't successfully compile currently, and this is being caught by CI.
Author
|
Thanks for the review! I've addressed the requested changes and pushed the updates. The project now compiles successfully locally with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extracts the duplicated logic for removing all counters from an enchanted permanent into a reusable
RemoveAllCountersEnchantedEffect.Updates:
EnchantedRiversGraspHonestWorkBoth cards now use the shared effect instead of maintaining separate
OneShotEffectimplementations.Closes #15901
Testing
mvn -pl Mage.Sets -am -DskipTests clean compilegit diff --cached --checkcompleted without errors.