From f2e9d5913ef06dbc876daf3d98521a82d43d9f95 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sat, 15 Dec 2018 10:01:29 +0300 Subject: [PATCH] - Default settings for holding back X damage spells. --- forge-ai/src/main/java/forge/ai/AiProps.java | 8 ++++---- forge-gui/res/ai/Cautious.ai | 9 +++++++++ forge-gui/res/ai/Default.ai | 9 +++++++++ forge-gui/res/ai/Experimental.ai | 20 ++++++++++---------- forge-gui/res/ai/Reckless.ai | 9 +++++++++ 5 files changed, 41 insertions(+), 14 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/AiProps.java b/forge-ai/src/main/java/forge/ai/AiProps.java index 26ff72aeb7a..290744383e4 100644 --- a/forge-ai/src/main/java/forge/ai/AiProps.java +++ b/forge-ai/src/main/java/forge/ai/AiProps.java @@ -80,6 +80,8 @@ public enum AiProps { /** */ AVOID_TARGETING_CREATS_THAT_WILL_DIE ("true"), /** */ DONT_EVAL_KILLSPELLS_ON_STACK_WITH_PERMISSION ("true"), /** */ CHANCE_TO_CHAIN_TWO_DAMAGE_SPELLS("50"), /** */ + HOLD_X_DAMAGE_SPELLS_FOR_MORE_DAMAGE_CHANCE("100"), + HOLD_X_DAMAGE_SPELLS_THRESHOLD("5"), /** */ PRIORITY_REDUCTION_FOR_STORM_SPELLS ("0"), /** */ USE_BERSERK_AGGRESSIVELY ("false"), /** */ MIN_COUNT_FOR_STORM_SPELLS ("0"), /** */ @@ -127,11 +129,9 @@ public enum AiProps { /** */ FLASH_USE_BUFF_AURAS_AS_COMBAT_TRICKS("true"), FLASH_BUFF_AURA_CHANCE_TO_CAST_EARLY("1"), FLASH_BUFF_AURA_CHANCE_CAST_AT_EOT("5"), - FLASH_BUFF_AURA_CHANCE_TO_RESPOND_TO_STACK("100"), /** */ + FLASH_BUFF_AURA_CHANCE_TO_RESPOND_TO_STACK("100"); /** */ // Experimental features, must be promoted or removed after extensive testing and, ideally, defaulting - HOLD_X_DAMAGE_SPELLS_FOR_MORE_DAMAGE_CHANCE("0"), - HOLD_X_DAMAGE_SPELLS_THRESHOLD("0"); /** */ - // <-- There are no other experimental options here --> + // <-- There are no experimental options here --> private final String strDefaultVal; diff --git a/forge-gui/res/ai/Cautious.ai b/forge-gui/res/ai/Cautious.ai index ee2ab585a38..2cc850ed726 100644 --- a/forge-gui/res/ai/Cautious.ai +++ b/forge-gui/res/ai/Cautious.ai @@ -125,6 +125,15 @@ DESTROY_IMMEDIATELY_UNBLOCKABLE_LIFE_IN_DNGR=5 # if the AI is in danger of dying. CHANCE_TO_CHAIN_TWO_DAMAGE_SPELLS=25 +# The chance that the AI will try to hold on to a direct damage spell with X in its cost (e.g. Blaze, Fireball, etc.) +# so that it doesn't cast it too early in the game against an early game target. Note that when in danger or when the +# AI has a chance to finish the opponent off with such a spell, it will not hold back the spells. +HOLD_X_DAMAGE_SPELLS_FOR_MORE_DAMAGE_CHANCE=100 +# This threshold defines the minimum amount of damage *or* the minimum number of the AI's turn in order to play a +# direct damage spell with X without holding it back. For example, if set to 5, the AI will prefer to hold the spell +# back (unless lethal/in danger) unless it can deal 5 or more damage with it or unless it's the AI's 5th turn or later. +HOLD_X_DAMAGE_SPELLS_THRESHOLD=6 + # Permission timings MIN_SPELL_CMC_TO_COUNTER=2 CHANCE_TO_COUNTER_CMC_1=0 diff --git a/forge-gui/res/ai/Default.ai b/forge-gui/res/ai/Default.ai index 1e3510af48f..2801deae8af 100644 --- a/forge-gui/res/ai/Default.ai +++ b/forge-gui/res/ai/Default.ai @@ -125,6 +125,15 @@ DESTROY_IMMEDIATELY_UNBLOCKABLE_LIFE_IN_DNGR=5 # if the AI is in danger of dying. CHANCE_TO_CHAIN_TWO_DAMAGE_SPELLS=50 +# The chance that the AI will try to hold on to a direct damage spell with X in its cost (e.g. Blaze, Fireball, etc.) +# so that it doesn't cast it too early in the game against an early game target. Note that when in danger or when the +# AI has a chance to finish the opponent off with such a spell, it will not hold back the spells. +HOLD_X_DAMAGE_SPELLS_FOR_MORE_DAMAGE_CHANCE=100 +# This threshold defines the minimum amount of damage *or* the minimum number of the AI's turn in order to play a +# direct damage spell with X without holding it back. For example, if set to 5, the AI will prefer to hold the spell +# back (unless lethal/in danger) unless it can deal 5 or more damage with it or unless it's the AI's 5th turn or later. +HOLD_X_DAMAGE_SPELLS_THRESHOLD=5 + # Permission timings MIN_SPELL_CMC_TO_COUNTER=0 CHANCE_TO_COUNTER_CMC_1=30 diff --git a/forge-gui/res/ai/Experimental.ai b/forge-gui/res/ai/Experimental.ai index 80306b55205..17744a3c4a1 100644 --- a/forge-gui/res/ai/Experimental.ai +++ b/forge-gui/res/ai/Experimental.ai @@ -125,6 +125,15 @@ DESTROY_IMMEDIATELY_UNBLOCKABLE_LIFE_IN_DNGR=5 # if the AI is in danger of dying. CHANCE_TO_CHAIN_TWO_DAMAGE_SPELLS=100 +# The chance that the AI will try to hold on to a direct damage spell with X in its cost (e.g. Blaze, Fireball, etc.) +# so that it doesn't cast it too early in the game against an early game target. Note that when in danger or when the +# AI has a chance to finish the opponent off with such a spell, it will not hold back the spells. +HOLD_X_DAMAGE_SPELLS_FOR_MORE_DAMAGE_CHANCE=100 +# This threshold defines the minimum amount of damage *or* the minimum number of the AI's turn in order to play a +# direct damage spell with X without holding it back. For example, if set to 5, the AI will prefer to hold the spell +# back (unless lethal/in danger) unless it can deal 5 or more damage with it or unless it's the AI's 5th turn or later. +HOLD_X_DAMAGE_SPELLS_THRESHOLD=5 + # Permission timings MIN_SPELL_CMC_TO_COUNTER=2 CHANCE_TO_COUNTER_CMC_1=30 @@ -281,13 +290,4 @@ MOJHOSTO_CHANCE_TO_USE_JHOIRA_COPY_INSTANT=20 # -- features is over. These toggles will be removed later, or may be reintroduced under a -- # -- different name if necessary -- -# The chance that the AI will try to hold on to a direct damage spell with X in its cost (e.g. Blaze, Fireball, etc.) -# so that it doesn't cast it too early in the game against an early game target. Note that when in danger or when the -# AI has a chance to finish the opponent off with such a spell, it will not hold back the spells. -HOLD_X_DAMAGE_SPELLS_FOR_MORE_DAMAGE_CHANCE=100 -# This threshold defines the minimum amount of damage *or* the minimum number of the AI's turn in order to play a -# direct damage spell with X without holding it back. For example, if set to 5, the AI will prefer to hold the spell -# back (unless lethal/in danger) unless it can deal 5 or more damage with it or unless it's the AI's 5th turn or later. -HOLD_X_DAMAGE_SPELLS_THRESHOLD=5 - -# <-- there are no other experimental options here at the moment --> +# <-- there are no experimental options here at the moment --> diff --git a/forge-gui/res/ai/Reckless.ai b/forge-gui/res/ai/Reckless.ai index b31835947a5..e2771362cd8 100644 --- a/forge-gui/res/ai/Reckless.ai +++ b/forge-gui/res/ai/Reckless.ai @@ -125,6 +125,15 @@ DESTROY_IMMEDIATELY_UNBLOCKABLE_LIFE_IN_DNGR=5 # if the AI is in danger of dying. CHANCE_TO_CHAIN_TWO_DAMAGE_SPELLS=75 +# The chance that the AI will try to hold on to a direct damage spell with X in its cost (e.g. Blaze, Fireball, etc.) +# so that it doesn't cast it too early in the game against an early game target. Note that when in danger or when the +# AI has a chance to finish the opponent off with such a spell, it will not hold back the spells. +HOLD_X_DAMAGE_SPELLS_FOR_MORE_DAMAGE_CHANCE=85 +# This threshold defines the minimum amount of damage *or* the minimum number of the AI's turn in order to play a +# direct damage spell with X without holding it back. For example, if set to 5, the AI will prefer to hold the spell +# back (unless lethal/in danger) unless it can deal 5 or more damage with it or unless it's the AI's 5th turn or later. +HOLD_X_DAMAGE_SPELLS_THRESHOLD=3 + # Permission timings MIN_SPELL_CMC_TO_COUNTER=0 CHANCE_TO_COUNTER_CMC_1=80