mirror of
https://github.com/Relintai/mtg-forge-ios.git
synced 2024-12-21 07:16:52 +01:00
- A more appropriate solution for the manland animation AI problem.
git-svn-id: http://svn.slightlymagic.net/forge/trunk@35765 269b9781-a132-4a9b-9d4e-f004f1b56b58
This commit is contained in:
parent
5b598b1629
commit
11236a9749
@ -204,10 +204,9 @@ public class ComputerUtilMana {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If a manland was previously animated this turn, do not tap it to animate another manland
|
// If a manland was previously animated this turn, do not tap it to animate another manland
|
||||||
// Also, don't animate a land that is already tapped (not very useful)
|
|
||||||
if (sa.getHostCard().isLand() && ma.getHostCard().isLand()
|
if (sa.getHostCard().isLand() && ma.getHostCard().isLand()
|
||||||
&& ai.getController().isAI()
|
&& ai.getController().isAI()
|
||||||
&& (AnimateAi.isAnimatedThisTurn(ai, ma.getHostCard())) || sa.getHostCard().isTapped()) {
|
&& AnimateAi.isAnimatedThisTurn(ai, ma.getHostCard())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (sa.getApi() == ApiType.Pump) {
|
} else if (sa.getApi() == ApiType.Pump) {
|
||||||
|
@ -163,7 +163,9 @@ public class AnimateAi extends SpellAbilityAi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (power + toughness > c.getCurrentPower() + c.getCurrentToughness()) {
|
if (power + toughness > c.getCurrentPower() + c.getCurrentToughness()) {
|
||||||
bFlag = true;
|
if (!c.isTapped() || (game.getCombat() != null && game.getCombat().isAttacking(c))) {
|
||||||
|
bFlag = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +184,9 @@ public class AnimateAi extends SpellAbilityAi {
|
|||||||
if (animatedCopy.getCurrentPower() + animatedCopy.getCurrentToughness() >
|
if (animatedCopy.getCurrentPower() + animatedCopy.getCurrentToughness() >
|
||||||
c.getCurrentPower() + c.getCurrentToughness()) {
|
c.getCurrentPower() + c.getCurrentToughness()) {
|
||||||
if (!isAnimatedThisTurn(aiPlayer, sa.getHostCard())) {
|
if (!isAnimatedThisTurn(aiPlayer, sa.getHostCard())) {
|
||||||
bFlag = true;
|
if (!sa.getHostCard().isTapped() || (game.getCombat() != null && game.getCombat().isAttacking(sa.getHostCard()))) {
|
||||||
|
bFlag = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user