Psycho Cut fix, small AI tweak
This commit is contained in:
parent
34f5d9e2ae
commit
bc86292c93
3 changed files with 32 additions and 14 deletions
|
@ -2811,16 +2811,13 @@ AI_CV_SemiInvulnerable:
|
||||||
score -1
|
score -1
|
||||||
goto AI_CV_SemiInvulnerable_End
|
goto AI_CV_SemiInvulnerable_End
|
||||||
|
|
||||||
@ BUG: The scripts for checking type-resistance to weather for semi-invulnerable moves are swapped
|
|
||||||
@ The result is that the AI is encouraged to stall while taking damage from weather
|
|
||||||
@ To fix, swap _CheckSandstormTypes/_CheckIceType in the below script
|
|
||||||
AI_CV_SemiInvulnerable2:
|
AI_CV_SemiInvulnerable2:
|
||||||
if_status AI_TARGET, STATUS1_TOXIC_POISON, AI_CV_SemiInvulnerable_TryEncourage
|
if_status AI_TARGET, STATUS1_TOXIC_POISON, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_SemiInvulnerable_TryEncourage
|
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_SemiInvulnerable_TryEncourage
|
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
get_weather
|
get_weather
|
||||||
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckIceType
|
||||||
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckIceType
|
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
||||||
goto AI_CV_SemiInvulnerable5
|
goto AI_CV_SemiInvulnerable5
|
||||||
|
|
||||||
AI_CV_SemiInvulnerable_CheckSandstormTypes:
|
AI_CV_SemiInvulnerable_CheckSandstormTypes:
|
||||||
|
@ -2828,6 +2825,8 @@ AI_CV_SemiInvulnerable_CheckSandstormTypes:
|
||||||
if_in_bytes AI_CV_SandstormResistantTypes, AI_CV_SemiInvulnerable_TryEncourage
|
if_in_bytes AI_CV_SandstormResistantTypes, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
get_user_type2
|
get_user_type2
|
||||||
if_in_bytes AI_CV_SandstormResistantTypes, AI_CV_SemiInvulnerable_TryEncourage
|
if_in_bytes AI_CV_SandstormResistantTypes, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
|
get_ability AI_USER
|
||||||
|
if_in_bytes AI_SandstormResistantAbilities, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
goto AI_CV_SemiInvulnerable5
|
goto AI_CV_SemiInvulnerable5
|
||||||
|
|
||||||
AI_CV_SemiInvulnerable_CheckIceType:
|
AI_CV_SemiInvulnerable_CheckIceType:
|
||||||
|
@ -2835,6 +2834,8 @@ AI_CV_SemiInvulnerable_CheckIceType:
|
||||||
if_equal TYPE_ICE, AI_CV_SemiInvulnerable_TryEncourage
|
if_equal TYPE_ICE, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
get_user_type2
|
get_user_type2
|
||||||
if_equal TYPE_ICE, AI_CV_SemiInvulnerable_TryEncourage
|
if_equal TYPE_ICE, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
|
get_ability AI_USER
|
||||||
|
if_in_bytes AI_HailResistantAbilities, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
|
|
||||||
AI_CV_SemiInvulnerable5:
|
AI_CV_SemiInvulnerable5:
|
||||||
if_target_faster AI_CV_SemiInvulnerable_End
|
if_target_faster AI_CV_SemiInvulnerable_End
|
||||||
|
@ -2855,6 +2856,21 @@ AI_CV_SandstormResistantTypes:
|
||||||
.byte TYPE_ROCK
|
.byte TYPE_ROCK
|
||||||
.byte TYPE_STEEL
|
.byte TYPE_STEEL
|
||||||
.byte -1
|
.byte -1
|
||||||
|
|
||||||
|
AI_SandstormResistantAbilities:
|
||||||
|
.byte ABILITY_SAND_VEIL
|
||||||
|
.byte ABILITY_SAND_FORCE
|
||||||
|
.byte ABILITY_SAND_RUSH
|
||||||
|
.byte ABILITY_OVERCOAT
|
||||||
|
.byte ABILITY_MAGIC_GUARD
|
||||||
|
.byte -1
|
||||||
|
|
||||||
|
AI_HailResistantAbilities:
|
||||||
|
.byte ABILITY_ICE_BODY
|
||||||
|
.byte ABILITY_SNOW_CLOAK
|
||||||
|
.byte ABILITY_OVERCOAT
|
||||||
|
.byte ABILITY_MAGIC_GUARD
|
||||||
|
.byte -1
|
||||||
|
|
||||||
AI_CV_FakeOut:
|
AI_CV_FakeOut:
|
||||||
if_ability AI_TARGET, ABILITY_INNER_FOCUS, AI_CV_FakeOut_End
|
if_ability AI_TARGET, ABILITY_INNER_FOCUS, AI_CV_FakeOut_End
|
||||||
|
|
|
@ -2746,20 +2746,22 @@ Move_PSYCHO_CUT:
|
||||||
loadspritegfx ANIM_TAG_PSYCHO_CUT
|
loadspritegfx ANIM_TAG_PSYCHO_CUT
|
||||||
monbg ANIM_ATK_PARTNER
|
monbg ANIM_ATK_PARTNER
|
||||||
createsprite gPsychoCutSpiralSpriteTemplate, 2, 4, 0, 0, 0, 0
|
createsprite gPsychoCutSpiralSpriteTemplate, 2, 4, 0, 0, 0, 0
|
||||||
createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 4, 4, RGB_BLACK
|
createvisualtask AnimTask_BlendBattleAnimPal, 1, 1, 2, 0, 4, RGB_BLACK
|
||||||
createvisualtask AnimTask_BlendBattleAnimPal, 9, 5, 2, 2, 10, 0, RGB(20, 12, 23)
|
createvisualtask AnimTask_BlendBattleAnimPal, 1, 2, 2, 0, 10, RGB(20, 12, 23)
|
||||||
createvisualtask AnimTask_BlendBattleAnimPal, 9, 2, 2, 10, 0, RGB(20, 12, 23)
|
|
||||||
delay 30
|
delay 30
|
||||||
clearmonbg ANIM_ATK_PARTNER
|
clearmonbg ANIM_ATK_PARTNER
|
||||||
blendoff
|
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
monbg ANIM_TARGET
|
monbg ANIM_TARGET
|
||||||
monbgprio_28 ANIM_TARGET
|
monbgprio_28 ANIM_TARGET
|
||||||
setalpha 12, 8
|
setalpha 12, 8
|
||||||
playsewithpan 160, SOUND_PAN_ATTACKER,
|
playsewithpan SE_W013B, SOUND_PAN_ATTACKER,
|
||||||
createsprite gPsychoCutSpriteTemplate, 130, 5, 20, 0, -8, 0, 20
|
createsprite gPsychoCutSpriteTemplate, 130, 5, 20, 0, -8, 0, 20
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
clearmonbg ANIM_TARGET
|
createvisualtask AnimTask_BlendBattleAnimPal, 1, 1, 2, 4, 0, RGB_BLACK
|
||||||
|
createvisualtask AnimTask_BlendBattleAnimPal, 1, 2, 2, 10, 0, RGB(20, 12, 23)
|
||||||
|
clearmonbg ANIM_TARGET
|
||||||
|
blendoff
|
||||||
|
waitforvisualfinish
|
||||||
end
|
end
|
||||||
|
|
||||||
Move_ZEN_HEADBUTT:
|
Move_ZEN_HEADBUTT:
|
||||||
|
@ -4450,14 +4452,14 @@ Move_INFERNO:
|
||||||
call SetImpactBackground
|
call SetImpactBackground
|
||||||
loopsewithpan SE_W221B, SOUND_PAN_TARGET, 40, 4
|
loopsewithpan SE_W221B, SOUND_PAN_TARGET, 40, 4
|
||||||
createvisualtask AnimTask_ShakeMon, 5, 1, 0, 2, 94, 1
|
createvisualtask AnimTask_ShakeMon, 5, 1, 0, 2, 94, 1
|
||||||
createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 0, 9, 31
|
createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 0, 9, RGB_RED
|
||||||
call InfernoAnim
|
call InfernoAnim
|
||||||
call InfernoAnim
|
call InfernoAnim
|
||||||
call InfernoAnim
|
call InfernoAnim
|
||||||
call InfernoAnim
|
call InfernoAnim
|
||||||
call InfernoAnim
|
call InfernoAnim
|
||||||
call InfernoAnim
|
call InfernoAnim
|
||||||
createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 9, 0, 31
|
createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 9, 0, RGB_RED
|
||||||
restorebg
|
restorebg
|
||||||
waitbgfadein
|
waitbgfadein
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
|
|
|
@ -9078,7 +9078,7 @@ static void Cmd_tryinfatuating(void)
|
||||||
speciesTarget = GetMonData(monTarget, MON_DATA_SPECIES);
|
speciesTarget = GetMonData(monTarget, MON_DATA_SPECIES);
|
||||||
personalityTarget = GetMonData(monTarget, MON_DATA_PERSONALITY);
|
personalityTarget = GetMonData(monTarget, MON_DATA_PERSONALITY);
|
||||||
|
|
||||||
if (gBattleMons[gBattlerTarget].ability == ABILITY_OBLIVIOUS)
|
if (GetBattlerAbility(gBattlerTarget) == ABILITY_OBLIVIOUS)
|
||||||
{
|
{
|
||||||
gBattlescriptCurrInstr = BattleScript_ObliviousPreventsAttraction;
|
gBattlescriptCurrInstr = BattleScript_ObliviousPreventsAttraction;
|
||||||
gLastUsedAbility = ABILITY_OBLIVIOUS;
|
gLastUsedAbility = ABILITY_OBLIVIOUS;
|
||||||
|
|
Loading…
Reference in a new issue