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

[BLB] Implement Clement, the Worrywort #13444

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

earchip94
Copy link

Implemented Clement, the Worrywort as well as some basic unit tests for him.

return false;
}

TargetCreaturePermanent target = new TargetCreaturePermanent(0, 1, bounceCreature, false);
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks incorrect, as declaring the target in the apply effect means it only gets chosen on resolution.

You need to extend the trigger class to add the proper target at the end of checkTrigger.

In which case you shouldn't need a custom effect here at all, just common ReturnToHandTargetEffect with setText

}

@Override
public OneShotEffect copy() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, the type of this method should be ClementWorrywortEffect ("covariant return")

"a creature you control with mana value " + permanent.getManaValue() + " or less"
);
// Can only bounce your creatures
bounceCreature.add(TargetController.YOU.getControllerPredicate());
Copy link
Contributor

Choose a reason for hiding this comment

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

fwiw FilterControlledCreaturePermanent is an option to simplify

this.addAbility(VigilanceAbility.getInstance());

// Whenever Clement, the Worrywort or another creature you control enters, return up to one target creature you control with lesser mana value to its owner's hand.
this.addAbility(new EntersBattlefieldThisOrAnotherTriggeredAbility(new ClementWorrywortEffect(), new FilterCreaturePermanent(), false, true));
Copy link
Contributor

Choose a reason for hiding this comment

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

can use StaticFilters.FILTER_PERMANENT_CREATURE

this.addAbility(new SimpleStaticAbility(
new GainAbilityControlledEffect(gMana, Duration.WhileOnBattlefield, frogFilter, false)
));
this.addAbility(new SimpleStaticAbility(
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't make two SimpleStaticAbility, instead add both GainAbilityControlledEffect to one SimpleStaticAbility.

(to get the text right on the card, you'll need to awkwardly override both effect text and split it between them. it's fine for the granted abilities to appear as two separate, that can't be helped the way mana abilities work in xmage)

castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, frog);
setChoice(playerA, "Spore Frog");

setStopAt(1, PhaseStep.BEGIN_COMBAT);
Copy link
Contributor

Choose a reason for hiding this comment

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

setStrictChooseMode before execute for all new tests
if you need it set false, then add comment to explain why

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.

2 participants