mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
AnimateAi: non-Curse Animate not for opponent stuff
This commit is contained in:
@@ -129,7 +129,6 @@ public class AnimateAi extends SpellAbilityAi {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean checkApiLogic(Player aiPlayer, SpellAbility sa) {
|
protected boolean checkApiLogic(Player aiPlayer, SpellAbility sa) {
|
||||||
final TargetRestrictions tgt = sa.getTargetRestrictions();
|
|
||||||
final Card source = sa.getHostCard();
|
final Card source = sa.getHostCard();
|
||||||
final Game game = aiPlayer.getGame();
|
final Game game = aiPlayer.getGame();
|
||||||
final PhaseHandler ph = game.getPhaseHandler();
|
final PhaseHandler ph = game.getPhaseHandler();
|
||||||
@@ -142,7 +141,7 @@ public class AnimateAi extends SpellAbilityAi {
|
|||||||
if (!ComputerUtilCost.checkTapTypeCost(aiPlayer, sa.getPayCosts(), source, sa)) {
|
if (!ComputerUtilCost.checkTapTypeCost(aiPlayer, sa.getPayCosts(), source, sa)) {
|
||||||
return false; // prevent crewing with equal or better creatures
|
return false; // prevent crewing with equal or better creatures
|
||||||
}
|
}
|
||||||
if (null == tgt) {
|
if (!sa.usesTargeting()) {
|
||||||
final List<Card> defined = AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa);
|
final List<Card> defined = AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa);
|
||||||
boolean bFlag = false;
|
boolean bFlag = false;
|
||||||
boolean givesHaste = sa.hasParam("Keywords") && sa.getParam("Keywords").contains("Haste");
|
boolean givesHaste = sa.hasParam("Keywords") && sa.getParam("Keywords").contains("Haste");
|
||||||
@@ -265,6 +264,11 @@ public class AnimateAi extends SpellAbilityAi {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// non-Curse Animate not on Opponent Stuff if able
|
||||||
|
if (c.getController().isOpponentOf(ai) && !sa.isCurse()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// if tapped it might not attack or block
|
// if tapped it might not attack or block
|
||||||
if (c.isTapped()) {
|
if (c.isTapped()) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user