mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
FlipACoinAi: format and remove getOpponent
This commit is contained in:
@@ -16,23 +16,23 @@ public class FlipACoinAi extends SpellAbilityAi {
|
||||
protected boolean canPlayAI(Player ai, SpellAbility sa) {
|
||||
|
||||
if (sa.hasParam("AILogic")) {
|
||||
String AILogic = sa.getParam("AILogic");
|
||||
String AILogic = sa.getParam("AILogic");
|
||||
if (AILogic.equals("Never")) {
|
||||
return false;
|
||||
} else if (AILogic.equals("PhaseOut")) {
|
||||
if (!ComputerUtil.predictThreatenedObjects(sa.getActivatingPlayer(), sa).contains(sa.getHostCard())) {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
} else if (AILogic.equals("KillOrcs")) {
|
||||
if (ai.getGame().getPhaseHandler().getPhase().isBefore(PhaseType.END_OF_TURN) ) {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
sa.resetTargets();
|
||||
for (Card c : ai.getOpponent().getCreaturesInPlay()) {
|
||||
if (sa.canTarget(c)) {
|
||||
sa.getTargets().add(c);
|
||||
return true;
|
||||
}
|
||||
for (Card c : ai.getOpponents().getCreaturesInPlay()) {
|
||||
if (sa.canTarget(c)) {
|
||||
sa.getTargets().add(c);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user