AbilityManaPart: add valid check for the SA itself

split later into extra check for SA and Host
This commit is contained in:
Hanmac
2018-04-12 07:16:31 +02:00
parent 333ba13869
commit f7bed9089c
2 changed files with 8 additions and 0 deletions

View File

@@ -168,6 +168,10 @@ public class ForgeScript {
if (!sa.isFlashBackAbility()) {
return false;
}
} else if (property.equals("Kicked")) {
if (!sa.isKicked()) {
return false;
}
} else if (property.equals("Aftermath")) {
if (!sa.isAftermath()) {
return false;

View File

@@ -337,6 +337,10 @@ public class AbilityManaPart implements java.io.Serializable {
}
}
if (sa.isValid(restriction, this.getSourceCard().getController(), this.getSourceCard(), null)) {
return true;
}
if (sa.isAbility()) {
if (restriction.startsWith("Activated")) {
restriction = TextUtil.fastReplace(restriction, "Activated", "Card");