mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
Additional fixes for #7006
This commit is contained in:
parent
6a6a4d83b8
commit
746bed7068
6 changed files with 38 additions and 46 deletions
|
@ -14,12 +14,12 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -28,7 +28,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class AboshanCephalidEmperor extends CardImpl {
|
||||
|
||||
static final FilterControlledCreaturePermanent filter1 = new FilterControlledCreaturePermanent("untapped Cephalid you control");
|
||||
static final FilterControlledPermanent filter1 = new FilterControlledPermanent("untapped Cephalid you control");
|
||||
static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures without flying");
|
||||
|
||||
static {
|
||||
|
@ -45,7 +45,7 @@ public final class AboshanCephalidEmperor extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Tap an untapped Cephalid you control: Tap target permanent.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter1, true)));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapTargetCost(new TargetControlledPermanent(1, filter1)));
|
||||
ability.addTarget(new TargetPermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -14,19 +12,19 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class AmbushCommander extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.ELF, "an Elf");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.ELF, "an Elf");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("Forests you control");
|
||||
|
||||
static {
|
||||
|
@ -34,7 +32,7 @@ public final class AmbushCommander extends CardImpl {
|
|||
}
|
||||
|
||||
public AmbushCommander(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
this.subtype.add(SubType.ELF);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -50,7 +48,7 @@ public final class AmbushCommander extends CardImpl {
|
|||
// {1}{G}, Sacrifice an Elf: Target creature gets +3/+3 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(3, 3, Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{1}{G}"));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, filter)));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -16,11 +14,12 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author nomage
|
||||
*/
|
||||
public final class BladewingsThrall extends CardImpl {
|
||||
|
@ -28,7 +27,7 @@ public final class BladewingsThrall extends CardImpl {
|
|||
static final private String RULE = "{this} has flying as long as you control a Dragon";
|
||||
|
||||
public BladewingsThrall(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
|
||||
this.subtype.add(SubType.ZOMBIE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
@ -36,12 +35,12 @@ public final class BladewingsThrall extends CardImpl {
|
|||
// Bladewing's Thrall has flying as long as you control a Dragon.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent(SubType.DRAGON, "a Dragon")),
|
||||
new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(SubType.DRAGON, "a Dragon")),
|
||||
RULE)));
|
||||
|
||||
// When a Dragon enters the battlefield, you may return Bladewing's Thrall from your graveyard to the battlefield.
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToBattlefieldEffect(), new FilterCreaturePermanent(SubType.DRAGON, "a Dragon"), true));
|
||||
new ReturnSourceFromGraveyardToBattlefieldEffect(), new FilterPermanent(SubType.DRAGON, "a Dragon"), true));
|
||||
}
|
||||
|
||||
public BladewingsThrall(final BladewingsThrall card) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
@ -12,23 +10,25 @@ import mage.abilities.keyword.ReachAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AttackingPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public final class DwynenGiltLeafDaen extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.ELF, "attacking Elf you control");
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.ELF, "attacking Elf you control");
|
||||
|
||||
static {
|
||||
filter.add(AttackingPredicate.instance);
|
||||
}
|
||||
|
||||
public DwynenGiltLeafDaen(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
|
@ -37,10 +37,10 @@ public final class DwynenGiltLeafDaen extends CardImpl {
|
|||
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
|
||||
// Other Elf creatures you control get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, new FilterCreaturePermanent(SubType.ELF, "Elf creatures"), true)));
|
||||
|
||||
|
||||
// Whenever Dwynen, Gilt-Leaf Daen attacks, you gain 1 life for each attacking Elf you control.
|
||||
this.addAbility(new AttacksTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)), false));
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import mage.ConditionalMana;
|
||||
|
@ -21,20 +20,19 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.AttackingPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class GnarlrootTrapper extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("attacking ELf you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("attacking ELf you control");
|
||||
|
||||
static {
|
||||
filter.add(AttackingPredicate.instance);
|
||||
|
@ -42,7 +40,7 @@ public final class GnarlrootTrapper extends CardImpl {
|
|||
}
|
||||
|
||||
public GnarlrootTrapper(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.DRUID);
|
||||
this.power = new MageInt(1);
|
||||
|
@ -57,7 +55,7 @@ public final class GnarlrootTrapper extends CardImpl {
|
|||
Effect effect = new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("Target attacking Elf you control gains deathtouch until end of turn. <i>(Any amount of damage it deals to a creature is enough to destroy it.)</i>");
|
||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetControlledPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
@ -91,10 +89,8 @@ class GnarlrootTrapperManaCondition extends CreatureCastManaCondition {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
if (super.apply(game, source)) {
|
||||
MageObject object = game.getObject(source.getSourceId());
|
||||
if (object != null && object.hasSubtype(SubType.ELF, game)
|
||||
&& object.isCreature()) {
|
||||
return true;
|
||||
}
|
||||
return object != null && object.hasSubtype(SubType.ELF, game)
|
||||
&& object.isCreature();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.w;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
|
||||
|
@ -12,24 +10,25 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jonubuu
|
||||
*/
|
||||
public final class WirewoodSymbiote extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Elf");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Elf");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ELF.getPredicate());
|
||||
}
|
||||
|
||||
public WirewoodSymbiote(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||
this.subtype.add(SubType.INSECT);
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
|
Loading…
Reference in a new issue