Fix stateBasedAction_Saga

This commit is contained in:
Bug Hunter
2021-05-12 14:47:32 +00:00
committed by Hans Mackowiak
parent 9d4e02c2d4
commit f3b771cb7d
2 changed files with 8 additions and 7 deletions

View File

@@ -1355,8 +1355,7 @@ public class GameAction {
if (c.getCounters(CounterEnumType.LORE) < c.getFinalChapterNr()) { if (c.getCounters(CounterEnumType.LORE) < c.getFinalChapterNr()) {
return false; return false;
} }
if (!game.getStack().hasSimultaneousStackEntries() && if (!game.getStack().hasSourceOnStack(c, SpellAbilityPredicates.isChapter())) {
!game.getStack().hasSourceOnStack(c, SpellAbilityPredicates.isChapter())) {
sacrifice(c, null, table); sacrifice(c, null, table);
checkAgain = true; checkAgain = true;
} }

View File

@@ -172,8 +172,7 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
} }
public final void clearFrozen() { public final void clearFrozen() {
// TODO: frozen triggered abilities and undoable costs have nasty // TODO: frozen triggered abilities and undoable costs have nasty consequences
// consequences
frozen = false; frozen = false;
frozenStack.clear(); frozenStack.clear();
} }
@@ -905,11 +904,14 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
} }
for (SpellAbilityStackInstance si : stack) { for (SpellAbilityStackInstance si : stack) {
if (si.isTrigger() && si.getSourceCard().equals(source)) { if (si.isTrigger() && si.getSourceCard().equals(source)) {
if (pred == null) { if (pred == null || pred.apply(si.getSpellAbility(false))) {
return true; return true;
} }
SpellAbility sa = si.getSpellAbility(false); }
if (pred.apply(sa)) { }
for (SpellAbility sa : simultaneousStackEntryList) {
if (sa.isTrigger() && sa.getHostCard().equals(source)) {
if (pred == null || pred.apply(sa)) {
return true; return true;
} }
} }