mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Made the new experimental AI option chance-based (currently disabled by default).
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user