[NEO] Implemented Life of Toshiro Umezawa / Memory of Toshiro

This commit is contained in:
Evan Kranzler 2022-01-31 08:35:03 -05:00
parent 87d74a4cf9
commit 89b5678cf4
4 changed files with 115 additions and 3 deletions

View file

@ -1,6 +1,7 @@
package mage.abilities.common;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.TriggeredAbility;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
@ -75,10 +76,9 @@ public class SagaAbility extends SimpleStaticAbility {
addChapterEffect(card, fromChapter, toChapter, effects, targets, false);
}
public void addChapterEffect(Card card, SagaChapter fromChapter, SagaChapter toChapter, Effects effects, Targets targets, boolean optional) {
ChapterTriggeredAbility ability;
public void addChapterEffect(Card card, SagaChapter fromChapter, SagaChapter toChapter, Effects effects, Targets targets, boolean optional, Mode... modes) {
for (int i = fromChapter.getNumber(); i <= toChapter.getNumber(); i++) {
ability = new ChapterTriggeredAbility(null, SagaChapter.getChapter(i), toChapter, optional);
ChapterTriggeredAbility ability = new ChapterTriggeredAbility(null, SagaChapter.getChapter(i), toChapter, optional);
for (Effect effect : effects) {
if (effect != null) {
ability.addEffect(effect.copy());
@ -89,6 +89,9 @@ public class SagaAbility extends SimpleStaticAbility {
ability.addTarget(target.copy());
}
}
for (Mode mode : modes) {
ability.addMode(mode.copy());
}
if (i > fromChapter.getNumber()) {
ability.setRuleVisible(false);
}