[NEO] Implemented Careful Cultivation

This commit is contained in:
Evan Kranzler 2022-02-05 10:12:04 -05:00
parent 672da5732f
commit 60e75f5bc5
3 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,70 @@
package mage.cards.c;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.AttachedToMatchesFilterCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.ChannelAbility;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.ReachAbility;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.game.permanent.token.HumanMonkToken;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CarefulCultivation extends CardImpl {
private static final Condition condition = new AttachedToMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_CREATURE);
public CarefulCultivation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
this.subtype.add(SubType.AURA);
// Enchant artifact or creature
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE);
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// As long as enchanted permanent is a creature, it gets +1/+3 and has reach and "{T}: Add {G}{G}."
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostEnchantedEffect(1, 3), condition,
"as long as enchanted permanent is a creature, it gets +1/+3"
));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilityAttachedEffect(
ReachAbility.getInstance(), AttachmentType.AURA
), condition, "and has reach"));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilityAttachedEffect(
new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost()), AttachmentType.AURA
), condition, "and \"{T}: Add {G}{G}.\""));
this.addAbility(ability);
// Channel {1}{G}, Discard Careful Cultivation: Create a 1/1 green Human Monk creature token with "{T}: Add {G}."
this.addAbility(new ChannelAbility("{1}{G}", new CreateTokenEffect(new HumanMonkToken())));
}
private CarefulCultivation(final CarefulCultivation card) {
super(card);
}
@Override
public CarefulCultivation copy() {
return new CarefulCultivation(this);
}
}

View file

@ -55,6 +55,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
cards.add(new SetCardInfo("Brilliant Restoration", 7, Rarity.RARE, mage.cards.b.BrilliantRestoration.class));
cards.add(new SetCardInfo("Bronzeplate Boar", 135, Rarity.UNCOMMON, mage.cards.b.BronzeplateBoar.class));
cards.add(new SetCardInfo("Brute Suit", 241, Rarity.COMMON, mage.cards.b.BruteSuit.class));
cards.add(new SetCardInfo("Careful Cultivation", 178, Rarity.COMMON, mage.cards.c.CarefulCultivation.class));
cards.add(new SetCardInfo("Circuit Mender", 242, Rarity.UNCOMMON, mage.cards.c.CircuitMender.class));
cards.add(new SetCardInfo("Coiling Stalker", 179, Rarity.COMMON, mage.cards.c.CoilingStalker.class));
cards.add(new SetCardInfo("Colossal Skyturtle", 216, Rarity.UNCOMMON, mage.cards.c.ColossalSkyturtle.class));

View file

@ -0,0 +1,35 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.mana.GreenManaAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
public final class HumanMonkToken extends TokenImpl {
public HumanMonkToken() {
super("Human Monk token", "1/1 green Monk creature token with \"{T}: Add {G}.\"");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add(SubType.HUMAN);
subtype.add(SubType.MONK);
power = new MageInt(1);
toughness = new MageInt(1);
addAbility(new GreenManaAbility());
availableImageSetCodes = Arrays.asList("NEO");
}
public HumanMonkToken(final HumanMonkToken token) {
super(token);
}
public HumanMonkToken copy() {
return new HumanMonkToken(this);
}
}