mirror of
https://github.com/correl/mage.git
synced 2024-12-28 11:14:13 +00:00
[VOW] Implemented Dormant Grove
This commit is contained in:
parent
2a5cbe5e3b
commit
cdfe3d1d2d
3 changed files with 128 additions and 0 deletions
76
Mage.Sets/src/mage/cards/d/DormantGrove.java
Normal file
76
Mage.Sets/src/mage/cards/d/DormantGrove.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class DormantGrove extends CardImpl {
|
||||
|
||||
public DormantGrove(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
|
||||
|
||||
this.transformable = true;
|
||||
this.secondSideCardClazz = mage.cards.g.GnarledGrovestrider.class;
|
||||
|
||||
// At the beginning of combat on your turn, put a +1/+1 counter on target creature you control.
|
||||
// Then if that creature has toughness 6 or greater, transform Dormant Grove.
|
||||
this.addAbility(new TransformAbility());
|
||||
|
||||
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
|
||||
TargetController.YOU, false
|
||||
);
|
||||
ability.addEffect(new ConditionalOneShotEffect(
|
||||
new TransformSourceEffect(true, true),
|
||||
DormatGroveCondition.instance,
|
||||
"Then if that creature has toughness 6 or greater, transform {this}"
|
||||
));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private DormantGrove(final DormantGrove card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DormantGrove copy() {
|
||||
return new DormantGrove(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum DormatGroveCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
return permanent.getToughness().getValue() >= 6;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "that creature has toughness 6 or greater";
|
||||
}
|
||||
}
|
50
Mage.Sets/src/mage/cards/g/GnarledGrovestrider.java
Normal file
50
Mage.Sets/src/mage/cards/g/GnarledGrovestrider.java
Normal file
|
@ -0,0 +1,50 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public class GnarledGrovestrider extends CardImpl {
|
||||
|
||||
public GnarledGrovestrider(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||
this.subtype.add(SubType.TREEFOLK);
|
||||
this.color.setGreen(true);
|
||||
|
||||
// Back half of Dormant Grove
|
||||
this.nightCard = true;
|
||||
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Other creatures you control have vigilance.
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||
VigilanceAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_PERMANENT_CREATURES, true
|
||||
)));
|
||||
}
|
||||
|
||||
private GnarledGrovestrider(final GnarledGrovestrider card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GnarledGrovestrider copy() {
|
||||
return new GnarledGrovestrider(this);
|
||||
}
|
||||
}
|
|
@ -42,11 +42,13 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dig Up", 197, Rarity.RARE, mage.cards.d.DigUp.class));
|
||||
cards.add(new SetCardInfo("Dire-Strain Anarchist", 181, Rarity.MYTHIC, mage.cards.d.DireStrainAnarchist.class));
|
||||
cards.add(new SetCardInfo("Dominating Vampire", 154, Rarity.RARE, mage.cards.d.DominatingVampire.class));
|
||||
cards.add(new SetCardInfo("Dormant Grove", 198, Rarity.UNCOMMON, mage.cards.d.DormantGrove.class));
|
||||
cards.add(new SetCardInfo("Dreamroot Cascade", 262, Rarity.RARE, mage.cards.d.DreamrootCascade.class));
|
||||
cards.add(new SetCardInfo("Fell Stinger", 112, Rarity.UNCOMMON, mage.cards.f.FellStinger.class));
|
||||
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Geistlight Snare", 60, Rarity.UNCOMMON, mage.cards.g.GeistlightSnare.class));
|
||||
cards.add(new SetCardInfo("Gluttonous Guest", 114, Rarity.COMMON, mage.cards.g.GluttonousGuest.class));
|
||||
cards.add(new SetCardInfo("Gnarled Grovestrider", 198, Rarity.UNCOMMON, mage.cards.g.GnarledGrovestrider.class));
|
||||
cards.add(new SetCardInfo("Grolnok, the Omnivore", 238, Rarity.RARE, mage.cards.g.GrolnokTheOmnivore.class));
|
||||
cards.add(new SetCardInfo("Gryff Rider", 15, Rarity.COMMON, mage.cards.g.GryffRider.class));
|
||||
cards.add(new SetCardInfo("Halana and Alena, Partners", 239, Rarity.RARE, mage.cards.h.HalanaAndAlenaPartners.class));
|
||||
|
|
Loading…
Reference in a new issue