mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Add ActivatorThisTurnCastEach (#5681)
This commit is contained in:
@@ -111,6 +111,27 @@ public class TriggerSpellAbilityCastOrCopy extends Trigger {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (hasParam("ActivatorThisTurnCastEach")) {
|
||||||
|
final String compare = getParam("ActivatorThisTurnCastEach");
|
||||||
|
final String valid = getParamOrDefault("ValidCard", "Card");
|
||||||
|
boolean found = false;
|
||||||
|
int right = Integer.parseInt(compare.substring(2));
|
||||||
|
for (String v : valid.split(",")) {
|
||||||
|
if (!cast.isValid(v, getHostCard().getController(), getHostCard(), this)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
List<Card> thisTurnCast = CardUtil.getThisTurnCast(v, getHostCard(), this, getHostCard().getController());
|
||||||
|
thisTurnCast = CardLists.filterControlledByAsList(thisTurnCast, activator);
|
||||||
|
int left = thisTurnCast.size();
|
||||||
|
if (Expressions.compare(left, compare, right)) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!matchesValidParam("ValidCard", cast)) {
|
if (!matchesValidParam("ValidCard", cast)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user