- RemAIDeck update: next iteration.

This commit is contained in:
Agetian
2017-10-05 06:35:39 +00:00
parent 0257acce1d
commit d8ec34aa6f
24 changed files with 41 additions and 32 deletions

View File

@@ -669,7 +669,7 @@ public class SpecialCardAi {
}
}
// Living Death (and possibly other similar cards using AILogic LivingDeath)
// Living Death (and other similar cards using AILogic LivingDeath or AILogic ReanimateAll)
public static class LivingDeath {
public static boolean consider(final Player ai, final SpellAbility sa) {
int aiBattlefieldPower = 0, aiGraveyardPower = 0;

View File

@@ -92,6 +92,8 @@ public class ChangeZoneAi extends SpellAbilityAi {
return SpecialCardAi.Necropotence.consider(aiPlayer, sa);
} else if (aiLogic.equals("SameName")) { // Declaration in Stone
return this.doSameNameLogic(aiPlayer, sa);
} else if (aiLogic.equals("ReanimateAll")) {
return SpecialCardAi.LivingDeath.consider(aiPlayer, sa);
} else if (aiLogic.equals("Intuition")) {
// This logic only fills the multiple cards array, the decision to play is made
// separately in hiddenOriginCanPlayAI later.

View File

@@ -10,6 +10,7 @@ import forge.ai.SpellAbilityAi;
import forge.game.ability.AbilityUtils;
import forge.game.card.*;
import forge.game.card.CardPredicates.Presets;
import forge.game.phase.PhaseHandler;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.player.PlayerActionConfirmMode;
@@ -24,12 +25,19 @@ public class CopyPermanentAi extends SpellAbilityAi {
// Card source = sa.getHostCard();
// TODO - I'm sure someone can do this AI better
PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
String aiLogic = sa.getParamOrDefault("AILogic", "");
if (ComputerUtil.preventRunAwayActivations(sa)) {
return false;
}
if ("MimicVat".equals(sa.getParam("AILogic"))) {
if ("MimicVat".equals(aiLogic)) {
return SpecialCardAi.MimicVat.considerCopy(aiPlayer, sa);
} else if ("AtEOT".equals(aiLogic)) {
return ph.is(PhaseType.END_OF_TURN);
} else if ("AtOppEOT".equals(aiLogic)) {
return ph.is(PhaseType.END_OF_TURN) && ph.getPlayerTurn() != aiPlayer;
}
if (sa.hasParam("AtEOT") && !aiPlayer.getGame().getPhaseHandler().is(PhaseType.MAIN1)) {