Changed AI X costs handling according human handling. Fixed AI handling of modal spells. Changed some AI setting. Changes to AI lgging.

This commit is contained in:
LevelX2 2013-03-14 23:55:14 +01:00
parent 987bfb588f
commit 9450074b70
11 changed files with 287 additions and 222 deletions

View file

@ -362,24 +362,6 @@ public class RandomPlayer extends ComputerPlayer<RandomPlayer> {
return true;
}
@Override
public boolean playXMana(VariableManaCost cost, ManaCosts<ManaCost> costs, Game game) {
for (Permanent perm: this.getAvailableManaProducers(game)) {
for (ManaAbility ability: perm.getAbilities().getAvailableManaAbilities(Zone.BATTLEFIELD, game)) {
if (rnd.nextBoolean())
activateAbility(ability, game);
}
}
// don't allow X=0
if (getManaPool().count() == 0) {
return false;
}
cost.setPaid();
return true;
}
@Override
public int chooseEffect(List<ReplacementEffect> rEffects, Game game) {
return rnd.nextInt(rEffects.size());