mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Fix AI not playing Lord of Tresserhorn trigger
This commit is contained in:
@@ -176,7 +176,7 @@ public class DrawAi extends SpellAbilityAi {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean chkAIDrawback(SpellAbility sa, Player ai) {
|
public boolean chkAIDrawback(SpellAbility sa, Player ai) {
|
||||||
return targetAI(ai, sa, false);
|
return targetAI(ai, sa, sa.isTrigger() && !sa.getRootAbility().isOptionalTrigger());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -981,15 +981,15 @@ public class PhaseHandler implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isFirstCombat() {
|
public final boolean isFirstCombat() {
|
||||||
return (nCombatsThisTurn == 1);
|
return nCombatsThisTurn == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isFirstUpkeep() {
|
public final boolean isFirstUpkeep() {
|
||||||
return is(PhaseType.UPKEEP) && (nUpkeepsThisTurn == 0);
|
return is(PhaseType.UPKEEP) && nUpkeepsThisTurn == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isFirstUpkeepThisGame() {
|
public final boolean isFirstUpkeepThisGame() {
|
||||||
return is(PhaseType.UPKEEP) && (nUpkeepsThisGame == 0);
|
return is(PhaseType.UPKEEP) && nUpkeepsThisGame == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isPreCombatMain() {
|
public final boolean isPreCombatMain() {
|
||||||
@@ -998,7 +998,7 @@ public class PhaseHandler implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final boolean beforeFirstPostCombatMainEnd() {
|
public final boolean beforeFirstPostCombatMainEnd() {
|
||||||
return (nMain2sThisTurn == 0);
|
return nMain2sThisTurn == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static boolean DEBUG_PHASES = false;
|
private final static boolean DEBUG_PHASES = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user