mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
@TriggerReplacementBase.meetsCommonRequirements a check for ManaNotSpent was fetching a wrong parameter
This commit is contained in:
@@ -20,6 +20,7 @@ public class MagicColor {
|
|||||||
public static final byte[] WUBRG = new byte[] { WHITE, BLUE, BLACK, RED, GREEN };
|
public static final byte[] WUBRG = new byte[] { WHITE, BLUE, BLACK, RED, GREEN };
|
||||||
|
|
||||||
public static byte fromName(String s) {
|
public static byte fromName(String s) {
|
||||||
|
if( s == null ) return 0;
|
||||||
if (s.equalsIgnoreCase(Constant.Color.WHITE) || s.equalsIgnoreCase("w")) {
|
if (s.equalsIgnoreCase(Constant.Color.WHITE) || s.equalsIgnoreCase("w")) {
|
||||||
return MagicColor.WHITE;
|
return MagicColor.WHITE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ public abstract class TriggerReplacementBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params.containsKey("ManaNotSpent")) {
|
if (params.containsKey("ManaNotSpent")) {
|
||||||
byte spent = MagicColor.fromName(params.get("ManaSpent"));
|
byte spent = MagicColor.fromName(params.get("ManaNotSpent"));
|
||||||
if ( 0 != (this.getHostCard().getColorsPaid() & spent)) {
|
if ( 0 != (this.getHostCard().getColorsPaid() & spent)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user