forked from External/mage
[PH17] Implement Inzerva, Master of Insights (#11774)
* Remove superfluous code from fateseal effect
This commit is contained in:
parent
86154a7317
commit
e5759bbd9e
10 changed files with 182 additions and 8 deletions
|
|
@ -15,7 +15,11 @@ public class DrawCardOpponentTriggeredAbility extends TriggeredAbilityImpl {
|
|||
private final boolean setTargetPointer;
|
||||
|
||||
public DrawCardOpponentTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
this(Zone.BATTLEFIELD, effect, optional, setTargetPointer);
|
||||
}
|
||||
|
||||
public DrawCardOpponentTriggeredAbility(Zone zone, Effect effect, boolean optional, boolean setTargetPointer) {
|
||||
super(zone, effect, optional);
|
||||
this.setTargetPointer = setTargetPointer;
|
||||
setTriggerPhrase("Whenever an opponent draws a card, ");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class PlayWithHandRevealedEffect extends ContinuousEffectImpl {
|
|||
for (UUID playerID : affectedPlayers) {
|
||||
Player player = game.getPlayer(playerID);
|
||||
if (player != null) {
|
||||
player.revealCards(player.getName() + "'s hand cards", player.getHand(), game, false);
|
||||
player.revealCards("Cards in " + player.getName() + "'s hand", player.getHand(), game, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@ public class FatesealEffect extends OneShotEffect {
|
|||
if (opponent == null) {
|
||||
return false;
|
||||
}
|
||||
boolean revealed = opponent.isTopCardRevealed(); // by looking at the cards with fateseal you have not to reveal the next card
|
||||
opponent.setTopCardRevealed(false);
|
||||
Cards cards = new CardsImpl();
|
||||
int count = Math.min(fatesealNumber, opponent.getLibrary().size());
|
||||
if (count == 0) {
|
||||
|
|
@ -76,7 +74,6 @@ public class FatesealEffect extends OneShotEffect {
|
|||
// move cards to the top of the library
|
||||
controller.putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
game.fireEvent(new GameEvent(GameEvent.EventType.FATESEALED, opponent.getId(), source, source.getControllerId()));
|
||||
controller.setTopCardRevealed(revealed);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -464,6 +464,7 @@ public enum SubType {
|
|||
GRIST("Grist", SubTypeSet.PlaneswalkerType),
|
||||
GUFF("Guff", SubTypeSet.PlaneswalkerType),
|
||||
HUATLI("Huatli", SubTypeSet.PlaneswalkerType),
|
||||
INZERVA("Inzerva", SubTypeSet.PlaneswalkerType),
|
||||
JACE("Jace", SubTypeSet.PlaneswalkerType),
|
||||
JARED("Jared", SubTypeSet.PlaneswalkerType),
|
||||
JESKA("Jeska", SubTypeSet.PlaneswalkerType),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package mage.game.command.emblems;
|
||||
|
||||
import mage.abilities.common.DrawCardOpponentTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.PlayWithHandRevealedEffect;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.command.Emblem;
|
||||
|
||||
/**
|
||||
* @author PurpleCrowbar
|
||||
*/
|
||||
public final class InzervaMasterOfInsightsEmblem extends Emblem {
|
||||
|
||||
// You get an emblem with "Your opponents play with their hands revealed" and "Whenever an opponent draws a card, this emblem deals 1 damage to them."
|
||||
public InzervaMasterOfInsightsEmblem() {
|
||||
super("Emblem Inzerva");
|
||||
// Your opponents play with their hands revealed
|
||||
this.getAbilities().add(new SimpleStaticAbility(
|
||||
Zone.COMMAND,
|
||||
new PlayWithHandRevealedEffect(TargetController.OPPONENT)
|
||||
));
|
||||
// Whenever an opponent draws a card, this emblem deals 1 damage to them
|
||||
this.getAbilities().add(new DrawCardOpponentTriggeredAbility(
|
||||
Zone.COMMAND, new DamageTargetEffect(1, true, "them")
|
||||
.setText("this emblem deals 1 damage to them"), false, true
|
||||
));
|
||||
}
|
||||
|
||||
private InzervaMasterOfInsightsEmblem(final InzervaMasterOfInsightsEmblem card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InzervaMasterOfInsightsEmblem copy() {
|
||||
return new InzervaMasterOfInsightsEmblem(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -985,8 +985,11 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
} else {
|
||||
// user defined order
|
||||
UUID cardOwner = cards.getRandom(game).getOwnerId();
|
||||
TargetCard target = new TargetCard(Zone.ALL,
|
||||
new FilterCard("card ORDER to put on the BOTTOM of your library (last one chosen will be bottommost)"));
|
||||
new FilterCard("card ORDER to put on the BOTTOM of " +
|
||||
(cardOwner.equals(playerId) ? "your" : game.getPlayer(cardOwner).getName() + "'s") +
|
||||
" library (last one chosen will be bottommost)"));
|
||||
target.setRequired(true);
|
||||
while (cards.size() > 1 && this.canRespond()
|
||||
&& this.choose(Outcome.Neutral, cards, target, source, game)) {
|
||||
|
|
@ -1078,8 +1081,11 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
} else {
|
||||
// user defined order
|
||||
UUID cardOwner = cards.getRandom(game).getOwnerId();
|
||||
TargetCard target = new TargetCard(Zone.ALL,
|
||||
new FilterCard("card ORDER to put on the TOP of your library (last one chosen will be topmost)"));
|
||||
new FilterCard("card ORDER to put on the TOP of " +
|
||||
(cardOwner.equals(playerId) ? "your" : game.getPlayer(cardOwner).getName() + "'s") +
|
||||
" library (last one chosen will be topmost)"));
|
||||
target.setRequired(true);
|
||||
while (cards.size() > 1
|
||||
&& this.canRespond()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue