- AI will no longer use AF_Tap during his turn outside of combat

This commit is contained in:
Sol
2011-10-12 03:07:24 +00:00
parent c248830701
commit 51809ae282

View File

@@ -649,6 +649,20 @@ public class AbilityFactory_PermanentState {
Random r = MyRandom.random; Random r = MyRandom.random;
boolean randomReturn = r.nextFloat() <= Math.pow(.6667, sa.getActivationsThisTurn()); boolean randomReturn = r.nextFloat() <= Math.pow(.6667, sa.getActivationsThisTurn());
Phase phase = AllZone.getPhase();
Player turn = phase.getPlayerTurn();
if (turn.isHuman()){
// Tap things down if it's Human's turn
}
else if (phase.inCombat() && phase.isBefore(Constant.Phase.Combat_Declare_Blockers)){
// TODO Tap creatures down if in combat
}
else{
// Generally don't want to tap things during AI turn outside of combat
return false;
}
if (tgt == null) { if (tgt == null) {
ArrayList<Card> defined = AbilityFactory.getDefinedCards(source, params.get("Defined"), sa); ArrayList<Card> defined = AbilityFactory.getDefinedCards(source, params.get("Defined"), sa);