mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Merge branch 'assorted-fixes' into 'master'
Improve the AI timing for Indestructible pump abilities. Closes #507 See merge request core-developers/forge!409
This commit is contained in:
@@ -262,6 +262,13 @@ public abstract class PumpAiBase extends SpellAbilityAi {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (keyword.endsWith("Indestructible")) {
|
} else if (keyword.endsWith("Indestructible")) {
|
||||||
|
// Predicting threatened objects in relevant non-combat situations happens elsewhere,
|
||||||
|
// so we are only worrying about combat relevance of Indestructible at this point.
|
||||||
|
if (combat == null
|
||||||
|
|| !((combat.isBlocked(card) || combat.isBlocking(card))
|
||||||
|
&& ComputerUtilCombat.combatantWouldBeDestroyed(ai, card, combat))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if (keyword.endsWith("Deathtouch")) {
|
} else if (keyword.endsWith("Deathtouch")) {
|
||||||
if (ph.isPlayerTurn(opp) && ph.getPhase().equals(PhaseType.COMBAT_DECLARE_ATTACKERS)) {
|
if (ph.isPlayerTurn(opp) && ph.getPhase().equals(PhaseType.COMBAT_DECLARE_ATTACKERS)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user