From 47044429041af87ebafeb2c4b000897dfd91a48a Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Sun, 1 Dec 2024 18:20:37 -0600 Subject: [PATCH] Decomped NoGastroAcidStatus --- asm/include/overlay_29_02301A84.inc | 1 - asm/overlay_29_02301A84.s | 17 ----------------- include/dg.h | 2 -- include/dg_camera.h | 2 -- include/dg_effect.h | 2 -- include/dg_object.h | 2 -- include/dg_uty.h | 2 -- include/dungeon_pokemon_attributes.h | 3 +++ include/enums.h | 1 + include/overlay_29_022EC608.h | 2 -- include/overlay_29_022ECDC0.h | 2 -- include/overlay_29_022EE348.h | 2 -- include/overlay_29_022EF7A0.h | 2 -- include/overlay_29_022F0590.h | 2 -- include/overlay_29_022F528C.h | 2 -- include/overlay_29_022F62A8.h | 2 -- include/overlay_29_022F7364.h | 2 -- include/overlay_29_022F9720.h | 1 + include/overlay_29_022FC99C.h | 2 -- include/overlay_29_022FED98.h | 2 -- include/overlay_29_023000E4.h | 2 -- include/overlay_29_02301A60.h | 1 + include/overlay_29_02302A38.h | 2 -- include/overlay_29_023047B8.h | 2 -- include/overlay_29_0230558C.h | 2 -- include/overlay_29_02305C04.h | 2 -- include/overlay_29_02307EF8.h | 2 -- include/overlay_29_0230827C.h | 2 -- include/overlay_29_02308FBC.h | 2 -- include/overlay_29_0230A994.h | 1 + include/overlay_29_0230E8F0.h | 2 -- include/overlay_29_0230F008.h | 2 -- include/overlay_29_0230F980.h | 1 + include/overlay_29_02311010.h | 2 -- include/overlay_29_023118B4.h | 2 -- include/overlay_29_02315118.h | 2 -- include/overlay_29_02318AB0.h | 1 + include/overlay_29_02318D34.h | 2 -- include/overlay_29_02318E4C.h | 2 -- include/overlay_29_02319F8C.h | 2 -- include/overlay_29_0231A9D4.h | 1 + include/overlay_29_0231B194.h | 2 -- include/overlay_29_0231B318.h | 1 + include/overlay_29_0231CBC8.h | 2 -- include/overlay_29_0231EDD8.h | 2 -- include/overlay_29_0231F570.h | 2 -- include/overlay_29_0231FBFC.h | 2 -- include/overlay_29_0232017C.h | 2 -- include/overlay_29_02320764.h | 2 -- include/overlay_29_02321438.h | 2 -- include/overlay_29_02322DB8.h | 1 + include/overlay_29_02325620.h | 2 -- include/overlay_29_0232800C.h | 2 -- include/overlay_29_0232A3D8.h | 2 -- include/overlay_29_0232C500.h | 2 -- include/overlay_29_0232E250.h | 2 -- include/overlay_29_0232E840.h | 2 -- include/overlay_29_02333FAC.h | 2 -- include/overlay_29_023350D8.h | 2 -- include/overlay_29_02337CA8.h | 2 -- include/overlay_29_02344AF8.h | 2 -- include/overlay_29_02345698.h | 2 -- include/overlay_29_02347BA4.h | 2 -- include/overlay_29_0234987C.h | 2 -- include/overlay_29_0234D460.h | 1 + include/overlay_29_0234DDD0.h | 2 -- include/overlay_29_0234EC14.h | 2 -- src/dungeon_pokemon_attributes.c | 11 ++++++++++- 68 files changed, 23 insertions(+), 127 deletions(-) diff --git a/asm/include/overlay_29_02301A84.inc b/asm/include/overlay_29_02301A84.inc index e801fec7..ae878d27 100644 --- a/asm/include/overlay_29_02301A84.inc +++ b/asm/include/overlay_29_02301A84.inc @@ -4,7 +4,6 @@ .public ExclusiveItemEffectIsActive__022FFF28 .public GetApparentWeather .public GetExclusiveItemWithEffectFromBag -.public IsMonster__02301A60 .public LogMessageByIdWithPopupCheckUserTarget .public MistIsActive .public SubstitutePlaceholderStringTags diff --git a/asm/overlay_29_02301A84.s b/asm/overlay_29_02301A84.s index 3354c7c2..ce621487 100644 --- a/asm/overlay_29_02301A84.s +++ b/asm/overlay_29_02301A84.s @@ -196,20 +196,3 @@ _02301CCC: mov r0, #0 ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} arm_func_end ov29_02301C2C - - arm_func_start NoGastroAcidStatus -NoGastroAcidStatus: ; 0x02301CDC - stmdb sp!, {r4, lr} - mov r4, r0 - bl IsMonster__02301A60 - cmp r0, #0 - moveq r0, #0 - ldmeqia sp!, {r4, pc} - ldr r0, [r4, #0xb4] - ldrb r0, [r0, #0xd8] - cmp r0, #4 - movne r0, #1 - moveq r0, #0 - and r0, r0, #0xff - ldmia sp!, {r4, pc} - arm_func_end NoGastroAcidStatus diff --git a/include/dg.h b/include/dg.h index d1d7e6ed..1243ab65 100644 --- a/include/dg.h +++ b/include/dg.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022E0354(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022E0354_H diff --git a/include/dg_camera.h b/include/dg_camera.h index 7c376ff7..4e45f85a 100644 --- a/include/dg_camera.h +++ b/include/dg_camera.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022E32E8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022E32E8_H diff --git a/include/dg_effect.h b/include/dg_effect.h index 6cfc1ca1..e7973f63 100644 --- a/include/dg_effect.h +++ b/include/dg_effect.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022E37B8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022E37B8_H diff --git a/include/dg_object.h b/include/dg_object.h index 430b4667..5ab58aa4 100644 --- a/include/dg_object.h +++ b/include/dg_object.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022E1A1C(struct entity *entity); void UpdateEntityPixelPos(struct entity *entity, struct pixel_position *pixel_pos); void SetEntityPixelPosXY(struct entity *entity, u32 x, u32 y); diff --git a/include/dg_uty.h b/include/dg_uty.h index e644c0f3..2ac6d78e 100644 --- a/include/dg_uty.h +++ b/include/dg_uty.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022E95F4(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022E95F4_H diff --git a/include/dungeon_pokemon_attributes.h b/include/dungeon_pokemon_attributes.h index 98a95505..1ae90a4c 100644 --- a/include/dungeon_pokemon_attributes.h +++ b/include/dungeon_pokemon_attributes.h @@ -3,6 +3,9 @@ #include "dungeon_mode.h" +// Checks if a monster does not have the Gastro Acid status. +bool8 NoGastroAcidStatus(struct entity *entity, enum ability_id ability); +// Checks if a monster has a certain ability that isn't disabled by Gastro Acid. bool8 AbilityIsActive(struct entity *pokemon, enum ability_id ability); #endif //PMDSKY_DUNGEON_POKEMON_ATTRIBUTES_H diff --git a/include/enums.h b/include/enums.h index 1e148e53..fecc21ce 100644 --- a/include/enums.h +++ b/include/enums.h @@ -3632,6 +3632,7 @@ enum status_id { #define CRINGE_STATUS_CONFUSED (STATUS_CONFUSED - STATUS_CRINGE + 1) // 2 #define CURSED_STATUS_DECOY (STATUS_DECOY - STATUS_CURSED + 1) // 2 +#define CURSED_STATUS_GASTRO_ACID (STATUS_GASTRO_ACID - STATUS_CURSED + 1) // 4 // Mission type on a floor enum mission_type { diff --git a/include/overlay_29_022EC608.h b/include/overlay_29_022EC608.h index d076c29c..527e6f93 100644 --- a/include/overlay_29_022EC608.h +++ b/include/overlay_29_022EC608.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022EC608(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022EC608_H diff --git a/include/overlay_29_022ECDC0.h b/include/overlay_29_022ECDC0.h index 0f82c01b..1dca1719 100644 --- a/include/overlay_29_022ECDC0.h +++ b/include/overlay_29_022ECDC0.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022ECDC0(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022ECDC0_H diff --git a/include/overlay_29_022EE348.h b/include/overlay_29_022EE348.h index 78695c3e..969507be 100644 --- a/include/overlay_29_022EE348.h +++ b/include/overlay_29_022EE348.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022EE348(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022EE348_H diff --git a/include/overlay_29_022EF7A0.h b/include/overlay_29_022EF7A0.h index c7ed8851..4c36012d 100644 --- a/include/overlay_29_022EF7A0.h +++ b/include/overlay_29_022EF7A0.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022EF7A0(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022EF7A0_H diff --git a/include/overlay_29_022F0590.h b/include/overlay_29_022F0590.h index 07607397..aa76a2d2 100644 --- a/include/overlay_29_022F0590.h +++ b/include/overlay_29_022F0590.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022F0590(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022F0590_H diff --git a/include/overlay_29_022F528C.h b/include/overlay_29_022F528C.h index d35cc361..078670fe 100644 --- a/include/overlay_29_022F528C.h +++ b/include/overlay_29_022F528C.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022F528C(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022F528C_H diff --git a/include/overlay_29_022F62A8.h b/include/overlay_29_022F62A8.h index a3d0aea9..374800ff 100644 --- a/include/overlay_29_022F62A8.h +++ b/include/overlay_29_022F62A8.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022F62A8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022F62A8_H diff --git a/include/overlay_29_022F7364.h b/include/overlay_29_022F7364.h index 324a9744..afe17448 100644 --- a/include/overlay_29_022F7364.h +++ b/include/overlay_29_022F7364.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022F7364(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022F7364_H diff --git a/include/overlay_29_022F9720.h b/include/overlay_29_022F9720.h index 88dba24c..bf61f757 100644 --- a/include/overlay_29_022F9720.h +++ b/include/overlay_29_022F9720.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" +// Checks if an entity is a monster (entity type 1). bool8 IsMonster__022F9720(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022F9720_H diff --git a/include/overlay_29_022FC99C.h b/include/overlay_29_022FC99C.h index be002edd..69aabff3 100644 --- a/include/overlay_29_022FC99C.h +++ b/include/overlay_29_022FC99C.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022FC99C(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022FC99C_H diff --git a/include/overlay_29_022FED98.h b/include/overlay_29_022FED98.h index 43e87b4d..0b07eabc 100644 --- a/include/overlay_29_022FED98.h +++ b/include/overlay_29_022FED98.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__022FED98(struct entity *entity); #endif //PMDSKY_OVERLAY_29_022FED98_H diff --git a/include/overlay_29_023000E4.h b/include/overlay_29_023000E4.h index f79c851e..75e3e38c 100644 --- a/include/overlay_29_023000E4.h +++ b/include/overlay_29_023000E4.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__023000E4(struct entity *entity); #endif //PMDSKY_OVERLAY_29_023000E4_H diff --git a/include/overlay_29_02301A60.h b/include/overlay_29_02301A60.h index 57d10089..88bcc5d4 100644 --- a/include/overlay_29_02301A60.h +++ b/include/overlay_29_02301A60.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" +// Checks if an entity is a monster (entity type 1). bool8 IsMonster__02301A60(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02301A60_H diff --git a/include/overlay_29_02302A38.h b/include/overlay_29_02302A38.h index cb982494..d9819ae5 100644 --- a/include/overlay_29_02302A38.h +++ b/include/overlay_29_02302A38.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02302A38(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02302A38_H diff --git a/include/overlay_29_023047B8.h b/include/overlay_29_023047B8.h index 96139a7a..2836bee4 100644 --- a/include/overlay_29_023047B8.h +++ b/include/overlay_29_023047B8.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__023047B8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_023047B8_H diff --git a/include/overlay_29_0230558C.h b/include/overlay_29_0230558C.h index cc4a9f9f..ded7f1c6 100644 --- a/include/overlay_29_0230558C.h +++ b/include/overlay_29_0230558C.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0230558C(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0230558C_H diff --git a/include/overlay_29_02305C04.h b/include/overlay_29_02305C04.h index 63a11c7d..ba403710 100644 --- a/include/overlay_29_02305C04.h +++ b/include/overlay_29_02305C04.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02305C04(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02305C04_H diff --git a/include/overlay_29_02307EF8.h b/include/overlay_29_02307EF8.h index cdc3f044..e70a63fa 100644 --- a/include/overlay_29_02307EF8.h +++ b/include/overlay_29_02307EF8.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02307EF8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02307EF8_H diff --git a/include/overlay_29_0230827C.h b/include/overlay_29_0230827C.h index c663f4e9..b0fb5593 100644 --- a/include/overlay_29_0230827C.h +++ b/include/overlay_29_0230827C.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0230827C(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0230827C_H diff --git a/include/overlay_29_02308FBC.h b/include/overlay_29_02308FBC.h index cab2b17a..9a2f717d 100644 --- a/include/overlay_29_02308FBC.h +++ b/include/overlay_29_02308FBC.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02308FBC(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02308FBC_H diff --git a/include/overlay_29_0230A994.h b/include/overlay_29_0230A994.h index 1d5341ea..f9c67285 100644 --- a/include/overlay_29_0230A994.h +++ b/include/overlay_29_0230A994.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" +// Checks if an entity is a monster (entity type 1). bool8 IsMonster__0230A994(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0230A994_H diff --git a/include/overlay_29_0230E8F0.h b/include/overlay_29_0230E8F0.h index 756453b7..e1b78991 100644 --- a/include/overlay_29_0230E8F0.h +++ b/include/overlay_29_0230E8F0.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0230E8F0(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0230E8F0_H diff --git a/include/overlay_29_0230F008.h b/include/overlay_29_0230F008.h index 46096d7b..96ef0265 100644 --- a/include/overlay_29_0230F008.h +++ b/include/overlay_29_0230F008.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0230F008(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0230F008_H diff --git a/include/overlay_29_0230F980.h b/include/overlay_29_0230F980.h index 220f2de4..5329bd42 100644 --- a/include/overlay_29_0230F980.h +++ b/include/overlay_29_0230F980.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" +// Checks if an entity is a monster (entity type 1). bool8 IsMonster__0230F980(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0230F980_H diff --git a/include/overlay_29_02311010.h b/include/overlay_29_02311010.h index 0a639832..cabb9df3 100644 --- a/include/overlay_29_02311010.h +++ b/include/overlay_29_02311010.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02311010(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02311010_H diff --git a/include/overlay_29_023118B4.h b/include/overlay_29_023118B4.h index 23a5d4e4..1314790a 100644 --- a/include/overlay_29_023118B4.h +++ b/include/overlay_29_023118B4.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__023118B4(struct entity *entity); #endif //PMDSKY_OVERLAY_29_023118B4_H diff --git a/include/overlay_29_02315118.h b/include/overlay_29_02315118.h index fb15f0b0..3eab387a 100644 --- a/include/overlay_29_02315118.h +++ b/include/overlay_29_02315118.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02315118(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02315118_H diff --git a/include/overlay_29_02318AB0.h b/include/overlay_29_02318AB0.h index c242434b..b0911383 100644 --- a/include/overlay_29_02318AB0.h +++ b/include/overlay_29_02318AB0.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" +// Checks if an entity is a monster (entity type 1). bool8 IsMonster__02318AB0(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02318AB0_H diff --git a/include/overlay_29_02318D34.h b/include/overlay_29_02318D34.h index c1540e0f..520c59d0 100644 --- a/include/overlay_29_02318D34.h +++ b/include/overlay_29_02318D34.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02318D34(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02318D34_H diff --git a/include/overlay_29_02318E4C.h b/include/overlay_29_02318E4C.h index f0758f34..082631ed 100644 --- a/include/overlay_29_02318E4C.h +++ b/include/overlay_29_02318E4C.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02318E4C(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02318E4C_H diff --git a/include/overlay_29_02319F8C.h b/include/overlay_29_02319F8C.h index 3b241b79..e173ecda 100644 --- a/include/overlay_29_02319F8C.h +++ b/include/overlay_29_02319F8C.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02319F8C(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02319F8C_H diff --git a/include/overlay_29_0231A9D4.h b/include/overlay_29_0231A9D4.h index 923ffa89..b42b843c 100644 --- a/include/overlay_29_0231A9D4.h +++ b/include/overlay_29_0231A9D4.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" +// Checks if an entity is a monster (entity type 1). bool8 IsMonster__0231A9D4(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0231A9D4_H diff --git a/include/overlay_29_0231B194.h b/include/overlay_29_0231B194.h index cc260d7f..d9a4b8bd 100644 --- a/include/overlay_29_0231B194.h +++ b/include/overlay_29_0231B194.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0231B194(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0231B194_H diff --git a/include/overlay_29_0231B318.h b/include/overlay_29_0231B318.h index 6ab4d38c..4d2cd5a8 100644 --- a/include/overlay_29_0231B318.h +++ b/include/overlay_29_0231B318.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" +// Checks if an entity is a monster (entity type 1). bool8 IsMonster__0231B318(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0231B318_H diff --git a/include/overlay_29_0231CBC8.h b/include/overlay_29_0231CBC8.h index a6202563..ea4e4a67 100644 --- a/include/overlay_29_0231CBC8.h +++ b/include/overlay_29_0231CBC8.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0231CBC8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0231CBC8_H diff --git a/include/overlay_29_0231EDD8.h b/include/overlay_29_0231EDD8.h index 6177c7c1..99c8ddf8 100644 --- a/include/overlay_29_0231EDD8.h +++ b/include/overlay_29_0231EDD8.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0231EDD8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0231EDD8_H diff --git a/include/overlay_29_0231F570.h b/include/overlay_29_0231F570.h index 9c76cc10..0cec0cec 100644 --- a/include/overlay_29_0231F570.h +++ b/include/overlay_29_0231F570.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0231F570(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0231F570_H diff --git a/include/overlay_29_0231FBFC.h b/include/overlay_29_0231FBFC.h index 222aaa66..36aaa97c 100644 --- a/include/overlay_29_0231FBFC.h +++ b/include/overlay_29_0231FBFC.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0231FBFC(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0231FBFC_H diff --git a/include/overlay_29_0232017C.h b/include/overlay_29_0232017C.h index d239fa45..720eb982 100644 --- a/include/overlay_29_0232017C.h +++ b/include/overlay_29_0232017C.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0232017C(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0232017C_H diff --git a/include/overlay_29_02320764.h b/include/overlay_29_02320764.h index 2a48a3f3..d00913f5 100644 --- a/include/overlay_29_02320764.h +++ b/include/overlay_29_02320764.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02320764(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02320764_H diff --git a/include/overlay_29_02321438.h b/include/overlay_29_02321438.h index 72752e2c..7561e481 100644 --- a/include/overlay_29_02321438.h +++ b/include/overlay_29_02321438.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02321438(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02321438_H diff --git a/include/overlay_29_02322DB8.h b/include/overlay_29_02322DB8.h index 761242f1..e6b7268b 100644 --- a/include/overlay_29_02322DB8.h +++ b/include/overlay_29_02322DB8.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" +// Checks if an entity is a monster (entity type 1). bool8 IsMonster__02322DB8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02322DB8_H diff --git a/include/overlay_29_02325620.h b/include/overlay_29_02325620.h index 749863f6..6ae17aa6 100644 --- a/include/overlay_29_02325620.h +++ b/include/overlay_29_02325620.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02325620(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02325620_H diff --git a/include/overlay_29_0232800C.h b/include/overlay_29_0232800C.h index d629c338..ee27cb5b 100644 --- a/include/overlay_29_0232800C.h +++ b/include/overlay_29_0232800C.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValidMoveEffects__0232800C(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0232800C_H diff --git a/include/overlay_29_0232A3D8.h b/include/overlay_29_0232A3D8.h index 3ef95bc8..be637cac 100644 --- a/include/overlay_29_0232A3D8.h +++ b/include/overlay_29_0232A3D8.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValidMoveEffects__0232A3D8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0232A3D8_H diff --git a/include/overlay_29_0232C500.h b/include/overlay_29_0232C500.h index 9de2c69f..5b6a5423 100644 --- a/include/overlay_29_0232C500.h +++ b/include/overlay_29_0232C500.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValidMoveEffects__0232C500(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0232C500_H diff --git a/include/overlay_29_0232E250.h b/include/overlay_29_0232E250.h index e0cb7dd2..27d0a03d 100644 --- a/include/overlay_29_0232E250.h +++ b/include/overlay_29_0232E250.h @@ -5,8 +5,6 @@ #include "dungeon_mode_common.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValidMoveEffects__0232E250(struct entity *entity); // Move effect: Defend Order // attacker: attacker pointer diff --git a/include/overlay_29_0232E840.h b/include/overlay_29_0232E840.h index a296b330..c4b54143 100644 --- a/include/overlay_29_0232E840.h +++ b/include/overlay_29_0232E840.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0232E840(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0232E840_H diff --git a/include/overlay_29_02333FAC.h b/include/overlay_29_02333FAC.h index 7f4efca2..052c5fce 100644 --- a/include/overlay_29_02333FAC.h +++ b/include/overlay_29_02333FAC.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02333FAC(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02333FAC_H diff --git a/include/overlay_29_023350D8.h b/include/overlay_29_023350D8.h index 0c85c445..a1aa5a9b 100644 --- a/include/overlay_29_023350D8.h +++ b/include/overlay_29_023350D8.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__023350D8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_023350D8_H diff --git a/include/overlay_29_02337CA8.h b/include/overlay_29_02337CA8.h index 90852104..d3a4998e 100644 --- a/include/overlay_29_02337CA8.h +++ b/include/overlay_29_02337CA8.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02337CA8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02337CA8_H diff --git a/include/overlay_29_02344AF8.h b/include/overlay_29_02344AF8.h index 94930e82..b93b5123 100644 --- a/include/overlay_29_02344AF8.h +++ b/include/overlay_29_02344AF8.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02344AF8(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02344AF8_H diff --git a/include/overlay_29_02345698.h b/include/overlay_29_02345698.h index 511943e4..9582fb4d 100644 --- a/include/overlay_29_02345698.h +++ b/include/overlay_29_02345698.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02345698(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02345698_H diff --git a/include/overlay_29_02347BA4.h b/include/overlay_29_02347BA4.h index ac8dfe36..efb091b7 100644 --- a/include/overlay_29_02347BA4.h +++ b/include/overlay_29_02347BA4.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__02347BA4(struct entity *entity); #endif //PMDSKY_OVERLAY_29_02347BA4_H diff --git a/include/overlay_29_0234987C.h b/include/overlay_29_0234987C.h index 801e8923..12b0b74f 100644 --- a/include/overlay_29_0234987C.h +++ b/include/overlay_29_0234987C.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0234987C(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0234987C_H diff --git a/include/overlay_29_0234D460.h b/include/overlay_29_0234D460.h index c4b54399..e5778a81 100644 --- a/include/overlay_29_0234D460.h +++ b/include/overlay_29_0234D460.h @@ -3,6 +3,7 @@ #include "dungeon_mode.h" +// Checks if an entity is a monster (entity type 1). bool8 IsMonster__0234D460(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0234D460_H diff --git a/include/overlay_29_0234DDD0.h b/include/overlay_29_0234DDD0.h index 2b6bf1a8..a38be47c 100644 --- a/include/overlay_29_0234DDD0.h +++ b/include/overlay_29_0234DDD0.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0234DDD0(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0234DDD0_H diff --git a/include/overlay_29_0234EC14.h b/include/overlay_29_0234EC14.h index 9b33f642..c3d2d67a 100644 --- a/include/overlay_29_0234EC14.h +++ b/include/overlay_29_0234EC14.h @@ -4,8 +4,6 @@ #include "dungeon_mode.h" // Checks if an entity pointer points to a valid entity (not entity type 0, which represents no entity). -// entity: entity pointer -// return: bool bool8 EntityIsValid__0234EC14(struct entity *entity); #endif //PMDSKY_OVERLAY_29_0234EC14_H diff --git a/src/dungeon_pokemon_attributes.c b/src/dungeon_pokemon_attributes.c index b31ed8c7..daad3eab 100644 --- a/src/dungeon_pokemon_attributes.c +++ b/src/dungeon_pokemon_attributes.c @@ -2,7 +2,16 @@ #include "dungeon_util.h" #include "overlay_29_02301A60.h" -extern bool8 NoGastroAcidStatus(struct entity *pokemon, enum ability_id ability); +bool8 NoGastroAcidStatus(struct entity *entity, enum ability_id ability) +{ + if (!IsMonster__02301A60(entity)) + return FALSE; + + if (GetEntInfo(entity)->curse_class_status.curse == CURSED_STATUS_GASTRO_ACID) + return FALSE; + + return TRUE; +} bool8 AbilityIsActive(struct entity *pokemon, enum ability_id ability) {