mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
IKO: Mythos cycle
This commit is contained in:
committed by
Michael Kamensky
parent
9033bbd410
commit
1ac8026b7f
@@ -197,6 +197,10 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
|
||||
this.setManaSpent(params.get("ConditionManaSpent"));
|
||||
}
|
||||
|
||||
if (params.containsKey("ConditionManaNotSpent")) {
|
||||
this.setManaNotSpent(params.get("ConditionManaNotSpent"));
|
||||
}
|
||||
|
||||
if (params.containsKey("ConditionCheckSVar")) {
|
||||
this.setSvarToCheck(params.get("ConditionCheckSVar"));
|
||||
}
|
||||
@@ -432,10 +436,21 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(this.getManaSpent())) {
|
||||
byte manaSpent = MagicColor.fromName(getManaSpent()); // they always check for single color
|
||||
if( 0 == (manaSpent & sa.getHostCard().getColorsPaid())) // no match of colors
|
||||
if (StringUtils.isNotEmpty(getManaSpent())) {
|
||||
for (String s : getManaSpent().split(" ")) {
|
||||
byte manaSpent = MagicColor.fromName(s);
|
||||
if( 0 == (manaSpent & sa.getHostCard().getColorsPaid())) // no match of colors
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(getManaNotSpent())) {
|
||||
byte toPay = 0;
|
||||
for (String s : getManaNotSpent().split(" ")) {
|
||||
toPay |= MagicColor.fromName(s);
|
||||
}
|
||||
if (0 != (toPay & sa.getHostCard().getColorsPaid())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getsVarToCheck() != null) {
|
||||
|
||||
@@ -89,6 +89,7 @@ public class SpellAbilityVariables implements Cloneable {
|
||||
this.lifeTotal = sav.getLifeTotal();
|
||||
this.lifeAmount = sav.getLifeAmount();
|
||||
this.manaSpent = sav.getManaSpent();
|
||||
this.manaNotSpent = sav.getManaNotSpent();
|
||||
this.targetValidTargeting = sav.getTargetValidTargeting();
|
||||
this.targetsSingleTarget = sav.targetsSingleTarget();
|
||||
this.presenceCondition = sav.getPresenceCondition();
|
||||
@@ -193,6 +194,7 @@ public class SpellAbilityVariables implements Cloneable {
|
||||
|
||||
/** The mana spent. */
|
||||
private String manaSpent = "";
|
||||
private String manaNotSpent = "";
|
||||
|
||||
/** The chosen colors string. */
|
||||
private String chosenColors = null;
|
||||
@@ -229,6 +231,13 @@ public class SpellAbilityVariables implements Cloneable {
|
||||
return this.manaSpent;
|
||||
}
|
||||
|
||||
public final void setManaNotSpent(final String s) {
|
||||
this.manaNotSpent = s;
|
||||
}
|
||||
public final String getManaNotSpent() {
|
||||
return this.manaNotSpent;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>zone</code>.
|
||||
|
||||
Reference in New Issue
Block a user