mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Fixes for GlintHawk, FaerieImposter. New card implementation DrakeFamiliar.
This commit is contained in:
parent
20e7130bb1
commit
8f1af6b940
3 changed files with 27 additions and 27 deletions
|
@ -109,7 +109,7 @@ class QuicklingEffect extends OneShotEffect {
|
|||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
targetChosen = true;
|
||||
controller.moveCards(permanent, null, Zone.HAND, source, game);
|
||||
permanent.moveToZone(Zone.HAND, this.getId(), game, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,15 +101,13 @@ class FaerieImpostorEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
boolean targetChosen = false;
|
||||
TargetPermanent target = new TargetPermanent(1, 1, filter, false);
|
||||
|
||||
if (target.canChoose(controller.getId(), game)) {
|
||||
controller.choose(Outcome.ReturnToHand, target, source.getSourceId(), game);
|
||||
TargetPermanent target = new TargetPermanent(1, 1, filter, true);
|
||||
if (target.canChoose(controller.getId(), game) && controller.chooseUse(outcome, "Return another creature you control to its owner's hand?", source, game)) {
|
||||
controller.chooseTarget(Outcome.ReturnToHand, target, source, game);
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
|
||||
if (permanent != null) {
|
||||
targetChosen = true;
|
||||
controller.moveCards(permanent, null, Zone.HAND, source, game);
|
||||
permanent.moveToZone(Zone.HAND, this.getId(), game, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
package mage.sets.scarsofmirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -39,6 +35,10 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -60,6 +60,8 @@ public class GlintHawk extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Glint Hawk enters the battlefield, sacrifice it unless you return an artifact you control to its owner's hand.
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GlintHawkEffect()));
|
||||
}
|
||||
|
@ -95,24 +97,24 @@ class GlintHawkEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
boolean targetChosen = false;
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
TargetPermanent target = new TargetPermanent(1, 1, filter, false);
|
||||
|
||||
if (target.canChoose(player.getId(), game)) {
|
||||
player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
|
||||
TargetPermanent target = new TargetPermanent(1, 1, filter, true);
|
||||
if (target.canChoose(controller.getId(), game) && controller.chooseUse(outcome, "Return an artifact you control to its owner's hand?", source, game)) {
|
||||
controller.chooseTarget(Outcome.Sacrifice, target, source, game);
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
|
||||
if ( permanent != null ) {
|
||||
if (permanent != null) {
|
||||
targetChosen = true;
|
||||
permanent.moveToZone(Zone.HAND, this.getId(), game, false);
|
||||
}
|
||||
}
|
||||
|
||||
if ( !targetChosen ) {
|
||||
if (!targetChosen) {
|
||||
new SacrificeSourceEffect().apply(game, source);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue