mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Implemented Rotwidow Pack
This commit is contained in:
parent
8d5a466265
commit
ba47fee11e
3 changed files with 80 additions and 3 deletions
66
Mage.Sets/src/mage/cards/r/RotwidowPack.java
Normal file
66
Mage.Sets/src/mage/cards/r/RotwidowPack.java
Normal file
|
@ -0,0 +1,66 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.ExileFromGraveCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.permanent.token.SpiderToken;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RotwidowPack extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.SPIDER);
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||
|
||||
public RotwidowPack(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{G}");
|
||||
|
||||
this.subtype.add(SubType.SPIDER);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// {3}{B}{G}, Exile a creature card from your graveyard: Create a 1/2 green Spider creature token with reach, then each opponent loses 1 life for each Spider you control.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new CreateTokenEffect(new SpiderToken())
|
||||
.setText("create a 1/2 green Spider creature token with reach, then"),
|
||||
new ManaCostsImpl("{3}{B}{G}")
|
||||
);
|
||||
ability.addEffect(new LoseLifeOpponentsEffect(xValue)
|
||||
.setText("each opponent loses 1 life for each Spider you control.")
|
||||
);
|
||||
ability.addCost(new ExileFromGraveCost(
|
||||
new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)
|
||||
));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private RotwidowPack(final RotwidowPack card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RotwidowPack copy() {
|
||||
return new RotwidowPack(this);
|
||||
}
|
||||
}
|
|
@ -151,6 +151,7 @@ public final class ModernHorizons extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rebuild", 66, Rarity.UNCOMMON, mage.cards.r.Rebuild.class));
|
||||
cards.add(new SetCardInfo("Reckless Charge", 144, Rarity.COMMON, mage.cards.r.RecklessCharge.class));
|
||||
cards.add(new SetCardInfo("Regrowth", 175, Rarity.UNCOMMON, mage.cards.r.Regrowth.class));
|
||||
cards.add(new SetCardInfo("Rotwidow Pack", 212, Rarity.UNCOMMON, mage.cards.r.RotwidowPack.class));
|
||||
cards.add(new SetCardInfo("Ruination Rioter", 213, Rarity.UNCOMMON, mage.cards.r.RuinationRioter.class));
|
||||
cards.add(new SetCardInfo("Savage Swipe", 178, Rarity.COMMON, mage.cards.s.SavageSwipe.class));
|
||||
cards.add(new SetCardInfo("Scale Up", 179, Rarity.UNCOMMON, mage.cards.s.ScaleUp.class));
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
|
||||
|
||||
package mage.filter.common;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class FilterControlledPermanent extends FilterPermanent {
|
||||
|
@ -17,8 +16,19 @@ public class FilterControlledPermanent extends FilterPermanent {
|
|||
}
|
||||
|
||||
public FilterControlledPermanent(String name) {
|
||||
this(null, name);
|
||||
}
|
||||
|
||||
public FilterControlledPermanent(SubType subtype) {
|
||||
this(subtype, subtype.toString() + " you control");
|
||||
}
|
||||
|
||||
public FilterControlledPermanent(SubType subtype, String name) {
|
||||
super(name);
|
||||
this.add(new ControllerPredicate(TargetController.YOU));
|
||||
if (subtype != null) {
|
||||
this.add(new SubtypePredicate(subtype));
|
||||
}
|
||||
}
|
||||
|
||||
public FilterControlledPermanent(final FilterControlledPermanent filter) {
|
||||
|
|
Loading…
Reference in a new issue