mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
[FIC] Implement Ultimate Magic: Holy
This commit is contained in:
parent
85f7aa0a95
commit
dd945eaee6
2 changed files with 69 additions and 0 deletions
67
Mage.Sets/src/mage/cards/u/UltimateMagicHoly.java
Normal file
67
Mage.Sets/src/mage/cards/u/UltimateMagicHoly.java
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.AddContinuousEffectToGame;
|
||||
import mage.abilities.effects.common.PreventDamageToControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.ForetellAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class UltimateMagicHoly extends CardImpl {
|
||||
|
||||
public UltimateMagicHoly(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
|
||||
// Permanents you control gain indestructible until end of turn. If this spell was cast from exile, prevent all damage that would be dealt to you this turn.
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
|
||||
IndestructibleAbility.getInstance(), Duration.EndOfTurn
|
||||
));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new AddContinuousEffectToGame(new PreventDamageToControllerEffect(Duration.EndOfTurn)),
|
||||
UltimateMagicHolyCondition.instance, "If this spell was cast from exile, " +
|
||||
"prevent all damage that would be dealt to you this turn"
|
||||
));
|
||||
|
||||
// Foretell {2}{W}
|
||||
this.addAbility(new ForetellAbility(this, "{2}{W}"));
|
||||
}
|
||||
|
||||
private UltimateMagicHoly(final UltimateMagicHoly card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UltimateMagicHoly copy() {
|
||||
return new UltimateMagicHoly(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum UltimateMagicHolyCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return Optional
|
||||
.ofNullable(source)
|
||||
.map(Ability::getSourceId)
|
||||
.map(game::getSpell)
|
||||
.map(Spell::getFromZone)
|
||||
.map(Zone.EXILED::match)
|
||||
.orElse(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -337,6 +337,8 @@ public final class FinalFantasyCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Torrential Gearhulk", 272, Rarity.RARE, mage.cards.t.TorrentialGearhulk.class));
|
||||
cards.add(new SetCardInfo("Tragic Arrogance", 258, Rarity.RARE, mage.cards.t.TragicArrogance.class));
|
||||
cards.add(new SetCardInfo("Trailblazer's Boots", 370, Rarity.UNCOMMON, mage.cards.t.TrailblazersBoots.class));
|
||||
cards.add(new SetCardInfo("Ultimate Magic: Holy", 110, Rarity.RARE, mage.cards.u.UltimateMagicHoly.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Ultimate Magic: Holy", 32, Rarity.RARE, mage.cards.u.UltimateMagicHoly.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Umaro, Raging Yeti", 156, Rarity.RARE, mage.cards.u.UmaroRagingYeti.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Umaro, Raging Yeti", 63, Rarity.RARE, mage.cards.u.UmaroRagingYeti.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Underground River", 439, Rarity.RARE, mage.cards.u.UndergroundRiver.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue