summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2021-01-19 04:46:31 -0500
committerGriffinR <griffin.g.richards@gmail.com>2021-01-19 04:46:31 -0500
commit1a40202ea4691447b326ac2f0519283b05d104df (patch)
tree17a64cbfce9fb68ad53f0289094f0db54098c9fb
parent4e845b6395aa7352e3ee15d0173c85ab65a1c4e5 (diff)
Note bug in Foresight AI
-rw-r--r--data/battle_ai_scripts.s22
1 files changed, 16 insertions, 6 deletions
diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s
index 6019303df..56be92c5e 100644
--- a/data/battle_ai_scripts.s
+++ b/data/battle_ai_scripts.s
@@ -2057,12 +2057,22 @@ AI_CV_Protect_ScoreDown2:
AI_CV_Protect_End:
end
+@ BUG: Foresight is only encouraged if the user is Ghost type or
+@ has high evasion, but should check target instead
AI_CV_Foresight:
+.ifdef BUGFIX
+ get_target_type1
+ if_equal TYPE_GHOST, AI_CV_Foresight2
+ get_target_type2
+ if_equal TYPE_GHOST, AI_CV_Foresight2
+ if_stat_level_more_than AI_TARGET, STAT_EVASION, 8, AI_CV_Foresight3
+.else
get_user_type1
if_equal TYPE_GHOST, AI_CV_Foresight2
get_user_type2
if_equal TYPE_GHOST, AI_CV_Foresight2
if_stat_level_more_than AI_USER, STAT_EVASION, 8, AI_CV_Foresight3
+.endif
score -2
goto AI_CV_Foresight_End
@@ -2329,13 +2339,13 @@ AI_CV_SemiInvulnerable2:
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_SemiInvulnerable_TryEncourage
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_SemiInvulnerable_TryEncourage
get_weather
- .ifdef BUGFIX
+.ifdef BUGFIX
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckIceType
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckSandstormTypes
- .else
+.else
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckSandstormTypes
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckIceType
- .endif
+.endif
goto AI_CV_SemiInvulnerable5
AI_CV_SemiInvulnerable_CheckSandstormTypes:
@@ -2404,11 +2414,11 @@ AI_CV_Hail_End:
@ BUG: Facade score is increased if the target is statused, but should be if the user is
AI_CV_Facade:
- .ifdef BUGFIX
+.ifdef BUGFIX
if_not_status AI_USER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
- .else
+.else
if_not_status AI_TARGET, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
- .endif
+.endif
score +1
AI_CV_Facade_End:
end