mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
* AI: fixed rollback errors on play cards with target stack (Diplomatic Escort, Not of This World, etc);
This commit is contained in:
parent
009e55c4f0
commit
86f6d39f5a
5 changed files with 126 additions and 101 deletions
|
|
@ -819,10 +819,13 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
return target.isChosen();
|
||||
}
|
||||
|
||||
if (target.getOriginalTarget() instanceof TargetSpell) {
|
||||
if (target.getOriginalTarget() instanceof TargetSpell
|
||||
|| target.getOriginalTarget() instanceof TargetStackObject) {
|
||||
if (!game.getStack().isEmpty()) {
|
||||
for (StackObject o : game.getStack()) {
|
||||
if (o instanceof Spell && !source.getId().equals(o.getStackAbility().getId())) {
|
||||
if (o instanceof Spell
|
||||
&& !source.getId().equals(o.getStackAbility().getId())
|
||||
&& target.canTarget(abilityControllerId, o.getStackAbility().getId(), source, game)) {
|
||||
return tryAddTarget(target, o.getId(), source, game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue