[AFR] Implemented Circle of the Moon Druid

This commit is contained in:
Evan Kranzler 2021-07-07 20:50:54 -04:00
parent 093f37b8bd
commit 651f63e9f2
2 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,89 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CircleOfTheMoonDruid extends CardImpl {
public CircleOfTheMoonDruid(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// Bear Form As long as its your turn, Circle of the Moon Druid is a Bear with base power and toughness 4/2.
this.addAbility(new SimpleStaticAbility(new WerewolfPackLeaderEffect()).withFlavorWord("Bear Form"));
}
private CircleOfTheMoonDruid(final CircleOfTheMoonDruid card) {
super(card);
}
@Override
public CircleOfTheMoonDruid copy() {
return new CircleOfTheMoonDruid(this);
}
}
class WerewolfPackLeaderEffect extends ContinuousEffectImpl {
WerewolfPackLeaderEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "as long as it's your turn, {this} is a Bear with base power and toughness 4/2";
}
private WerewolfPackLeaderEffect(final WerewolfPackLeaderEffect effect) {
super(effect);
}
@Override
public WerewolfPackLeaderEffect copy() {
return new WerewolfPackLeaderEffect(this);
}
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
if (permanent == null || !game.isActivePlayer(source.getControllerId())) {
return false;
}
switch (layer) {
case TypeChangingEffects_4:
permanent.removeAllCreatureTypes(game);
permanent.addSubType(game, SubType.BEAR);
return true;
case PTChangingEffects_7:
if (sublayer == SubLayer.SetPT_7b) {
permanent.getPower().setValue(4);
permanent.getToughness().setValue(2);
return true;
}
}
return false;
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public boolean hasLayer(Layer layer) {
return layer == Layer.TypeChangingEffects_4 || layer == Layer.PTChangingEffects_7;
}
}

View file

@ -52,6 +52,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
cards.add(new SetCardInfo("Check for Traps", 92, Rarity.UNCOMMON, mage.cards.c.CheckForTraps.class));
cards.add(new SetCardInfo("Choose Your Weapon", 175, Rarity.UNCOMMON, mage.cards.c.ChooseYourWeapon.class));
cards.add(new SetCardInfo("Circle of Dreams Druid", 176, Rarity.RARE, mage.cards.c.CircleOfDreamsDruid.class));
cards.add(new SetCardInfo("Circle of the Moon Druid", 177, Rarity.COMMON, mage.cards.c.CircleOfTheMoonDruid.class));
cards.add(new SetCardInfo("Clattering Skeletons", 93, Rarity.COMMON, mage.cards.c.ClatteringSkeletons.class));
cards.add(new SetCardInfo("Clever Conjurer", 51, Rarity.COMMON, mage.cards.c.CleverConjurer.class));
cards.add(new SetCardInfo("Cloister Gargoyle", 7, Rarity.UNCOMMON, mage.cards.c.CloisterGargoyle.class));