mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- AI will no longer dredge when the library is nearly empty.
This commit is contained in:
@@ -646,6 +646,11 @@ public class AiController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Card chooseCardToDredge(List<Card> dredgers) {
|
public Card chooseCardToDredge(List<Card> dredgers) {
|
||||||
|
Player ai = getPlayer();
|
||||||
|
//don't dredge when the library is nearly empty
|
||||||
|
if (ai.getCardsIn(ZoneType.Library).size() < 8 && !ai.isCardInPlay("Laboratory Maniac")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
// use dredge if there are more than one of them in your graveyard
|
// use dredge if there are more than one of them in your graveyard
|
||||||
if (dredgers.size() > 1 || MyRandom.getRandom().nextBoolean()) {
|
if (dredgers.size() > 1 || MyRandom.getRandom().nextBoolean()) {
|
||||||
return Aggregates.random(dredgers);
|
return Aggregates.random(dredgers);
|
||||||
|
|||||||
Reference in New Issue
Block a user