- Handle AI equipping creatures in Main 2 by way of prioritizing spells instead of hard-locking it.

This commit is contained in:
Michael Kamensky
2020-08-19 09:53:58 +03:00
parent 9c3411738f
commit f9e86bbe8c
2 changed files with 4 additions and 5 deletions

View File

@@ -997,6 +997,10 @@ public class AiController {
if (source.isEquipment() && noCreatures) { if (source.isEquipment() && noCreatures) {
p -= 9; p -= 9;
} }
// don't equip stuff in main 2 if there's more stuff to cast at the moment
if (sa.getApi() == ApiType.Attach && !sa.isCurse() && source.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DECLARE_BLOCKERS)) {
p -= 1;
}
// 1. increase chance of using Surge effects // 1. increase chance of using Surge effects
// 2. non-surged versions are usually inefficient // 2. non-surged versions are usually inefficient
if (source.getOracleText().contains("surge cost") && !sa.isSurged()) { if (source.getOracleText().contains("surge cost") && !sa.isSurged()) {

View File

@@ -69,11 +69,6 @@ public class AttachAi extends SpellAbilityAi {
return false; return false;
} }
if (ai.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DECLARE_BLOCKERS)
&& !"Curse".equals(sa.getParam("AILogic"))) {
return false;
}
// prevent run-away activations - first time will always return true // prevent run-away activations - first time will always return true
if (ComputerUtil.preventRunAwayActivations(sa)) { if (ComputerUtil.preventRunAwayActivations(sa)) {
return false; return false;