Champion bug fixes

This commit is contained in:
drmDev 2016-04-11 17:06:14 -04:00
parent 57a992649e
commit f2d5462c97
13 changed files with 21 additions and 15 deletions

View file

@ -61,7 +61,7 @@ public class BoggartMob extends CardImpl {
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
// Champion a Goblin // Champion a Goblin
this.addAbility(new ChampionAbility(this, "Goblin")); this.addAbility(new ChampionAbility(this, "Goblin", false));
// Whenever a Goblin you control deals combat damage to a player, you may put a 1/1 black Goblin Rogue creature token onto the battlefield. // Whenever a Goblin you control deals combat damage to a player, you may put a 1/1 black Goblin Rogue creature token onto the battlefield.
this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility( this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(

View file

@ -56,7 +56,7 @@ public class ChangelingBerserker extends CardImpl {
this.addAbility(HasteAbility.getInstance()); this.addAbility(HasteAbility.getInstance());
// Champion a creature // Champion a creature
this.addAbility(new ChampionAbility(this, "")); this.addAbility(new ChampionAbility(this, "", true));
} }
public ChangelingBerserker(final ChangelingBerserker card) { public ChangelingBerserker(final ChangelingBerserker card) {

View file

@ -53,7 +53,7 @@ public class ChangelingHero extends CardImpl {
this.addAbility(ChangelingAbility.getInstance()); this.addAbility(ChangelingAbility.getInstance());
// Champion a creature // Champion a creature
this.addAbility(new ChampionAbility(this, "")); this.addAbility(new ChampionAbility(this, "", true));
// Lifelink // Lifelink
this.addAbility(LifelinkAbility.getInstance()); this.addAbility(LifelinkAbility.getInstance());

View file

@ -52,7 +52,7 @@ public class ChangelingTitan extends CardImpl {
this.addAbility(ChangelingAbility.getInstance()); this.addAbility(ChangelingAbility.getInstance());
// Champion a creature // Champion a creature
this.addAbility(new ChampionAbility(this, "")); this.addAbility(new ChampionAbility(this, "", true));
} }
public ChangelingTitan(final ChangelingTitan card) { public ChangelingTitan(final ChangelingTitan card) {

View file

@ -64,7 +64,7 @@ public class MistbindClique extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Champion a Faerie // Champion a Faerie
this.addAbility(new ChampionAbility(this, "Faerie")); this.addAbility(new ChampionAbility(this, "Faerie", false));
// When a Faerie is championed with Mistbind Clique, tap all lands target player controls. // When a Faerie is championed with Mistbind Clique, tap all lands target player controls.
this.addAbility(new MistbindCliqueAbility()); this.addAbility(new MistbindCliqueAbility());

View file

@ -53,7 +53,7 @@ public class NovaChaser extends CardImpl {
this.addAbility(TrampleAbility.getInstance()); this.addAbility(TrampleAbility.getInstance());
// Champion an Elemental // Champion an Elemental
this.addAbility(new ChampionAbility(this, "Elemental")); this.addAbility(new ChampionAbility(this, "Elemental", false));
} }
public NovaChaser(final NovaChaser card) { public NovaChaser(final NovaChaser card) {

View file

@ -60,7 +60,7 @@ public class ThoughtweftTrio extends CardImpl {
this.addAbility(VigilanceAbility.getInstance()); this.addAbility(VigilanceAbility.getInstance());
// Champion a Kithkin // Champion a Kithkin
this.addAbility(new ChampionAbility(this, "Kithkin")); this.addAbility(new ChampionAbility(this, "Kithkin", false));
// Thoughtweft Trio can block any number of creatures. // Thoughtweft Trio can block any number of creatures.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(0))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureEffect(0)));

View file

@ -63,7 +63,7 @@ public class WanderwineProphets extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// Champion a Merfolk // Champion a Merfolk
this.addAbility(new ChampionAbility(this, "Merfolk")); this.addAbility(new ChampionAbility(this, "Merfolk", false));
// Whenever Wanderwine Prophets deals combat damage to a player, you may sacrifice a Merfolk. If you do, take an extra turn after this one. // Whenever Wanderwine Prophets deals combat damage to a player, you may sacrifice a Merfolk. If you do, take an extra turn after this one.
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new AddExtraTurnControllerEffect(), true); Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new AddExtraTurnControllerEffect(), true);
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true))); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true)));

View file

@ -70,7 +70,7 @@ public class WrensRunPackmaster extends CardImpl {
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
// Champion an Elf // Champion an Elf
this.addAbility(new ChampionAbility(this, "Elf")); this.addAbility(new ChampionAbility(this, "Elf", false));
// {2}{G}: Put a 2/2 green Wolf creature token onto the battlefield. // {2}{G}: Put a 2/2 green Wolf creature token onto the battlefield.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new WolfToken("LRW")), new ManaCostsImpl<>("{2}{G}"))); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new WolfToken("LRW")), new ManaCostsImpl<>("{2}{G}")));

View file

@ -55,7 +55,7 @@ public class LightningCrafter extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Champion a Goblin or Shaman // Champion a Goblin or Shaman
this.addAbility(new ChampionAbility(this, new String[]{"Goblin", "Shaman"})); this.addAbility(new ChampionAbility(this, new String[]{"Goblin", "Shaman"}, false));
// {T}: Lightning Crafter deals 3 damage to target creature or player. // {T}: Lightning Crafter deals 3 damage to target creature or player.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost());

View file

@ -60,7 +60,7 @@ public class SupremeExemplar extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Champion an Elemental // Champion an Elemental
this.addAbility(new ChampionAbility(this, "Elemental")); this.addAbility(new ChampionAbility(this, "Elemental", false));
} }
public SupremeExemplar(final SupremeExemplar card) { public SupremeExemplar(final SupremeExemplar card) {

View file

@ -68,7 +68,7 @@ public class UnstoppableAsh extends CardImpl {
this.addAbility(TrampleAbility.getInstance()); this.addAbility(TrampleAbility.getInstance());
// Champion a Treefolk or Warrior // Champion a Treefolk or Warrior
this.addAbility(new ChampionAbility(this, new String[]{"Treefolk", "Warrior"})); this.addAbility(new ChampionAbility(this, new String[]{"Treefolk", "Warrior"}, false));
// Whenever a creature you control becomes blocked, it gets +0/+5 until end of turn. // Whenever a creature you control becomes blocked, it gets +0/+5 until end of turn.
Effect effect = new BoostTargetEffect(0, 5, Duration.EndOfTurn); Effect effect = new BoostTargetEffect(0, 5, Duration.EndOfTurn);

View file

@ -39,11 +39,13 @@ import mage.abilities.costs.CostImpl;
import mage.abilities.effects.common.ReturnFromExileForSourceEffect; import mage.abilities.effects.common.ReturnFromExileForSourceEffect;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicate; import mage.filter.predicate.Predicate;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game; import mage.game.Game;
@ -74,8 +76,8 @@ public class ChampionAbility extends StaticAbility {
protected String[] subtypes; protected String[] subtypes;
protected String objectDescription; protected String objectDescription;
public ChampionAbility(Card card, String subtype) { public ChampionAbility(Card card, String subtype, boolean requiresCreature) {
this(card, new String[]{subtype}); this(card, new String[]{subtype}, requiresCreature);
} }
/** /**
@ -85,8 +87,9 @@ public class ChampionAbility extends StaticAbility {
* @param card * @param card
* @param subtypes subtypes to champion with, if empty all creatures can be * @param subtypes subtypes to champion with, if empty all creatures can be
* used * used
* @param requiresCreature for cards that specifically require championing another creature
*/ */
public ChampionAbility(Card card, String[] subtypes) { public ChampionAbility(Card card, String[] subtypes, boolean requiresCreature) {
super(Zone.BATTLEFIELD, null); super(Zone.BATTLEFIELD, null);
this.subtypes = subtypes; this.subtypes = subtypes;
@ -111,6 +114,9 @@ public class ChampionAbility extends StaticAbility {
if (!subtypesPredicates.isEmpty()) { if (!subtypesPredicates.isEmpty()) {
filter.add(Predicates.or(subtypesPredicates)); filter.add(Predicates.or(subtypesPredicates));
} }
if (requiresCreature) {
filter.add(new CardTypePredicate(CardType.CREATURE));
}
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
// When this permanent enters the battlefield, sacrifice it unless you exile another [object] you control. // When this permanent enters the battlefield, sacrifice it unless you exile another [object] you control.