mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
Implemented Flame Sweep
This commit is contained in:
parent
c4fc04f89c
commit
4258d6f1c1
2 changed files with 59 additions and 0 deletions
58
Mage.Sets/src/mage/cards/f/FlameSweep.java
Normal file
58
Mage.Sets/src/mage/cards/f/FlameSweep.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.ObjectPlayer;
|
||||
import mage.filter.predicate.ObjectPlayerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FlameSweep extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterCreaturePermanent("creature except for creatures you control with flying");
|
||||
|
||||
static {
|
||||
filter.add(FlameSweepPredicate.instance);
|
||||
}
|
||||
|
||||
public FlameSweep(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}");
|
||||
|
||||
// Flame sweep deals 2 damage to each creature except for creatures you control with flying.
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(2, filter));
|
||||
}
|
||||
|
||||
private FlameSweep(final FlameSweep card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlameSweep copy() {
|
||||
return new FlameSweep(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum FlameSweepPredicate implements ObjectPlayerPredicate<ObjectPlayer<Permanent>> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectPlayer<Permanent> input, Game game) {
|
||||
Permanent object = input.getObject();
|
||||
UUID playerId = input.getPlayerId();
|
||||
return !(object.isControlledBy(playerId)
|
||||
&& object.getAbilities(game).stream().anyMatch(
|
||||
ability -> ability.getClass().equals(FlyingAbility.class)
|
||||
));
|
||||
}
|
||||
}
|
|
@ -40,6 +40,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dragon Mage", 135, Rarity.UNCOMMON, mage.cards.d.DragonMage.class));
|
||||
cards.add(new SetCardInfo("Dread Presence", 96, Rarity.RARE, mage.cards.d.DreadPresence.class));
|
||||
cards.add(new SetCardInfo("Empyrean Eagle", 208, Rarity.UNCOMMON, mage.cards.e.EmpyreanEagle.class));
|
||||
cards.add(new SetCardInfo("Flame Sweep", 139, Rarity.UNCOMMON, mage.cards.f.FlameSweep.class));
|
||||
cards.add(new SetCardInfo("Infuriate", 145, Rarity.COMMON, mage.cards.i.Infuriate.class));
|
||||
cards.add(new SetCardInfo("Kykar, Wind's Fury", 212, Rarity.MYTHIC, mage.cards.k.KykarWindsFury.class));
|
||||
cards.add(new SetCardInfo("Leyline of Sanctity", 26, Rarity.RARE, mage.cards.l.LeylineOfSanctity.class));
|
||||
|
|
Loading…
Reference in a new issue