From 03c032e3b088db0d1b0f2560eecbf74021383547 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 27 Oct 2013 10:33:08 +0100 Subject: [PATCH] Some fixes/updates to tooltip generation (e.g. charms). --- .../mage/sets/riseoftheeldrazi/DevastatingSummons.java | 2 +- .../src/mage/sets/riseoftheeldrazi/DisasterRadius.java | 2 +- .../src/mage/sets/riseoftheeldrazi/InduceDespair.java | 2 +- Mage.Sets/src/mage/sets/urzaslegacy/Tinker.java | 2 +- Mage.Sets/src/mage/sets/weatherlight/Firestorm.java | 2 +- Mage.Sets/src/mage/sets/zendikar/CobraTrap.java | 2 +- Mage/src/mage/abilities/Modes.java | 4 ++-- Mage/src/mage/abilities/effects/Effects.java | 6 +++--- .../common/continious/GainAbilityAttachedEffect.java | 8 ++++++-- 9 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DevastatingSummons.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DevastatingSummons.java index 8690a1ed86..792aa312f0 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DevastatingSummons.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DevastatingSummons.java @@ -79,7 +79,7 @@ class DevastatingSummonsCost extends CostImpl implements protected int amountPaid = 0; public DevastatingSummonsCost() { - this.text = "sacrifice X lands."; + this.text = "sacrifice X lands"; } public DevastatingSummonsCost(final DevastatingSummonsCost cost) { diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DisasterRadius.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DisasterRadius.java index 16f72884d2..aca0e28bd8 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/DisasterRadius.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/DisasterRadius.java @@ -57,7 +57,7 @@ public class DisasterRadius extends CardImpl { this.color.setRed(true); // As an additional cost to cast Disaster Radius, reveal a creature card from your hand. - TargetCardInHand targetCard = new TargetCardInHand(new FilterCreatureCard("a creature card.")); + TargetCardInHand targetCard = new TargetCardInHand(new FilterCreatureCard("a creature card")); this.getSpellAbility().addCost(new RevealTargetFromHandCost(targetCard)); // Disaster Radius deals X damage to each creature your opponents control, where X is the revealed card's converted mana cost. diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/InduceDespair.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/InduceDespair.java index 021c49ea21..b5d43212c6 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/InduceDespair.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/InduceDespair.java @@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent; */ public class InduceDespair extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your hand."); + private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your hand"); public InduceDespair(UUID ownerId) { super(ownerId, 114, "Induce Despair", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/Tinker.java b/Mage.Sets/src/mage/sets/urzaslegacy/Tinker.java index bfb0215331..9115ac7533 100644 --- a/Mage.Sets/src/mage/sets/urzaslegacy/Tinker.java +++ b/Mage.Sets/src/mage/sets/urzaslegacy/Tinker.java @@ -45,7 +45,7 @@ import mage.target.common.TargetControlledPermanent; */ public class Tinker extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact."); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("an artifact"); static { filter.add(new CardTypePredicate(CardType.ARTIFACT)); diff --git a/Mage.Sets/src/mage/sets/weatherlight/Firestorm.java b/Mage.Sets/src/mage/sets/weatherlight/Firestorm.java index 79dbb4b0fe..6f912460aa 100644 --- a/Mage.Sets/src/mage/sets/weatherlight/Firestorm.java +++ b/Mage.Sets/src/mage/sets/weatherlight/Firestorm.java @@ -128,7 +128,7 @@ class FirestormCost extends CostImpl implements VariableCost { protected int amountPaid = 0; public FirestormCost() { - this.text = "discard X cards."; + this.text = "discard X cards"; } public FirestormCost(final FirestormCost cost) { diff --git a/Mage.Sets/src/mage/sets/zendikar/CobraTrap.java b/Mage.Sets/src/mage/sets/zendikar/CobraTrap.java index 24495f3e32..ff8d0294b3 100644 --- a/Mage.Sets/src/mage/sets/zendikar/CobraTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/CobraTrap.java @@ -141,6 +141,6 @@ class CobraTrapAlternativeCost extends AlternativeCostImpl { for (Mode mode: this.values()) { sb.append(mode.getEffects().getText(mode)); if (this.size() > 1) { - if (sb.length() > 2 && sb.substring(sb.length()-2, sb.length()).equals(". ")) { - sb.delete(sb.length()-2, sb.length()); + if (sb.length() > 2 && sb.substring(sb.length()-1, sb.length()).equals(".")) { + sb.delete(sb.length()-1, sb.length()); } sb.append(andOr); } diff --git a/Mage/src/mage/abilities/effects/Effects.java b/Mage/src/mage/abilities/effects/Effects.java index 4d65310de1..72215d68db 100644 --- a/Mage/src/mage/abilities/effects/Effects.java +++ b/Mage/src/mage/abilities/effects/Effects.java @@ -58,18 +58,18 @@ public class Effects extends ArrayList { String rule = null; for (Effect effect: this) { String endString = ""; - if (rule != null && rule.length()> 3 && !rule.endsWith(". ")) { + if (rule != null && rule.length()> 3 && !rule.endsWith(".")) { endString = ". "; } rule = effect.getText(mode); if (rule != null) { - if (rule.startsWith("and ")) { + if (rule.startsWith("and ") || rule.startsWith(",")) { endString = " "; } sbText.append(endString).append(rule); } } - if (rule != null && rule.length()> 3 && !rule.endsWith(". ")) { + if (rule != null && rule.length()> 3 && !rule.endsWith(".") && !rule.endsWith("\"")) { sbText.append("."); } return sbText.toString(); diff --git a/Mage/src/mage/abilities/effects/common/continious/GainAbilityAttachedEffect.java b/Mage/src/mage/abilities/effects/common/continious/GainAbilityAttachedEffect.java index 9187cc0a98..e7c86f0cd2 100644 --- a/Mage/src/mage/abilities/effects/common/continious/GainAbilityAttachedEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/GainAbilityAttachedEffect.java @@ -70,7 +70,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl