[ONE] Implement Zealot's Conviction

This commit is contained in:
theelk801 2023-01-29 11:23:41 -05:00
parent 5bb46d5dd6
commit f2005f9246
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,62 @@
package mage.cards.z;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CorruptedCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.FlashAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ZealotsConviction extends CardImpl {
public ZealotsConviction(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
this.subtype.add(SubType.AURA);
// Flash
this.addAbility(FlashAbility.getInstance());
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget));
// Enchanted creature gets +1/+1.
this.addAbility(new SimpleStaticAbility(new BoostEnchantedEffect(1, 1)));
// Corrupted -- As long as an opponent has three or more poison counters, enchanted creature gets an additional +1/+0 and has first strike.
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostEnchantedEffect(1, 0), CorruptedCondition.instance,
"as long as an opponent has three or more poison counters, enchanted creature gets an additional +1/+0"
));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilityAttachedEffect(
FirstStrikeAbility.getInstance(), AttachmentType.AURA
), CorruptedCondition.instance, "and has first strike"));
this.addAbility(ability.setAbilityWord(AbilityWord.CORRUPTED).addHint(CorruptedCondition.getHint()));
}
private ZealotsConviction(final ZealotsConviction card) {
super(card);
}
@Override
public ZealotsConviction copy() {
return new ZealotsConviction(this);
}
}

View file

@ -223,6 +223,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
cards.add(new SetCardInfo("Vulshok Splitter", 156, Rarity.COMMON, mage.cards.v.VulshokSplitter.class));
cards.add(new SetCardInfo("Whisper of the Dross", 117, Rarity.COMMON, mage.cards.w.WhisperOfTheDross.class));
cards.add(new SetCardInfo("White Sun's Twilight", 38, Rarity.RARE, mage.cards.w.WhiteSunsTwilight.class));
cards.add(new SetCardInfo("Zealot's Conviction", 39, Rarity.COMMON, mage.cards.z.ZealotsConviction.class));
cards.add(new SetCardInfo("Zopandrel, Hunger Dominus", 195, Rarity.MYTHIC, mage.cards.z.ZopandrelHungerDominus.class));
}