mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
2 text 2 fixrious
This commit is contained in:
parent
0075535650
commit
14107b3d55
83 changed files with 412 additions and 300 deletions
|
|
@ -480,21 +480,21 @@ public class Mana implements Comparable<Mana>, Serializable, Copyable<Mana> {
|
|||
for (int i = 0; i < colorless; i++) {
|
||||
sbMana.append("{C}");
|
||||
}
|
||||
for (int i = 0; i < white; i++) {
|
||||
sbMana.append("{W}");
|
||||
}
|
||||
for (int i = 0; i < blue; i++) {
|
||||
sbMana.append("{U}");
|
||||
}
|
||||
for (int i = 0; i < black; i++) {
|
||||
sbMana.append("{B}");
|
||||
}
|
||||
for (int i = 0; i < red; i++) {
|
||||
sbMana.append("{R}");
|
||||
}
|
||||
for (int i = 0; i < green; i++) {
|
||||
sbMana.append("{G}");
|
||||
}
|
||||
for (int i = 0; i < blue; i++) {
|
||||
sbMana.append("{U}");
|
||||
}
|
||||
for (int i = 0; i < white; i++) {
|
||||
sbMana.append("{W}");
|
||||
}
|
||||
for (int i = 0; i < black; i++) {
|
||||
sbMana.append("{B}");
|
||||
}
|
||||
for (int i = 0; i < any; i++) {
|
||||
sbMana.append("{Any}");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility {
|
|||
super(card.getSpellAbility().getManaCosts().copy(), card.getName() + " as though it had flash", Zone.HAND, SpellAbilityType.BASE_ALTERNATE);
|
||||
this.costsToAdd = costsToAdd;
|
||||
this.timing = TimingRule.INSTANT;
|
||||
|
||||
this.ruleAtTheTop = true;
|
||||
CardUtil.increaseCost(this, costsToAdd);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class CardsInHandCondition implements Condition {
|
||||
|
||||
|
||||
private Condition condition;
|
||||
private ComparisonType type;
|
||||
private int count;
|
||||
|
|
@ -114,7 +113,7 @@ public class CardsInHandCondition implements Condition {
|
|||
@Override
|
||||
public String toString() {
|
||||
int workCount = count;
|
||||
StringBuilder sb = new StringBuilder("if ");
|
||||
StringBuilder sb = new StringBuilder("if");
|
||||
switch (targetController) {
|
||||
case YOU:
|
||||
sb.append(" you have");
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import mage.abilities.mana.builder.ConditionalManaBuilder;
|
|||
import mage.choices.ChoiceColor;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
|
|
@ -59,8 +60,10 @@ public class AddConditionalManaOfAnyColorEffect extends ManaEffect {
|
|||
this.manaBuilder = manaBuilder;
|
||||
this.oneChoice = oneChoice;
|
||||
//
|
||||
staticText = "Add " + amount + " mana of "
|
||||
+ (oneChoice ? "any one color" : "in any combination of colors")
|
||||
staticText = "Add "
|
||||
+ (amount instanceof StaticValue ? (CardUtil.numberToText(((StaticValue) amount).toString())) : "")
|
||||
+ " mana "
|
||||
+ (oneChoice ? "of any one color" : "in any combination of colors")
|
||||
+ " to your mana pool. " + manaBuilder.getRule();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,11 +46,12 @@ public class CastSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public CastSourceTriggeredAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
}
|
||||
|
||||
|
||||
public CastSourceTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.STACK, effect, optional);
|
||||
this.ruleAtTheTop = true;
|
||||
}
|
||||
|
||||
|
||||
public CastSourceTriggeredAbility(final CastSourceTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
|
@ -70,7 +71,7 @@ public class CastSourceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (event.getSourceId().equals(this.getSourceId())) {
|
||||
MageObject spellObject = game.getObject(sourceId);
|
||||
if (spellObject != null && (spellObject instanceof Spell)) {
|
||||
Spell spell = (Spell)spellObject;
|
||||
Spell spell = (Spell) spellObject;
|
||||
if (spell.getSpellAbility() != null) {
|
||||
for (Effect effect : getEffects()) {
|
||||
effect.setValue(SOURCE_CAST_SPELL_ABILITY, spell.getSpellAbility());
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class CounterUnlessPaysEffect extends OneShotEffect {
|
|||
if (mode.getTargets().isEmpty()) {
|
||||
sb.append("counter it");
|
||||
} else {
|
||||
sb.append("Counter target ").append(mode.getTargets().get(0).getTargetName());
|
||||
sb.append("counter target ").append(mode.getTargets().get(0).getTargetName());
|
||||
}
|
||||
sb.append(" unless its controller pays ");
|
||||
if (cost != null) {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.List;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
|
@ -45,7 +46,7 @@ public class GetEmblemEffect extends OneShotEffect {
|
|||
public GetEmblemEffect(Emblem emblem) {
|
||||
super(Outcome.Benefit);
|
||||
this.emblem = emblem;
|
||||
this.staticText = "You get an emblem with \"" + emblem.getAbilities().getRules(null) + '"';
|
||||
this.staticText = "You get an emblem with \"" + +'"';
|
||||
}
|
||||
|
||||
public GetEmblemEffect(final GetEmblemEffect effect) {
|
||||
|
|
@ -68,4 +69,21 @@ public class GetEmblemEffect extends OneShotEffect {
|
|||
return true;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("You get an emblem with \"");
|
||||
List<String> rules = emblem.getAbilities().getRules(null);
|
||||
if (rules.size() == 1) {
|
||||
sb.append(rules.get(0));
|
||||
sb.append('"');
|
||||
} else if (rules.size() == 2) {
|
||||
for (String s : rules) {
|
||||
sb.append(s);
|
||||
sb.append("\" and \"");
|
||||
}
|
||||
sb.append('"');
|
||||
}
|
||||
sb.append('.');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,27 +82,27 @@ public class NameACardEffect extends OneShotEffect {
|
|||
switch (typeOfName) {
|
||||
case ALL:
|
||||
cardChoice.setChoices(CardRepository.instance.getNames());
|
||||
cardChoice.setMessage("Name a card");
|
||||
cardChoice.setMessage("Choose a card name");
|
||||
break;
|
||||
case NON_ARTIFACT_AND_NON_LAND_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getNonArtifactAndNonLandNames());
|
||||
cardChoice.setMessage("Name a non artifact and non land card");
|
||||
cardChoice.setMessage("Choose a nonartifact, nonland card name");
|
||||
break;
|
||||
case NON_LAND_AND_NON_CREATURE_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getNonLandAndNonCreatureNames());
|
||||
cardChoice.setMessage("Name a non land and non creature card");
|
||||
cardChoice.setMessage("Choose a nonland and non creature card");
|
||||
break;
|
||||
case NON_LAND_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getNonLandNames());
|
||||
cardChoice.setMessage("Name a non land card");
|
||||
cardChoice.setMessage("Choose a nonland card name");
|
||||
break;
|
||||
case CREATURE_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getCreatureNames());
|
||||
cardChoice.setMessage("Name a creature card");
|
||||
cardChoice.setMessage("Choose a creature card name");
|
||||
break;
|
||||
case ARTIFACT_NAME:
|
||||
cardChoice.setChoices(CardRepository.instance.getArtifactNames());
|
||||
cardChoice.setMessage("Name an artifact card");
|
||||
cardChoice.setMessage("Choose an artifact card name");
|
||||
break;
|
||||
}
|
||||
cardChoice.clearChoice();
|
||||
|
|
@ -130,7 +130,7 @@ public class NameACardEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
private String setText() {
|
||||
StringBuilder sb = new StringBuilder("name a ");
|
||||
StringBuilder sb = new StringBuilder("choose a ");
|
||||
switch (typeOfName) {
|
||||
case ALL:
|
||||
sb.append("card");
|
||||
|
|
@ -139,7 +139,7 @@ public class NameACardEffect extends OneShotEffect {
|
|||
sb.append("nonartifact, nonland card");
|
||||
break;
|
||||
case NON_LAND_AND_NON_CREATURE_NAME:
|
||||
sb.append("card other than a creature or a land card");
|
||||
sb.append("noncreature, nonland card");
|
||||
break;
|
||||
case NON_LAND_NAME:
|
||||
sb.append("nonland card");
|
||||
|
|
@ -151,6 +151,7 @@ public class NameACardEffect extends OneShotEffect {
|
|||
sb.append("artifact card");
|
||||
break;
|
||||
}
|
||||
sb.append(" name");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class UntapAllThatAttackedEffect extends OneShotEffect {
|
|||
|
||||
public UntapAllThatAttackedEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = " Untap all creatures that attacked this turn";
|
||||
staticText = "Untap all creatures that attacked this turn";
|
||||
}
|
||||
|
||||
public UntapAllThatAttackedEffect(final UntapAllThatAttackedEffect effect) {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ package mage.abilities.effects.common.combat;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.constants.Duration;
|
||||
import static mage.constants.Duration.EndOfTurn;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -45,8 +46,9 @@ public class CantBeBlockedByAllTargetEffect extends RestrictionEffect {
|
|||
public CantBeBlockedByAllTargetEffect(FilterCreaturePermanent filterBlockedBy, Duration duration) {
|
||||
super(duration);
|
||||
this.filterBlockedBy = filterBlockedBy;
|
||||
staticText = "Target creature"
|
||||
staticText = "target creature"
|
||||
+ " can't be blocked "
|
||||
+ (duration == EndOfTurn ? "this turn " : "")
|
||||
+ (filterBlockedBy.getMessage().startsWith("except by") ? "" : "by ")
|
||||
+ filterBlockedBy.getMessage();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl {
|
|||
|
||||
private void setText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Enchanted creature gets ");
|
||||
sb.append("enchanted creature gets ");
|
||||
String p = power.toString();
|
||||
if (!p.startsWith("-")) {
|
||||
sb.append('+');
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -106,9 +107,9 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect {
|
|||
sb.append("search your library for ");
|
||||
if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
|
||||
if (target.getMaxNumberOfTargets() == Integer.MAX_VALUE) {
|
||||
sb.append("any number of ").append(' ');
|
||||
sb.append("any number of ");
|
||||
} else {
|
||||
sb.append("up to ").append(target.getMaxNumberOfTargets()).append(' ');
|
||||
sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' ');
|
||||
}
|
||||
sb.append(target.getTargetName()).append(" and put them onto the battlefield");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public class BolsterEffect extends OneShotEffect {
|
|||
} else {
|
||||
sb.append("X, where X is the number of ");
|
||||
sb.append(amount.getMessage());
|
||||
sb.append(". (Choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.)");
|
||||
sb.append(" (Choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.)");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ public class DashAbility extends StaticAbility implements AlternativeSourceCosts
|
|||
new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom, false),
|
||||
DashedCondition.instance, "", "");
|
||||
ability.addEffect(new DashAddDelayedTriggeredAbilityEffect());
|
||||
ability.setRuleVisible(false);
|
||||
addSubAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@
|
|||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
*/
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -40,7 +39,7 @@ import java.io.ObjectStreamException;
|
|||
*/
|
||||
public class ReachAbility extends StaticAbility implements MageSingleton {
|
||||
|
||||
private static final ReachAbility instance = new ReachAbility();
|
||||
private static final ReachAbility instance = new ReachAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return instance;
|
||||
|
|
@ -56,7 +55,7 @@ public class ReachAbility extends StaticAbility implements MageSingleton {
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Reach";
|
||||
return "reach";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ public class SuspendAbility extends SpecialAction {
|
|||
}
|
||||
StringBuilder sb = new StringBuilder("Suspend ");
|
||||
if (cost != null) {
|
||||
sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append(" - ").append(cost.getText());
|
||||
sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append(" - ").append(cost.getText()).append(suspend == Integer.MAX_VALUE ? ". X can't be 0" : "");
|
||||
if (!shortRule) {
|
||||
sb.append(" <i>(Rather than cast this card from your hand, pay ")
|
||||
.append(cost.getText())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue