Skip to content

Commit

Permalink
Update Kassandra, Eagle Bearer to reduce player choose dialogues from…
Browse files Browse the repository at this point in the history
… three to two.
  • Loading branch information
Grath committed Jan 20, 2025
1 parent 5fcc037 commit 9ba12d1
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions Mage.Sets/src/mage/cards/k/KassandraEagleBearer.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package mage.cards.k;

import java.util.Objects;
import java.util.Set;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
Expand Down Expand Up @@ -98,36 +99,30 @@ public boolean apply(Game game, Ability source) {
}
}

// Hand is a hidden zone - you may fail to find a Spear of Leonidas that's in your hand.
// 701.19b. If a player is searching a hidden zone for cards with a stated quality, such as a card with a
// certain card type or color, that player isn't required to find some or all of those cards even if they're
// present in that zone.
// This is true even if your hand is revealed:
// 400.2. ... Hidden zones are zones in which not all players can be expected to see the cards' faces.
// Library and hand are hidden zones, even if all the cards in one such zone happen to be revealed.
if (spearCard == null) {
FilterCard filter2 = new FilterCard("card from your hand named The Spear of Leonidas");
filter2.add(new NamePredicate(spearName));
TargetCard target = new TargetCard(0, 1, Zone.HAND, filter2);
target.withNotTarget(true);
Cards cards = new CardsImpl();
cards.addAllCards(controller.getHand().getCards(filter, source.getControllerId(), source, game));
if (!cards.isEmpty()) {
controller.choose(outcome, cards, target, source, game);
for (UUID id : target.getTargets()) {
spearCard = game.getCard(id);
}
Cards spears = new CardsImpl();
spears.addAllCards(controller.getHand().getCards(filter, source.getControllerId(), source, game));
Set<Card> spearsInGraveyard = controller.getGraveyard().getCards(filter, source.getControllerId(), source, game);
TargetCard target;
if (spearsInGraveyard.isEmpty()) {
// Hand is a hidden zone - you may fail to find a Spear of Leonidas that's in your hand.
// 701.19b. If a player is searching a hidden zone for cards with a stated quality, such as a card with a
// certain card type or color, that player isn't required to find some or all of those cards even if they're
// present in that zone.
// This is true even if your hand is revealed:
// 400.2. ... Hidden zones are zones in which not all players can be expected to see the cards' faces.
// Library and hand are hidden zones, even if all the cards in one such zone happen to be revealed.
target = new TargetCard(0, 1, Zone.HAND, filter);
} else {
spears.addAllCards(spearsInGraveyard);
// You cannot fail to find a spear if there is one in your graveyard, because the graveyard is not hidden.
target = new TargetCard(1, 1, Zone.HAND, filter);
}
}

// You cannot fail to find a spear if there is one in your graveyard, because the graveyard is not hidden.
if (spearCard == null) {
TargetCard target = new TargetCard(1, 1, Zone.GRAVEYARD, filter);
target.withNotTarget(true);
Cards cards = new CardsImpl();
cards.addAllCards(controller.getGraveyard().getCards(filter, source.getControllerId(), source, game));
if (!cards.isEmpty()) {
controller.choose(outcome, cards, target, source, game);
if (!spears.isEmpty()) {
controller.choose(outcome, spears, target, source, game);
for (UUID id : target.getTargets()) {
spearCard = game.getCard(id);
}
Expand Down

0 comments on commit 9ba12d1

Please sign in to comment.