forked from External/mage
Cleanup: replace custom code with common classes, text fixes to abilities (#10304)
* Use common FirstCombatPhaseCondition on Raiyuu, Storm's Edge * Use common ReturnFromExileForSourceEffect on Parallax Wave * Use common exile effects on Prowling Geistcatcher (attempt to fix #9981) * Fix text: Fading ability * Fix text: Endangered Armodon * Fix text: Nemata, Primeval Warden * Fix text: Capitalization on alternative/additional costs other than mana
This commit is contained in:
parent
550d719498
commit
4c13b42dee
9 changed files with 41 additions and 111 deletions
|
|
@ -6,11 +6,13 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/*
|
||||
* 702.31. Fading
|
||||
|
|
@ -31,10 +33,20 @@ public class FadingAbility extends EntersBattlefieldAbility {
|
|||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new FadingEffect(), TargetController.YOU, false);
|
||||
ability.setRuleVisible(false);
|
||||
addSubAbility(ability);
|
||||
String cardTypeName;
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
cardTypeName = "creature";
|
||||
} else if (card.getCardType().contains(CardType.ARTIFACT)) {
|
||||
cardTypeName = "artifact";
|
||||
} else if (card.getCardType().contains(CardType.ENCHANTMENT)) {
|
||||
cardTypeName = "enchantment";
|
||||
} else {
|
||||
cardTypeName = "permanent";
|
||||
}
|
||||
ruleText = "Fading " + fadeCounter
|
||||
+ (shortRuleText ? ""
|
||||
: " <i>(This permanent enters the battlefield with " + fadeCounter + " fade counters on it."
|
||||
+ " At the beginning of your upkeep, remove a fade counter from this permanent. If you can't, sacrifice the permanent.)</i>");
|
||||
: " <i>(This " + cardTypeName + " enters the battlefield with " + CardUtil.numberToText(fadeCounter) + " fade counters on it."
|
||||
+ " At the beginning of your upkeep, remove a fade counter from it. If you can't, sacrifice it.)</i>");
|
||||
}
|
||||
|
||||
public FadingAbility(final FadingAbility ability) {
|
||||
|
|
@ -57,7 +69,7 @@ class FadingEffect extends OneShotEffect {
|
|||
|
||||
FadingEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
staticText = "remove a fade counter from this permanent. If you can't, sacrifice the permanent";
|
||||
staticText = "remove a fade counter from {this}. If you can't, sacrifice it";
|
||||
}
|
||||
|
||||
FadingEffect(final FadingEffect effect) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue