test framework: improved aiXXX commands support:

- added more options for priority control (play single priority, play multiple priorities until stack resolved);
- added more options for step control (play single step, play multiple steps);
- improved compatibility with AI and real time commands (now check commands can be called inside AI controlled steps);
- added tests for assign non-blocked damage;
This commit is contained in:
Oleg Agafonov 2024-10-26 11:33:32 +04:00
parent a06935da81
commit a9bdf2eb18
12 changed files with 342 additions and 88 deletions

View file

@ -1,5 +1,7 @@
package mage.constants;
import java.util.Arrays;
/**
* @author North
*/
@ -51,6 +53,13 @@ public enum PhaseStep {
return text;
}
public static PhaseStep fromString(String needText) {
return Arrays.stream(values())
.filter(step -> step.toString().equals(needText))
.findFirst()
.orElse(null);
}
public String getStepText() {
return stepText;
}