mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[TDM] Implement Thunder of Unity
This commit is contained in:
parent
f2ea83f73b
commit
1da557534e
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/t/ThunderOfUnity.java
Normal file
83
Mage.Sets/src/mage/cards/t/ThunderOfUnity.java
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.SagaAbility;
|
||||
import mage.abilities.effects.common.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SagaChapter;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ThunderOfUnity extends CardImpl {
|
||||
|
||||
public ThunderOfUnity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}{W}{B}");
|
||||
|
||||
this.subtype.add(SubType.SAGA);
|
||||
|
||||
// (As this Saga enters step, add a lore counter. Sacrifice after III.)
|
||||
SagaAbility sagaAbility = new SagaAbility(this);
|
||||
|
||||
// I -- You draw two cards and you lose 2 life.
|
||||
sagaAbility.addChapterEffect(
|
||||
this, SagaChapter.CHAPTER_I,
|
||||
new DrawCardSourceControllerEffect(2, true),
|
||||
new LoseLifeSourceControllerEffect(2).concatBy("and")
|
||||
);
|
||||
|
||||
// II, III -- Whenever a creature you control enters this turn, each opponent loses 1 life and you gain 1 life.
|
||||
sagaAbility.addChapterEffect(
|
||||
this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_III,
|
||||
new CreateDelayedTriggeredAbilityEffect(new ThunderOfUnityTriggeredAbility())
|
||||
);
|
||||
this.addAbility(sagaAbility);
|
||||
}
|
||||
|
||||
private ThunderOfUnity(final ThunderOfUnity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThunderOfUnity copy() {
|
||||
return new ThunderOfUnity(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ThunderOfUnityTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
ThunderOfUnityTriggeredAbility() {
|
||||
super(new LoseLifeOpponentsEffect(1), Duration.EndOfTurn, false, false);
|
||||
this.addEffect(new GainLifeEffect(1).concatBy("and"));
|
||||
this.setTriggerPhrase("Whenever a creature you control enters this turn, ");
|
||||
}
|
||||
|
||||
private ThunderOfUnityTriggeredAbility(final ThunderOfUnityTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThunderOfUnityTriggeredAbility copy() {
|
||||
return new ThunderOfUnityTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
return permanent != null && permanent.isCreature(game) && permanent.isControlledBy(getControllerId());
|
||||
}
|
||||
}
|
||||
|
|
@ -200,6 +200,7 @@ public final class TarkirDragonstorm extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Temur Tawnyback", 229, Rarity.COMMON, mage.cards.t.TemurTawnyback.class));
|
||||
cards.add(new SetCardInfo("The Sibsig Ceremony", 91, Rarity.RARE, mage.cards.t.TheSibsigCeremony.class));
|
||||
cards.add(new SetCardInfo("Thornwood Falls", 269, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class));
|
||||
cards.add(new SetCardInfo("Thunder of Unity", 231, Rarity.RARE, mage.cards.t.ThunderOfUnity.class));
|
||||
cards.add(new SetCardInfo("Trade Route Envoy", 163, Rarity.COMMON, mage.cards.t.TradeRouteEnvoy.class));
|
||||
cards.add(new SetCardInfo("Tranquil Cove", 270, Rarity.COMMON, mage.cards.t.TranquilCove.class));
|
||||
cards.add(new SetCardInfo("Twin Bolt", 128, Rarity.COMMON, mage.cards.t.TwinBolt.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue