mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[FIN] Implement Stiltzkin, Moogle Merchant (#13443)
This commit is contained in:
parent
cdebbe151b
commit
6f524b69c0
3 changed files with 98 additions and 0 deletions
95
Mage.Sets/src/mage/cards/s/StiltzkinMoogleMerchant.java
Normal file
95
Mage.Sets/src/mage/cards/s/StiltzkinMoogleMerchant.java
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
|
||||
/**
|
||||
* @author balazskristof
|
||||
*/
|
||||
public final class StiltzkinMoogleMerchant extends CardImpl {
|
||||
|
||||
public StiltzkinMoogleMerchant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.MOOGLE);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
|
||||
// {2}, {T}: Target opponent gains control of another target permanent you control. If they do, you draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(new StiltzkinMoogleMerchantEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetOpponent());
|
||||
ability.addTarget(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_PERMANENT));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private StiltzkinMoogleMerchant(final StiltzkinMoogleMerchant card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StiltzkinMoogleMerchant copy() {
|
||||
return new StiltzkinMoogleMerchant(this);
|
||||
}
|
||||
}
|
||||
|
||||
class StiltzkinMoogleMerchantEffect extends OneShotEffect {
|
||||
|
||||
StiltzkinMoogleMerchantEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Target opponent gains control of another target permanent you control. If they do, you draw a card.";
|
||||
}
|
||||
|
||||
private StiltzkinMoogleMerchantEffect(StiltzkinMoogleMerchantEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StiltzkinMoogleMerchantEffect copy() {
|
||||
return new StiltzkinMoogleMerchantEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
UUID opponent = getTargetPointer().getFirst(game, source);
|
||||
game.addEffect(new GainControlTargetEffect(
|
||||
Duration.Custom, true, opponent
|
||||
).setTargetPointer(new FixedTarget(permanent.getId(), game)), source);
|
||||
game.processAction();
|
||||
if (permanent.isControlledBy(opponent)) {
|
||||
new DrawCardSourceControllerEffect(1).apply(game, source);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -26,6 +26,8 @@ public final class FinalFantasy extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sin, Spira's Punishment", 242, Rarity.RARE, mage.cards.s.SinSpirasPunishment.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Sin, Spira's Punishment", 348, Rarity.RARE, mage.cards.s.SinSpirasPunishment.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Sin, Spira's Punishment", 508, Rarity.RARE, mage.cards.s.SinSpirasPunishment.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Stiltzkin, Moogle Merchant", 34, Rarity.RARE, mage.cards.s.StiltzkinMoogleMerchant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Stiltzkin, Moogle Merchant", 327, Rarity.RARE, mage.cards.s.StiltzkinMoogleMerchant.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Summon: Shiva", 78, Rarity.UNCOMMON, mage.cards.s.SummonShiva.class));
|
||||
cards.add(new SetCardInfo("Tonberry", 122, Rarity.UNCOMMON, mage.cards.t.Tonberry.class));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,6 +274,7 @@ public enum SubType {
|
|||
MONGOOSE("Mongoose", SubTypeSet.CreatureType),
|
||||
MONK("Monk", SubTypeSet.CreatureType),
|
||||
MONKEY("Monkey", SubTypeSet.CreatureType),
|
||||
MOOGLE("Moogle", SubTypeSet.CreatureType),
|
||||
MOONFOLK("Moonfolk", SubTypeSet.CreatureType),
|
||||
MOUNT("Mount", SubTypeSet.CreatureType),
|
||||
MOUSE("Mouse", SubTypeSet.CreatureType),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue