mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Implemented League Guildmage
This commit is contained in:
parent
82818e665a
commit
35547f84a3
4 changed files with 82 additions and 3 deletions
67
Mage.Sets/src/mage/cards/l/LeagueGuildmage.java
Normal file
67
Mage.Sets/src/mage/cards/l/LeagueGuildmage.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterInstantOrSorcerySpell;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LeagueGuildmage extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterInstantOrSorcerySpell("instant or sorcery you control with converted mana cost X");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public LeagueGuildmage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {3}{U}, {T}: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1),
|
||||
new ManaCostsImpl("{3}{U}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
// {X}{R}, {T}: Copy target instant or sorcery spell you control with converted mana cost X. You may choose new targets for the copy.
|
||||
ability = new SimpleActivatedAbility(
|
||||
new CopyTargetSpellEffect(),
|
||||
new ManaCostsImpl("{X}{R}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public LeagueGuildmage(final LeagueGuildmage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LeagueGuildmage copy() {
|
||||
return new LeagueGuildmage(this);
|
||||
}
|
||||
}
|
|
@ -100,6 +100,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Izzet Locket", 238, Rarity.COMMON, mage.cards.i.IzzetLocket.class));
|
||||
cards.add(new SetCardInfo("Knight of Autumn", 183, Rarity.RARE, mage.cards.k.KnightOfAutumn.class));
|
||||
cards.add(new SetCardInfo("Lava Coil", 108, Rarity.UNCOMMON, mage.cards.l.LavaCoil.class));
|
||||
cards.add(new SetCardInfo("League Guildmage", 185, Rarity.UNCOMMON, mage.cards.l.LeagueGuildmage.class));
|
||||
cards.add(new SetCardInfo("Ledev Guardian", 18, Rarity.COMMON, mage.cards.l.LedevGuardian.class));
|
||||
cards.add(new SetCardInfo("Legion Guildmage", 187, Rarity.MYTHIC, mage.cards.l.LegionGuildmage.class));
|
||||
cards.add(new SetCardInfo("Legion Warboss", 109, Rarity.RARE, mage.cards.l.LegionWarboss.class));
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards;
|
||||
|
||||
import mage.MageObject;
|
||||
|
@ -21,6 +20,8 @@ import mage.filter.FilterMana;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterInstantOrSorcerySpell;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
|
@ -454,6 +455,14 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetCreaturePermanent(filterCreaturePermanent));
|
||||
break;
|
||||
case X_CMC_EQUAL_SPELL_CONTROLLED: // League Guildmage
|
||||
xValue = ability.getManaCostsToPay().getX();
|
||||
FilterSpell spellFilter = new FilterInstantOrSorcerySpell("instant or sorcery you control with converted mana cost " + xValue);
|
||||
spellFilter.add(new ControllerPredicate(TargetController.YOU));
|
||||
spellFilter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue));
|
||||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetSpell(spellFilter));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,12 @@ public enum TargetAdjustment {
|
|||
X_TARGETS,
|
||||
X_CMC_EQUAL_PERM,
|
||||
X_CMC_EQUAL_GY_CARD,
|
||||
X_POWER_LEQ, CHOSEN_NAME,
|
||||
X_POWER_LEQ,
|
||||
CHOSEN_NAME,
|
||||
CHOSEN_COLOR,
|
||||
VERSE_COUNTER_TARGETS,
|
||||
TREASURE_COUNTER_POWER,
|
||||
SIMIC_MANIPULATOR,
|
||||
CREATURE_POWER_X_OR_LESS
|
||||
CREATURE_POWER_X_OR_LESS,
|
||||
X_CMC_EQUAL_SPELL_CONTROLLED
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue