mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- RemAIDeck update: next iteration.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user