mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 14:02:05 -08:00
[DOM] Added Saga ability and Fall of the Thran.
This commit is contained in:
parent
c22e287957
commit
245a3c5202
6 changed files with 437 additions and 7 deletions
|
|
@ -365,7 +365,9 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
Card card = pickTarget(cards, outcome, target, null, game);
|
||||
if (card != null && alreadyTargetted != null && !alreadyTargetted.contains(card.getId())) {
|
||||
target.add(card.getId(), game);
|
||||
return true;
|
||||
if (target.isChosen()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
@ -757,17 +759,20 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
protected Card pickTarget(List<Card> cards, Outcome outcome, Target target, Ability source, Game game) {
|
||||
Card card;
|
||||
while (!cards.isEmpty()) {
|
||||
|
||||
if (outcome.isGood()) {
|
||||
card = pickBestCard(cards, null, target, source, game);
|
||||
} else {
|
||||
card = pickWorstCard(cards, null, target, source, game);
|
||||
}
|
||||
if (source != null) {
|
||||
if (target.canTarget(getId(), card.getId(), source, game)) {
|
||||
if (!target.getTargets().contains(card.getId())) {
|
||||
if (source != null) {
|
||||
if (target.canTarget(getId(), card.getId(), source, game)) {
|
||||
return card;
|
||||
}
|
||||
} else {
|
||||
return card;
|
||||
}
|
||||
} else {
|
||||
return card;
|
||||
}
|
||||
cards.remove(card);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue