mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[SNC] Fix for Roccoo Cabaretti Caterer (#8931)
This commit is contained in:
commit
6f5ec6e9bd
1 changed files with 10 additions and 4 deletions
|
@ -44,11 +44,14 @@ public final class RoccoCabarettiCaterer extends CardImpl {
|
|||
// When Rocco, Cabaretti Caterer enters the battlefield, if you cast it, you may search your library for a creature card with mana value X or less, put it onto the battlefield, then shuffle.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(
|
||||
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)), true
|
||||
), CastFromEverywhereSourceCondition.instance, "When {this} enters the battlefield, " +
|
||||
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)),
|
||||
true
|
||||
),
|
||||
CastFromEverywhereSourceCondition.instance,
|
||||
"When {this} enters the battlefield, " +
|
||||
"if you cast it, you may search your library for a creature card with mana value X or less, " +
|
||||
"put it onto the battlefield, then shuffle."
|
||||
));
|
||||
"put it onto the battlefield, then shuffle.")
|
||||
);
|
||||
}
|
||||
|
||||
private RoccoCabarettiCaterer(final RoccoCabarettiCaterer card) {
|
||||
|
@ -66,6 +69,9 @@ enum RoccoCabarettiCatererPredicate implements ObjectSourcePlayerPredicate<Card>
|
|||
|
||||
@Override
|
||||
public boolean apply(ObjectSourcePlayer<Card> input, Game game) {
|
||||
if (input.getSource() == null) {
|
||||
return false;
|
||||
}
|
||||
return input.getObject().getManaValue()
|
||||
<= ManacostVariableValue.ETB.calculate(game, input.getSource(), null);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue