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"));
} else {
for (String s : sa.getParam("CounterType").split(",")) {
CounterType.getType(s);
types.add(CounterType.getType(s));
}
}

View File

@@ -183,7 +183,8 @@ public class TwoPilesEffect extends SpellAbilityEffect {
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
// Chosen/Unchosen subability resolutions, so this preserves that
card.clearRemembered();

View File

@@ -496,7 +496,7 @@ public class CardProperty {
} else if (property.startsWith("CanEnchant")) {
final String restriction = property.substring(10);
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")) {
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) {
if (!stAb.matchesValidParam("ValidCard", card)) {
return false;
}

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: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
# This variable may be incorrect if the controller changes while the ability is on the stack
SVar:X:Count$InYourLibrary
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.