mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18: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) {
|
private boolean isSafeToHoldLandDropForMain2(Card landToPlay) {
|
||||||
if (!getBooleanProperty(AiProps.HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED)) {
|
if (!MyRandom.percentTrue(getIntProperty(AiProps.HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED))) {
|
||||||
// the AI profile specifies that this option should not be used
|
// check against the chance specified in the profile
|
||||||
return false;
|
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
|
// too obvious when doing it on the very first turn of the game
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public enum AiProps { /** */
|
|||||||
DEFAULT_PLANAR_DIE_ROLL_CHANCE ("50"), /** */
|
DEFAULT_PLANAR_DIE_ROLL_CHANCE ("50"), /** */
|
||||||
MULLIGAN_THRESHOLD ("5"), /** */
|
MULLIGAN_THRESHOLD ("5"), /** */
|
||||||
PLANAR_DIE_ROLL_HESITATION_CHANCE ("10"),
|
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"),
|
CHEAT_WITH_MANA_ON_SHUFFLE ("false"),
|
||||||
MOVE_EQUIPMENT_TO_BETTER_CREATURES ("from_useless_only"),
|
MOVE_EQUIPMENT_TO_BETTER_CREATURES ("from_useless_only"),
|
||||||
MOVE_EQUIPMENT_CREATURE_EVAL_THRESHOLD ("60"),
|
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
|
# Only works when AI cheating is enabled in preferences, otherwise does nothing
|
||||||
CHEAT_WITH_MANA_ON_SHUFFLE=true
|
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
|
# 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
|
||||||
# with the extra mana
|
# do with the extra mana
|
||||||
HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=false
|
HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=0
|
||||||
|
|
||||||
# Planechase logic
|
# Planechase logic
|
||||||
DEFAULT_MAX_PLANAR_DIE_ROLLS_PER_TURN=1
|
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
|
# Only works when AI cheating is enabled in preferences, otherwise does nothing
|
||||||
CHEAT_WITH_MANA_ON_SHUFFLE=true
|
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
|
# 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
|
||||||
# with the extra mana
|
# do with the extra mana
|
||||||
HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=false
|
HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=0
|
||||||
|
|
||||||
# Planechase logic
|
# Planechase logic
|
||||||
DEFAULT_MAX_PLANAR_DIE_ROLLS_PER_TURN=1
|
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
|
# Only works when AI cheating is enabled in preferences, otherwise does nothing
|
||||||
CHEAT_WITH_MANA_ON_SHUFFLE=true
|
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
|
# 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
|
||||||
# with the extra mana
|
# do with the extra mana
|
||||||
HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=true
|
HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=100
|
||||||
|
|
||||||
# Planechase logic
|
# Planechase logic
|
||||||
DEFAULT_MAX_PLANAR_DIE_ROLLS_PER_TURN=1
|
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
|
# Only works when AI cheating is enabled in preferences, otherwise does nothing
|
||||||
CHEAT_WITH_MANA_ON_SHUFFLE=true
|
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
|
# 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
|
||||||
# with the extra mana
|
# do with the extra mana
|
||||||
HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=false
|
HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED=0
|
||||||
|
|
||||||
# Planechase logic
|
# Planechase logic
|
||||||
DEFAULT_MAX_PLANAR_DIE_ROLLS_PER_TURN=1
|
DEFAULT_MAX_PLANAR_DIE_ROLLS_PER_TURN=1
|
||||||
|
|||||||
Reference in New Issue
Block a user