mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added a Planeswalker check to AbilityFactory.playReusable to make the AI use the abilities each turn (without random factor).
This commit is contained in:
@@ -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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user