mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[FDN] Implement Herald of Eternal Dawn
This commit is contained in:
parent
311c92ad8c
commit
482fbf0d0c
7 changed files with 119 additions and 166 deletions
|
|
@ -3,15 +3,15 @@ package mage.cards.c;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.CantLoseGameSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ReconfigureAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ public final class CloudsteelKirin extends CardImpl {
|
|||
FlyingAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||
));
|
||||
ability.addEffect(new GainAbilityAttachedEffect(
|
||||
new SimpleStaticAbility(new CloudsteelKirinEffect()), AttachmentType.EQUIPMENT
|
||||
new SimpleStaticAbility(new CantLoseGameSourceControllerEffect()), AttachmentType.EQUIPMENT
|
||||
).setText("and \"You can't lose the game and your opponents can't win the game.\""));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
@ -53,37 +53,3 @@ public final class CloudsteelKirin extends CardImpl {
|
|||
return new CloudsteelKirin(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CloudsteelKirinEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
CloudsteelKirinEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, false, false);
|
||||
staticText = "You can't lose the game and your opponents can't win the game";
|
||||
}
|
||||
|
||||
private CloudsteelKirinEffect(final CloudsteelKirinEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudsteelKirinEffect copy() {
|
||||
return new CloudsteelKirinEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.WINS
|
||||
|| event.getType() == GameEvent.EventType.LOSES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
switch (event.getType()) {
|
||||
case WINS:
|
||||
return game.getOpponents(source.getControllerId()).contains(event.getPlayerId());
|
||||
case LOSES:
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
45
Mage.Sets/src/mage/cards/h/HeraldOfEternalDawn.java
Normal file
45
Mage.Sets/src/mage/cards/h/HeraldOfEternalDawn.java
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.CantLoseGameSourceControllerEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HeraldOfEternalDawn extends CardImpl {
|
||||
|
||||
public HeraldOfEternalDawn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}{W}");
|
||||
|
||||
this.subtype.add(SubType.ANGEL);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// You can't lose the game and your opponents can't win the game.
|
||||
this.addAbility(new SimpleStaticAbility(new CantLoseGameSourceControllerEffect()));
|
||||
}
|
||||
|
||||
private HeraldOfEternalDawn(final HeraldOfEternalDawn card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeraldOfEternalDawn copy() {
|
||||
return new HeraldOfEternalDawn(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +1,13 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.CantLoseGameSourceControllerEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -28,7 +23,7 @@ public final class PlatinumAngel extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
this.addAbility(new SimpleStaticAbility(new PlatinumAngelEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new CantLoseGameSourceControllerEffect()));
|
||||
}
|
||||
|
||||
private PlatinumAngel(final PlatinumAngel card) {
|
||||
|
|
@ -40,37 +35,3 @@ public final class PlatinumAngel extends CardImpl {
|
|||
return new PlatinumAngel(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PlatinumAngelEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
PlatinumAngelEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, false, false);
|
||||
staticText = "You can't lose the game and your opponents can't win the game";
|
||||
}
|
||||
|
||||
private PlatinumAngelEffect(final PlatinumAngelEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlatinumAngelEffect copy() {
|
||||
return new PlatinumAngelEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.WINS
|
||||
|| event.getType() == GameEvent.EventType.LOSES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
switch (event.getType()) {
|
||||
case WINS:
|
||||
return game.getOpponents(source.getControllerId()).contains(event.getPlayerId());
|
||||
case LOSES:
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package mage.cards.t;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||
|
|
@ -10,24 +9,23 @@ import mage.abilities.costs.common.ExileSourceCost;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.CantLoseGameSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.hint.ConditionHint;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.Angel33Token;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.game.permanent.token.Angel33Token;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
|
@ -56,7 +54,7 @@ public final class TheBookOfExaltedDeeds extends CardImpl {
|
|||
new AddCountersTargetEffect(CounterType.ENLIGHTENED.createInstance()), new ManaCostsImpl<>("{W}{W}{W}")
|
||||
);
|
||||
ability.addEffect(new GainAbilityTargetEffect(
|
||||
new SimpleStaticAbility(new TheBookOfExaltedDeedsEffect()), Duration.Custom,
|
||||
new SimpleStaticAbility(new CantLoseGameSourceControllerEffect()), Duration.Custom,
|
||||
"It gains \"You can't lose the game and your opponents can't win the game.\""
|
||||
));
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
@ -74,37 +72,3 @@ public final class TheBookOfExaltedDeeds extends CardImpl {
|
|||
return new TheBookOfExaltedDeeds(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TheBookOfExaltedDeedsEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
TheBookOfExaltedDeedsEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, false, false);
|
||||
staticText = "You can't lose the game and your opponents can't win the game";
|
||||
}
|
||||
|
||||
private TheBookOfExaltedDeedsEffect(final TheBookOfExaltedDeedsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheBookOfExaltedDeedsEffect copy() {
|
||||
return new TheBookOfExaltedDeedsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.WINS
|
||||
|| event.getType() == GameEvent.EventType.LOSES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
switch (event.getType()) {
|
||||
case WINS:
|
||||
return game.getOpponents(source.getControllerId()).contains(event.getPlayerId());
|
||||
case LOSES:
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ public final class Foundations extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Halana and Alena, Partners", 659, Rarity.RARE, mage.cards.h.HalanaAndAlenaPartners.class));
|
||||
cards.add(new SetCardInfo("Harmless Offering", 625, Rarity.RARE, mage.cards.h.HarmlessOffering.class));
|
||||
cards.add(new SetCardInfo("Helpful Hunter", 16, Rarity.COMMON, mage.cards.h.HelpfulHunter.class));
|
||||
cards.add(new SetCardInfo("Herald of Eternal Dawn", 17, Rarity.MYTHIC, mage.cards.h.HeraldOfEternalDawn.class));
|
||||
cards.add(new SetCardInfo("Hero's Downfall", 175, Rarity.UNCOMMON, mage.cards.h.HerosDownfall.class));
|
||||
cards.add(new SetCardInfo("Hidetsugu's Second Rite", 202, Rarity.UNCOMMON, mage.cards.h.HidetsugusSecondRite.class));
|
||||
cards.add(new SetCardInfo("Highborn Vampire", 522, Rarity.COMMON, mage.cards.h.HighbornVampire.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
package mage.abilities.effects.common.continuous;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class CantLoseGameSourceControllerEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
public CantLoseGameSourceControllerEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit, false, false);
|
||||
staticText = "you can't lose the game and your opponents can't win the game";
|
||||
}
|
||||
|
||||
private CantLoseGameSourceControllerEffect(final CantLoseGameSourceControllerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CantLoseGameSourceControllerEffect copy() {
|
||||
return new CantLoseGameSourceControllerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
switch (event.getType()) {
|
||||
case WINS:
|
||||
case LOSES:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
switch (event.getType()) {
|
||||
case WINS:
|
||||
return game.getOpponents(source.getControllerId()).contains(event.getPlayerId());
|
||||
case LOSES:
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +1,31 @@
|
|||
package mage.game.command.emblems;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect;
|
||||
import mage.abilities.effects.common.continuous.CantLoseGameSourceControllerEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterPlaneswalkerPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class GideonOfTheTrialsEmblem extends Emblem {
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||
new FilterPlaneswalkerPermanent(SubType.GIDEON), true
|
||||
);
|
||||
|
||||
public GideonOfTheTrialsEmblem() {
|
||||
super("Emblem Gideon");
|
||||
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new GideonOfTheTrialsCantLoseEffect());
|
||||
this.getAbilities().add(ability);
|
||||
this.getAbilities().add(new SimpleStaticAbility(
|
||||
Zone.COMMAND,
|
||||
new ConditionalContinuousRuleModifyingEffect(new CantLoseGameSourceControllerEffect(), condition)
|
||||
.setText("as long as you control a Gideon planeswalker, you can't lose the game and your opponents can't win the game")
|
||||
));
|
||||
}
|
||||
|
||||
private GideonOfTheTrialsEmblem(final GideonOfTheTrialsEmblem card) {
|
||||
|
|
@ -32,41 +37,3 @@ public final class GideonOfTheTrialsEmblem extends Emblem {
|
|||
return new GideonOfTheTrialsEmblem(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GideonOfTheTrialsCantLoseEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
private static final FilterPlaneswalkerPermanent filter = new FilterPlaneswalkerPermanent("a Gideon planeswalker");
|
||||
|
||||
static {
|
||||
filter.add(SubType.GIDEON.getPredicate());
|
||||
}
|
||||
|
||||
public GideonOfTheTrialsCantLoseEffect() {
|
||||
super(Duration.EndOfGame, Outcome.Benefit, false, false);
|
||||
staticText = "As long as you control a Gideon planeswalker, you can't lose the game and your opponents can't win the game";
|
||||
}
|
||||
|
||||
protected GideonOfTheTrialsCantLoseEffect(final GideonOfTheTrialsCantLoseEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.WINS
|
||||
|| event.getType() == GameEvent.EventType.LOSES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if ((event.getType() == GameEvent.EventType.WINS && game.getOpponents(source.getControllerId()).contains(event.getPlayerId()))
|
||||
|| (event.getType() == GameEvent.EventType.LOSES && event.getPlayerId().equals(source.getControllerId()))) {
|
||||
return game.getBattlefield().containsControlled(filter, source, game, 1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GideonOfTheTrialsCantLoseEffect copy() {
|
||||
return new GideonOfTheTrialsCantLoseEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue