[KHM] KayaTheInexorableEmblem - Move choices to static

This commit is contained in:
Daniel Bomar 2020-12-23 14:29:03 -06:00
parent a1318663d6
commit 0a28963aa3

View file

@ -39,9 +39,13 @@ public class KayaTheInexorableEmblem extends Emblem {
class KayaTheInexorableEmblemEffect extends OneShotEffect { class KayaTheInexorableEmblemEffect extends OneShotEffect {
private static final FilterOwnedCard filter = new FilterOwnedCard(); private static final FilterOwnedCard filter = new FilterOwnedCard();
private static final Set<String> choices = new LinkedHashSet<>();
static { static {
filter.add(SuperType.LEGENDARY.getPredicate()); filter.add(SuperType.LEGENDARY.getPredicate());
filter.add(Predicates.not(CardType.LAND.getPredicate())); filter.add(Predicates.not(CardType.LAND.getPredicate()));
choices.add("Hand");
choices.add("Graveyard");
choices.add("Exile");
} }
public KayaTheInexorableEmblemEffect() { public KayaTheInexorableEmblemEffect() {
@ -62,10 +66,6 @@ class KayaTheInexorableEmblemEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId()); Player player = game.getPlayer(source.getControllerId());
if (player != null) { if (player != null) {
Set<String> choices = new LinkedHashSet<>();
choices.add("Hand");
choices.add("Graveyard");
choices.add("Exile");
Choice zoneChoice = new ChoiceImpl(true); Choice zoneChoice = new ChoiceImpl(true);
zoneChoice.setMessage("Cast a legendary spell from hand, graveyard, or exile"); zoneChoice.setMessage("Cast a legendary spell from hand, graveyard, or exile");
zoneChoice.setChoices(choices); zoneChoice.setChoices(choices);