mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[NEO] Implemented Kami's Flare
This commit is contained in:
parent
266addb4e1
commit
d3ba8224f4
2 changed files with 93 additions and 0 deletions
92
Mage.Sets/src/mage/cards/k/KamisFlare.java
Normal file
92
Mage.Sets/src/mage/cards/k/KamisFlare.java
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
package mage.cards.k;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.hint.ConditionHint;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.permanent.ModifiedPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class KamisFlare extends CardImpl {
|
||||||
|
|
||||||
|
public KamisFlare(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||||
|
|
||||||
|
// Kami's Flare deals 3 damage to target creature or planeswalker. Kami's Flare also deals 2 damage to that permanent's controller if you control a modified creature.
|
||||||
|
this.getSpellAbility().addEffect(new KamisFlareEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
|
||||||
|
this.getSpellAbility().addHint(KamisFlareEffect.getHint());
|
||||||
|
}
|
||||||
|
|
||||||
|
private KamisFlare(final KamisFlare card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KamisFlare copy() {
|
||||||
|
return new KamisFlare(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class KamisFlareEffect extends OneShotEffect {
|
||||||
|
private static final FilterPermanent filter = new FilterControlledPermanent();
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(ModifiedPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Hint hint = new ConditionHint(
|
||||||
|
new PermanentsOnTheBattlefieldCondition(filter), "You control a modified creature"
|
||||||
|
);
|
||||||
|
|
||||||
|
KamisFlareEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "{this} deals 3 damage to target creature or planeswalker. " +
|
||||||
|
"{this} also deals 2 damage to that permanent's controller if you control a modified creature";
|
||||||
|
}
|
||||||
|
|
||||||
|
private KamisFlareEffect(final KamisFlareEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KamisFlareEffect copy() {
|
||||||
|
return new KamisFlareEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||||
|
if (permanent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
permanent.damage(3, source, game);
|
||||||
|
if (!game.getBattlefield().contains(filter, source, game, 1)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Player player = game.getPlayer(permanent.getControllerId());
|
||||||
|
if (player != null) {
|
||||||
|
player.damage(2, source, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Hint getHint() {
|
||||||
|
return hint;
|
||||||
|
}
|
||||||
|
}
|
|
@ -137,6 +137,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Kaito Shizuki", 226, Rarity.MYTHIC, mage.cards.k.KaitoShizuki.class));
|
cards.add(new SetCardInfo("Kaito Shizuki", 226, Rarity.MYTHIC, mage.cards.k.KaitoShizuki.class));
|
||||||
cards.add(new SetCardInfo("Kaito's Pursuit", 103, Rarity.COMMON, mage.cards.k.KaitosPursuit.class));
|
cards.add(new SetCardInfo("Kaito's Pursuit", 103, Rarity.COMMON, mage.cards.k.KaitosPursuit.class));
|
||||||
cards.add(new SetCardInfo("Kami of Terrible Secrets", 105, Rarity.COMMON, mage.cards.k.KamiOfTerribleSecrets.class));
|
cards.add(new SetCardInfo("Kami of Terrible Secrets", 105, Rarity.COMMON, mage.cards.k.KamiOfTerribleSecrets.class));
|
||||||
|
cards.add(new SetCardInfo("Kami's Flare", 150, Rarity.COMMON, mage.cards.k.KamisFlare.class));
|
||||||
cards.add(new SetCardInfo("Kappa Tech-Wrecker", 198, Rarity.UNCOMMON, mage.cards.k.KappaTechWrecker.class));
|
cards.add(new SetCardInfo("Kappa Tech-Wrecker", 198, Rarity.UNCOMMON, mage.cards.k.KappaTechWrecker.class));
|
||||||
cards.add(new SetCardInfo("Kindled Fury", 151, Rarity.COMMON, mage.cards.k.KindledFury.class));
|
cards.add(new SetCardInfo("Kindled Fury", 151, Rarity.COMMON, mage.cards.k.KindledFury.class));
|
||||||
cards.add(new SetCardInfo("Kirin-Touched Orochi", 212, Rarity.RARE, mage.cards.k.KirinTouchedOrochi.class));
|
cards.add(new SetCardInfo("Kirin-Touched Orochi", 212, Rarity.RARE, mage.cards.k.KirinTouchedOrochi.class));
|
||||||
|
|
Loading…
Reference in a new issue