test framework: added commands to check declared attackers and blockers creatures (useful for AI tests, see checkAttackers and checkBlockers)

This commit is contained in:
Oleg Agafonov 2024-12-30 15:09:02 +04:00
parent 6b9532febd
commit 60112c6be5
5 changed files with 146 additions and 7 deletions

View file

@ -1423,6 +1423,7 @@ public abstract class GameImpl implements Game {
newWatchers.add(new CreaturesDiedWatcher());
newWatchers.add(new TemptedByTheRingWatcher());
newWatchers.add(new SpellsCastWatcher());
newWatchers.add(new AttackedOrBlockedThisCombatWatcher()); // required for tests
// runtime check - allows only GAME scope (one watcher per game)
newWatchers.forEach(watcher -> {
@ -3635,7 +3636,7 @@ public abstract class GameImpl implements Game {
/**
* Reset objects stored for Last Known Information. (Happens if all effects
* are applied und stack is empty)
* are applied and stack is empty)
*/
@Override
public void resetLKI() {