mirror of
https://github.com/Relintai/mtg-forge-ios.git
synced 2024-11-14 04:17:19 +01:00
- A little improvement to the previous commit.
git-svn-id: http://svn.slightlymagic.net/forge/trunk@35708 269b9781-a132-4a9b-9d4e-f004f1b56b58
This commit is contained in:
parent
75b2097313
commit
491d7b8dcd
@ -2533,6 +2533,7 @@ public class ComputerUtilCombat {
|
||||
// (currently looks for the creature with maximum raw power since that's what the AI usually judges by when
|
||||
// deciding whether the creature is worth blocking).
|
||||
// If the creature doesn't change into anything, returns the original creature.
|
||||
if (attacker == null) { return null; }
|
||||
Card attackerAfterTrigs = attacker;
|
||||
|
||||
// Test for some special triggers that can change the creature in combat
|
||||
@ -2547,7 +2548,7 @@ public class ComputerUtilCombat {
|
||||
// while attacking
|
||||
int maxPwr = 0;
|
||||
for (Card c : attacker.getController().getCreaturesInPlay()) {
|
||||
if (c.getNetPower() > maxPwr) {
|
||||
if (c.getNetPower() > maxPwr || (c.getNetPower() == maxPwr && ComputerUtilCard.evaluateCreature(c) > ComputerUtilCard.evaluateCreature(attackerAfterTrigs))) {
|
||||
maxPwr = c.getNetPower();
|
||||
attackerAfterTrigs = c;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user