mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
CardFactoryUtil: fix Squad Trigger for Copy
This commit is contained in:
@@ -1806,7 +1806,7 @@ public class CardFactoryUtil {
|
||||
inst.addTrigger(parsedTrigger);
|
||||
} else if (keyword.startsWith("Squad")) {
|
||||
final String trigScript = "Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | " +
|
||||
"ValidCard$ Card.Self+wasCast | CheckSVar$ SquadAmount | Secondary$ True | " +
|
||||
"ValidCard$ Card.Self+linkedCastSA | CheckSVar$ SquadAmount | Secondary$ True | " +
|
||||
"TriggerDescription$ When this creature enters the battlefield, create that many tokens that " +
|
||||
"are copies of it.";
|
||||
final String abString = "DB$ CopyPermanent | Defined$ TriggeredCard | NumCopies$ SquadAmount";
|
||||
|
||||
@@ -1810,6 +1810,13 @@ public class CardProperty {
|
||||
} else if (property.equals("couldAttackButNotAttacking")) {
|
||||
if (!game.getPhaseHandler().isPlayerTurn(controller)) return false;
|
||||
return CombatUtil.couldAttackButNotAttacking(combat, card);
|
||||
} else if (property.equals("linkedCastSA")) {
|
||||
if (card.getCastSA() == null) {
|
||||
return false;
|
||||
}
|
||||
if (AbilityUtils.isUnlinkedFromCastSA(spellAbility, card)) {
|
||||
return false;
|
||||
}
|
||||
} else if (property.startsWith("kicked")) {
|
||||
// CR 607.2i check cost is linked
|
||||
if (AbilityUtils.isUnlinkedFromCastSA(spellAbility, card)) {
|
||||
|
||||
Reference in New Issue
Block a user