Fix static trigger messing up LTB trigger

This commit is contained in:
tool4EvEr
2023-03-04 15:10:03 +01:00
parent 96c94ffa95
commit 0657bdc243
5 changed files with 5 additions and 5 deletions

View File

@@ -1378,7 +1378,7 @@ public class AbilityUtils {
Player pl = sa.getActivatingPlayer();
final Game game = pl.getGame();
if (sa.isTrigger() && sa.getParent() == null) {
if (sa.isTrigger() && !sa.getTrigger().isStatic() && sa.getParent() == null) {
// when trigger cost are paid before the effect does resolve, need to clean the trigger
game.getTriggerHandler().resetActiveTriggers();
}

View File

@@ -207,7 +207,7 @@ public class AnimateEffect extends AnimateEffectBase {
if (sa.hasParam("AtEOT") && !tgts.isEmpty()) {
registerDelayedTrigger(sa, sa.getParam("AtEOT"), tgts);
}
} // animateResolve extends SpellEffect {
}
/* (non-Javadoc)
* @see forge.card.abilityfactory.SpellEffect#getStackDescription(java.util.Map, forge.card.spellability.SpellAbility)

View File

@@ -2564,7 +2564,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
continue;
}
for (final StaticAbility stAb : ca.getStaticAbilities()) {
if (stAb.isSuppressed() || !stAb.checkConditions()) {
if (!stAb.checkConditions()) {
continue;
}

View File

@@ -430,7 +430,7 @@ public class CostAdjustment {
}
private static boolean checkRequirement(final SpellAbility sa, final StaticAbility st) {
if (st.isSuppressed() || !st.checkConditions()) {
if (!st.checkConditions()) {
return false;
}

View File

@@ -1752,7 +1752,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
public boolean isZeroTargets() {
return getMinTargets() == 0 && getTargets().size() == 0;
return getMinTargets() == 0 && getTargets().isEmpty();
}
public boolean isMinTargetChosen() {