diff --git a/forge-ai/src/main/java/forge/ai/AiController.java b/forge-ai/src/main/java/forge/ai/AiController.java index cb39b94efd4..be615774362 100644 --- a/forge-ai/src/main/java/forge/ai/AiController.java +++ b/forge-ai/src/main/java/forge/ai/AiController.java @@ -1117,11 +1117,11 @@ public class AiController { } private boolean isSafeToHoldLandDropForMain2(Card landToPlay) { - if (!getBooleanProperty(AiProps.HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED)) { - // the AI profile specifies that this option should not be used + if (!MyRandom.percentTrue(getIntProperty(AiProps.HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED))) { + // check against the chance specified in the profile return false; } - if (game.getPhaseHandler().getTurn() < 2) { + if (game.getPhaseHandler().getTurn() <= 2) { // too obvious when doing it on the very first turn of the game return false; } diff --git a/forge-ai/src/main/java/forge/ai/AiProps.java b/forge-ai/src/main/java/forge/ai/AiProps.java index dd1e5d3cd15..d23f4a21c45 100644 --- a/forge-ai/src/main/java/forge/ai/AiProps.java +++ b/forge-ai/src/main/java/forge/ai/AiProps.java @@ -29,7 +29,7 @@ public enum AiProps { /** */ DEFAULT_PLANAR_DIE_ROLL_CHANCE ("50"), /** */ MULLIGAN_THRESHOLD ("5"), /** */ PLANAR_DIE_ROLL_HESITATION_CHANCE ("10"), - HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED ("false"), /** */ + HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED ("0"), /** */ CHEAT_WITH_MANA_ON_SHUFFLE ("false"), MOVE_EQUIPMENT_TO_BETTER_CREATURES ("from_useless_only"), MOVE_EQUIPMENT_CREATURE_EVAL_THRESHOLD ("60"), diff --git a/forge-gui/res/ai/Cautious.ai b/forge-gui/res/ai/Cautious.ai index b9328c7d679..189286cac57 100644 --- a/forge-gui/res/ai/Cautious.ai +++ b/forge-gui/res/ai/Cautious.ai @@ -62,9 +62,9 @@ THRESHOLD_CHUMP_TO_SAVE_PLANESWALKER=-1 # Only works when AI cheating is enabled in preferences, otherwise does nothing CHEAT_WITH_MANA_ON_SHUFFLE=true -# If enabled, the AI will attempt to hold land drops until Main 2 when it's safe and when it has nothing to potentially do -# with the extra mana -HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=false +# The chance for the AI to attempt to hold land drops until Main 2 when it's safe and when it has nothing to potentially +# do with the extra mana +HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=0 # Planechase logic DEFAULT_MAX_PLANAR_DIE_ROLLS_PER_TURN=1 diff --git a/forge-gui/res/ai/Default.ai b/forge-gui/res/ai/Default.ai index 70c927a15d3..faff2d28f6c 100644 --- a/forge-gui/res/ai/Default.ai +++ b/forge-gui/res/ai/Default.ai @@ -62,9 +62,9 @@ THRESHOLD_CHUMP_TO_SAVE_PLANESWALKER=-1 # Only works when AI cheating is enabled in preferences, otherwise does nothing CHEAT_WITH_MANA_ON_SHUFFLE=true -# If enabled, the AI will attempt to hold land drops until Main 2 when it's safe and when it has nothing to potentially do -# with the extra mana -HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=false +# The chance for the AI to attempt to hold land drops until Main 2 when it's safe and when it has nothing to potentially +# do with the extra mana +HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=0 # Planechase logic DEFAULT_MAX_PLANAR_DIE_ROLLS_PER_TURN=1 diff --git a/forge-gui/res/ai/Experimental.ai b/forge-gui/res/ai/Experimental.ai index 22965a6d746..a126e6e628c 100644 --- a/forge-gui/res/ai/Experimental.ai +++ b/forge-gui/res/ai/Experimental.ai @@ -62,9 +62,9 @@ THRESHOLD_CHUMP_TO_SAVE_PLANESWALKER=135 # Only works when AI cheating is enabled in preferences, otherwise does nothing CHEAT_WITH_MANA_ON_SHUFFLE=true -# If enabled, the AI will attempt to hold land drops until Main 2 when it's safe and when it has nothing to potentially do -# with the extra mana -HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=true +# The chance for the AI to attempt to hold land drops until Main 2 when it's safe and when it has nothing to potentially +# do with the extra mana +HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=100 # Planechase logic DEFAULT_MAX_PLANAR_DIE_ROLLS_PER_TURN=1 diff --git a/forge-gui/res/ai/Reckless.ai b/forge-gui/res/ai/Reckless.ai index 36d4c94c87f..c96c8249e85 100644 --- a/forge-gui/res/ai/Reckless.ai +++ b/forge-gui/res/ai/Reckless.ai @@ -62,9 +62,9 @@ THRESHOLD_CHUMP_TO_SAVE_PLANESWALKER=-1 # Only works when AI cheating is enabled in preferences, otherwise does nothing CHEAT_WITH_MANA_ON_SHUFFLE=true -# If enabled, the AI will attempt to hold land drops until Main 2 when it's safe and when it has nothing to potentially do -# with the extra mana -HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=false +# The chance for the AI to attempt to hold land drops until Main 2 when it's safe and when it has nothing to potentially +# do with the extra mana +HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=0 # Planechase logic DEFAULT_MAX_PLANAR_DIE_ROLLS_PER_TURN=1