mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Small fixes to last commit and added some Shuffle params where necessary
This commit is contained in:
@@ -2,7 +2,7 @@ Name:Mass Polymorph
|
|||||||
ManaCost:5 U
|
ManaCost:5 U
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ ChangeZoneAll | Cost$ 5 U | ChangeType$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | SubAbility$ DBMassReveal | SpellDescription$ Exile all creatures you control, then reveal cards from the top of your library until you reveal that many creature cards. Put all creature cards revealed this way onto the battlefield, then shuffle the rest of the revealed cards into your library.
|
A:SP$ ChangeZoneAll | Cost$ 5 U | ChangeType$ Creature.YouCtrl | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | SubAbility$ DBMassReveal | SpellDescription$ Exile all creatures you control, then reveal cards from the top of your library until you reveal that many creature cards. Put all creature cards revealed this way onto the battlefield, then shuffle the rest of the revealed cards into your library.
|
||||||
SVar:DBMassReveal:DB$ DigUntil | Amount$ MassX | References$ MassX | Valid$ Creature.YouOwn | ValidDescription$ creature | RevealedDestination$ Library | RevealedLibraryPosition$ 0 | FoundDestination$ Battlefield | SubAbility$ DBMassCleanup
|
SVar:DBMassReveal:DB$ DigUntil | Amount$ MassX | References$ MassX | Valid$ Creature.YouOwn | ValidDescription$ creature | RevealedDestination$ Library | RevealedLibraryPosition$ 0 | FoundDestination$ Battlefield | SubAbility$ DBMassCleanup | Shuffle$ True
|
||||||
SVar:DBMassCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBMassShuffle
|
SVar:DBMassCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBMassShuffle
|
||||||
SVar:DBMassShuffle:DB$ Shuffle
|
SVar:DBMassShuffle:DB$ Shuffle
|
||||||
SVar:MassX:Remembered$Amount
|
SVar:MassX:Remembered$Amount
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Spellshift
|
|||||||
ManaCost:3 U
|
ManaCost:3 U
|
||||||
Types:Instant
|
Types:Instant
|
||||||
A:SP$ Counter | Cost$ 3 U | TargetType$ Spell | ValidTgts$ Instant,Sorcery | TgtPrompt$ Select target Instant or Sorcery Spell | SubAbility$ DBDig | SpellDescription$ Counter target instant or sorcery spell. Its controller reveals cards from the top of his or her library until he or she reveals an instant or sorcery card. That player may cast that card without paying its mana cost. Then he or she shuffles his or her library.
|
A:SP$ Counter | Cost$ 3 U | TargetType$ Spell | ValidTgts$ Instant,Sorcery | TgtPrompt$ Select target Instant or Sorcery Spell | SubAbility$ DBDig | SpellDescription$ Counter target instant or sorcery spell. Its controller reveals cards from the top of his or her library until he or she reveals an instant or sorcery card. That player may cast that card without paying its mana cost. Then he or she shuffles his or her library.
|
||||||
SVar:DBDig:DB$ DigUntil | Defined$ TargetedController | Valid$ Instant,Sorcery | ValidDescription$ Sorcery or Instant | FoundDestination$ Library | RevealedDestination$ Library | RememberFound$ True | SubAbility$ DBPlay
|
SVar:DBDig:DB$ DigUntil | Defined$ TargetedController | Valid$ Instant,Sorcery | ValidDescription$ Sorcery or Instant | FoundDestination$ Library | RevealedDestination$ Library | RememberFound$ True | SubAbility$ DBPlay | Shuffle$ True
|
||||||
SVar:DBPlay:DB$ Play | Defined$ Remembered | Controller$ TargetedController | WithoutManaCost$ True | Optional$ True | SubAbility$ DBShuffle
|
SVar:DBPlay:DB$ Play | Defined$ Remembered | Controller$ TargetedController | WithoutManaCost$ True | Optional$ True | SubAbility$ DBShuffle
|
||||||
SVar:DBShuffle:DB$ Shuffle | Defined$ TargetedController | SubAbility$ DBCleanup
|
SVar:DBShuffle:DB$ Shuffle | Defined$ TargetedController | SubAbility$ DBCleanup
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
|||||||
@@ -104,7 +104,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>();
|
List<Card> found = new ArrayList<Card>();
|
||||||
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,12 +130,13 @@ public class DigUntilEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
final GameState game = p.getGame();
|
final GameState game = p.getGame();
|
||||||
|
|
||||||
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) {
|
||||||
|
// Allow ordering of found cards
|
||||||
|
if ((foundDest.isKnown()) && found.size() >= 2) {
|
||||||
|
found = p.getController().orderMoveToZoneList(found, foundDest);
|
||||||
|
// should possibly use host.getController().getController()... for these instead of p.getController?
|
||||||
|
}
|
||||||
|
|
||||||
final Iterator<Card> itr = found.iterator();
|
final Iterator<Card> itr = found.iterator();
|
||||||
while (itr.hasNext()) {
|
while (itr.hasNext()) {
|
||||||
final Card c = itr.next();
|
final Card c = itr.next();
|
||||||
@@ -166,9 +167,13 @@ public class DigUntilEffect extends SpellAbilityEffect {
|
|||||||
Collections.shuffle(revealed, random);
|
Collections.shuffle(revealed, random);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (revealedDest == ZoneType.Library && !sa.hasParam("Shuffle") && revealed.size() >= 2) {
|
// Allow ordering the rest of the revealed cards
|
||||||
|
if ((revealedDest.isKnown()) && revealed.size() >= 2) {
|
||||||
|
revealed = p.getController().orderMoveToZoneList(revealed, revealedDest);
|
||||||
|
}
|
||||||
|
if (revealedDest == ZoneType.Library && !sa.hasParam("Shuffle")
|
||||||
|
&& !sa.hasParam("RevealRandomOrder") && revealed.size() >= 2) {
|
||||||
revealed = p.getController().orderMoveToZoneList(revealed, revealedDest);
|
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();
|
||||||
|
|||||||
@@ -126,7 +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);
|
public abstract List<Card> orderMoveToZoneList(List<Card> cards, 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);
|
||||||
|
|||||||
@@ -211,9 +211,9 @@ public class PlayerControllerAi extends PlayerController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Card> orderMoveToZoneList(List<Card> revealed, ZoneType destinationZone) {
|
public List<Card> orderMoveToZoneList(List<Card> cards, ZoneType destinationZone) {
|
||||||
//TODO Add logic for AI ordering here
|
//TODO Add logic for AI ordering here
|
||||||
return revealed;
|
return cards;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -334,13 +334,15 @@ public class PlayerControllerHuman extends PlayerController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Card> orderMoveToZoneList(List<Card> revealed, ZoneType destinationZone) {
|
public List<Card> orderMoveToZoneList(List<Card> cards, ZoneType destinationZone) {
|
||||||
if (destinationZone == ZoneType.Library) {
|
if (destinationZone == ZoneType.Library) {
|
||||||
return GuiChoose.order("Choose order of cards to put into the library", "Closest to top", 0, revealed, null, null);
|
return GuiChoose.order("Choose order of cards to put into the library", "Closest to top", 0, cards, null, null);
|
||||||
} else if (destinationZone == ZoneType.Battlefield) {
|
} else if (destinationZone == ZoneType.Battlefield) {
|
||||||
return GuiChoose.order("Choose order of cards to put onto the battlefield", "Put first", 0, revealed, null, null);
|
return GuiChoose.order("Choose order of cards to put onto the battlefield", "Put first", 0, cards, null, null);
|
||||||
|
} else if (destinationZone == ZoneType.Graveyard) {
|
||||||
|
return GuiChoose.order("Choose order of cards to put into the graveyard", "Closest to top", 0, cards, null, null);
|
||||||
}
|
}
|
||||||
return revealed;
|
return cards;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user