forked from External/mage
* Fixed a problem where for copies of cards/permanent the included spell ability was not correctly copied and the copied card had the spell ability twice. That could cause in some rare cases problems with spell ids of copies (this fixes #6824) or did allow on the other side some unproper handling of things (Animate Dead).
This commit is contained in:
parent
9f92377eef
commit
eecaa232f5
12 changed files with 300 additions and 149 deletions
|
|
@ -1,22 +1,20 @@
|
|||
package mage.abilities.effects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.targetpointer.TargetPointer;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class Effects extends ArrayList<Effect> {
|
||||
|
||||
public Effects(Effect... effects) {
|
||||
for (Effect effect : effects) {
|
||||
this.add(effect);
|
||||
}
|
||||
this.addAll(Arrays.asList(effects));
|
||||
}
|
||||
|
||||
public Effects(final Effects effects) {
|
||||
|
|
@ -64,15 +62,15 @@ public class Effects extends ArrayList<Effect> {
|
|||
endString = " ";
|
||||
} else if (nextRule.startsWith(",") || nextRule.startsWith(" ")) {
|
||||
endString = "";
|
||||
// nextRule determined to be a new sentence, now check ending of lastRule
|
||||
// nextRule determined to be a new sentence, now check ending of lastRule
|
||||
} else if (lastRule != null && lastRule.length() > 3) {
|
||||
//check if lastRule already has appropriate punctuation, if so, add a space.
|
||||
if (lastRule.endsWith(".\"") ||
|
||||
lastRule.endsWith(".)") ||
|
||||
lastRule.endsWith(".)</i>") ||
|
||||
lastRule.endsWith(".")){
|
||||
if (lastRule.endsWith(".\"")
|
||||
|| lastRule.endsWith(".)")
|
||||
|| lastRule.endsWith(".)</i>")
|
||||
|| lastRule.endsWith(".")) {
|
||||
endString = " ";
|
||||
// if lastRule does not have appropriate punctuation, add the default ". "
|
||||
// if lastRule does not have appropriate punctuation, add the default ". "
|
||||
} else if (!lastRule.endsWith(".") && !lastRule.endsWith("<br>")) {
|
||||
endString = ". ";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue