mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- CheckStyle.
This commit is contained in:
@@ -12,7 +12,7 @@ import forge.game.phase.PhaseType;
|
|||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
|
|
||||||
public class CloneAi extends SpellAiLogic {
|
public class CloneAi extends SpellAiLogic {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean canPlayAI(Player ai, SpellAbility sa) {
|
protected boolean canPlayAI(Player ai, SpellAbility sa) {
|
||||||
final Target tgt = sa.getTarget();
|
final Target tgt = sa.getTarget();
|
||||||
@@ -32,7 +32,7 @@ public class CloneAi extends SpellAiLogic {
|
|||||||
// TODO - add some kind of check for during human turn to answer
|
// TODO - add some kind of check for during human turn to answer
|
||||||
// "Can I use this to block something?"
|
// "Can I use this to block something?"
|
||||||
|
|
||||||
PhaseHandler phase = Singletons.getModel().getGame().getPhaseHandler();
|
PhaseHandler phase = Singletons.getModel().getGame().getPhaseHandler();
|
||||||
// don't use instant speed clone abilities outside computers
|
// don't use instant speed clone abilities outside computers
|
||||||
// Combat_Begin step
|
// Combat_Begin step
|
||||||
if (!phase.is(PhaseType.COMBAT_BEGIN)
|
if (!phase.is(PhaseType.COMBAT_BEGIN)
|
||||||
@@ -43,8 +43,9 @@ public class CloneAi extends SpellAiLogic {
|
|||||||
|
|
||||||
// don't use instant speed clone abilities outside humans
|
// don't use instant speed clone abilities outside humans
|
||||||
// Combat_Declare_Attackers_InstantAbility step
|
// Combat_Declare_Attackers_InstantAbility step
|
||||||
if ( (!phase.is(PhaseType.COMBAT_DECLARE_ATTACKERS_INSTANT_ABILITY) || Singletons.getModel().getGame().getCombat().getAttackers().isEmpty())
|
if ((!phase.is(PhaseType.COMBAT_DECLARE_ATTACKERS_INSTANT_ABILITY)
|
||||||
&& !phase.isPlayerTurn(ai)) {
|
|| Singletons.getModel().getGame().getCombat().getAttackers().isEmpty())
|
||||||
|
&& !phase.isPlayerTurn(ai)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,4 +142,4 @@ public class CloneAi extends SpellAiLogic {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user