mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Refactor: Significant speed-up for ManaOptions (#9233)
This commit is contained in:
parent
23a4d2640b
commit
55a6acba22
32 changed files with 782 additions and 408 deletions
|
|
@ -1536,7 +1536,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
if (!unpaid.getMana().includesMana(mana)) {
|
||||
continue ManaAbility;
|
||||
}
|
||||
colored += mana.countColored();
|
||||
colored += CardUtil.overflowInc(colored, mana.countColored());
|
||||
}
|
||||
if (colored > 1 && (cost instanceof ColoredManaCost)) {
|
||||
for (Mana netMana : manaAbility.getNetMana(game)) {
|
||||
|
|
@ -1773,7 +1773,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
a2Max = netMana.count();
|
||||
}
|
||||
}
|
||||
return a2Max - a1Max;
|
||||
return CardUtil.overflowDec(a2Max, a1Max);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue