[AKH] Fixed black cards tooltips

This commit is contained in:
Styxo 2017-04-16 17:14:48 +02:00
parent ee9613fa49
commit d4e2b6f306
8 changed files with 21 additions and 120 deletions

View file

@ -61,7 +61,7 @@ import mage.watchers.common.CreaturesDiedWatcher;
*/
public class BontuTheGlorified extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
private static final FilterControlledPermanent filter = new FilterControlledPermanent("another creature");
static {
filter.add(new AnotherPredicate());

View file

@ -47,7 +47,7 @@ public class Decompose extends CardImpl {
// Exile up to three target cards from a single graveyard.
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards")));
this.getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards from a single graveyard")));
}
public Decompose(final Decompose card) {

View file

@ -29,22 +29,18 @@ package mage.cards.f;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardSourceCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.target.common.TargetCardInGraveyard;
import java.util.UUID;
import mage.abilities.effects.common.ExileTargetEffect;
/**
*
@ -53,7 +49,7 @@ import java.util.UUID;
public class FaerieMacabre extends CardImpl {
public FaerieMacabre(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.subtype.add("Faerie");
this.subtype.add("Rogue");
@ -63,7 +59,7 @@ public class FaerieMacabre extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Discard Faerie Macabre: Exile up to two target cards from graveyards.
Ability ability = new SimpleActivatedAbility(Zone.HAND, new FaerieMacabreExileTargetEffect(), new DiscardSourceCost());
Ability ability = new SimpleActivatedAbility(Zone.HAND, new ExileTargetEffect(), new DiscardSourceCost());
ability.addTarget(new TargetCardInGraveyard(0, 2, new FilterCard("cards from graveyards")));
this.addAbility(ability);
}
@ -77,35 +73,3 @@ public class FaerieMacabre extends CardImpl {
return new FaerieMacabre(this);
}
}
class FaerieMacabreExileTargetEffect extends OneShotEffect {
public FaerieMacabreExileTargetEffect() {
super(Outcome.Exile);
}
public FaerieMacabreExileTargetEffect(final FaerieMacabreExileTargetEffect effect) {
super(effect);
}
@Override
public FaerieMacabreExileTargetEffect copy() {
return new FaerieMacabreExileTargetEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for(UUID uuid : source.getTargets().get(0).getTargets()){
Card card = game.getCard(uuid);
if (card != null) {
card.moveToExile(null, "Faerie Macabre", source.getSourceId(), game);
}
}
return true;
}
@Override
public String getText(Mode mode) {
return "Exile up to two target cards from graveyards";
}
}

View file

@ -56,9 +56,9 @@ public class FamishedGhoul extends CardImpl {
this.toughness = new MageInt(2);
// {1}{B}, Sacrifice Famished Ghoul: Exile up to two target cards from a single graveyard.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect("Exile up to two target cards from a single graveyard"), new ManaCostsImpl("{1}{B}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{1}{B}"));
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInASingleGraveyard(0, 2, new FilterCard()));
ability.addTarget(new TargetCardInASingleGraveyard(0, 2, new FilterCard("cards from a single graveyard")));
this.addAbility(ability);
}

View file

@ -25,25 +25,21 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.r;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.target.common.TargetCardInASingleGraveyard;
/**
@ -52,23 +48,22 @@ import mage.target.common.TargetCardInASingleGraveyard;
*/
public class RagDealer extends CardImpl {
public RagDealer (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
public RagDealer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.subtype.add("Human");
this.subtype.add("Rogue");
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// {2}{B}, {T}: Exile up to three target cards from a single graveyard.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RagDealerExileEffect(), new ManaCostsImpl("{2}{B}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{2}{B}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("up to three target cards from a single graveyard")));
ability.addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards from a single graveyard")));
this.addAbility(ability);
}
public RagDealer (final RagDealer card) {
public RagDealer(final RagDealer card) {
super(card);
}
@ -78,31 +73,3 @@ public class RagDealer extends CardImpl {
}
}
class RagDealerExileEffect extends OneShotEffect {
public RagDealerExileEffect() {
super(Outcome.Exile);
this.staticText = "Exile up to three target cards from a single graveyard";
}
public RagDealerExileEffect(final RagDealerExileEffect effect) {
super(effect);
}
@Override
public RagDealerExileEffect copy() {
return new RagDealerExileEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for (UUID targetID : source.getTargets().get(0).getTargets()) {
Card card = game.getCard(targetID);
if (card != null) {
card.moveToExile(null, "", source.getSourceId(), game);
}
}
return true;
}
}

View file

@ -28,17 +28,13 @@
package mage.cards.r;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.CyclingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.target.common.TargetCardInASingleGraveyard;
/**
@ -48,11 +44,11 @@ import mage.target.common.TargetCardInASingleGraveyard;
public class RapidDecay extends CardImpl {
public RapidDecay(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
// Exile up to three target cards from a single graveyard.
this.getSpellAbility().addEffect(new RapidDecayExileEffect());
this.getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("up to three target cards from a single graveyard")));
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards from a single graveyard")));
// Cycling {2}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
@ -67,31 +63,3 @@ public class RapidDecay extends CardImpl {
return new RapidDecay(this);
}
}
class RapidDecayExileEffect extends OneShotEffect {
public RapidDecayExileEffect() {
super(Outcome.Exile);
this.staticText = "Exile up to three target cards from a single graveyard";
}
public RapidDecayExileEffect(final RapidDecayExileEffect effect) {
super(effect);
}
@Override
public RapidDecayExileEffect copy() {
return new RapidDecayExileEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
for (UUID targetID : source.getTargets().get(0).getTargets()) {
Card card = game.getCard(targetID);
if (card != null) {
card.moveToExile(null, "", source.getSourceId(), game);
}
}
return true;
}
}

View file

@ -20,7 +20,7 @@ public class ScarabFeast extends CardImpl {
// Exile up to three target cards from a single graveyard.
getSpellAbility().addEffect(new ExileTargetEffect());
getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards")));
getSpellAbility().addTarget(new TargetCardInASingleGraveyard(0, 3, new FilterCard("cards from a single graveyard")));
// Cycling {B}
addAbility(new CyclingAbility(new ManaCostsImpl("{B}")));

View file

@ -172,6 +172,8 @@ public class ExileTargetEffect extends OneShotEffect {
sb.append("target ");
}
sb.append(targetName);
} else if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
sb.append("exile up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" target ").append(target.getTargetName());
} else {
sb.append("exile ").append(CardUtil.numberToText(target.getNumberOfTargets())).append(" target ").append(target.getTargetName());
}