mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Now the AI properly realizes this can be played, but doesn't actually play it.
Is there something that prevents it from playing things that destroy own tokens?
This commit is contained in:
@@ -41,16 +41,16 @@ public class DestroyAi extends SpellAbilityAi {
|
||||
havepact = true;
|
||||
}
|
||||
}
|
||||
if ("Pactivator".equals(logic)) {
|
||||
if (("Pactivator".equals(logic)) && (havepact)) {
|
||||
if (
|
||||
(!ai.getGame().getPhaseHandler().isPlayerTurn(ai)) &&
|
||||
((ai.getGame().getPhaseHandler().is(PhaseType.END_OF_TURN))
|
||||
|| (ai.getGame().getPhaseHandler().is(PhaseType.COMBAT_DECLARE_BLOCKERS)))
|
||||
&&
|
||||
(ai.getOpponents().get(0).getCreaturesInPlay().size() > 0)
|
||||
&& (havepact)
|
||||
) {
|
||||
return ai.getController().chooseTargetsFor(sa);
|
||||
sa.getTargetRestrictions().setMandatory(true);
|
||||
return true; //ai.getController().chooseTargetsFor(sa);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user