[CMM] Implement Leori, Sparktouched Hunter (#10669)

This commit is contained in:
Susucre 2023-07-27 06:24:28 +02:00 committed by GitHub
parent ffcb742b32
commit 84e1b44845
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 204 additions and 0 deletions

View file

@ -0,0 +1,43 @@
package mage.choices;
import mage.MageObject;
import mage.constants.SubType;
import java.util.LinkedHashSet;
import java.util.stream.Collectors;
public class ChoicePlaneswalkerType extends ChoiceImpl {
private static final String DEFAULT_MESSAGE = "Choose a planeswalker type";
public ChoicePlaneswalkerType() {
this(true, DEFAULT_MESSAGE, null);
}
public ChoicePlaneswalkerType(MageObject source) {
this(true, DEFAULT_MESSAGE, source);
}
public ChoicePlaneswalkerType(String chooseMessage, MageObject source) {
this(true, chooseMessage, source);
}
public ChoicePlaneswalkerType(boolean required, String chooseMessage, MageObject source) {
super(required);
this.setChoices(SubType.getPlaneswalkerTypes().stream().map(SubType::toString).collect(Collectors.toCollection(LinkedHashSet::new)));
this.setMessage(chooseMessage);
if (source != null) {
this.setSubMessage(source.getIdName());
}
this.setSearchEnabled(true);
}
public ChoicePlaneswalkerType(final ChoicePlaneswalkerType choice) {
super(choice);
}
@Override
public ChoicePlaneswalkerType copy() {
return new ChoicePlaneswalkerType(this);
}
}