Merge master into fix-eventobj, add explicit size to gObjectEventGraphicsInfoPointers
|
@ -743,7 +743,7 @@ AI_CheckViability:
|
|||
if_effect EFFECT_MIRROR_COAT, AI_CV_MirrorCoat
|
||||
if_effect EFFECT_SKULL_BASH, AI_CV_ChargeUpMove
|
||||
if_effect EFFECT_SOLARBEAM, AI_CV_ChargeUpMove
|
||||
if_effect EFFECT_SEMI_INVULNERABLE, AI_CV_Fly
|
||||
if_effect EFFECT_SEMI_INVULNERABLE, AI_CV_SemiInvulnerable
|
||||
if_effect EFFECT_SOFTBOILED, AI_CV_Heal
|
||||
if_effect EFFECT_FAKE_OUT, AI_CV_FakeOut
|
||||
if_effect EFFECT_SPIT_UP, AI_CV_SpitUp
|
||||
|
@ -2317,48 +2317,51 @@ AI_CV_ChargeUpMove_ScoreDown2:
|
|||
AI_CV_ChargeUpMove_End:
|
||||
end
|
||||
|
||||
AI_CV_Fly:
|
||||
if_doesnt_have_move_with_effect AI_TARGET, EFFECT_PROTECT, AI_CV_Fly2
|
||||
AI_CV_SemiInvulnerable:
|
||||
if_doesnt_have_move_with_effect AI_TARGET, EFFECT_PROTECT, AI_CV_SemiInvulnerable2
|
||||
score -1
|
||||
goto AI_CV_Fly_End
|
||||
goto AI_CV_SemiInvulnerable_End
|
||||
|
||||
AI_CV_Fly2:
|
||||
if_status AI_TARGET, STATUS1_TOXIC_POISON, AI_CV_Fly6
|
||||
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_Fly6
|
||||
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_Fly6
|
||||
@ 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:
|
||||
if_status AI_TARGET, STATUS1_TOXIC_POISON, AI_CV_SemiInvulnerable_TryEncourage
|
||||
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_SemiInvulnerable_TryEncourage
|
||||
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_SemiInvulnerable_TryEncourage
|
||||
get_weather
|
||||
if_equal AI_WEATHER_HAIL, AI_CV_Fly3
|
||||
if_equal AI_WEATHER_SANDSTORM, AI_CV_Fly4
|
||||
goto AI_CV_Fly5
|
||||
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
||||
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckIceType
|
||||
goto AI_CV_SemiInvulnerable5
|
||||
|
||||
AI_CV_Fly3:
|
||||
AI_CV_SemiInvulnerable_CheckSandstormTypes:
|
||||
get_user_type1
|
||||
if_in_bytes AI_CV_Fly_TypesToEncourage, AI_CV_Fly6
|
||||
if_in_bytes AI_CV_SandstormResistantTypes, AI_CV_SemiInvulnerable_TryEncourage
|
||||
get_user_type2
|
||||
if_in_bytes AI_CV_Fly_TypesToEncourage, AI_CV_Fly6
|
||||
goto AI_CV_Fly5
|
||||
if_in_bytes AI_CV_SandstormResistantTypes, AI_CV_SemiInvulnerable_TryEncourage
|
||||
goto AI_CV_SemiInvulnerable5
|
||||
|
||||
AI_CV_Fly4:
|
||||
AI_CV_SemiInvulnerable_CheckIceType:
|
||||
get_user_type1
|
||||
if_equal TYPE_ICE, AI_CV_Fly6
|
||||
if_equal TYPE_ICE, AI_CV_SemiInvulnerable_TryEncourage
|
||||
get_user_type2
|
||||
if_equal TYPE_ICE, AI_CV_Fly6
|
||||
if_equal TYPE_ICE, AI_CV_SemiInvulnerable_TryEncourage
|
||||
|
||||
AI_CV_Fly5:
|
||||
if_target_faster AI_CV_Fly_End
|
||||
AI_CV_SemiInvulnerable5:
|
||||
if_target_faster AI_CV_SemiInvulnerable_End
|
||||
get_last_used_bank_move AI_TARGET
|
||||
get_move_effect_from_result
|
||||
if_not_equal EFFECT_LOCK_ON, AI_CV_Fly6
|
||||
goto AI_CV_Fly_End
|
||||
if_not_equal EFFECT_LOCK_ON, AI_CV_SemiInvulnerable_TryEncourage
|
||||
goto AI_CV_SemiInvulnerable_End
|
||||
|
||||
AI_CV_Fly6:
|
||||
if_random_less_than 80, AI_CV_Fly_End
|
||||
AI_CV_SemiInvulnerable_TryEncourage:
|
||||
if_random_less_than 80, AI_CV_SemiInvulnerable_End
|
||||
score +1
|
||||
|
||||
AI_CV_Fly_End:
|
||||
AI_CV_SemiInvulnerable_End:
|
||||
end
|
||||
|
||||
AI_CV_Fly_TypesToEncourage:
|
||||
AI_CV_SandstormResistantTypes:
|
||||
.byte TYPE_GROUND
|
||||
.byte TYPE_ROCK
|
||||
.byte TYPE_STEEL
|
||||
|
|
Before Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 156 B |
Before Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 199 B |
Before Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 149 B |
Before Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 146 B |
Before Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 130 B |
Before Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 126 B |
Before Width: | Height: | Size: 137 B |
Before Width: | Height: | Size: 124 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 138 B |