mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
updated a test failure fix
This commit is contained in:
parent
4df7bc157c
commit
175e15ff98
2 changed files with 5 additions and 6 deletions
|
@ -41,9 +41,6 @@ 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);
|
||||
|
||||
|
|
|
@ -33,7 +33,9 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
|
||||
public DoIfCostPaid(Effect effectOnPaid, Effect effectOnNotPaid, Cost cost, boolean optional) {
|
||||
this(effectOnPaid, cost, null, optional);
|
||||
this.otherwiseEffects.add(effectOnNotPaid);
|
||||
if (effectOnNotPaid != null) {
|
||||
this.otherwiseEffects.add(effectOnNotPaid);
|
||||
}
|
||||
}
|
||||
|
||||
public DoIfCostPaid(Effect effectOnPaid, Cost cost, String chooseUseText) {
|
||||
|
@ -155,8 +157,8 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
if (!staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
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) : "");
|
||||
return (optional ? "you may " : "") + getCostText() + ". If you do, " + executingEffects.getText(mode)
|
||||
+ (!otherwiseEffects.isEmpty() ? " If you don't, " + otherwiseEffects.getText(mode) : "");
|
||||
}
|
||||
|
||||
protected String getCostText() {
|
||||
|
|
Loading…
Reference in a new issue