mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
implement [MKM] Presumed Dead
This commit is contained in:
parent
9895e7892c
commit
7af6a82928
2 changed files with 82 additions and 0 deletions
81
Mage.Sets/src/mage/cards/p/PresumedDead.java
Normal file
81
Mage.Sets/src/mage/cards/p/PresumedDead.java
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author xenohedron
|
||||
*/
|
||||
public final class PresumedDead extends CardImpl {
|
||||
|
||||
public PresumedDead(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}");
|
||||
|
||||
// Until end of turn, target creature gets +2/+0 and gains "When this creature dies, return it to the battlefield under its owner's control and suspect it."
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn)
|
||||
.setText("Until end of turn, target creature gets +2/+0"));
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new DiesSourceTriggeredAbility(new PresumedDeadEffect()))
|
||||
.setText("and gains \"When this creature dies, return it to the battlefield under its owner's control and suspect it.\""));
|
||||
|
||||
}
|
||||
|
||||
private PresumedDead(final PresumedDead card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PresumedDead copy() {
|
||||
return new PresumedDead(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PresumedDeadEffect extends OneShotEffect {
|
||||
|
||||
PresumedDeadEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "return it to the battlefield under its owner's control and suspect it";
|
||||
}
|
||||
|
||||
private PresumedDeadEffect(final PresumedDeadEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PresumedDeadEffect copy() {
|
||||
return new PresumedDeadEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (controller == null || card == null) {
|
||||
return false;
|
||||
}
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||
game.getState().processAction(game);
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent != null) {
|
||||
permanent.setSuspected(true, game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -177,6 +177,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Pick Your Poison", 170, Rarity.COMMON, mage.cards.p.PickYourPoison.class));
|
||||
cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Pompous Gadabout", 171, Rarity.UNCOMMON, mage.cards.p.PompousGadabout.class));
|
||||
cards.add(new SetCardInfo("Presumed Dead", 100, Rarity.UNCOMMON, mage.cards.p.PresumedDead.class));
|
||||
cards.add(new SetCardInfo("Private Eye", 223, Rarity.UNCOMMON, mage.cards.p.PrivateEye.class));
|
||||
cards.add(new SetCardInfo("Public Thoroughfare", 265, Rarity.COMMON, mage.cards.p.PublicThoroughfare.class));
|
||||
cards.add(new SetCardInfo("Push // Pull", 250, Rarity.UNCOMMON, mage.cards.p.PushPull.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue