mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +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
|
||||
protected boolean checkApiLogic(Player aiPlayer, SpellAbility sa) {
|
||||
final TargetRestrictions tgt = sa.getTargetRestrictions();
|
||||
final Card source = sa.getHostCard();
|
||||
final Game game = aiPlayer.getGame();
|
||||
final PhaseHandler ph = game.getPhaseHandler();
|
||||
@@ -142,7 +141,7 @@ public class AnimateAi extends SpellAbilityAi {
|
||||
if (!ComputerUtilCost.checkTapTypeCost(aiPlayer, sa.getPayCosts(), source, sa)) {
|
||||
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);
|
||||
boolean bFlag = false;
|
||||
boolean givesHaste = sa.hasParam("Keywords") && sa.getParam("Keywords").contains("Haste");
|
||||
@@ -265,6 +264,11 @@ public class AnimateAi extends SpellAbilityAi {
|
||||
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 (c.isTapped()) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user