diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s index df6cf1b6f..bdc80cd5b 100644 --- a/data/battle_ai_scripts.s +++ b/data/battle_ai_scripts.s @@ -1099,15 +1099,18 @@ AI_CV_AttackDown3: score -2 AI_CV_AttackDown4: get_target_type1 - if_in_bytes AI_CV_AttackDown_UnknownTypeList, AI_CV_AttackDown_End + if_in_bytes AI_CV_AttackDown_PhysicalTypeList, AI_CV_AttackDown_End get_target_type2 - if_in_bytes AI_CV_AttackDown_UnknownTypeList, AI_CV_AttackDown_End + if_in_bytes AI_CV_AttackDown_PhysicalTypeList, AI_CV_AttackDown_End if_random_less_than 50, AI_CV_AttackDown_End score -2 AI_CV_AttackDown_End: end -AI_CV_AttackDown_UnknownTypeList: +@ If the target is not of any type in this list then using the move may be discouraged. +@ It seems likely this was meant to be "discourage reducing the target's attack if they're +@ not a physical type", but they've left out Flying, Poison, and Ghost. +AI_CV_AttackDown_PhysicalTypeList: .byte TYPE_NORMAL .byte TYPE_FIGHTING .byte TYPE_GROUND diff --git a/src/item.c b/src/item.c index 8b375df84..b67cf5f21 100644 --- a/src/item.c +++ b/src/item.c @@ -15,18 +15,14 @@ #include "constants/items.h" #include "constants/hold_effects.h" -// this file's functions static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count); static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count); -// EWRAM variables EWRAM_DATA struct BagPocket gBagPockets[POCKETS_COUNT] = {0}; -// rodata #include "data/text/item_descriptions.h" #include "data/items.h" -// code static u16 GetBagItemQuantity(u16 *quantity) { return gSaveBlock2Ptr->encryptionKey ^ *quantity;