mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* Allow deselection of target cards (eg. in graveyard using Delve).
This commit is contained in:
parent
652daddfe8
commit
f7535505dd
1 changed files with 12 additions and 4 deletions
|
@ -288,13 +288,21 @@ public class HumanPlayer extends PlayerImpl {
|
|||
if (possibleTargets.contains(response.getUUID())) {
|
||||
if (target instanceof TargetPermanent) {
|
||||
if (((TargetPermanent)target).canTarget(playerId, response.getUUID(), source, game)) {
|
||||
target.addTarget(response.getUUID(), source, game);
|
||||
if(target.doneChosing()){
|
||||
return true;
|
||||
if (target.getTargets().contains(response.getUUID())) { // if already included remove it with
|
||||
target.remove(response.getUUID());
|
||||
} else {
|
||||
target.addTarget(response.getUUID(), source, game);
|
||||
if(target.doneChosing()){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (target.canTarget(playerId, response.getUUID(), source, game)) {
|
||||
target.addTarget(response.getUUID(), source, game);
|
||||
if (target.getTargets().contains(response.getUUID())) { // if already included remove it with
|
||||
target.remove(response.getUUID());
|
||||
} else {
|
||||
target.addTarget(response.getUUID(), source, game);
|
||||
}
|
||||
if(target.doneChosing()){
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue