mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
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:
parent
987bfb588f
commit
9450074b70
11 changed files with 287 additions and 222 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue