mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Merge branch 'master' into 'master'
Don't add a null card to target in animateTgtAi See merge request core-developers/forge!3272
This commit is contained in:
@@ -340,16 +340,18 @@ public class AnimateAi extends SpellAbilityAi {
|
|||||||
|
|
||||||
// select the worst of the best
|
// select the worst of the best
|
||||||
final Card worst = ComputerUtilCard.getWorstAI(maxList);
|
final Card worst = ComputerUtilCard.getWorstAI(maxList);
|
||||||
if (worst != null && worst.isLand()) {
|
if (worst != null) {
|
||||||
// e.g. Clan Guildmage, make sure we're not using the same land we want to animate to activate the ability
|
if (worst.isLand()) {
|
||||||
this.holdAnimatedTillMain2(ai, worst);
|
// e.g. Clan Guildmage, make sure we're not using the same land we want to animate to activate the ability
|
||||||
if (!ComputerUtilMana.canPayManaCost(sa, ai, 0)) {
|
this.holdAnimatedTillMain2(ai, worst);
|
||||||
this.releaseHeldTillMain2(ai, worst);
|
if (!ComputerUtilMana.canPayManaCost(sa, ai, 0)) {
|
||||||
return false;
|
this.releaseHeldTillMain2(ai, worst);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
this.rememberAnimatedThisTurn(ai, worst);
|
||||||
|
sa.getTargets().add(worst);
|
||||||
}
|
}
|
||||||
this.rememberAnimatedThisTurn(ai, worst);
|
|
||||||
sa.getTargets().add(worst);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user