mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
[MID] Implement Consuming Blob
This commit is contained in:
parent
7e89d620b8
commit
eb065bc0e7
4 changed files with 151 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ public final class CatharCommando extends CardImpl {
|
|||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// {1}, Sacrifice Cathar Commando: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}{G}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{1}"));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
78
Mage.Sets/src/mage/cards/c/ConsumingBlob.java
Normal file
78
Mage.Sets/src/mage/cards/c/ConsumingBlob.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.hint.common.CardTypesInGraveyardHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.ConsumingBlobToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public final class ConsumingBlob extends CardImpl {
|
||||
|
||||
public ConsumingBlob(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
|
||||
this.subtype.add(SubType.OOZE);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Consuming Blob's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConsumingBlobEffect()).addHint(CardTypesInGraveyardHint.YOU));
|
||||
|
||||
// At the beginning of your end step, create a green Ooze creature token with "This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1".
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||
new CreateTokenEffect(new ConsumingBlobToken()), TargetController.YOU, false)
|
||||
);
|
||||
}
|
||||
|
||||
private ConsumingBlob(final ConsumingBlob card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsumingBlob copy() {
|
||||
return new ConsumingBlob(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ConsumingBlobEffect extends ContinuousEffectImpl {
|
||||
|
||||
public ConsumingBlobEffect() {
|
||||
super(Duration.EndOfGame, Layer.PTChangingEffects_7, SubLayer.CharacteristicDefining_7a, Outcome.BoostCreature);
|
||||
staticText = "{this}'s power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1";
|
||||
}
|
||||
|
||||
public ConsumingBlobEffect(final ConsumingBlobEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsumingBlobEffect copy() {
|
||||
return new ConsumingBlobEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
MageObject target = source.getSourceObject(game);
|
||||
if (target == null) {
|
||||
return false;
|
||||
}
|
||||
int number = CardTypesInGraveyardCount.YOU.calculate(game, source, this);
|
||||
target.getPower().setValue(number);
|
||||
target.getToughness().setValue(number + 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -81,6 +81,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Clear Shot", 176, Rarity.UNCOMMON, mage.cards.c.ClearShot.class));
|
||||
cards.add(new SetCardInfo("Component Collector", 43, Rarity.COMMON, mage.cards.c.ComponentCollector.class));
|
||||
cards.add(new SetCardInfo("Consider", 44, Rarity.COMMON, mage.cards.c.Consider.class));
|
||||
cards.add(new SetCardInfo("Consuming Blob", 177, Rarity.MYTHIC, mage.cards.c.ConsumingBlob.class));
|
||||
cards.add(new SetCardInfo("Contortionist Troupe", 178, Rarity.UNCOMMON, mage.cards.c.ContortionistTroupe.class));
|
||||
cards.add(new SetCardInfo("Corpse Cobble", 214, Rarity.UNCOMMON, mage.cards.c.CorpseCobble.class));
|
||||
cards.add(new SetCardInfo("Covert Cutpurse", 92, Rarity.UNCOMMON, mage.cards.c.CovertCutpurse.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.hint.common.CardTypesInGraveyardHint;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public final class ConsumingBlobToken extends TokenImpl {
|
||||
|
||||
public ConsumingBlobToken() {
|
||||
super("Ooze", "green Ooze creature token with \"This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1.\"");
|
||||
setOriginalExpansionSetCode("MID");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.OOZE);
|
||||
color.setGreen(true);
|
||||
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
// This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConsumingBlobTokenEffect()).addHint(CardTypesInGraveyardHint.YOU));
|
||||
|
||||
}
|
||||
|
||||
private ConsumingBlobToken(final ConsumingBlobToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsumingBlobToken copy() {
|
||||
return new ConsumingBlobToken(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class ConsumingBlobTokenEffect extends ContinuousEffectImpl {
|
||||
|
||||
public ConsumingBlobTokenEffect() {
|
||||
super(Duration.EndOfGame, Layer.PTChangingEffects_7, SubLayer.CharacteristicDefining_7a, Outcome.BoostCreature);
|
||||
staticText = "{this}'s power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1";
|
||||
}
|
||||
|
||||
public ConsumingBlobTokenEffect(final ConsumingBlobTokenEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsumingBlobTokenEffect copy() {
|
||||
return new ConsumingBlobTokenEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
MageObject target = source.getSourceObject(game);
|
||||
if (target == null) {
|
||||
return false;
|
||||
}
|
||||
int number = CardTypesInGraveyardCount.YOU.calculate(game, source, this);
|
||||
target.getPower().setValue(number);
|
||||
target.getToughness().setValue(number + 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue