Update rules for Sagas (#13728)

* update saga rules

* update test

* update test
This commit is contained in:
Evan Kranzler 2025-06-07 21:02:26 -04:00 committed by GitHub
parent 8495d6a74e
commit c7f2263ddb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 6 deletions

View file

@ -1,5 +1,8 @@
package org.mage.test.cards.enchantments; package org.mage.test.cards.enchantments;
import mage.abilities.common.SagaAbility;
import mage.abilities.mana.ColorlessManaAbility;
import mage.abilities.mana.RedManaAbility;
import mage.constants.PhaseStep; import mage.constants.PhaseStep;
import mage.constants.Zone; import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
@ -148,8 +151,10 @@ public class SagaTest extends CardTestPlayerBase {
setStopAt(1, PhaseStep.END_TURN); setStopAt(1, PhaseStep.END_TURN);
execute(); execute();
assertPermanentCount(playerA, saga, 0); assertGraveyardCount(playerA, saga, 0);
assertGraveyardCount(playerA, saga, 1); assertAbilityCount(playerA, saga, ColorlessManaAbility.class, 1);
assertAbilityCount(playerA, saga, RedManaAbility.class, 1);
assertAbilityCount(playerA, saga, SagaAbility.class, 0);
assertPermanentCount(playerA, moon, 1); assertPermanentCount(playerA, moon, 1);
} }
@ -171,8 +176,11 @@ public class SagaTest extends CardTestPlayerBase {
setStopAt(1, PhaseStep.END_TURN); setStopAt(1, PhaseStep.END_TURN);
execute(); execute();
assertPermanentCount(playerA, saga, 0); assertGraveyardCount(playerA, saga, 0);
assertGraveyardCount(playerA, saga, 1); // TODO: This should be 0 but the ability still triggers due to blood moon issues
// assertAbilityCount(playerA, saga, ColorlessManaAbility.class, 0);
assertAbilityCount(playerA, saga, RedManaAbility.class, 1);
assertAbilityCount(playerA, saga, SagaAbility.class, 0);
assertPermanentCount(playerA, moon, 1); assertPermanentCount(playerA, moon, 1);
} }

View file

@ -2711,9 +2711,9 @@ public abstract class GameImpl implements Game {
.add(perm); .add(perm);
} }
} }
// 704.5s If the number of lore counters on a Saga permanent is greater than or equal to its final chapter number // 704.5s If the number of lore counters on a Saga permanent with one or more chapter abilities is greater than or equal to its final chapter number
// and it isn't the source of a chapter ability that has triggered but not yet left the stack, that Saga's controller sacrifices it. // and it isn't the source of a chapter ability that has triggered but not yet left the stack, that Saga's controller sacrifices it.
if (perm.hasSubtype(SubType.SAGA, this)) { if (perm.hasSubtype(SubType.SAGA, this) && perm.getAbilities(this).containsClass(SagaAbility.class)) {
int maxChapter = perm int maxChapter = perm
.getAbilities(this) .getAbilities(this)
.stream() .stream()

View file

@ -1,9 +1,11 @@
package mage.game.turn; package mage.game.turn;
import mage.abilities.common.SagaAbility;
import mage.constants.PhaseStep; import mage.constants.PhaseStep;
import mage.constants.SubType; import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -19,6 +21,7 @@ public class PreCombatMainStep extends Step {
static { static {
filter.add(SubType.SAGA.getPredicate()); filter.add(SubType.SAGA.getPredicate());
filter.add(new AbilityPredicate(SagaAbility.class));
} }
public PreCombatMainStep() { public PreCombatMainStep() {