mirror of
https://github.com/correl/mage.git
synced 2024-11-14 11:09:31 +00:00
Fixed multiple card texts;
This commit is contained in:
parent
5157a88dba
commit
b2ab3a2ba4
9 changed files with 34 additions and 23 deletions
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||
|
@ -21,6 +20,8 @@ import mage.game.Game;
|
|||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
|
@ -37,7 +38,7 @@ public final class AshiokSculptorOfFears extends CardImpl {
|
|||
|
||||
// +2: Draw a card. Each player puts the top two cards of their library into their graveyard.
|
||||
Ability ability = new LoyaltyAbility(
|
||||
new DrawCardSourceControllerEffect(1).setText("draw a card."), 2
|
||||
new DrawCardSourceControllerEffect(1).setText("draw a card"), 2
|
||||
);
|
||||
ability.addEffect(new PutTopCardOfLibraryIntoGraveEachPlayerEffect(2, TargetController.ANY));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class DemonOfLoathing extends CardImpl {
|
|||
|
||||
// Whenever Demon of Loathing deals combat damage to a player, that player sacrifices a creature.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeEffect(
|
||||
StaticFilters.FILTER_PERMANENT_A_CREATURE, 1, "that player"
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE, 1, "that player"
|
||||
), false, true));
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class DreamstalkerManticore extends CardImpl {
|
|||
|
||||
// Whenever you cast your first spell during each opponent's turn, Dreamstalker Manticore deals 1 damage to any target.
|
||||
Ability ability = new FirstSpellOpponentsTurnTriggeredAbility(
|
||||
new DamageTargetEffect(1, "it"), false
|
||||
new DamageTargetEffect(1), false
|
||||
);
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -10,8 +9,9 @@ import mage.constants.Duration;
|
|||
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
||||
import mage.watchers.common.DamagedByWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class UnderworldFires extends CardImpl {
|
||||
|
@ -22,6 +22,7 @@ public final class UnderworldFires extends CardImpl {
|
|||
// Underworld Fires deals 1 damage to each creature and each planeswalker.
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(1,
|
||||
new FilterCreatureOrPlaneswalkerPermanent("creature and each planeswalker")));
|
||||
|
||||
// If a permanent dealt damage this way would die this turn, exile it instead.
|
||||
this.getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addWatcher(new DamagedByWatcher(false));
|
||||
|
|
|
@ -20,7 +20,6 @@ import mage.target.Target;
|
|||
import mage.target.Targets;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SagaAbility extends SimpleStaticAbility {
|
||||
|
@ -101,7 +100,7 @@ public class SagaAbility extends SimpleStaticAbility {
|
|||
|
||||
public static boolean isChapterAbility(StackObject stackObject) {
|
||||
if (stackObject instanceof StackAbility) {
|
||||
return ((StackAbility) stackObject).getStackAbility() instanceof ChapterTriggeredAbility;
|
||||
return stackObject.getStackAbility() instanceof ChapterTriggeredAbility;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -181,7 +180,7 @@ class ChapterTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
}
|
||||
String text = super.getRule();
|
||||
sb.append(": ").append(Character.toUpperCase(text.charAt(0))).append(text.substring(1));
|
||||
sb.append(" - ").append(Character.toUpperCase(text.charAt(0))).append(text.substring(1));
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
|
||||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.constants.Outcome;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
|
@ -45,10 +42,11 @@ public class PutTopCardOfLibraryIntoGraveControllerEffect extends OneShotEffect
|
|||
}
|
||||
|
||||
private String setText() {
|
||||
StringBuilder sb = new StringBuilder("put the top ");
|
||||
StringBuilder sb = new StringBuilder("put the top");
|
||||
if (numberCards == 1) {
|
||||
sb.append(" card");
|
||||
} else {
|
||||
sb.append(" ");
|
||||
sb.append(CardUtil.numberToText(numberCards));
|
||||
sb.append(" cards");
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ public class GainAbilityControlledEffect extends ContinuousEffectImpl {
|
|||
if (!duration.toString().isEmpty() && duration != Duration.EndOfGame) {
|
||||
sb.append(' ').append(duration.toString());
|
||||
}
|
||||
staticText = sb.toString();
|
||||
staticText = sb.toString() + ".";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common.continuous;
|
||||
|
||||
import mage.MageObject;
|
||||
|
@ -16,7 +15,6 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect {
|
||||
|
@ -78,6 +76,20 @@ public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect
|
|||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
return "target creature you control gains protection from the color of your choice " + duration.toString();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (!mode.getTargets().isEmpty()) {
|
||||
if (mode.getTargets().get(0).getTargetName().contains("target")) {
|
||||
sb.append(mode.getTargets().get(0).getTargetName());
|
||||
} else {
|
||||
sb.append("target ").append(mode.getTargets().get(0).getTargetName());
|
||||
}
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
sb.append(" ");
|
||||
}
|
||||
sb.append("gains protection from the color of your choice " + duration.toString());
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package mage.abilities.effects.common.search;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.SearchEffect;
|
||||
import mage.cards.CardsImpl;
|
||||
|
@ -12,8 +10,10 @@ import mage.players.Player;
|
|||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class SearchLibraryPutInPlayEffect extends SearchEffect {
|
||||
|
@ -84,11 +84,11 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect {
|
|||
} else {
|
||||
sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' ');
|
||||
}
|
||||
sb.append(target.getTargetName()).append(" and put them onto the battlefield");
|
||||
sb.append(target.getTargetName()).append(", put them onto the battlefield");
|
||||
} else {
|
||||
sb.append(target.getTargetName().startsWith("a ") || target.getTargetName().startsWith("an ") ? "" : "a ")
|
||||
.append(target.getTargetName())
|
||||
.append(" and put it onto the battlefield");
|
||||
.append(", put it onto the battlefield");
|
||||
}
|
||||
if (tapped) {
|
||||
sb.append(" tapped");
|
||||
|
|
Loading…
Reference in a new issue