mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
[AFR] Implemented Burning Hands
This commit is contained in:
parent
75ec16ac19
commit
f4de47461e
2 changed files with 64 additions and 0 deletions
63
Mage.Sets/src/mage/cards/b/BurningHands.java
Normal file
63
Mage.Sets/src/mage/cards/b/BurningHands.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BurningHands extends CardImpl {
|
||||
|
||||
public BurningHands(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
|
||||
// Burning Hands deals 2 damage to target creature or planeswalker. If that permanent is green, Burning Hands deals 6 damage instead.
|
||||
this.getSpellAbility().addEffect(new BurningHandsEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
|
||||
}
|
||||
|
||||
private BurningHands(final BurningHands card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BurningHands copy() {
|
||||
return new BurningHands(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BurningHandsEffect extends OneShotEffect {
|
||||
|
||||
BurningHandsEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "{this} deals 2 damage to target creature or planeswalker. " +
|
||||
"If that permanent is green, {this} deals 6 damage instead";
|
||||
}
|
||||
|
||||
private BurningHandsEffect(final BurningHandsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BurningHandsEffect copy() {
|
||||
return new BurningHandsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
return permanent.damage(permanent.getColor(game).isGreen() ? 6 : 2, source.getSourceId(), source, game) > 0;
|
||||
}
|
||||
}
|
|
@ -38,6 +38,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Bruenor Battlehammer", 219, Rarity.UNCOMMON, mage.cards.b.BruenorBattlehammer.class));
|
||||
cards.add(new SetCardInfo("Bulette", 173, Rarity.COMMON, mage.cards.b.Bulette.class));
|
||||
cards.add(new SetCardInfo("Bull's Strength", 174, Rarity.COMMON, mage.cards.b.BullsStrength.class));
|
||||
cards.add(new SetCardInfo("Burning Hands", 135, Rarity.UNCOMMON, mage.cards.b.BurningHands.class));
|
||||
cards.add(new SetCardInfo("Cave of the Frost Dragon", 253, Rarity.RARE, mage.cards.c.CaveOfTheFrostDragon.class));
|
||||
cards.add(new SetCardInfo("Celestial Unicorn", 5, Rarity.COMMON, mage.cards.c.CelestialUnicorn.class));
|
||||
cards.add(new SetCardInfo("Charmed Sleep", 50, Rarity.COMMON, mage.cards.c.CharmedSleep.class));
|
||||
|
|
Loading…
Reference in a new issue