mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Improved rule text generation of flashback ability. Fixed text bug of Dread Return.
This commit is contained in:
parent
590cebd8bd
commit
0be107359d
3 changed files with 13 additions and 9 deletions
|
@ -42,6 +42,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
@ -63,7 +64,7 @@ public class CabalTherapy extends CardImpl<CabalTherapy> {
|
|||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addEffect(new CabalTherapyEffect());
|
||||
// Flashback-Sacrifice a creature.
|
||||
this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1)), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"), true)), TimingRule.SORCERY));
|
||||
}
|
||||
|
||||
public CabalTherapy(final CabalTherapy card) {
|
||||
|
@ -80,7 +81,7 @@ class CabalTherapyEffect extends OneShotEffect<CabalTherapyEffect> {
|
|||
|
||||
public CabalTherapyEffect() {
|
||||
super(Outcome.Exile);
|
||||
staticText = "Name a nonland card. Search target player's hand for all cards with that name and discard them.";
|
||||
staticText = "Name a nonland card. Search target player's hand for all cards with that name and discard them";
|
||||
}
|
||||
|
||||
public CabalTherapyEffect(final CabalTherapyEffect effect) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
|||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
@ -55,7 +56,7 @@ public class DreadReturn extends CardImpl<DreadReturn> {
|
|||
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
|
||||
// Flashback-Sacrifice three creatures.
|
||||
this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledCreaturePermanent(3)), TimingRule.SORCERY));
|
||||
this.addAbility(new FlashbackAbility(new SacrificeTargetCost(new TargetControlledCreaturePermanent(3,3,new FilterControlledCreaturePermanent("three creatures"),true,true)), TimingRule.SORCERY));
|
||||
}
|
||||
|
||||
public DreadReturn(final DreadReturn card) {
|
||||
|
|
|
@ -67,18 +67,20 @@ public class FlashbackAbility extends /*SpellAbility*/ ActivatedAbilityImpl<Flas
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
StringBuilder sbRule = new StringBuilder("Flashback ");
|
||||
boolean first = true;
|
||||
StringBuilder sbRule = new StringBuilder("Flashback");
|
||||
if (costs.size() > 0) {
|
||||
sbRule.append("--");
|
||||
} else {
|
||||
sbRule.append(" ");
|
||||
}
|
||||
if (manaCosts.size() > 0) {
|
||||
sbRule.append(manaCosts.getText());
|
||||
first = false;
|
||||
}
|
||||
if (costs.size() > 0) {
|
||||
if (first) {
|
||||
sbRule.append(",");
|
||||
}
|
||||
sbRule.append(costs.getText());
|
||||
sbRule.append(".");
|
||||
}
|
||||
sbRule.append(" <i>(You may cast this card from your graveyard for its flashback cost. Then exile it.)</i>");
|
||||
return sbRule.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue