Fixed crash when soft resetting, fixed crash when Struggle and confusion pseudo-moves are used, fix broken AI, fixed crash after evolution, fixed crash when editing weather map metadata.

This commit is contained in:
Maruno17
2021-04-28 23:24:17 +01:00
parent f3048abd86
commit 17d1344e74
5 changed files with 7 additions and 8 deletions

View File

@@ -350,7 +350,7 @@ class PokeBattle_AI
if skill>=PBTrainerAI.bestSkill && target.itemActive?
# NOTE: Type-weakening berries aren't suitable for checking at the start
# of the round.
if !target.item.is_berry?
if target.item && !target.item.is_berry?
BattleHandlers.triggerDamageCalcTargetItem(target.item,
user,target,move,multipliers,baseDmg,type)
end