forked from External/mage
Fixed card texts
This commit is contained in:
parent
47b943021f
commit
a995643512
4 changed files with 15 additions and 13 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue