forked from External/mage
[SPM] Implement Villainous Wrath
This commit is contained in:
parent
988c661ccf
commit
7df3985dd9
2 changed files with 68 additions and 0 deletions
66
Mage.Sets/src/mage/cards/v/VillainousWrath.java
Normal file
66
Mage.Sets/src/mage/cards/v/VillainousWrath.java
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class VillainousWrath extends CardImpl {
|
||||
|
||||
public VillainousWrath(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}{B}");
|
||||
|
||||
// Target opponent loses life equal to the number of creatures they control. Then destroy all creatures.
|
||||
this.getSpellAbility().addEffect(new VillainousWrathEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES).concatBy("Then"));
|
||||
}
|
||||
|
||||
private VillainousWrath(final VillainousWrath card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VillainousWrath copy() {
|
||||
return new VillainousWrath(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VillainousWrathEffect extends OneShotEffect {
|
||||
|
||||
VillainousWrathEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "target opponent loses life equal to the number of creatures they control";
|
||||
}
|
||||
|
||||
private VillainousWrathEffect(final VillainousWrathEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VillainousWrathEffect copy() {
|
||||
return new VillainousWrathEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int amount = game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, player.getId(), source, game);
|
||||
return amount > 0 && player.loseLife(amount, game, source, false) > 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -280,6 +280,8 @@ public final class MarvelsSpiderMan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Venom, Evil Unleashed", 71, Rarity.COMMON, mage.cards.v.VenomEvilUnleashed.class));
|
||||
cards.add(new SetCardInfo("Venomized Cat", 72, Rarity.COMMON, mage.cards.v.VenomizedCat.class));
|
||||
cards.add(new SetCardInfo("Vibrant Cityscape", 188, Rarity.COMMON, mage.cards.v.VibrantCityscape.class));
|
||||
cards.add(new SetCardInfo("Villainous Wrath", 259, Rarity.RARE, mage.cards.v.VillainousWrath.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Villainous Wrath", 74, Rarity.RARE, mage.cards.v.VillainousWrath.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Vulture, Scheming Scavenger", 158, Rarity.UNCOMMON, mage.cards.v.VultureSchemingScavenger.class));
|
||||
cards.add(new SetCardInfo("Wall Crawl", 121, Rarity.UNCOMMON, mage.cards.w.WallCrawl.class));
|
||||
cards.add(new SetCardInfo("Web Up", 21, Rarity.COMMON, mage.cards.w.WebUp.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue