- Add changes to allow for a one of the two piles to be facedown

- Add Fortune's Favor
This commit is contained in:
Sol
2016-07-26 14:32:42 +00:00
parent 9496bf38fd
commit d41c0bc3e0
9 changed files with 49 additions and 31 deletions

View File

@@ -741,11 +741,14 @@ public class PlayerControllerAi extends PlayerController {
}
@Override
public boolean chooseCardsPile(SpellAbility sa, CardCollectionView pile1, CardCollectionView pile2, boolean faceUp) {
if (!faceUp) {
public boolean chooseCardsPile(SpellAbility sa, CardCollectionView pile1, CardCollectionView pile2, String faceUp) {
if (faceUp.equals("True")) {
// AI will choose the first pile if it is larger or the same
// TODO Improve this to be slightly more random to not be so predictable
return pile1.size() >= pile2.size();
} else if (faceUp.equals("One")) {
// Probably want to see if the face up pile has anything "worth it", then potentially take face down pile
return pile1.size() >= pile2.size();
} else {
boolean allCreatures = Iterables.all(Iterables.concat(pile1, pile2), CardPredicates.Presets.CREATURES);
int cmc1 = allCreatures ? ComputerUtilCard.evaluateCreatureList(pile1) : ComputerUtilCard.evaluatePermanentList(pile1);

View File

@@ -54,9 +54,4 @@ public class TwoPilesAi extends SpellAbilityAi {
int size = pool.size();
return size > 2;
}
@Override
protected boolean doTriggerAINoCost(Player aiPlayer, SpellAbility sa, boolean mandatory) {
return false;
}
}