mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Add changes to allow for a one of the two piles to be facedown
- Add Fortune's Favor
This commit is contained in:
10
forge-gui/res/cardsfolder/f/fortunes_favor.txt
Normal file
10
forge-gui/res/cardsfolder/f/fortunes_favor.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Name:Fortune's Favor
|
||||
ManaCost:3 U
|
||||
Types:Instant
|
||||
A:SP$ PeekAndReveal | Cost$ 3 U | Defined$ You | PeekAmount$ 4 | NoPeek$ True | NoReveal$ True | RememberPeeked$ True | SubAbility$ Separate | SpellDescription$ Target opponent looks at the top four cards of your library and separates them into a face-down pile and a face-up pile. Put one pile into your hand and the other into your graveyard.
|
||||
SVar:Separate:DB$ TwoPiles | Defined$ You | Separator$ TargetedPlayer | Chooser$ You | ValidTgts$ Opponent | DefinedCards$ Remembered | ChosenPile$ DBHand | UnchosenPile$ DBGrave | Zone$ Library | FaceDown$ One | StackDescription$ None
|
||||
SVar:DBHand:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | SubAbility$ DBCleanup
|
||||
SVar:DBGrave:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Graveyard | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/fortunes_favor.jpg
|
||||
Oracle:Target opponent looks at the top four cards of your library and separates them into a face-down pile and a face-up pile. Put one pile into your hand and the other into your graveyard.
|
||||
@@ -1289,25 +1289,33 @@ public class PlayerControllerHuman
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean chooseCardsPile(final SpellAbility sa, final CardCollectionView pile1, final CardCollectionView pile2, final boolean faceUp) {
|
||||
if (!faceUp) {
|
||||
final String p1Str = String.format("Pile 1 (%s cards)", pile1.size());
|
||||
final String p2Str = String.format("Pile 2 (%s cards)", pile2.size());
|
||||
public boolean chooseCardsPile(final SpellAbility sa, final CardCollectionView pile1, final CardCollectionView pile2, final String faceUp) {
|
||||
final String p1Str = String.format("-- Pile 1 (%s cards) --", pile1.size());
|
||||
final String p2Str = String.format("-- Pile 2 (%s cards) --", pile2.size());
|
||||
|
||||
/*
|
||||
if (faceUp.equals("True")) {
|
||||
final List<String> possibleValues = ImmutableList.of(p1Str , p2Str);
|
||||
return getGui().confirm(CardView.get(sa.getHostCard()), "Choose a Pile", possibleValues);
|
||||
}
|
||||
|
||||
tempShowCards(pile1);
|
||||
tempShowCards(pile2);
|
||||
*/
|
||||
|
||||
final List<CardView> cards = Lists.newArrayListWithCapacity(pile1.size() + pile2.size() + 2);
|
||||
final CardView pileView1 = new CardView(Integer.MIN_VALUE, null, "--- Pile 1 ---");
|
||||
cards.add(pileView1);
|
||||
cards.addAll(CardView.getCollection(pile1));
|
||||
final CardView pileView1 = new CardView(Integer.MIN_VALUE, null, p1Str);
|
||||
|
||||
final CardView pileView2 = new CardView(Integer.MIN_VALUE + 1, null, "--- Pile 2 ---");
|
||||
cards.add(pileView1);
|
||||
if (faceUp.equals("False")) {
|
||||
tempShowCards(pile1);
|
||||
cards.addAll(CardView.getCollection(pile1));
|
||||
}
|
||||
|
||||
final CardView pileView2 = new CardView(Integer.MIN_VALUE + 1, null, p2Str);
|
||||
cards.add(pileView2);
|
||||
cards.addAll(CardView.getCollection(pile2));
|
||||
if (!faceUp.equals("True")) {
|
||||
tempShowCards(pile2);
|
||||
cards.addAll(CardView.getCollection(pile2));
|
||||
}
|
||||
|
||||
|
||||
// make sure Pile 1 or Pile 2 is clicked on
|
||||
boolean result;
|
||||
|
||||
Reference in New Issue
Block a user