* Split cards improves:

* Fixed that fused spells can't be played from non hand zone;
 * Fixed double choose spell dialog (#5506, #6549);
This commit is contained in:
Oleg Agafonov 2020-05-19 01:30:46 +04:00
parent 6b5108770c
commit 63dbf5f40b
9 changed files with 1 additions and 190 deletions

View file

@ -1895,27 +1895,6 @@ public class ComputerPlayer extends PlayerImpl implements Player {
return 0;
}
@Override
public SpellAbility chooseSpellAbilityForCast(SpellAbility ability, Game game, boolean noMana) {
switch (ability.getSpellAbilityType()) {
case SPLIT:
case SPLIT_FUSED:
case SPLIT_AFTERMATH:
MageObject object = game.getObject(ability.getSourceId());
if (object != null) {
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
return (SpellAbility) useableAbilities.values().iterator().next();
}
}
return null;
default:
return ability;
}
}
@Override
public Mode chooseMode(Modes modes, Ability source, Game game) {
log.debug("chooseMode");