forked from External/mage
Merge branch 'master' of https://github.com/magefree/mage
This commit is contained in:
commit
3a4eae3bca
2 changed files with 0 additions and 32 deletions
|
|
@ -183,20 +183,6 @@ public class ComputerPlayerMCTS extends ComputerPlayer<ComputerPlayerMCTS> imple
|
|||
// throw new UnsupportedOperationException("Not supported yet.");
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean playXMana(VariableManaCost cost, ManaCosts<ManaCost> costs, Game game) {
|
||||
//MCTSPlayer.simulateVariableCosts method adds a generic mana cost for each option
|
||||
for (ManaCost manaCost: costs) {
|
||||
if (manaCost instanceof GenericManaCost) {
|
||||
cost.setPayment(manaCost.getPayment());
|
||||
logger.debug("using X = " + cost.getPayment().count());
|
||||
break;
|
||||
}
|
||||
}
|
||||
game.informPlayers(getName() + " payed " + cost.getPayment().count() + " for " + cost.getText());
|
||||
cost.setPaid();
|
||||
return true;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public int chooseEffect(List<ReplacementEffect> rEffects, Game game) {
|
||||
|
|
|
|||
|
|
@ -373,24 +373,6 @@ public class SimulatedPlayerMCTS extends MCTSPlayer {
|
|||
return super.choose(outcome, choice, game);
|
||||
}
|
||||
|
||||
@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) {
|
||||
if (this.isHuman())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue