- Added a Planeswalker check to AbilityFactory.playReusable to make the AI use the abilities each turn (without random factor).

This commit is contained in:
Sloth
2011-09-23 19:11:29 +00:00
parent 33e7b4c396
commit 9daacbae6b
2 changed files with 9 additions and 15 deletions

View File

@@ -1109,11 +1109,18 @@ public class AbilityFactory {
// TODO probably also consider if winter orb or similar are out // TODO probably also consider if winter orb or similar are out
if (sa.getPayCosts() == null) { if (sa.getPayCosts() == null) {
// This is only true for Drawbacks and triggers return true; // This is only true for Drawbacks and triggers
}
if (!sa.getPayCosts().isReusuableResource()) {
return false;
}
if (sa.getRestrictions().getPlaneswalker() && AllZone.getPhase().is(Constant.Phase.Main2)) {
return true; return true;
} }
return (sa.getPayCosts().isReusuableResource() && AllZone.getPhase().is(Constant.Phase.End_Of_Turn) return (AllZone.getPhase().is(Constant.Phase.End_Of_Turn)
&& AllZone.getPhase().isNextTurn(AllZone.getComputerPlayer())); && AllZone.getPhase().isNextTurn(AllZone.getComputerPlayer()));
} }

View File

@@ -455,19 +455,6 @@ public class AbilityFactory_Pump {
} }
} }
/*Not needed
if (AF.isCurse()){
t = CardFactoryUtil.AI_getBestCreature(list);
goodt = true;
}
else{
while(!goodt && !list.isEmpty()) {
t = CardFactoryUtil.AI_getBestCreature(list);
if((t.getNetDefense() + defense) > t.getDamage()) goodt = true;
else list.remove(t);
}
}*/
t = CardFactoryUtil.AI_getBestCreature(list); t = CardFactoryUtil.AI_getBestCreature(list);
tgt.addTarget(t); tgt.addTarget(t);
list.remove(t); list.remove(t);