Merge pull request #2644 from tool4ever/makeanexample

Fix Make an Example
This commit is contained in:
Anthony Calosa
2023-03-09 06:10:09 +08:00
committed by GitHub
7 changed files with 6 additions and 7 deletions

View File

@@ -994,7 +994,7 @@ public class CountersPutAi extends CountersAi {
types.add((CounterType)params.get("CounterType")); types.add((CounterType)params.get("CounterType"));
} else { } else {
for (String s : sa.getParam("CounterType").split(",")) { for (String s : sa.getParam("CounterType").split(",")) {
CounterType.getType(s); types.add(CounterType.getType(s));
} }
} }

View File

@@ -225,7 +225,7 @@ public class StaticData {
return foil ? card.getFoiled() : card; return foil ? card.getFoiled() : card;
} }
public void attemptToLoadCard(String cardName){ public void attemptToLoadCard(String cardName) {
this.attemptToLoadCard(cardName, null); this.attemptToLoadCard(cardName, null);
} }
public void attemptToLoadCard(String cardName, String setCode) { public void attemptToLoadCard(String cardName, String setCode) {

View File

@@ -183,7 +183,8 @@ public class TwoPilesEffect extends SpellAbilityEffect {
card.addRemembered(tempRemembered); card.addRemembered(tempRemembered);
} }
} }
if (!sa.hasParam("KeepRemembered")) {
if (!sa.hasParam("KeepRemembered") && !sa.hasParam("RememberChosen")) {
// prior to addition of "DefinedPiles" param, TwoPilesEffect cleared remembered objects in the // prior to addition of "DefinedPiles" param, TwoPilesEffect cleared remembered objects in the
// Chosen/Unchosen subability resolutions, so this preserves that // Chosen/Unchosen subability resolutions, so this preserves that
card.clearRemembered(); card.clearRemembered();

View File

@@ -496,7 +496,7 @@ public class CardProperty {
} else if (property.startsWith("CanEnchant")) { } else if (property.startsWith("CanEnchant")) {
final String restriction = property.substring(10); final String restriction = property.substring(10);
if (restriction.equals("EquippedBy")) { if (restriction.equals("EquippedBy")) {
if (!source.getEquipping().canBeAttached(card, null)) return false; if (!source.isEquipping() || !source.getEquipping().canBeAttached(card, null)) return false;
} }
if (restriction.equals("Remembered")) { if (restriction.equals("Remembered")) {
for (final Object rem : source.getRemembered()) { for (final Object rem : source.getRemembered()) {

View File

@@ -46,7 +46,6 @@ public class StaticAbilityCanAttackDefender {
} }
public static boolean applyCanAttackAbility(final StaticAbility stAb, final Card card, final GameEntity target) { public static boolean applyCanAttackAbility(final StaticAbility stAb, final Card card, final GameEntity target) {
if (!stAb.matchesValidParam("ValidCard", card)) { if (!stAb.matchesValidParam("ValidCard", card)) {
return false; return false;
} }

View File

@@ -91,7 +91,7 @@ public class TriggerSacrificed extends Trigger {
for (IndividualCostPaymentInstance individual : stack) { for (IndividualCostPaymentInstance individual : stack) {
sa = individual.getPayment().getAbility(); sa = individual.getPayment().getAbility();
if (sa == null || sa.getHostCard() == null) if (sa == null || sa.getHostCard() == null)
continue; continue;
if (sa.isSpell() && sa.getHostCard().hasStartOfUnHiddenKeyword(keyword)) { if (sa.isSpell() && sa.getHostCard().hasStartOfUnHiddenKeyword(keyword)) {

View File

@@ -5,7 +5,6 @@ A:AB$ Dig | Cost$ 3 | ValidTgts$ Opponent | DigNum$ 10 | RememberRevealed$ True
SVar:DBTwoPiles:DB$ TwoPiles | Defined$ You | DefinedCards$ Remembered | Separator$ Targeted | FaceDown$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE10 | ChosenPile$ DBHand | UnchosenPile$ DBExile SVar:DBTwoPiles:DB$ TwoPiles | Defined$ You | DefinedCards$ Remembered | Separator$ Targeted | FaceDown$ True | ConditionCheckSVar$ X | ConditionSVarCompare$ GE10 | ChosenPile$ DBHand | UnchosenPile$ DBExile
SVar:DBHand:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | ChangeType$ Card | ChangeNum$ 1 | ChooseFromDefined$ True | Mandatory$ True | Shuffle$ True SVar:DBHand:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | ChangeType$ Card | ChangeNum$ 1 | ChooseFromDefined$ True | Mandatory$ True | Shuffle$ True
SVar:DBExile:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Exile SVar:DBExile:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Exile
# This variable may be incorrect if the controller changes while the ability is on the stack
SVar:X:Count$InYourLibrary SVar:X:Count$InYourLibrary
AI:RemoveDeck:All AI:RemoveDeck:All
Oracle:{3}: If your library has ten or more cards in it, target opponent looks at the top ten cards of your library and separates them into two face-down piles. Exile one of those piles. Search the other pile for a card, put it into your hand, then shuffle the rest of that pile into your library. Oracle:{3}: If your library has ten or more cards in it, target opponent looks at the top ten cards of your library and separates them into two face-down piles. Exile one of those piles. Search the other pile for a card, put it into your hand, then shuffle the rest of that pile into your library.