mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
Fixed multiple card texts;
This commit is contained in:
parent
5157a88dba
commit
b2ab3a2ba4
9 changed files with 34 additions and 23 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue