- Added Mangara's Tome

This commit is contained in:
swordshine
2014-03-04 13:41:24 +00:00
parent ff48b93222
commit 986dd76696
7 changed files with 39 additions and 8 deletions

1
.gitattributes vendored
View File

@@ -7555,6 +7555,7 @@ forge-gui/res/cardsfolder/m/manaweft_sliver.txt -text
forge-gui/res/cardsfolder/m/mangara_of_corondor.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/mangara_of_corondor.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/mangaras_blessing.txt -text forge-gui/res/cardsfolder/m/mangaras_blessing.txt -text
forge-gui/res/cardsfolder/m/mangaras_equity.txt -text forge-gui/res/cardsfolder/m/mangaras_equity.txt -text
forge-gui/res/cardsfolder/m/mangaras_tome.txt -text
forge-gui/res/cardsfolder/m/maniacal_rage.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/maniacal_rage.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/manic_vandal.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/manic_vandal.txt svneol=native#text/plain
forge-gui/res/cardsfolder/m/manipulate_fate.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/manipulate_fate.txt svneol=native#text/plain

View File

@@ -102,8 +102,10 @@ public class GameAction {
* @return a {@link forge.game.card.Card} object. * @return a {@link forge.game.card.Card} object.
*/ */
public Card changeZone(final Zone zoneFrom, Zone zoneTo, final Card c, Integer position) { public Card changeZone(final Zone zoneFrom, Zone zoneTo, final Card c, Integer position) {
if (c.isCopiedSpell()) { if (c.isCopiedSpell() || (c.isImmutable() && zoneTo.is(ZoneType.Exile))) {
if ((zoneFrom != null)) { // Remove Effect from command immediately, this is essential when some replacement
// effects happen during the resolving of a spellability ("the next time ..." effect)
if (zoneFrom != null) {
zoneFrom.remove(c); zoneFrom.remove(c);
} }
return c; return c;

View File

@@ -173,6 +173,11 @@ public class AbilityUtils {
cards.add(game.getCardState((Card) o)); cards.add(game.getCardState((Card) o));
} }
} }
} else if (defined.equals("FirstRemembered")) {
Object o = Iterables.getFirst(hostCard.getRemembered(), null);
if (o != null && o instanceof Card) {
cards.add(game.getCardState((Card) o));
}
} else if (defined.equals("Clones")) { } else if (defined.equals("Clones")) {
for (final Card clone : hostCard.getClones()) { for (final Card clone : hostCard.getClones()) {
cards.add(game.getCardState(clone)); cards.add(game.getCardState(clone));

View File

@@ -758,6 +758,10 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
} }
} }
if (sa.hasParam("ShuffleChangedPile")) {
CardLists.shuffle(chosenCards);
}
List<Card> movedCards = new ArrayList<Card>(); List<Card> movedCards = new ArrayList<Card>();
long ts = game.getNextTimestamp(); long ts = game.getNextTimestamp();
for(Card c : chosenCards) { for(Card c : chosenCards) {

View File

@@ -71,8 +71,8 @@ public class DebuffEffect extends SpellAbilityEffect {
} }
tgtC.removeIntrinsicKeyword(kw); tgtC.removeIntrinsicKeyword(kw);
tgtC.removeAllExtrinsicKeyword(kw); tgtC.removeAllExtrinsicKeyword(kw);
tgtC.addChangedCardKeywords(new ArrayList<String>(), kws, false, timestamp);
} }
tgtC.addChangedCardKeywords(new ArrayList<String>(), kws, false, timestamp);
} }
if (!sa.hasParam("Permanent")) { if (!sa.hasParam("Permanent")) {
game.getEndOfTurn().addUntil(new GameCommand() { game.getEndOfTurn().addUntil(new GameCommand() {

View File

@@ -1865,12 +1865,13 @@ public class Card extends GameEntity implements Comparable<Card> {
final Card c = (Card) o; final Card c = (Card) o;
if (c.isFaceDown()) { if (c.isFaceDown()) {
sb.append("Face Down"); sb.append("Face Down");
// face-down cards don't show unique number to avoid cheating
} else { } else {
sb.append(c.getName()); sb.append(c.getName());
}
sb.append(" ("); sb.append(" (");
sb.append(c.getUniqueNumber()); sb.append(c.getUniqueNumber());
sb.append(")"); sb.append(")");
}
} else if (o != null) { } else if (o != null) {
sb.append(o.toString()); sb.append(o.toString());
} }

View File

@@ -0,0 +1,18 @@
Name:Mangara's Tome
ManaCost:5
Types:Artifact
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigSearch | TriggerDescription$ When CARDNAME enters the battlefield, search your library for five cards, exile them in a face-down pile, and shuffle that pile. Then shuffle your library.
SVar:TrigSearch:AB$ ChangeZone | Cost$ 0 | ChangeNum$ 5 | ChangeType$ Card | Origin$ Library | Destination$ Exile | ShuffleChangedPile$ True | ExileFaceDown$ True | RememberChanged$ True
T:Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Exile | Destination$ Any | Static$ True | Execute$ TrigForget
SVar:TrigForget:DB$ Pump | ForgetObjects$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigReset | Static$ True
SVar:TrigReset:DB$ Cleanup | ClearRemembered$ True
A:AB$ Effect | Cost$ 2 | RememberObjects$ FirstRemembered | Triggers$ TrigLeavePlay | ReplacementEffects$ DrawReplace | SVars$ ExileEffect,RepMangarasTome | ImprintCards$ Self | SpellDescription$ The next time you would draw a card this turn, instead put the top card of the exiled pile into its owner's hand.
SVar:DrawReplace:Event$ Draw | ValidPlayer$ You | ReplaceWith$ RepMangarasTome | Description$ The next time you would draw a card this turn, instead put the top card of the exiled pile into its owner's hand.
SVar:TrigLeavePlay:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.IsImprinted | Execute$ ExileEffect | Static$ True
SVar:RepMangarasTome:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Hand | SubAbility$ ExileEffect
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/mangaras_tome.jpg
Oracle:When Mangara's Tome enters the battlefield, search your library for five cards, exile them in a face-down pile, and shuffle that pile. Then shuffle your library.\n{2}: The next time you would draw a card this turn, instead put the top card of the exiled pile into its owner's hand.