forked from External/mage
[J25] Implement Fumulus, the Infestation
This commit is contained in:
parent
0d98652c60
commit
43cdf845d5
3 changed files with 85 additions and 2 deletions
78
Mage.Sets/src/mage/cards/f/FumulusTheInfestation.java
Normal file
78
Mage.Sets/src/mage/cards/f/FumulusTheInfestation.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksAllTriggeredAbility;
|
||||
import mage.abilities.common.SacrificePermanentTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.permanent.token.XiraBlackInsectToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FumulusTheInfestation extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("an Insect, Leech, Slug, or Worm you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
SubType.INSECT.getPredicate(),
|
||||
SubType.LEECH.getPredicate(),
|
||||
SubType.SLUG.getPredicate(),
|
||||
SubType.WORM.getPredicate()
|
||||
));
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public FumulusTheInfestation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.subtype.add(SubType.INSECT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Deathtouch
|
||||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
|
||||
// Whenever a player sacrifices a nontoken creature, create a 1/1 black Insect creature token with flying.
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(
|
||||
new CreateTokenEffect(new XiraBlackInsectToken()),
|
||||
StaticFilters.FILTER_CREATURE_NON_TOKEN, TargetController.ANY
|
||||
));
|
||||
|
||||
// Whenever an Insect, Leech, Slug, or Worm you control attacks, defending player loses 1 life and you gain 1 life.
|
||||
Ability ability = new AttacksAllTriggeredAbility(
|
||||
new LoseLifeTargetEffect(1), false,
|
||||
filter, SetTargetPointer.PLAYER, false
|
||||
);
|
||||
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private FumulusTheInfestation(final FumulusTheInfestation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FumulusTheInfestation copy() {
|
||||
return new FumulusTheInfestation(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -278,6 +278,7 @@ public final class FoundationsJumpstart extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Foul Play", 442, Rarity.UNCOMMON, mage.cards.f.FoulPlay.class));
|
||||
cards.add(new SetCardInfo("Fretwork Colony", 443, Rarity.UNCOMMON, mage.cards.f.FretworkColony.class));
|
||||
cards.add(new SetCardInfo("Frost Trickster", 313, Rarity.COMMON, mage.cards.f.FrostTrickster.class));
|
||||
cards.add(new SetCardInfo("Fumulus, the Infestation", 42, Rarity.RARE, mage.cards.f.FumulusTheInfestation.class));
|
||||
cards.add(new SetCardInfo("Fungal Plots", 658, Rarity.UNCOMMON, mage.cards.f.FungalPlots.class));
|
||||
cards.add(new SetCardInfo("Furious Reprisal", 554, Rarity.UNCOMMON, mage.cards.f.FuriousReprisal.class));
|
||||
cards.add(new SetCardInfo("Fusion Elemental", 745, Rarity.UNCOMMON, mage.cards.f.FusionElemental.class));
|
||||
|
|
|
|||
|
|
@ -28,7 +28,11 @@ public class SacrificePermanentTriggeredAbility extends TriggeredAbilityImpl {
|
|||
* zone = battlefield, setTargetPointer = NONE, optional = false
|
||||
*/
|
||||
public SacrificePermanentTriggeredAbility(Effect effect, FilterPermanent filter) {
|
||||
this(Zone.BATTLEFIELD, effect, filter, TargetController.YOU, SetTargetPointer.NONE, false);
|
||||
this(effect, filter, TargetController.YOU);
|
||||
}
|
||||
|
||||
public SacrificePermanentTriggeredAbility(Effect effect, FilterPermanent filter, TargetController sacrificingPlayer) {
|
||||
this(Zone.BATTLEFIELD, effect, filter, sacrificingPlayer, SetTargetPointer.NONE, false);
|
||||
}
|
||||
|
||||
public SacrificePermanentTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter,
|
||||
|
|
@ -115,7 +119,7 @@ public class SacrificePermanentTriggeredAbility extends TriggeredAbilityImpl {
|
|||
default:
|
||||
throw new IllegalArgumentException("Unsupported TargetController in SacrificePermanentTriggeredAbility: " + sacrificingPlayer);
|
||||
}
|
||||
return getWhen() + targetControllerText + CardUtil.addArticle(filter.getMessage()) + ", ";
|
||||
return getWhen() + targetControllerText + CardUtil.addArticle(filter.getMessage()) + ", ";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue