[DOM] Some fixes and tooltip rule text changes.

This commit is contained in:
LevelX2 2018-04-19 15:48:25 +02:00
parent 753e01598a
commit 4cc77c49c4
23 changed files with 91 additions and 86 deletions

View file

@ -26,7 +26,7 @@ public class AddConditionalColorlessManaEffect extends ManaEffect {
this.manaBuilder = manaBuilder;
staticText = "Add " + String.format(String.format("%%%ds", amount), " ").replace(" ", "{C}")
+ " to your mana pool. " + manaBuilder.getRule();
+ ". " + manaBuilder.getRule();
}
public AddConditionalColorlessManaEffect(final AddConditionalColorlessManaEffect effect) {

View file

@ -1,16 +1,16 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
@ -20,21 +20,20 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
* 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.effects.common;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.StaticValue;
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;
@ -88,7 +87,7 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect {
StringBuilder sb = new StringBuilder();
String message = amount.getMessage();
sb.append("Target ").append(mode.getTargets().get(0).getTargetName());
sb.append("target ").append(mode.getTargets().get(0).getTargetName());
sb.append(" puts the top ");
if (message.isEmpty()) {
if (amount.toString().equals("1")) {

View file

@ -39,6 +39,7 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetLandPermanent;
import mage.util.CardUtil;
/**
* "Untap (up to) X lands" effect
@ -56,7 +57,7 @@ public class UntapLandsEffect extends OneShotEffect {
super(Outcome.Untap);
this.amount = amount;
this.upTo = upTo;
staticText = "Untap " + (upTo ? "up to " : "") + amount + " lands";
staticText = "Untap " + (upTo ? "up to " : "") + CardUtil.numberToText(amount, staticText) + " lands";
}
public UntapLandsEffect(final UntapLandsEffect effect) {

View file

@ -27,6 +27,7 @@
*/
package mage.abilities.effects.common.continuous;
import java.util.Locale;
import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.constants.*;
@ -74,7 +75,7 @@ public class AddCardSuperTypeAttachedEffect extends ContinuousEffectImpl {
private void setText() {
StringBuilder sb = new StringBuilder();
sb.append(attachmentType.verb());
sb.append(" permanent is ").append(addedSuperType.toString()); //TODO add attacked card type detection
sb.append(" permanent is ").append(addedSuperType.toString().toLowerCase(Locale.ENGLISH)); //TODO add attacked card type detection
staticText = sb.toString();
}
}

View file

@ -154,7 +154,8 @@ public class AddCountersTargetEffect extends OneShotEffect {
}
if (target.getMaxNumberOfTargets() > 1 || target.getNumberOfTargets() == 0) {
sb.append(target.getMaxNumberOfTargets()).append(" target ").append(target.getTargetName());
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets()))
.append(" target ").append(target.getTargetName());
} else {
if (!target.getTargetName().startsWith("another")) {
sb.append("target ");

View file

@ -14,11 +14,12 @@ public enum SuperType {
String text;
SuperType(String text){
SuperType(String text) {
this.text = text;
}
public String toString(){
@Override
public String toString() {
return text;
}

View file

@ -142,6 +142,11 @@ public final class StaticFilters {
static {
FILTER_CONTROLLED_PERMANENT_ARTIFACT.setLockedFilter(true);
}
public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN = new FilterControlledArtifactPermanent("an artifact");
static {
FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN.setLockedFilter(true);
}
public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE = new FilterControlledPermanent("artifact or creature you control");
static {