mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
[MID] Implemented Faith Flare
This commit is contained in:
parent
5cfc86f799
commit
5cbc1bcf64
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/f/FaithFlare.java
Normal file
76
Mage.Sets/src/mage/cards/f/FaithFlare.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
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.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FaithFlare extends CardImpl {
|
||||
|
||||
public FaithFlare(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
|
||||
// Target creature gets +2/+2 until end of turn. If it's a Human, it gets +3/+3 and gains indestructible until end of turn instead.
|
||||
this.getSpellAbility().addEffect(new FaithFlareEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private FaithFlare(final FaithFlare card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FaithFlare copy() {
|
||||
return new FaithFlare(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FaithFlareEffect extends OneShotEffect {
|
||||
|
||||
FaithFlareEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "target creature gets +2/+2 until end of turn. If it's a Human, " +
|
||||
"it gets +3/+3 and gains indestructible until end of turn instead";
|
||||
}
|
||||
|
||||
private FaithFlareEffect(final FaithFlareEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FaithFlareEffect copy() {
|
||||
return new FaithFlareEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
if (permanent.hasSubtype(SubType.HUMAN, game)) {
|
||||
game.addEffect(new BoostTargetEffect(3, 3), source);
|
||||
game.addEffect(new GainAbilityTargetEffect(
|
||||
IndestructibleAbility.getInstance(), Duration.EndOfTurn
|
||||
), source);
|
||||
} else {
|
||||
game.addEffect(new BoostTargetEffect(2, 2), source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -66,6 +66,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dissipate", 49, Rarity.UNCOMMON, mage.cards.d.Dissipate.class));
|
||||
cards.add(new SetCardInfo("Eaten Alive", 99, Rarity.COMMON, mage.cards.e.EatenAlive.class));
|
||||
cards.add(new SetCardInfo("Embodiment of Flame", 141, Rarity.UNCOMMON, mage.cards.e.EmbodimentOfFlame.class));
|
||||
cards.add(new SetCardInfo("Faith Flare", 19, Rarity.COMMON, mage.cards.f.FaithFlare.class));
|
||||
cards.add(new SetCardInfo("Faithful Mending", 221, Rarity.UNCOMMON, mage.cards.f.FaithfulMending.class));
|
||||
cards.add(new SetCardInfo("Falkenrath Perforator", 136, Rarity.COMMON, mage.cards.f.FalkenrathPerforator.class));
|
||||
cards.add(new SetCardInfo("Famished Foragers", 138, Rarity.COMMON, mage.cards.f.FamishedForagers.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue