-
Notifications
You must be signed in to change notification settings - Fork 799
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
base: master
Are you sure you want to change the base?
Conversation
return false; | ||
} | ||
|
||
TargetCreaturePermanent target = new TargetCreaturePermanent(0, 1, bounceCreature, false); |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
Implemented Clement, the Worrywort as well as some basic unit tests for him.