mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Flames of the Raze-Boar
This commit is contained in:
parent
cf19bf2f56
commit
5522da05c0
2 changed files with 79 additions and 0 deletions
78
Mage.Sets/src/mage/cards/f/FlamesOfTheRazeBoar.java
Normal file
78
Mage.Sets/src/mage/cards/f/FlamesOfTheRazeBoar.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.FerociousCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.filter.predicate.permanent.PermanentIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FlamesOfTheRazeBoar extends CardImpl {
|
||||
|
||||
public FlamesOfTheRazeBoar(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{5}{R}");
|
||||
|
||||
// Flames of the Raze-Boar deals 4 damage to target creature an opponent controls. Then Flames of the Raze-Boar deals 2 damage to each other creature that player controls if you control a creature with power 4 or greater.
|
||||
this.getSpellAbility().addEffect(new FlamesOfTheRazeBoarEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponentsCreaturePermanent());
|
||||
}
|
||||
|
||||
private FlamesOfTheRazeBoar(final FlamesOfTheRazeBoar card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlamesOfTheRazeBoar copy() {
|
||||
return new FlamesOfTheRazeBoar(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FlamesOfTheRazeBoarEffect extends OneShotEffect {
|
||||
|
||||
FlamesOfTheRazeBoarEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "{this} deals 4 damage to target creature an opponent controls. " +
|
||||
"Then {this} deals 2 damage to each other creature that player controls " +
|
||||
"if you control a creature with power 4 or greater.";
|
||||
}
|
||||
|
||||
private FlamesOfTheRazeBoarEffect(final FlamesOfTheRazeBoarEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlamesOfTheRazeBoarEffect copy() {
|
||||
return new FlamesOfTheRazeBoarEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
permanent.damage(4, source.getSourceId(), game);
|
||||
if (!FerociousCondition.instance.apply(game, source)) {
|
||||
return true;
|
||||
}
|
||||
FilterPermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new ControllerIdPredicate(permanent.getControllerId()));
|
||||
filter.add(Predicates.not(new PermanentIdPredicate(permanent.getId())));
|
||||
return new DamageAllEffect(2, filter).apply(game, source);
|
||||
}
|
||||
}
|
|
@ -114,6 +114,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Feral Maaka", 100, Rarity.COMMON, mage.cards.f.FeralMaaka.class));
|
||||
cards.add(new SetCardInfo("Final Payment", 171, Rarity.COMMON, mage.cards.f.FinalPayment.class));
|
||||
cards.add(new SetCardInfo("Fireblade Artist", 172, Rarity.UNCOMMON, mage.cards.f.FirebladeArtist.class));
|
||||
cards.add(new SetCardInfo("Flames of the Raze-Boar", 101, Rarity.UNCOMMON, mage.cards.f.FlamesOfTheRazeBoar.class));
|
||||
cards.add(new SetCardInfo("Font of Agonies", 74, Rarity.RARE, mage.cards.f.FontOfAgonies.class));
|
||||
cards.add(new SetCardInfo("Footlight Fiend", 216, Rarity.COMMON, mage.cards.f.FootlightFiend.class));
|
||||
cards.add(new SetCardInfo("Forbidding Spirit", 9, Rarity.UNCOMMON, mage.cards.f.ForbiddingSpirit.class));
|
||||
|
|
Loading…
Reference in a new issue