mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[FDN] Implement Quilled Greatwurm
This commit is contained in:
parent
dc38ac0710
commit
b559ed6a63
4 changed files with 120 additions and 6 deletions
114
Mage.Sets/src/mage/cards/q/QuilledGreatwurm.java
Normal file
114
Mage.Sets/src/mage/cards/q/QuilledGreatwurm.java
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
package mage.cards.q;
|
||||
|
||||
import mage.MageIdentifier;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsDamageToAnyTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.Costs;
|
||||
import mage.abilities.costs.CostsImpl;
|
||||
import mage.abilities.costs.common.RemoveCounterCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.SavedDamageValue;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.CounterAnyPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author PurpleCrowbar
|
||||
*/
|
||||
public final class QuilledGreatwurm extends CardImpl {
|
||||
|
||||
public QuilledGreatwurm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}");
|
||||
this.subtype.add(SubType.WURM);
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Whenever a creature you control deals combat damage during your turn, put that many +1/+1 counters on it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(new DealsDamageToAnyTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new AddCountersTargetEffect(
|
||||
CounterType.P1P1.createInstance(), SavedDamageValue.MANY
|
||||
), StaticFilters.FILTER_CONTROLLED_A_CREATURE, SetTargetPointer.PERMANENT, true, false
|
||||
), MyTurnCondition.instance, "Whenever a creature you control deals combat damage during your turn, put that many +1/+1 counters on it"));
|
||||
|
||||
// You may cast this card from your graveyard by removing six counters from among creatures you control in addition to paying its other costs.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new QuilledGreatwurmEffect()).setIdentifier(MageIdentifier.QuilledGreatwurmAlternateCast));
|
||||
}
|
||||
|
||||
private QuilledGreatwurm(final QuilledGreatwurm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QuilledGreatwurm copy() {
|
||||
return new QuilledGreatwurm(this);
|
||||
}
|
||||
}
|
||||
|
||||
class QuilledGreatwurmEffect extends AsThoughEffectImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(CounterAnyPredicate.instance);
|
||||
}
|
||||
|
||||
QuilledGreatwurmEffect() {
|
||||
super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
|
||||
this.staticText = "you may cast {this} from your graveyard by removing six counters " +
|
||||
"from among creatures you control in addition to paying its other costs";
|
||||
}
|
||||
|
||||
private QuilledGreatwurmEffect(final QuilledGreatwurmEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QuilledGreatwurmEffect copy() {
|
||||
return new QuilledGreatwurmEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectControllerId, Game game) {
|
||||
if (!source.getSourceId().equals(objectId)
|
||||
|| !source.isControlledBy(affectControllerId)
|
||||
|| game.getState().getZone(objectId) != Zone.GRAVEYARD) {
|
||||
return false;
|
||||
}
|
||||
Player controller = game.getPlayer(affectControllerId);
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
Costs<Cost> costs = new CostsImpl<>();
|
||||
costs.add(new RemoveCounterCost(new TargetControlledCreaturePermanent(1, 6, filter, true), null, 6));
|
||||
controller.setCastSourceIdWithAlternateMana(
|
||||
objectId, new ManaCostsImpl<>("{4}{G}{G}"), costs,
|
||||
MageIdentifier.QuilledGreatwurmAlternateCast
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -379,6 +379,9 @@ public final class Foundations extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Pyromancer's Goggles", 677, Rarity.MYTHIC, mage.cards.p.PyromancersGoggles.class));
|
||||
cards.add(new SetCardInfo("Quakestrider Ceratops", 110, Rarity.UNCOMMON, mage.cards.q.QuakestriderCeratops.class));
|
||||
cards.add(new SetCardInfo("Quick Study", 513, Rarity.COMMON, mage.cards.q.QuickStudy.class));
|
||||
cards.add(new SetCardInfo("Quilled Greatwurm", 111, Rarity.MYTHIC, mage.cards.q.QuilledGreatwurm.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Quilled Greatwurm", 339, Rarity.MYTHIC, mage.cards.q.QuilledGreatwurm.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Quilled Greatwurm", 473, Rarity.MYTHIC, mage.cards.q.QuilledGreatwurm.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Quick-Draw Katana", 130, Rarity.COMMON, mage.cards.q.QuickDrawKatana.class));
|
||||
cards.add(new SetCardInfo("Raging Redcap", 543, Rarity.COMMON, mage.cards.r.RagingRedcap.class));
|
||||
cards.add(new SetCardInfo("Raise the Past", 22, Rarity.RARE, mage.cards.r.RaiseThePast.class));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
package org.mage.test.cards.abilities.keywords;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
@ -59,7 +57,6 @@ public class GraftTest extends CardTestPlayerBase {
|
|||
assertPermanentCount(playerA, "Sporeback Troll", 1);
|
||||
assertPowerToughness(playerA, "Sporeback Troll", 2, 2);
|
||||
assertCounterCount("Sporeback Troll", CounterType.P1P1, 2);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -102,6 +99,5 @@ public class GraftTest extends CardTestPlayerBase {
|
|||
assertPowerToughness(playerA, "Cytoplast Root-Kin", 4, 4);
|
||||
assertCounterCount("Sporeback Troll", CounterType.P1P1, 2);
|
||||
assertCounterCount("Cytoplast Root-Kin", CounterType.P1P1, 4);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ public enum MageIdentifier {
|
|||
OfferingAlternateCast,
|
||||
TheRuinousPowersAlternateCast,
|
||||
FiresOfMountDoomAlternateCast,
|
||||
PrimalPrayersAlternateCast;
|
||||
PrimalPrayersAlternateCast,
|
||||
QuilledGreatwurmAlternateCast;
|
||||
|
||||
/**
|
||||
* Additional text if there is need to differentiate two very similar effects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue