* Fixed Sacrific a creature text and filter handling.

This commit is contained in:
LevelX2 2018-03-17 18:58:18 +01:00
parent 66bd5294e8
commit 7d1af66162
160 changed files with 676 additions and 596 deletions

View file

@ -180,6 +180,14 @@ public final class StaticFilters {
static {
FILTER_CONTROLLED_CREATURE.setLockedFilter(true);
}
// Used for sacrifice targets that don't need the "you control" text
public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_CREATURE_SHORT_TEXT = new FilterControlledCreaturePermanent("a creature");
static {
FILTER_CONTROLLED_CREATURE_SHORT_TEXT.setLockedFilter(true);
}
public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_CREATURES = new FilterControlledCreaturePermanent("creatures you control");
static {
@ -219,6 +227,10 @@ public final class StaticFilters {
public static final FilterLandPermanent FILTER_LANDS_NONBASIC = FilterLandPermanent.nonbasicLands();
static {
FILTER_LANDS_NONBASIC.setLockedFilter(true);
}
public static final FilterBasicLandCard FILTER_BASIC_LAND_CARD = new FilterBasicLandCard();
static {

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.constants.Zone;
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
import mage.game.command.Emblem;
import mage.target.common.TargetControlledCreaturePermanent;
@ -45,7 +46,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
* @author spjspj
*/
public class ObNixilisOfTheBlackOathEmblem extends Emblem {
// You get an emblem with "{1}{B}, Sacrifice a creature: You gain X life and draw X cards, where X is the sacrificed creature's power."
public ObNixilisOfTheBlackOathEmblem() {
this.setName("Emblem Nixilis");
@ -53,7 +54,7 @@ public class ObNixilisOfTheBlackOathEmblem extends Emblem {
Effect effect = new GainLifeEffect(xValue);
effect.setText("You gain X life");
Ability ability = new SimpleActivatedAbility(Zone.COMMAND, effect, new ManaCostsImpl("{1}{B}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
effect = new DrawCardSourceControllerEffect(xValue);
effect.setText("and draw X cards, where X is the sacrificed creature's power");
ability.addEffect(effect);