- Made the new experimental AI option chance-based (currently disabled by default).

This commit is contained in:
Agetian
2017-09-17 08:07:56 +00:00
parent 543aae0893
commit cede2927c5
6 changed files with 16 additions and 16 deletions

View File

@@ -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;
}

View File

@@ -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"),