Merge branch 'biblio' into 'master'

STX - The Biblioplex

See merge request core-developers/forge!4361
This commit is contained in:
Michael Kamensky
2021-04-04 04:25:56 +00:00
6 changed files with 34 additions and 4 deletions

View File

@@ -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;
}
}

View File

@@ -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.

View File

@@ -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 its an instant or sorcery card, you may reveal it and put it into your hand. If you dont 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 its an instant or sorcery card, you may reveal it and put it into your hand. If you dont 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.

View File

@@ -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

View File

@@ -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

View File

@@ -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