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
|
||||
// Also, don't animate a land that is already tapped (not very useful)
|
||||
if (sa.getHostCard().isLand() && ma.getHostCard().isLand()
|
||||
&& ai.getController().isAI()
|
||||
&& (AnimateAi.isAnimatedThisTurn(ai, ma.getHostCard())) || sa.getHostCard().isTapped()) {
|
||||
&& AnimateAi.isAnimatedThisTurn(ai, ma.getHostCard())) {
|
||||
continue;
|
||||
}
|
||||
} else if (sa.getApi() == ApiType.Pump) {
|
||||
|
@ -163,9 +163,11 @@ public class AnimateAi extends SpellAbilityAi {
|
||||
}
|
||||
}
|
||||
if (power + toughness > c.getCurrentPower() + c.getCurrentToughness()) {
|
||||
if (!c.isTapped() || (game.getCombat() != null && game.getCombat().isAttacking(c))) {
|
||||
bFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!SpellAbilityAi.isSorcerySpeed(sa) && !sa.hasParam("Permanent")) {
|
||||
Card animatedCopy = becomeAnimated(c, sa);
|
||||
@ -182,11 +184,13 @@ public class AnimateAi extends SpellAbilityAi {
|
||||
if (animatedCopy.getCurrentPower() + animatedCopy.getCurrentToughness() >
|
||||
c.getCurrentPower() + c.getCurrentToughness()) {
|
||||
if (!isAnimatedThisTurn(aiPlayer, sa.getHostCard())) {
|
||||
if (!sa.getHostCard().isTapped() || (game.getCombat() != null && game.getCombat().isAttacking(sa.getHostCard()))) {
|
||||
bFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bFlag) {
|
||||
this.rememberAnimatedThisTurn(aiPlayer, sa.getHostCard());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user