mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Added Fathom Trawl
- Enabled ordering of cards going to library or battlefield from DigUntil effects.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -3572,6 +3572,7 @@ res/cardsfolder/f/fate_transfer.txt -text
|
|||||||
res/cardsfolder/f/fatestitcher.txt svneol=native#text/plain
|
res/cardsfolder/f/fatestitcher.txt svneol=native#text/plain
|
||||||
res/cardsfolder/f/fathom_mage.txt -text
|
res/cardsfolder/f/fathom_mage.txt -text
|
||||||
res/cardsfolder/f/fathom_seer.txt svneol=native#text/plain
|
res/cardsfolder/f/fathom_seer.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/f/fathom_trawl.txt -text
|
||||||
res/cardsfolder/f/fatigue.txt -text
|
res/cardsfolder/f/fatigue.txt -text
|
||||||
res/cardsfolder/f/fault_line.txt svneol=native#text/plain
|
res/cardsfolder/f/fault_line.txt svneol=native#text/plain
|
||||||
res/cardsfolder/f/fault_riders.txt svneol=native#text/plain
|
res/cardsfolder/f/fault_riders.txt svneol=native#text/plain
|
||||||
|
|||||||
9
res/cardsfolder/f/fathom_trawl.txt
Normal file
9
res/cardsfolder/f/fathom_trawl.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Fathom Trawl
|
||||||
|
ManaCost:3 U U
|
||||||
|
Types:Sorcery
|
||||||
|
A:SP$ DigUntil | Cost$ 3 U U | Amount$ 3 | Valid$ Card.nonLand+YouOwn | ValidDescription$ nonland | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | FoundDestination$ Hand | SpellDescription$ Reveal cards from the top of your library until you reveal three nonland cards. Put the nonland cards revealed this way into your hand, then put the rest of the revealed cards on the bottom of your library in any order.
|
||||||
|
SVar:NeedsToPlayVar:AIHand LE4
|
||||||
|
SVar:AIHand:Count$InYourHand
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/fathom_trawl.jpg
|
||||||
|
Oracle:Reveal cards from the top of your library until you reveal three nonland cards. Put the nonland cards revealed this way into your hand, then put the rest of the revealed cards on the bottom of your library in any order.
|
||||||
|
SetInfo:LRW Rare
|
||||||
@@ -105,7 +105,7 @@ public class DigUntilEffect extends SpellAbilityEffect {
|
|||||||
for (final Player p : getTargetPlayers(sa)) {
|
for (final Player p : getTargetPlayers(sa)) {
|
||||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||||
final List<Card> found = new ArrayList<Card>();
|
final List<Card> found = new ArrayList<Card>();
|
||||||
final List<Card> revealed = new ArrayList<Card>();
|
List<Card> revealed = new ArrayList<Card>();
|
||||||
|
|
||||||
final PlayerZone library = p.getZone(digSite);
|
final PlayerZone library = p.getZone(digSite);
|
||||||
|
|
||||||
@@ -130,7 +130,11 @@ public class DigUntilEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
final GameState game = p.getGame();
|
final GameState game = p.getGame();
|
||||||
|
|
||||||
// TODO Allow Human to choose the order
|
if (revealedDest == ZoneType.Battlefield && revealed.size() >= 2) {
|
||||||
|
revealed = p.getController().orderMoveToZoneList(revealed, revealedDest);
|
||||||
|
// should possibly use host.getController().getController()... above instead of p.getController?
|
||||||
|
}
|
||||||
|
|
||||||
if (foundDest != null) {
|
if (foundDest != null) {
|
||||||
final Iterator<Card> itr = found.iterator();
|
final Iterator<Card> itr = found.iterator();
|
||||||
while (itr.hasNext()) {
|
while (itr.hasNext()) {
|
||||||
@@ -162,7 +166,11 @@ public class DigUntilEffect extends SpellAbilityEffect {
|
|||||||
Collections.shuffle(revealed, random);
|
Collections.shuffle(revealed, random);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Use getOrderChoices before this moveTo call for the Human
|
if (revealedDest == ZoneType.Library && !sa.hasParam("Shuffle") && revealed.size() >= 2) {
|
||||||
|
revealed = p.getController().orderMoveToZoneList(revealed, revealedDest);
|
||||||
|
// should possibly use host.getController().getController()... above instead of p.getController?
|
||||||
|
}
|
||||||
|
|
||||||
final Iterator<Card> itr = revealed.iterator();
|
final Iterator<Card> itr = revealed.iterator();
|
||||||
while (itr.hasNext()) {
|
while (itr.hasNext()) {
|
||||||
final Card c = itr.next();
|
final Card c = itr.next();
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ public abstract class PlayerController {
|
|||||||
public abstract void reveal(String string, Collection<Card> cards, ZoneType zone, Player owner);
|
public abstract void reveal(String string, Collection<Card> cards, ZoneType zone, Player owner);
|
||||||
public abstract ImmutablePair<List<Card>, List<Card>> arrangeForScry(List<Card> topN);
|
public abstract ImmutablePair<List<Card>, List<Card>> arrangeForScry(List<Card> topN);
|
||||||
public abstract boolean willPutCardOnTop(Card c);
|
public abstract boolean willPutCardOnTop(Card c);
|
||||||
|
public abstract List<Card> orderMoveToZoneList(List<Card> revealed, ZoneType destinationZone);
|
||||||
|
|
||||||
/** p = target player, validCards - possible discards, min cards to discard */
|
/** p = target player, validCards - possible discards, min cards to discard */
|
||||||
public abstract List<Card> chooseCardsToDiscardFrom(Player playerDiscard, SpellAbility sa, List<Card> validCards, int min, int max);
|
public abstract List<Card> chooseCardsToDiscardFrom(Player playerDiscard, SpellAbility sa, List<Card> validCards, int min, int max);
|
||||||
|
|||||||
@@ -210,6 +210,12 @@ public class PlayerControllerAi extends PlayerController {
|
|||||||
return true; // AI does not know what will happen next (another clash or that would become his topdeck)
|
return true; // AI does not know what will happen next (another clash or that would become his topdeck)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Card> orderMoveToZoneList(List<Card> revealed, ZoneType destinationZone) {
|
||||||
|
//TODO Add logic for AI ordering here
|
||||||
|
return revealed;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Card> chooseCardsToDiscardFrom(Player p, SpellAbility sa, List<Card> validCards, int min, int max) {
|
public List<Card> chooseCardsToDiscardFrom(Player p, SpellAbility sa, List<Card> validCards, int min, int max) {
|
||||||
boolean isTargetFriendly = !p.isOpponentOf(player);
|
boolean isTargetFriendly = !p.isOpponentOf(player);
|
||||||
|
|||||||
@@ -333,6 +333,16 @@ public class PlayerControllerHuman extends PlayerController {
|
|||||||
return GuiDialog.confirm(c, "Where will you put " + c.getName() + " in your library", new String[]{"Top", "Bottom"} );
|
return GuiDialog.confirm(c, "Where will you put " + c.getName() + " in your library", new String[]{"Top", "Bottom"} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Card> orderMoveToZoneList(List<Card> revealed, ZoneType destinationZone) {
|
||||||
|
if (destinationZone == ZoneType.Library) {
|
||||||
|
return GuiChoose.order("Choose order of cards to put into the library", "Closest to top", 0, revealed, null, null);
|
||||||
|
} else if (destinationZone == ZoneType.Battlefield) {
|
||||||
|
return GuiChoose.order("Choose order of cards to put onto the battlefield", "Put first", 0, revealed, null, null);
|
||||||
|
}
|
||||||
|
return revealed;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Card> chooseCardsToDiscardFrom(Player p, SpellAbility sa, List<Card> valid, int min, int max) {
|
public List<Card> chooseCardsToDiscardFrom(Player p, SpellAbility sa, List<Card> valid, int min, int max) {
|
||||||
if ( p != player ) {
|
if ( p != player ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user