mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[FIC] Implement Yuffie, Materia Hunter
This commit is contained in:
parent
7b2a5dbd08
commit
a669e3e49f
2 changed files with 87 additions and 0 deletions
85
Mage.Sets/src/mage/cards/y/YuffieMateriaHunter.java
Normal file
85
Mage.Sets/src/mage/cards/y/YuffieMateriaHunter.java
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
package mage.cards.y;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.abilities.keyword.NinjutsuAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class YuffieMateriaHunter extends CardImpl {
|
||||
|
||||
public YuffieMateriaHunter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.NINJA);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Ninjutsu {1}{R}
|
||||
this.addAbility(new NinjutsuAbility("{1}{R}"));
|
||||
|
||||
// When Yuffie enters, gain control of target noncreature artifact for as long as you control Yuffie. Then you may attach an Equipment you control to Yuffie.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.WhileControlled));
|
||||
ability.addEffect(new YuffieMateriaHunterEffect());
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ARTIFACT_NON_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private YuffieMateriaHunter(final YuffieMateriaHunter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public YuffieMateriaHunter copy() {
|
||||
return new YuffieMateriaHunter(this);
|
||||
}
|
||||
}
|
||||
|
||||
class YuffieMateriaHunterEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.EQUIPMENT);
|
||||
|
||||
YuffieMateriaHunterEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Then you may attach an Equipment you control to {this}";
|
||||
}
|
||||
|
||||
private YuffieMateriaHunterEffect(final YuffieMateriaHunterEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public YuffieMateriaHunterEffect copy() {
|
||||
return new YuffieMateriaHunterEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
TargetPermanent target = new TargetPermanent(0, 1, filter, true);
|
||||
player.choose(outcome, target, source, game);
|
||||
return permanent.addAttachment(target.getFirstTarget(), source, game);
|
||||
}
|
||||
}
|
||||
|
|
@ -368,6 +368,8 @@ public final class FinalFantasyCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Y'shtola, Night's Blessed", 215, Rarity.MYTHIC, mage.cards.y.YshtolaNightsBlessed.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Y'shtola, Night's Blessed", 226, Rarity.MYTHIC, mage.cards.y.YshtolaNightsBlessed.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Y'shtola, Night's Blessed", 7, Rarity.MYTHIC, mage.cards.y.YshtolaNightsBlessed.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Yuffie, Materia Hunter", 158, Rarity.RARE, mage.cards.y.YuffieMateriaHunter.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Yuffie, Materia Hunter", 65, Rarity.RARE, mage.cards.y.YuffieMateriaHunter.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Yuna's Decision", 125, Rarity.RARE, mage.cards.y.YunasDecision.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Yuna's Decision", 74, Rarity.RARE, mage.cards.y.YunasDecision.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Yuna's Whistle", 126, Rarity.RARE, mage.cards.y.YunasWhistle.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue