Test framework - multiple improves:

* Added support of spell ability choice in free cast (chooseSpellAbilityForCast);
* Added support of "up to" targets setup in addTargetAmount (use TestPlayer.TARGET_SKIP to stop target choose);
* Restored multiple checks for addTargetAmount;
* Fixed many wrong tests (wrong order or missing commands);
This commit is contained in:
Oleg Agafonov 2020-01-12 01:17:39 +04:00
parent b0853fae8b
commit e1fea330dd
24 changed files with 435 additions and 327 deletions

View file

@ -1885,7 +1885,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
case SPLIT_AFTERMATH:
MageObject object = game.getObject(ability.getSourceId());
if (object != null) {
LinkedHashMap<UUID, ActivatedAbility> useableAbilities = getSpellAbilities(object, game.getState().getZone(object.getId()), game);
LinkedHashMap<UUID, ActivatedAbility> useableAbilities = getSpellAbilities(playerId, object, game.getState().getZone(object.getId()), game);
if (useableAbilities != null && !useableAbilities.isEmpty()) {
// game.fireGetChoiceEvent(playerId, name, object, new ArrayList<>(useableAbilities.values()));
// TODO: Improve this