mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Improved ControlGainAi.
This commit is contained in:
@@ -96,7 +96,8 @@ public class ControlGainAi extends SpellAbilityAi {
|
|||||||
// Don't steal something if I can't Attack without, or prevent it from
|
// Don't steal something if I can't Attack without, or prevent it from
|
||||||
// blocking at least
|
// blocking at least
|
||||||
if (lose != null && lose.contains("EOT")
|
if (lose != null && lose.contains("EOT")
|
||||||
&& ai.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DECLARE_ATTACKERS)) {
|
&& ai.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.COMBAT_DECLARE_ATTACKERS)
|
||||||
|
&& !sa.isTrigger()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,8 +109,16 @@ public class ControlGainAi extends SpellAbilityAi {
|
|||||||
@Override
|
@Override
|
||||||
public boolean apply(final Card c) {
|
public boolean apply(final Card c) {
|
||||||
final Map<String, String> vars = c.getSVars();
|
final Map<String, String> vars = c.getSVars();
|
||||||
return !vars.containsKey("RemAIDeck") && c.canBeTargetedBy(sa) && CombatUtil.canAttackNextTurn(c, ai.getOpponent())
|
if (!c.canBeTargetedBy(sa)) {
|
||||||
&& c.getNetCombatDamage() > 0;
|
return false;
|
||||||
|
}
|
||||||
|
if (sa.isTrigger()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (c.isCreature() && (!CombatUtil.canAttackNextTurn(c, ai.getOpponent()) || c.getNetCombatDamage() == 0)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return !vars.containsKey("RemAIDeck");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user