mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[TMT] Implement The Ooze
This commit is contained in:
parent
c8d7ab9f1c
commit
6f1afc88ae
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/t/TheOoze.java
Normal file
83
Mage.Sets/src/mage/cards/t/TheOoze.java
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.MutagenToken;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TheOoze extends CardImpl {
|
||||
|
||||
public TheOoze(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
||||
// Whenever a creature you control with a +1/+1 counter on it leaves the battlefield, create a Mutagen token for each +1/+1 counter on it.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
||||
new CreateTokenEffect(new MutagenToken(), TheOozeValue.instance),
|
||||
false, StaticFilters.FILTER_A_CONTROLLED_CREATURE_P1P1
|
||||
));
|
||||
|
||||
// {T}: Exile target card from a graveyard. Create a Mutagen token.
|
||||
Ability ability = new SimpleActivatedAbility(new ExileTargetEffect(), new TapSourceCost());
|
||||
ability.addEffect(new CreateTokenEffect(new MutagenToken()));
|
||||
ability.addTarget(new TargetCardInGraveyard());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private TheOoze(final TheOoze card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheOoze copy() {
|
||||
return new TheOoze(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum TheOozeValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return Optional
|
||||
.ofNullable((Permanent) effect.getValue("creatureDied"))
|
||||
.map(permanent -> permanent.getCounters(game).getCount(CounterType.P1P1))
|
||||
.orElse(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheOozeValue copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "+1/+1 counter on it";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
|
|
@ -74,6 +74,7 @@ public final class TeenageMutantNinjaTurtles extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Super Shredder", 83, Rarity.MYTHIC, mage.cards.s.SuperShredder.class));
|
||||
cards.add(new SetCardInfo("Swamp", 255, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Swamp", 312, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("The Ooze", 177, Rarity.RARE, mage.cards.t.TheOoze.class));
|
||||
cards.add(new SetCardInfo("Transdimensional Bovine", 134, Rarity.RARE, mage.cards.t.TransdimensionalBovine.class));
|
||||
cards.add(new SetCardInfo("Triceraton Commander", 25, Rarity.MYTHIC, mage.cards.t.TriceratonCommander.class));
|
||||
cards.add(new SetCardInfo("Turtle Power!", 135, Rarity.RARE, mage.cards.t.TurtlePower.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue