mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* 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:
parent
6b5108770c
commit
63dbf5f40b
9 changed files with 1 additions and 190 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue