mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
fixed some test failures
This commit is contained in:
parent
2181eacb85
commit
4df7bc157c
3 changed files with 41 additions and 36 deletions
|
|
@ -41,6 +41,9 @@ public class Effects extends ArrayList<Effect> {
|
|||
String lastRule = null;
|
||||
int effectNum = 0;
|
||||
for (Effect effect : this) {
|
||||
if (effect == null) {
|
||||
continue;
|
||||
}
|
||||
String endString = "";
|
||||
String nextRule = effect.getText(mode);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.Locale;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
|
|
@ -14,6 +13,8 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class DoIfCostPaid extends OneShotEffect {
|
||||
|
||||
protected Effects executingEffects = new Effects();
|
||||
|
|
@ -63,7 +64,7 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
return this;
|
||||
}
|
||||
|
||||
public DoIfCostPaid addOtherwiseEffect (Effect effect) {
|
||||
public DoIfCostPaid addOtherwiseEffect(Effect effect) {
|
||||
otherwiseEffects.add(effect);
|
||||
return this;
|
||||
}
|
||||
|
|
@ -154,7 +155,8 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
if (!staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
return (optional ? "you may " : "") + getCostText() + ". If you do, " + executingEffects.getText(mode) + (!otherwiseEffects.isEmpty() ? " If you don't, " + otherwiseEffects.getText(mode) : "");
|
||||
String otherwiseText = otherwiseEffects.getText(mode);
|
||||
return (optional ? "you may " : "") + getCostText() + ". If you do, " + executingEffects.getText(mode) + (!otherwiseText.isEmpty() ? " If you don't, " + otherwiseEffects.getText(mode) : "");
|
||||
}
|
||||
|
||||
protected String getCostText() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue