mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Test framework: added commands for real time checks/assertions:
* new checks: color, subtype, ability, PT, permanent and hand count; * more info in #4936;
This commit is contained in:
parent
f30c0a7054
commit
4851ba9e84
5 changed files with 344 additions and 106 deletions
|
|
@ -4,6 +4,7 @@ import java.util.Arrays;
|
|||
import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import mage.util.SubTypeList;
|
||||
|
||||
public enum SubType {
|
||||
|
|
@ -328,17 +329,16 @@ public enum SubType {
|
|||
TROOPER("Trooper", SubTypeSet.CreatureType, true), // Star Wars
|
||||
TRILOBITE("Trilobite", SubTypeSet.CreatureType),
|
||||
TWILEK("Twi'lek", SubTypeSet.CreatureType, true), // Star Wars
|
||||
|
||||
// U
|
||||
UGNAUGHT("Ugnaught", SubTypeSet.CreatureType, true),
|
||||
UNICORN("Unicorn", SubTypeSet.CreatureType),
|
||||
//V
|
||||
// V
|
||||
VAMPIRE("Vampire", SubTypeSet.CreatureType),
|
||||
VEDALKEN("Vedalken", SubTypeSet.CreatureType),
|
||||
VIASHINO("Viashino", SubTypeSet.CreatureType),
|
||||
VILLAIN("Villain", SubTypeSet.CreatureType, true), // Unstable
|
||||
VOLVER("Volver", SubTypeSet.CreatureType),
|
||||
//W
|
||||
// W
|
||||
WALL("Wall", SubTypeSet.CreatureType),
|
||||
WARRIOR("Warrior", SubTypeSet.CreatureType),
|
||||
WEEQUAY("Weequay", SubTypeSet.CreatureType, true),
|
||||
|
|
@ -429,6 +429,16 @@ public enum SubType {
|
|||
return description;
|
||||
}
|
||||
|
||||
public static SubType fromString(String value) {
|
||||
for (SubType st : SubType.values()) {
|
||||
if (st.toString().equals(value)) {
|
||||
return st;
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException("Can''t find subtype enum value: " + value);
|
||||
}
|
||||
|
||||
public static SubType byDescription(String subType) {
|
||||
for (SubType s : values()) {
|
||||
if (s.getDescription().equals(subType)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue