Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couple of functions used for Magic Coat #272

Merged
merged 6 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions headers/functions/arm9.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,11 @@ bool IsExclusiveItemIdForMonster(enum item_id item_id, enum monster_id monster_i
enum type_id type1, enum type_id type2);
bool IsExclusiveItemForMonster(struct item* item, enum monster_id monster_id, enum type_id type1,
enum type_id type2);
enum item_id BagHasExclusiveItemTypeForMonster(int excl_type, enum monster_id monster_id,
enum item_id BagHasExclusiveItemTypeForMonster(enum exclusive_item_effect_id effect_id,
enum monster_id monster_id,
enum type_id type1, enum type_id type2);
bool GetExclusiveItemForMonsterFromBag(struct item* item, int excl_type, enum monster_id monster_id,
enum type_id type1, enum type_id type2);
bool GetExclusiveItemForMonsterFromBag(struct item* item, enum exclusive_item_effect_id effect_id,
enum monster_id monster_id, enum type_id type1, enum type_id type2);
int GetHpBoostFromExclusiveItems(undefined* param_1);
void ApplyGummiBoostsToGroundMonster(struct ground_monster* ground_monster, enum item_id item_id,
bool not_boost_stats, struct gummi_result* gummi_result);
Expand Down
4 changes: 4 additions & 0 deletions headers/functions/overlay29.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ void GetPossibleAiThrownItemDirections(struct entity* entity, int ally_or_enemy,
void GetPossibleAiArcItemTargets(struct entity* user, struct item* item, struct position* positions,
bool always_add_position);
void TryNonLeaderItemPickUp(struct entity* entity);
bool GetExclusiveItemWithEffectFromBag(struct entity* entity,
enum exclusive_item_effect_id effect_id,
struct item* item);
bool AuraBowIsActive(struct entity* entity);
int ExclusiveItemOffenseBoost(struct entity* entity, int move_category_idx);
int ExclusiveItemDefenseBoost(struct entity* entity, int move_category_idx);
Expand Down Expand Up @@ -643,6 +646,7 @@ int DealDamageWithType(struct entity* attacker, struct entity* defender, enum ty
struct move* move, fx32_8 damage_mult_fp, enum item_id item_id);
int PerformDamageSequence(struct entity* attacker, struct entity* defender, struct move* move,
struct damage_data* damage_out, union damage_source damage_source);
bool CanHitWithRegularAttack(struct entity* attacker, struct entity* defender);
bool StatusCheckerCheck(struct entity* attacker, struct move* move);
enum weather_id GetApparentWeather(struct entity* entity);
void TryWeatherFormChange(struct entity* entity);
Expand Down
20 changes: 20 additions & 0 deletions symbols/overlay29.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4045,6 +4045,16 @@ overlay29:
Used both for enemies and team members.

r0: entity pointer
- name: GetExclusiveItemWithEffectFromBag
address:
EU: 0x23100C8
description: |-
If an exclusive item with a certain effect is present in the bag and works for the entity, returns true and copies the item struct to the address at item. Otherwise, returns false.

r0: Entity pointer
r1: exclusive_item_effect_id enum
r2: [output] Item pointer
return: bool
- name: AuraBowIsActive
address:
EU: 0x231013C
Expand Down Expand Up @@ -6290,6 +6300,16 @@ overlay29:
r3: [output] struct containing info about the damage calculation
stack[0]: Damage source
return: Calculated damage
- name: CanHitWithRegularAttack
address:
EU: 0x2333A08
description: |-
Returns true if the defender is adjacent to the attacker and can hit them with a regular attack.
Notably, this check is what prevents ranged moves, moves that cut corners, etc. from being reflected by Magic Coat and Mirror Move.

r0: Entity pointer (attacker)
r1: Entity pointer (defender)
return: bool
- name: StatusCheckerCheck
address:
EU: 0x2333AB4
Expand Down
Loading