Fixed card texts

This commit is contained in:
Oleg Agafonov 2019-01-03 04:13:24 +04:00
parent 47b943021f
commit a995643512
4 changed files with 15 additions and 13 deletions

View file

@ -1,16 +1,15 @@
package mage.abilities.effects;
import mage.abilities.Mode;
import mage.constants.Outcome;
import mage.target.targetpointer.TargetPointer;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import mage.abilities.Mode;
import mage.constants.Outcome;
import mage.target.targetpointer.TargetPointer;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class Effects extends ArrayList<Effect> {
@ -46,6 +45,12 @@ public class Effects extends ArrayList<Effect> {
for (Effect effect : this) {
String endString = "";
String nextRule = effect.getText(mode);
// ignore empty rules
if (nextRule == null || nextRule.isEmpty()) {
continue;
}
if (nextRule != null) {
if (nextRule.startsWith("and ") || nextRule.startsWith("with ")) {
endString = " ";
@ -63,6 +68,7 @@ public class Effects extends ArrayList<Effect> {
}
lastRule = nextRule;
}
if (lastRule != null && lastRule.length() > 3
&& !lastRule.endsWith(".")
&& !lastRule.endsWith("\"")
@ -71,6 +77,7 @@ public class Effects extends ArrayList<Effect> {
&& !lastRule.endsWith("</i>")) {
sbText.append('.');
}
return sbText.toString();
}

View file

@ -1,17 +1,12 @@
package mage.abilities.keyword;
import java.util.UUID;
import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.costs.Cost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.EquipEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TimingRule;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent;
@ -45,7 +40,7 @@ public class EquipAbility extends ActivatedAbilityImpl {
@Override
public String getRule() {
return "Equip " + costs.getText() + manaCosts.getText() + " (" + manaCosts.getText() + ": <i>Attach to target creature you control. Equip only as a sorcery.)</i>";
return "Equip " + costs.getText() + manaCosts.getText() + " <i>(" + manaCosts.getText() + ": Attach to target creature you control. Equip only as a sorcery.)</i>";
}
}