mirror of
https://github.com/correl/mage.git
synced 2025-03-30 01:03:57 -09:00
[MOC] Implement Path of the Schemer
This commit is contained in:
parent
a53c63e19c
commit
22946bb35e
3 changed files with 102 additions and 5 deletions
Mage.Sets/src/mage
Mage/src/main/java/mage/abilities/effects/common
86
Mage.Sets/src/mage/cards/p/PathOfTheSchemer.java
Normal file
86
Mage.Sets/src/mage/cards/p/PathOfTheSchemer.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.MillCardsEachPlayerEffect;
|
||||
import mage.abilities.effects.common.WillOfThePlaneswalkersEffect;
|
||||
import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PathOfTheSchemer extends CardImpl {
|
||||
|
||||
public PathOfTheSchemer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
|
||||
|
||||
// Each player mills two cards. Then you put a creature card from a graveyard onto the battlefield under your control. It's an artifact in addition to its other types.
|
||||
this.getSpellAbility().addEffect(new MillCardsEachPlayerEffect(2, TargetController.EACH_PLAYER));
|
||||
this.getSpellAbility().addEffect(new PathOfTheSchemerEffect());
|
||||
|
||||
// Will of the Planeswalkers -- Starting with you, each player votes for planeswalk or chaos. If planeswalk gets more votes, planeswalk. If chaos gets more votes or the vote is tied, chaos ensues.
|
||||
this.getSpellAbility().addEffect(new WillOfThePlaneswalkersEffect());
|
||||
}
|
||||
|
||||
private PathOfTheSchemer(final PathOfTheSchemer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PathOfTheSchemer copy() {
|
||||
return new PathOfTheSchemer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class PathOfTheSchemerEffect extends OneShotEffect {
|
||||
|
||||
PathOfTheSchemerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Then you put a creature card from a graveyard onto the battlefield " +
|
||||
"under your control. It's an artifact in addition to its other types";
|
||||
}
|
||||
|
||||
private PathOfTheSchemerEffect(final PathOfTheSchemerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PathOfTheSchemerEffect copy() {
|
||||
return new PathOfTheSchemerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
TargetCard target = new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE);
|
||||
target.setNotTarget(true);
|
||||
if (!target.canChoose(source.getControllerId(), source, game)) {
|
||||
return false;
|
||||
}
|
||||
player.choose(Outcome.PutCreatureInPlay, target, source, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
game.addEffect(new AddCardTypeTargetEffect(Duration.Custom, CardType.ARTIFACT)
|
||||
.setTargetPointer(new FixedTarget(new MageObjectReference(card, game, 1))), source);
|
||||
player.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -231,10 +231,11 @@ public final class MarchOfTheMachineCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Pain Distributor", 33, Rarity.RARE, mage.cards.p.PainDistributor.class));
|
||||
cards.add(new SetCardInfo("Painful Truths", 262, Rarity.RARE, mage.cards.p.PainfulTruths.class));
|
||||
cards.add(new SetCardInfo("Path of Ancestry", 418, Rarity.COMMON, mage.cards.p.PathOfAncestry.class));
|
||||
cards.add(new SetCardInfo("Path of the Animist", 38, Rarity.RARE, mage.cards.p.PathOfTheAnimist.class));
|
||||
cards.add(new SetCardInfo("Path of the Enigma", 23, Rarity.RARE, mage.cards.p.PathOfTheEnigma.class));
|
||||
cards.add(new SetCardInfo("Path of the Ghosthunter", 18, Rarity.RARE, mage.cards.p.PathOfTheGhosthunter.class));
|
||||
cards.add(new SetCardInfo("Path of the Pyromancer", 34, Rarity.RARE, mage.cards.p.PathOfThePyromancer.class));
|
||||
// cards.add(new SetCardInfo("Path of the Animist", 38, Rarity.RARE, mage.cards.p.PathOfTheAnimist.class));
|
||||
// cards.add(new SetCardInfo("Path of the Enigma", 23, Rarity.RARE, mage.cards.p.PathOfTheEnigma.class));
|
||||
// cards.add(new SetCardInfo("Path of the Ghosthunter", 18, Rarity.RARE, mage.cards.p.PathOfTheGhosthunter.class));
|
||||
// cards.add(new SetCardInfo("Path of the Pyromancer", 34, Rarity.RARE, mage.cards.p.PathOfThePyromancer.class));
|
||||
// cards.add(new SetCardInfo("Path of the Schemer", 28, Rarity.RARE, mage.cards.p.PathOfTheSchemer.class));
|
||||
cards.add(new SetCardInfo("Path to Exile", 198, Rarity.UNCOMMON, mage.cards.p.PathToExile.class));
|
||||
cards.add(new SetCardInfo("Perplexing Test", 229, Rarity.RARE, mage.cards.p.PerplexingTest.class));
|
||||
cards.add(new SetCardInfo("Phyrexian Delver", 263, Rarity.RARE, mage.cards.p.PhyrexianDelver.class));
|
||||
|
|
|
@ -2,6 +2,7 @@ package mage.abilities.effects.common;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.choices.TwoChoiceVote;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
@ -13,7 +14,7 @@ public class WillOfThePlaneswalkersEffect extends OneShotEffect {
|
|||
|
||||
public WillOfThePlaneswalkersEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = AbilityWord.WILL_OF_THE_COUNCIL.formatWord() + "Starting with you, each player votes " +
|
||||
staticText = AbilityWord.WILL_OF_THE_PLANESWALKERS.formatWord() + "Starting with you, each player votes " +
|
||||
"for planeswalk or chaos. If planeswalk gets more votes, planeswalk. " +
|
||||
"If chaos gets more votes or the vote is tied, chaos ensues";
|
||||
concatBy("<br>");
|
||||
|
@ -30,7 +31,16 @@ public class WillOfThePlaneswalkersEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
TwoChoiceVote vote = new TwoChoiceVote("Planeswalk", "Chaos", Outcome.Benefit);
|
||||
vote.doVotes(source, game);
|
||||
int planeswalkCount = vote.getVoteCount(true);
|
||||
int chaosCount = vote.getVoteCount(false);
|
||||
// TODO: Implement when planes have been refactored
|
||||
if (planeswalkCount > chaosCount) {
|
||||
// planeswalk to next plane
|
||||
} else {
|
||||
// chaos ensues
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue