[STX] Implemented Rowan, Scholar of Sparks / Will, Scholar of Frost

This commit is contained in:
Evan Kranzler 2021-04-13 09:12:10 -04:00
parent dc42107962
commit ae22f99b54
6 changed files with 222 additions and 2 deletions

View file

@ -12,6 +12,7 @@ import mage.constants.SubLayer;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.Target;
import mage.util.CardUtil;
import java.util.UUID;
@ -68,6 +69,11 @@ public class SetPowerToughnessTargetEffect extends ContinuousEffectImpl {
return staticText;
}
StringBuilder sb = new StringBuilder();
if (mode.getTargets().get(0).getMinNumberOfTargets() == 0) {
sb.append("up to ");
sb.append(CardUtil.numberToText(mode.getTargets().get(0).getMaxNumberOfTargets()));
sb.append(' ');
}
if (!mode.getTargets().get(0).getTargetName().contains("target")) {
sb.append("target ");
}

View file

@ -4,6 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.command.Emblem;
@ -21,7 +22,8 @@ public final class LukkaWaywardBonderEmblem extends Emblem {
this.setName("Emblem Lukka");
this.setExpansionSetCodeForImage("STX");
Ability ability = new EntersBattlefieldControlledTriggeredAbility(
new LukkaWaywardBonderEmblemEffect(), StaticFilters.FILTER_PERMANENT_CREATURE_A
Zone.COMMAND, new LukkaWaywardBonderEmblemEffect(),
StaticFilters.FILTER_PERMANENT_CREATURE_A, false
);
ability.addTarget(new TargetAnyTarget());
this.getAbilities().add(ability);

View file

@ -0,0 +1,25 @@
package mage.game.command.emblems;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CopyTargetSpellEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.command.Emblem;
/**
* @author TheElk801
*/
public final class RowanScholarOfSparksEmblem extends Emblem {
// 4: You get an emblem with "Whenever you cast an instant or sorcery spell, you may pay {2}. If you do, copy that spell. You may choose new targets for the copy."
public RowanScholarOfSparksEmblem() {
this.setName("Emblem Rowan");
this.setExpansionSetCodeForImage("STX");
this.getAbilities().add(new SpellCastControllerTriggeredAbility(
Zone.COMMAND, new DoIfCostPaid(new CopyTargetSpellEffect(true), new GenericManaCost(2)),
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false, true
));
}
}

View file

@ -28,7 +28,11 @@ public class TargetPermanent extends TargetObject {
}
public TargetPermanent(int numTargets, FilterPermanent filter) {
this(numTargets, numTargets, filter, false);
this(numTargets, numTargets, filter);
}
public TargetPermanent(int minNumTargets, int maxNumTargets, FilterPermanent filter) {
this(minNumTargets, maxNumTargets, filter, false);
}
public TargetPermanent(int minNumTargets, int maxNumTargets, FilterPermanent filter, boolean notTarget) {