[40K] Implemented Magus Lucea Kane

This commit is contained in:
Evan Kranzler 2022-10-22 17:17:10 -04:00
parent 1a6b7d55ae
commit b57bdfe192
11 changed files with 130 additions and 27 deletions

View file

@ -3,7 +3,7 @@ package mage.cards.b;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CopyStackAbilityEffect;
import mage.abilities.effects.common.CopyStackObjectEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EquipAbility;
@ -55,7 +55,7 @@ public final class BattlemagesBracers extends CardImpl {
class BattlemagesBracersTriggeredAbility extends TriggeredAbilityImpl {
BattlemagesBracersTriggeredAbility() {
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyStackAbilityEffect(), new GenericManaCost(1)));
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyStackObjectEffect(), new GenericManaCost(1)));
}
private BattlemagesBracersTriggeredAbility(final BattlemagesBracersTriggeredAbility ability) {
@ -82,7 +82,7 @@ class BattlemagesBracersTriggeredAbility extends TriggeredAbilityImpl {
if (stackAbility == null || stackAbility.getStackAbility() instanceof ActivatedManaAbilityImpl) {
return false;
}
getEffects().setValue("stackAbility", stackAbility);
getEffects().setValue("stackObject", stackAbility);
return true;
}

View file

@ -96,7 +96,7 @@ class ChandrasRegulatorEffect extends OneShotEffect {
if (!cost.pay(source, game, source, source.getControllerId(), false, null)) {
return true;
}
StackAbility ability = (StackAbility) getValue("stackAbility");
StackAbility ability = (StackAbility) getValue("stackObject");
Player controller = game.getPlayer(source.getControllerId());
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (ability == null || controller == null || sourcePermanent == null) {

View file

@ -2,7 +2,7 @@ package mage.cards.i;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CopyStackAbilityEffect;
import mage.abilities.effects.common.CopyStackObjectEffect;
import mage.abilities.keyword.EquipAbility;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.cards.CardImpl;
@ -47,7 +47,7 @@ public final class IllusionistsBracers extends CardImpl {
class IllusionistsBracersTriggeredAbility extends TriggeredAbilityImpl {
IllusionistsBracersTriggeredAbility() {
super(Zone.BATTLEFIELD, new CopyStackAbilityEffect());
super(Zone.BATTLEFIELD, new CopyStackObjectEffect());
}
private IllusionistsBracersTriggeredAbility(final IllusionistsBracersTriggeredAbility ability) {
@ -74,7 +74,7 @@ class IllusionistsBracersTriggeredAbility extends TriggeredAbilityImpl {
if (stackAbility == null || stackAbility.getStackAbility() instanceof ActivatedManaAbilityImpl) {
return false;
}
this.getEffects().setValue("stackAbility", stackAbility);
this.getEffects().setValue("stackObject", stackAbility);
return true;
}

View file

@ -3,7 +3,7 @@ package mage.cards.k;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CopyStackAbilityEffect;
import mage.abilities.effects.common.CopyStackObjectEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.cards.Card;
@ -50,7 +50,7 @@ public final class KurkeshOnakkeAncient extends CardImpl {
class KurkeshOnakkeAncientTriggeredAbility extends TriggeredAbilityImpl {
KurkeshOnakkeAncientTriggeredAbility() {
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyStackAbilityEffect(), new GenericManaCost(1)));
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyStackObjectEffect(), new GenericManaCost(1)));
setTriggerPhrase("Whenever you activate an ability of an artifact, if it isn't a mana ability");
}
@ -81,7 +81,7 @@ class KurkeshOnakkeAncientTriggeredAbility extends TriggeredAbilityImpl {
if (stackAbility == null || stackAbility.getStackAbility() instanceof ActivatedManaAbilityImpl) {
return false;
}
this.getEffects().setValue("stackAbility", stackAbility);
this.getEffects().setValue("stackObject", stackAbility);
return true;
}
}

View file

@ -0,0 +1,102 @@
package mage.cards.m;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.VariableManaCost;
import mage.abilities.effects.common.CopyStackObjectEffect;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.mana.SimpleManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.StackObject;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MagusLuceaKane extends CardImpl {
public MagusLuceaKane(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}{R}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.TYRANID);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Spiritual Leader -- At the beginning of combat on your turn, put a +1/+1 counter on target creature.
Ability ability = new BeginningOfCombatTriggeredAbility(
new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
TargetController.YOU, false
);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability.withFlavorWord("Spiritual Leader"));
// Psychic Stimulus -- {T}: Add {C}{C}. When you next cast a spell with {X} in its mana cost or activate an ability with {X} in its activation cost this turn, copy that spell or ability. You may choose new targets for the copy.
ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost());
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new MagusLuceaKaneTriggeredAbility()));
this.addAbility(ability.withFlavorWord("Psychic Stimulus"));
}
private MagusLuceaKane(final MagusLuceaKane card) {
super(card);
}
@Override
public MagusLuceaKane copy() {
return new MagusLuceaKane(this);
}
}
class MagusLuceaKaneTriggeredAbility extends DelayedTriggeredAbility {
MagusLuceaKaneTriggeredAbility() {
super(new CopyStackObjectEffect(), Duration.EndOfTurn, true, false);
}
private MagusLuceaKaneTriggeredAbility(final MagusLuceaKaneTriggeredAbility ability) {
super(ability);
}
@Override
public MagusLuceaKaneTriggeredAbility copy() {
return new MagusLuceaKaneTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY
|| event.getType() == GameEvent.EventType.SPELL_CAST;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
StackObject stackObject = game.getStack().getStackObject(event.getTargetId());
if (stackObject != null
&& stackObject.isControlledBy(getControllerId())
&& stackObject.getManaCost().stream().anyMatch(VariableManaCost.class::isInstance)) {
this.getEffects().setValue("stackObject", stackObject);
return true;
}
return false;
}
@Override
public String getRule() {
return "When you next cast a spell with {X} in its mana cost or activate an ability with {X} in its " +
"activation cost this turn, copy that spell or ability. You may choose new targets for the copy.";
}
}

View file

@ -2,7 +2,7 @@ package mage.cards.r;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CopyStackAbilityEffect;
import mage.abilities.effects.common.CopyStackObjectEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.cards.CardImpl;
@ -40,7 +40,7 @@ public final class RingsOfBrighthearth extends CardImpl {
class RingsOfBrighthearthTriggeredAbility extends TriggeredAbilityImpl {
RingsOfBrighthearthTriggeredAbility() {
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyStackAbilityEffect(), new GenericManaCost(2)));
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CopyStackObjectEffect(), new GenericManaCost(2)));
}
private RingsOfBrighthearthTriggeredAbility(final RingsOfBrighthearthTriggeredAbility ability) {
@ -66,7 +66,7 @@ class RingsOfBrighthearthTriggeredAbility extends TriggeredAbilityImpl {
if (stackAbility == null || stackAbility.getStackAbility() instanceof ActivatedManaAbilityImpl) {
return false;
}
this.getEffects().setValue("stackAbility", stackAbility);
this.getEffects().setValue("stackObject", stackAbility);
return true;
}

View file

@ -3,7 +3,7 @@ package mage.cards.v;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.effects.common.CopyStackAbilityEffect;
import mage.abilities.effects.common.CopyStackObjectEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.FlyingAbility;
@ -96,8 +96,8 @@ class VerrakWarpedSengirTriggeredAbility extends TriggeredAbilityImpl {
).mapToInt(PayLifeCost::getLifePaid).sum();
if (lifePaid > 0) {
this.getEffects().clear();
this.addEffect(new DoIfCostPaid(new CopyStackAbilityEffect(), new PayLifeCost(lifePaid)));
this.getEffects().setValue("stackAbility", stackAbility);
this.addEffect(new DoIfCostPaid(new CopyStackObjectEffect(), new PayLifeCost(lifePaid)));
this.getEffects().setValue("stackObject", stackAbility);
return true;
}
return false;

View file

@ -157,6 +157,7 @@ public final class Warhammer40000 extends ExpansionSet {
cards.add(new SetCardInfo("Lord of Change", 24, Rarity.RARE, mage.cards.l.LordOfChange.class));
cards.add(new SetCardInfo("Lychguard", 39, Rarity.RARE, mage.cards.l.Lychguard.class));
cards.add(new SetCardInfo("Magnus the Red", 131, Rarity.RARE, mage.cards.m.MagnusTheRed.class));
cards.add(new SetCardInfo("Magus Lucea Kane", 7, Rarity.MYTHIC, mage.cards.m.MagusLuceaKane.class));
cards.add(new SetCardInfo("Malanthrope", 132, Rarity.RARE, mage.cards.m.Malanthrope.class));
cards.add(new SetCardInfo("Mandate of Abaddon", 40, Rarity.RARE, mage.cards.m.MandateOfAbaddon.class));
cards.add(new SetCardInfo("Marneus Calgar", 8, Rarity.MYTHIC, mage.cards.m.MarneusCalgar.class));

View file

@ -49,7 +49,7 @@ public class ActivatePlaneswalkerLoyaltyAbilityTriggeredAbility extends Triggere
|| !permanent.hasSubtype(planeswalkerSubType, game)) {
return false;
}
this.getEffects().setValue("stackAbility", stackAbility);
this.getEffects().setValue("stackObject", stackAbility);
return true;
}
}

View file

@ -4,32 +4,32 @@ import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.stack.StackAbility;
import mage.game.stack.StackObject;
import mage.players.Player;
/**
* @author TheElk801
*/
public class CopyStackAbilityEffect extends OneShotEffect {
public class CopyStackObjectEffect extends OneShotEffect {
public CopyStackAbilityEffect() {
public CopyStackObjectEffect() {
super(Outcome.Copy);
staticText = "copy that ability. You may choose new targets for the copy";
}
private CopyStackAbilityEffect(final CopyStackAbilityEffect effect) {
private CopyStackObjectEffect(final CopyStackObjectEffect effect) {
super(effect);
}
@Override
public CopyStackAbilityEffect copy() {
return new CopyStackAbilityEffect(this);
public CopyStackObjectEffect copy() {
return new CopyStackObjectEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
StackAbility ability = (StackAbility) getValue("stackAbility");
StackObject ability = (StackObject) getValue("stackObject");
if (controller == null || ability == null) {
return false;
}

View file

@ -1,7 +1,7 @@
package mage.game.command.emblems;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.CopyStackAbilityEffect;
import mage.abilities.effects.common.CopyStackObjectEffect;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.constants.Zone;
import mage.game.Game;
@ -28,7 +28,7 @@ public final class RowanKenrithEmblem extends Emblem {
class RowanKenrithEmblemTriggeredAbility extends TriggeredAbilityImpl {
RowanKenrithEmblemTriggeredAbility() {
super(Zone.COMMAND, new CopyStackAbilityEffect(), false);
super(Zone.COMMAND, new CopyStackObjectEffect(), false);
}
private RowanKenrithEmblemTriggeredAbility(final RowanKenrithEmblemTriggeredAbility ability) {
@ -54,7 +54,7 @@ class RowanKenrithEmblemTriggeredAbility extends TriggeredAbilityImpl {
if (stackAbility == null || stackAbility.getStackAbility() instanceof ActivatedManaAbilityImpl) {
return false;
}
this.getEffects().setValue("stackAbility", stackAbility);
this.getEffects().setValue("stackObject", stackAbility);
return true;
}