mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[VOW] Implemented Toxrill, the Corrosive
This commit is contained in:
parent
f83002b43b
commit
e30ba1b62a
3 changed files with 142 additions and 0 deletions
113
Mage.Sets/src/mage/cards/t/ToxrillTheCorrosive.java
Normal file
113
Mage.Sets/src/mage/cards/t/ToxrillTheCorrosive.java
Normal file
|
@ -0,0 +1,113 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SlugToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ToxrillTheCorrosive extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterCreaturePermanent("a creature you don't control with a slime counter on it");
|
||||
private static final FilterControlledPermanent filter2
|
||||
= new FilterControlledPermanent(SubType.SLUG, "a Slug");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.NOT_YOU.getControllerPredicate());
|
||||
filter.add(CounterType.SLIME.getPredicate());
|
||||
}
|
||||
|
||||
public ToxrillTheCorrosive(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.SLUG);
|
||||
this.subtype.add(SubType.HORROR);
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// At the beginning of each end step, put a slime counter on each creature you don't control.
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(new AddCountersAllEffect(
|
||||
CounterType.SLIME.createInstance(), StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL
|
||||
), TargetController.ANY, false));
|
||||
|
||||
// Creatures you don't control get -1/-1 for each slime counter on them.
|
||||
this.addAbility(new SimpleStaticAbility(new ToxrillTheCorrosiveEffect()));
|
||||
|
||||
// Whenever a creature you don't control with a slime counter on it dies, create a 1/1 black Slug creature token.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
||||
new CreateTokenEffect(new SlugToken()), false, filter
|
||||
));
|
||||
|
||||
// {U}{B}, Sacrifice a Slug: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{U}{B}")
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter2)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private ToxrillTheCorrosive(final ToxrillTheCorrosive card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToxrillTheCorrosive copy() {
|
||||
return new ToxrillTheCorrosive(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ToxrillTheCorrosiveEffect extends ContinuousEffectImpl {
|
||||
|
||||
ToxrillTheCorrosiveEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.UnboostCreature);
|
||||
staticText = "creatures you don't control get -1/-1 for each slime counter on them";
|
||||
}
|
||||
|
||||
private ToxrillTheCorrosiveEffect(final ToxrillTheCorrosiveEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToxrillTheCorrosiveEffect copy() {
|
||||
return new ToxrillTheCorrosiveEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL,
|
||||
source.getControllerId(), source.getSourceId(), game
|
||||
)) {
|
||||
int counter = permanent.getCounters(game).getCount(CounterType.SLIME);
|
||||
permanent.getPower().boostValue(-counter);
|
||||
permanent.getToughness().boostValue(-counter);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -283,6 +283,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Thirst for Discovery", 85, Rarity.UNCOMMON, mage.cards.t.ThirstForDiscovery.class));
|
||||
cards.add(new SetCardInfo("Torens, Fist of the Angels", 249, Rarity.RARE, mage.cards.t.TorensFistOfTheAngels.class));
|
||||
cards.add(new SetCardInfo("Toxic Scorpion", 224, Rarity.COMMON, mage.cards.t.ToxicScorpion.class));
|
||||
cards.add(new SetCardInfo("Toxrill, the Corrosive", 132, Rarity.MYTHIC, mage.cards.t.ToxrillTheCorrosive.class));
|
||||
cards.add(new SetCardInfo("Traveling Minister", 39, Rarity.COMMON, mage.cards.t.TravelingMinister.class));
|
||||
cards.add(new SetCardInfo("Twinblade Geist", 40, Rarity.UNCOMMON, mage.cards.t.TwinbladeGeist.class));
|
||||
cards.add(new SetCardInfo("Twinblade Invocation", 40, Rarity.UNCOMMON, mage.cards.t.TwinbladeInvocation.class));
|
||||
|
|
28
Mage/src/main/java/mage/game/permanent/token/SlugToken.java
Normal file
28
Mage/src/main/java/mage/game/permanent/token/SlugToken.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SlugToken extends TokenImpl {
|
||||
|
||||
public SlugToken() {
|
||||
super("Slug", "1/1 black Slug creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add(SubType.SLUG);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
|
||||
public SlugToken(final SlugToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public SlugToken copy() {
|
||||
return new SlugToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue