From b52d22fd764b024daeeb9f649a8d87416d0bf308 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 3 Apr 2021 13:07:38 -0400 Subject: [PATCH 1/3] the_biblioplex.txt --- .../res/cardsfolder/upcoming/the_biblioplex.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/the_biblioplex.txt diff --git a/forge-gui/res/cardsfolder/upcoming/the_biblioplex.txt b/forge-gui/res/cardsfolder/upcoming/the_biblioplex.txt new file mode 100644 index 00000000000..8bb64904489 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/the_biblioplex.txt @@ -0,0 +1,12 @@ +Name:The Biblioplex +ManaCost:no cost +Types:Land +A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}. +A:AB$ PeekAndReveal | Cost$ 2 T | PeekAmount$ 1 | RevealValid$ Card.Instant,Card.Sorcery | RevealOptional$ True | RememberRevealed$ True | ActivationCardsInHand$ 0 | OrActivationCardsInHand$ 7 | SubAbility$ DBChangeZone1 | SpellDescription$ Look at the top card of your library. If it’s an instant or sorcery card, you may reveal it and put it into your hand. If you don’t put the card into your hand, you may put it into your graveyard. Activate only if you have exactly zero or seven cards in hand. +SVar:DBChangeZone1:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | SubAbility$ DBChangeZone2 | StackDescription$ None +SVar:DBChangeZone2:DB$ ChangeZone | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0 | Defined$ TopOfLibrary | Origin$ Library | Destination$ Graveyard | Optional$ True | SubAbility$ DBCleanup | StackDescription$ None +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:X:Count$CardsInYourHand +DeckHas:Ability$Graveyard +DeckNeeds:Type$Instant|Sorcery +Oracle:{T}: Add {C}.\n{2}, {T}: Look at the top card of your library. If it’s an instant or sorcery card, you may reveal it and put it into your hand. If you don’t put the card into your hand, you may put it into your graveyard. Activate only if you have exactly zero or seven cards in hand. From 09334d20434579b64a0547588008563d44ebdaf4 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 3 Apr 2021 13:10:09 -0400 Subject: [PATCH 2/3] support for OrActivationCardsInHand param --- .../game/spellability/SpellAbilityRestriction.java | 10 +++++++++- .../forge/game/spellability/SpellAbilityVariables.java | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java b/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java index 5c8f0973aee..4dbc7d44a8d 100644 --- a/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java +++ b/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java @@ -141,6 +141,9 @@ public class SpellAbilityRestriction extends SpellAbilityVariables { if (params.containsKey("ActivationCardsInHand")) { this.setActivateCardsInHand(Integer.parseInt(params.get("ActivationCardsInHand"))); } + if (params.containsKey("OrActivationCardsInHand")) { + this.setActivateCardsInHand2(Integer.parseInt(params.get("OrActivationCardsInHand"))); + } if (params.containsKey("ActivationChosenColor")) { this.setColorToCheck(params.get("ActivationChosenColor")); @@ -356,7 +359,12 @@ public class SpellAbilityRestriction extends SpellAbilityVariables { } if (getCardsInHand() != -1) { - if (activator.getCardsIn(ZoneType.Hand).size() != getCardsInHand()) { + int h = activator.getCardsIn(ZoneType.Hand).size(); + if (getCardsInHand2() != -1) { + if (h != getCardsInHand() && h != getCardsInHand2()) { + return false; + } + } else if (h != getCardsInHand()) { return false; } } diff --git a/forge-game/src/main/java/forge/game/spellability/SpellAbilityVariables.java b/forge-game/src/main/java/forge/game/spellability/SpellAbilityVariables.java index 0856cc4bb9d..2711b33d95d 100644 --- a/forge-game/src/main/java/forge/game/spellability/SpellAbilityVariables.java +++ b/forge-game/src/main/java/forge/game/spellability/SpellAbilityVariables.java @@ -134,6 +134,7 @@ public class SpellAbilityVariables implements Cloneable { /** The n cards in hand. */ private int cardsInHand = -1; + private int cardsInHand2 = -1; // Conditional States for Cards private boolean threshold = false; @@ -384,6 +385,9 @@ public class SpellAbilityVariables implements Cloneable { public final void setActivateCardsInHand(final int cards) { this.setCardsInHand(cards); } + public final void setActivateCardsInHand2(final int cards) { + this.setCardsInHand2(cards); + } public final void setHellbent(final boolean bHellbent) { @@ -830,6 +834,9 @@ public class SpellAbilityVariables implements Cloneable { public final int getCardsInHand() { return this.cardsInHand; } + public final int getCardsInHand2() { + return this.cardsInHand2; + } /** * Sets the cards in hand. @@ -840,6 +847,9 @@ public class SpellAbilityVariables implements Cloneable { public final void setCardsInHand(final int cardsInHand0) { this.cardsInHand = cardsInHand0; } + public final void setCardsInHand2(final int cardsInHand0) { + this.cardsInHand2 = cardsInHand0; + } /** * Gets the checks if is present. From 2e31e1840ad57e462091080a66b96469d59428b6 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 3 Apr 2021 13:11:45 -0400 Subject: [PATCH 3/3] improve awkward prompt --- forge-gui/res/languages/en-US.properties | 2 +- forge-gui/res/languages/es-ES.properties | 2 +- forge-gui/res/languages/it-IT.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/forge-gui/res/languages/en-US.properties b/forge-gui/res/languages/en-US.properties index 7176ca7bcfe..83ca8a31540 100644 --- a/forge-gui/res/languages/en-US.properties +++ b/forge-gui/res/languages/en-US.properties @@ -1762,7 +1762,7 @@ lblChooseColorReplace=Choose a color word to replace lblChooseNewColor=Choose a new color word #ChangeZoneEffect.java lblDoYouWantMoveTargetFromOriToDest=Do you want to move {0} from {1} to {2}? -lblPutThatCardFromPlayerOriginToDestination=Put that card from for {0} {1} to {2} +lblPutThatCardFromPlayerOriginToDestination=Put that card from {0} {1} to {2}? lblSearchPlayerZoneConfirm=Search {0} {1}? lblCardMatchSearchingTypeInAlternateZones=cards match your searching type in Alternate Zones. lblLookingCardIn=Looking at cards in diff --git a/forge-gui/res/languages/es-ES.properties b/forge-gui/res/languages/es-ES.properties index fdf7955f8e7..005abf4db80 100644 --- a/forge-gui/res/languages/es-ES.properties +++ b/forge-gui/res/languages/es-ES.properties @@ -1762,7 +1762,7 @@ lblChooseColorReplace=Elige una palabra de color para reemplazarla lblChooseNewColor=Elige una nueva palabra de color #ChangeZoneEffect.java lblDoYouWantMoveTargetFromOriToDest=¿Quieres mover {0} de {1} a {2}? -lblPutThatCardFromPlayerOriginToDestination=Poner esa carta desde {0} {1} hasta {2} +lblPutThatCardFromPlayerOriginToDestination=¿Poner esa carta desde {0} {1} hasta {2}? lblSearchPlayerZoneConfirm=¿Buscar {0} {1}? lblCardMatchSearchingTypeInAlternateZones=las cartas coinciden con tu tipo de búsqueda en las zonas alternativas. lblLookingCardIn=Mirando las cartas en diff --git a/forge-gui/res/languages/it-IT.properties b/forge-gui/res/languages/it-IT.properties index 68d60d4ee1a..9f3d6e991f9 100644 --- a/forge-gui/res/languages/it-IT.properties +++ b/forge-gui/res/languages/it-IT.properties @@ -1762,7 +1762,7 @@ lblChooseColorReplace=Choose a color word to replace lblChooseNewColor=Choose a new color word #ChangeZoneEffect.java lblDoYouWantMoveTargetFromOriToDest=Do you want to move {0} from {1} to {2}? -lblPutThatCardFromPlayerOriginToDestination=Put that card from for {0} {1} to {2} +lblPutThatCardFromPlayerOriginToDestination=Put that card from {0} {1} to {2}? lblSearchPlayerZoneConfirm=Search {0} {1}? lblCardMatchSearchingTypeInAlternateZones=cards match your searching type in Alternate Zones. lblLookingCardIn=Looking at cards in