mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- TargetsValid should find targets in the subabilities
This commit is contained in:
@@ -125,6 +125,7 @@ public class TriggerSpellAbilityCast extends Trigger {
|
|||||||
} else {
|
} else {
|
||||||
if (sa.getTargetRestrictions().doesTarget()) {
|
if (sa.getTargetRestrictions().doesTarget()) {
|
||||||
boolean validTgtFound = false;
|
boolean validTgtFound = false;
|
||||||
|
while (sa != null && !validTgtFound) {
|
||||||
for (final Card tgt : sa.getTargets().getTargetCards()) {
|
for (final Card tgt : sa.getTargets().getTargetCards()) {
|
||||||
if (tgt.isValid(this.mapParams.get("TargetsValid").split(","), this.getHostCard()
|
if (tgt.isValid(this.mapParams.get("TargetsValid").split(","), this.getHostCard()
|
||||||
.getController(), this.getHostCard())) {
|
.getController(), this.getHostCard())) {
|
||||||
@@ -139,6 +140,8 @@ public class TriggerSpellAbilityCast extends Trigger {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sa = sa.getSubAbility();
|
||||||
|
}
|
||||||
|
|
||||||
if (!validTgtFound) {
|
if (!validTgtFound) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user