mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Fixed the first ability of Phylactery Lich to not use the stack (which fixes it for the AI, but the human input still delays it until the always trigger kicks in).
This commit is contained in:
@@ -522,8 +522,7 @@ public class CardFactoryCreatures {
|
||||
public void selectCard(final Card card, final PlayerZone zone) {
|
||||
if (card.isArtifact() && zone.is(Constant.Zone.Battlefield)
|
||||
&& card.getController().isHuman()) {
|
||||
ability.setTargetCard(card);
|
||||
AllZone.getStack().add(ability);
|
||||
card.addCounter(Counters.PHYLACTERY, 1);
|
||||
this.stop();
|
||||
}
|
||||
}
|
||||
@@ -538,13 +537,29 @@ public class CardFactoryCreatures {
|
||||
}
|
||||
|
||||
} else { // computer
|
||||
final Object o = getArt.execute();
|
||||
// should never happen, but just in case
|
||||
if (o != null) {
|
||||
ability.setTargetCard((Card) o);
|
||||
AllZone.getStack().addSimultaneousStackEntry(ability);
|
||||
|
||||
CardList art = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield);
|
||||
art = art.filter(new CardListFilter() {
|
||||
@Override
|
||||
public boolean addCard(final Card c) {
|
||||
return c.isArtifact();
|
||||
}
|
||||
});
|
||||
|
||||
CardList list = new CardList(art.toArray());
|
||||
list = list.filter(new CardListFilter() {
|
||||
@Override
|
||||
public boolean addCard(final Card c) {
|
||||
return c.getIntrinsicKeyword().contains("Indestructible");
|
||||
}
|
||||
});
|
||||
|
||||
Card chosen = null;
|
||||
if (!list.isEmpty()) {
|
||||
chosen = list.get(0);
|
||||
} else if (!art.isEmpty()) {
|
||||
chosen = art.get(0);
|
||||
}
|
||||
chosen.addCounter(Counters.PHYLACTERY, 1);
|
||||
} // else
|
||||
} // execute()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user