fix Ezuri, Renegade Leader

This commit is contained in:
xenohedron 2024-06-13 00:26:51 -04:00
parent 918d3b1acb
commit f2b2c95e4a

View file

@ -1,7 +1,5 @@
package mage.cards.e;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -13,11 +11,12 @@ import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
@ -25,14 +24,12 @@ import mage.target.common.TargetControlledCreaturePermanent;
*/
public final class EzuriRenegadeLeader extends CardImpl {
private static final FilterCreaturePermanent elfFilter = new FilterCreaturePermanent("Elf creatures");
private static final FilterControlledCreaturePermanent notEzuri = new FilterControlledCreaturePermanent();
private static final FilterCreaturePermanent elfFilter = new FilterCreaturePermanent(SubType.ELF, "Elf creatures");
private static final FilterPermanent anotherFilter = new FilterPermanent("another target Elf");
static {
elfFilter.add(SubType.ELF.getPredicate());
notEzuri.add(SubType.ELF.getPredicate());
notEzuri.add(Predicates.not(new NamePredicate("Ezuri, Renegade Leader")));
anotherFilter.add(SubType.ELF.getPredicate());
anotherFilter.add(AnotherPredicate.instance);
}
public EzuriRenegadeLeader(UUID ownerId, CardSetInfo setInfo) {
@ -44,16 +41,18 @@ public final class EzuriRenegadeLeader extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// {G}: Regenerate another target Elf.
Ability ezuriRegen = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new ManaCostsImpl<>("{G}"));
TargetControlledCreaturePermanent regenTarget = new TargetControlledCreaturePermanent(1, 1, notEzuri, false);
regenTarget.setTargetName("another target Elf");
ezuriRegen.addTarget(regenTarget);
ezuriRegen.addTarget(new TargetPermanent(anotherFilter));
this.addAbility(ezuriRegen);
// {2}{G}{G}{G}: Elf creatures you control get +3/+3 and gain trample until end of turn.
Ability ezuriBoost = new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BoostControlledEffect(3, 3, Duration.EndOfTurn, elfFilter, false),
new BoostControlledEffect(3, 3, Duration.EndOfTurn, elfFilter, false)
.setText("Elf creatures you control get +3/+3"),
new ManaCostsImpl<>("{2}{G}{G}{G}"));
ezuriBoost.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, elfFilter));
ezuriBoost.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, elfFilter)
.setText("and gain trample until end of turn"));
this.addAbility(ezuriBoost);
}