mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[STX] Implemented Explosive Welcome
This commit is contained in:
parent
00952580b4
commit
37a4ae27f1
3 changed files with 64 additions and 0 deletions
56
Mage.Sets/src/mage/cards/e/ExplosiveWelcome.java
Normal file
56
Mage.Sets/src/mage/cards/e/ExplosiveWelcome.java
Normal file
|
@ -0,0 +1,56 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import mage.Mana;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.mana.BasicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ManaType;
|
||||
import mage.filter.common.FilterCreaturePlayerOrPlaneswalker;
|
||||
import mage.filter.predicate.other.AnotherTargetPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
import mage.target.targetpointer.SecondTargetPointer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ExplosiveWelcome extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePlayerOrPlaneswalker filter = new FilterCreaturePlayerOrPlaneswalker();
|
||||
|
||||
static {
|
||||
filter.add(new AnotherTargetPredicate(2));
|
||||
}
|
||||
|
||||
public ExplosiveWelcome(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{7}{R}");
|
||||
|
||||
// Explosive Welcome deals 5 damage to any target and 3 damage to any other target. Add {R}{R}{R}.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(5));
|
||||
this.getSpellAbility().addEffect(
|
||||
new DamageTargetEffect(3)
|
||||
.setTargetPointer(new SecondTargetPointer())
|
||||
.setText("and 3 damage to any other target.")
|
||||
);
|
||||
this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(ManaType.RED, 3)));
|
||||
Target target = new TargetAnyTarget();
|
||||
target.setTargetTag(1);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
target = new TargetAnyTarget(filter);
|
||||
target.setTargetTag(2);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
}
|
||||
|
||||
private ExplosiveWelcome(final ExplosiveWelcome card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExplosiveWelcome copy() {
|
||||
return new ExplosiveWelcome(this);
|
||||
}
|
||||
}
|
|
@ -94,6 +94,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Exhilarating Elocution", 185, Rarity.COMMON, mage.cards.e.ExhilaratingElocution.class));
|
||||
cards.add(new SetCardInfo("Expanded Anatomy", 2, Rarity.COMMON, mage.cards.e.ExpandedAnatomy.class));
|
||||
cards.add(new SetCardInfo("Expel", 18, Rarity.COMMON, mage.cards.e.Expel.class));
|
||||
cards.add(new SetCardInfo("Explosive Welcome", 100, Rarity.UNCOMMON, mage.cards.e.ExplosiveWelcome.class));
|
||||
cards.add(new SetCardInfo("Exponential Growth", 130, Rarity.RARE, mage.cards.e.ExponentialGrowth.class));
|
||||
cards.add(new SetCardInfo("Eyetwitch", 70, Rarity.UNCOMMON, mage.cards.e.Eyetwitch.class));
|
||||
cards.add(new SetCardInfo("Field Trip", 131, Rarity.COMMON, mage.cards.f.FieldTrip.class));
|
||||
|
|
|
@ -5,6 +5,8 @@ import mage.filter.FilterImpl;
|
|||
import mage.filter.FilterInPlay;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.FilterPlayer;
|
||||
import mage.filter.predicate.ObjectPlayerPredicate;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -44,6 +46,11 @@ public class FilterPermanentOrPlayer extends FilterImpl<MageItem> implements Fil
|
|||
return true;
|
||||
}
|
||||
|
||||
public void add(ObjectPlayerPredicate predicate) {
|
||||
playerFilter.add((Predicate<? super Player>) predicate);
|
||||
permanentFilter.add((Predicate<? super Permanent>) predicate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean match(MageItem o, Game game) {
|
||||
if (super.match(o, game)) {
|
||||
|
|
Loading…
Reference in a new issue