mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Converted token generation ability activation chance for the AI into a profile variable (currently defaults to 100% for all profiles, pending testing).
This commit is contained in:
@@ -50,7 +50,8 @@ public enum AiProps { /** */
|
||||
STRIPMINE_MIN_LANDS_FOR_NO_TIMING_CHECK ("3"), /** */
|
||||
STRIPMINE_MIN_LANDS_OTB_FOR_NO_TEMPO_CHECK ("6"), /** */
|
||||
STRIPMINE_MAX_LANDS_TO_ATTEMPT_MANALOCKING ("3"), /** */
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP ("false"); /** */
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP ("false"),
|
||||
TOKEN_GENERATION_ABILITY_CHANCE ("100"); /** */
|
||||
|
||||
private final String strDefaultVal;
|
||||
|
||||
|
||||
@@ -7,11 +7,7 @@ import java.util.List;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import forge.ai.ComputerUtil;
|
||||
import forge.ai.ComputerUtilCard;
|
||||
import forge.ai.ComputerUtilMana;
|
||||
import forge.ai.SpellAbilityAi;
|
||||
import forge.ai.SpellApiToAi;
|
||||
import forge.ai.*;
|
||||
import forge.game.Game;
|
||||
import forge.game.GameEntity;
|
||||
import forge.game.ability.AbilityFactory;
|
||||
@@ -234,8 +230,12 @@ public class TokenAi extends SpellAbilityAi {
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
//return MyRandom.getRandom().nextFloat() < .8;
|
||||
double chance = 1.0F; // 100%
|
||||
if (ai.getController().isAI()) {
|
||||
chance = (double)((PlayerControllerAi) ai.getController()).getAi().getIntProperty(AiProps.TOKEN_GENERATION_ABILITY_CHANCE) / 100;
|
||||
}
|
||||
|
||||
return MyRandom.getRandom().nextFloat() <= chance;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,4 +44,8 @@ STRIPMINE_MIN_LANDS_IN_HAND_TO_ACTIVATE=1
|
||||
STRIPMINE_MIN_LANDS_FOR_NO_TIMING_CHECK=9999
|
||||
STRIPMINE_MIN_LANDS_OTB_FOR_NO_TEMPO_CHECK=8
|
||||
STRIPMINE_MAX_LANDS_TO_ATTEMPT_MANALOCKING=3
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP=true
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP=true
|
||||
|
||||
# A chance to use the token-generation abilities (The Hive, etc.). If less than 100, the AI will sometimes
|
||||
# feel "forgetful" (might miss activation of planeswalker token abilities, The Hive on defense, etc.)
|
||||
TOKEN_GENERATION_ABILITY_CHANCE=100
|
||||
@@ -45,3 +45,7 @@ STRIPMINE_MIN_LANDS_FOR_NO_TIMING_CHECK=9999
|
||||
STRIPMINE_MIN_LANDS_OTB_FOR_NO_TEMPO_CHECK=6
|
||||
STRIPMINE_MAX_LANDS_TO_ATTEMPT_MANALOCKING=3
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP=true
|
||||
|
||||
# A chance to use the token-generation abilities (The Hive, etc.). If less than 100, the AI will sometimes
|
||||
# feel "forgetful" (might miss activation of planeswalker token abilities, The Hive on defense, etc.)
|
||||
TOKEN_GENERATION_ABILITY_CHANCE=100
|
||||
|
||||
@@ -44,4 +44,8 @@ STRIPMINE_MIN_LANDS_IN_HAND_TO_ACTIVATE=1
|
||||
STRIPMINE_MIN_LANDS_FOR_NO_TIMING_CHECK=9999
|
||||
STRIPMINE_MIN_LANDS_OTB_FOR_NO_TEMPO_CHECK=6
|
||||
STRIPMINE_MAX_LANDS_TO_ATTEMPT_MANALOCKING=3
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP=true
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP=true
|
||||
|
||||
# A chance to use the token-generation abilities (The Hive, etc.). If less than 100, the AI will sometimes
|
||||
# feel "forgetful" (might miss activation of planeswalker token abilities, The Hive on defense, etc.)
|
||||
TOKEN_GENERATION_ABILITY_CHANCE=100
|
||||
@@ -44,4 +44,8 @@ STRIPMINE_MIN_LANDS_IN_HAND_TO_ACTIVATE=1
|
||||
STRIPMINE_MIN_LANDS_FOR_NO_TIMING_CHECK=3
|
||||
STRIPMINE_MIN_LANDS_OTB_FOR_NO_TEMPO_CHECK=4
|
||||
STRIPMINE_MAX_LANDS_TO_ATTEMPT_MANALOCKING=4
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP=true
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP=true
|
||||
|
||||
# A chance to use the token-generation abilities (The Hive, etc.). If less than 100, the AI will sometimes
|
||||
# feel "forgetful" (might miss activation of planeswalker token abilities, The Hive on defense, etc.)
|
||||
TOKEN_GENERATION_ABILITY_CHANCE=100
|
||||
Reference in New Issue
Block a user