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

Minor Dungeon Notes & Trap Function #286

Merged
merged 5 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions headers/functions/arm9.h
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ bool BaseFormsEqual(enum monster_id monster1, enum monster_id monster2);
bool DexNumbersEqual(enum monster_id monster1, enum monster_id monster2);
bool GendersEqual(enum monster_id monster1, enum monster_id monster2);
bool GendersEqualNotGenderless(enum monster_id monster1, enum monster_id monster2);
bool GendersOppositeNotGenderless(enum monster_id monster1, enum monster_id monster2);
UsernameFodder marked this conversation as resolved.
Show resolved Hide resolved
bool IsMonsterOnTeam(enum monster_id monster_id, int recruit_strategy);
void GetNbRecruited(undefined* recruit);
bool IsValidTeamMember(int member_idx);
Expand Down
1 change: 1 addition & 0 deletions headers/functions/overlay29.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ void SpawnEnemyTrapAtPos(enum trap_id trap_id, int16_t x, int16_t y, uint8_t fla
void PrepareTrapperTrap(struct entity* entity, enum trap_id trap_id, uint8_t team);
bool TrySpawnTrap(struct position* pos, enum trap_id trap_id, uint8_t team, bool visible);
bool TrySpawnTrapperTrap(struct entity* entity);
bool TryRemoveTrap(struct position* pos, bool update_trap_visibility);
void TryTriggerTrap(struct entity* entity, struct position* pos, undefined param_3,
undefined param_4);
void ApplyMudTrapEffect(struct entity* attacker, struct entity* defender);
Expand Down
9 changes: 4 additions & 5 deletions headers/types/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,10 @@ struct team_member {
uint32_t iq_skill_flags[3];
struct tactic_id_8 tactic; // 0x58
undefined field_0x59;
undefined field_0x5A;
undefined field_0x5B;
undefined field_0x5C;
undefined field_0x5D;
char name[10]; // 0x5E: Display name of the monster
int16_t hidden_power_base_power; // 0x5A
struct type_id_8 hidden_power_type; // 0x5C
undefined field_0x5D; // Gets copied to monster->field_0x47.
char name[10]; // 0x5E: Display name of the monster
};
ASSERT_SIZE(struct team_member, 104);

Expand Down
13 changes: 6 additions & 7 deletions headers/types/dungeon_mode/dungeon.h
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ struct dungeon {
bool monster_house_triggered_event;
undefined field_0x795;
// 0x796: Seems to often be 0x3E7 (999)? Somehow related to controlling or managing the
// playing music?
// playing music? Initialized to 999 at 0x22EAF7C [NA]?
undefined2 field_0x796;
struct dungeon_objective_8 dungeon_objective; // 0x798: Objective of the current dungeon
// 0x799: Determines which message to display when the leader's belly reaches 0. Goes up
Expand Down Expand Up @@ -1691,13 +1691,12 @@ struct dungeon {
undefined field_0x2caf5;
undefined field_0x2caf6;
undefined field_0x2caf7;
// 0x2CAF8: Related to playing dungeon music? Initialized to 0x4.
// 0x2CAF8: Related to playing dungeon music? Initialized to 0x0 at the
UsernameFodder marked this conversation as resolved.
Show resolved Hide resolved
// address 0x22EAF64 [NA]?
undefined4 field_0x2caf8;
// Related to playing dungeon music?
undefined field_0x2cafc;
undefined field_0x2cafd;
undefined field_0x2cafe;
undefined field_0x2caff;
// 0x2CAFC: Related to playing dungeon music? Initialized to 0x0 at their
// address 0x22EAF6C [NA]?
undefined4 field_0x2cafc;
// Related to playing dungeon music?
undefined2 field_0x2cb00;
// Related to playing dungeon music?
Expand Down
4 changes: 1 addition & 3 deletions headers/types/dungeon_mode/dungeon_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,7 @@ struct monster {
undefined field_0x16f;
// 0x170: Set to make the monster disappear when using the move U-turn.
bool uturn_hide_monster_flag;
// 0x171: Some kind of visual flag? Gets set to 0 temporarily when changing Shaymin form
// or when using the Gone Pebble? Also hardcoded to be set to 0 for monsters that generally
// tend to float? Otherwise 1?
// 0x171: Setting this with entity->0xB3 causes the monster's animations to freeze.
bool field_0x171;
// 0x172: Set when the leader and falling through a pitfall trap.
// If both this and pitfall_trap_flag_0x174 are set, the sprite will disappear.
Expand Down
5 changes: 3 additions & 2 deletions headers/types/dungeon_mode/dungeon_mode_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ struct move {
// Consume 4 PP this turn. No effect unless f_consume_pp is set, overrides f_consume_2_pp
bool f_consume_4_pp : 1;
uint16_t flags2_unk7 : 1;
uint16_t flags2_unk8 : 1;
bool f_multitalent_iq_pp_boost : 1; // The IQ skill Multitalent is actively boosting move PP
UsernameFodder marked this conversation as resolved.
Show resolved Hide resolved
bool f_exclusive_item_pp_boost : 1; // A PP-boosting exclusive item is in effect
uint16_t flags3_unk10 : 6;
bool f_unknown_pp_boost : 1; // A PP-boosting effect? Possibly unused?
uint16_t flags3_unk11 : 5;

struct move_id_16 id; // 0x4
uint8_t pp; // 0x6: Current PP
Expand Down
10 changes: 10 additions & 0 deletions symbols/arm9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9331,6 +9331,16 @@ arm9:
description: |-
Checks if the genders for two monster IDs are equal. Always returns false if either gender is GENDER_GENDERLESS.

r0: id1
r1: id2
return: bool
- name: GendersOppositeNotGenderless
address:
NA: 0x2054EC8
description: |-
Checks if the genders for two monster IDs are not equal. Always returns false
if either gender is GENDER_GENDERLESS.

r0: id1
r1: id2
return: bool
Expand Down
15 changes: 14 additions & 1 deletion symbols/overlay29.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,17 @@ overlay29:

r0: entity pointer
return: true if a trap was spawned succesfully
- name: TryRemoveTrap
address:
EU: 0x22EE82C
NA: 0x22EDE7C
description: |-
Tries to remove a trap from the tile at the passed position. It does nothing
if there is no trap on the tile at that position.

r0: position
r1: bool update trap visibility
return: whether a trap was succesfully removed or not
- name: TryTriggerTrap
address:
EU: 0x22EE950
Expand Down Expand Up @@ -6014,7 +6025,9 @@ overlay29:
NA: 0x2321104
JP: 0x23225B0
description: |-
Checks that the given monster is standing on a tile it can stand on given its movement type, and warps it to a random location if it's not.
Checks that the given monster is standing on a tile it can stand on given its
movement type. If the monster is a non-leader ally, they will be warped to the
leader. Otherwise, the monster is warped randomly.
Frostbyte0x70 marked this conversation as resolved.
Show resolved Hide resolved

r0: Entity pointer
- name: TryActivateNondamagingDefenderAbility
Expand Down
4 changes: 4 additions & 0 deletions symbols/ram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -638,12 +638,14 @@ ram:
description: "[Runtime] Appears to be set to true whenever a multihit fatigue move deals damage."
- name: TWINEEDLE_HIT_TRACKER
address:
EU: 0x237D66B
NA: 0x237CA6B
length:
NA: 0x1
description: "[Runtime] Appears to be set to true whenever Twineedle hits and deals damage. So that even if the second attack misses, it will still try to poison the target."
- name: RAPID_SPIN_BINDING_REMOVAL
address:
EU: 0x237D66D
NA: 0x237CA6D
length:
NA: 0x1
Expand All @@ -656,12 +658,14 @@ ram:
description: "[Runtime] Seems to count the number of successive hits by Rollout or Ice Ball."
- name: MULTIHIT_MOVE_SUCCESSIVE_HITS
address:
EU: 0x237D678
NA: 0x237CA78
length:
NA: 0x4
description: "[Runtime] Seems to count the number of successive hits for multihit moves. This is used by Twineedle to check to attempt to apply Poison after the second attack."
- name: TRIPLE_KICK_SUCCESSIVE_HITS
address:
EU: 0x237D67C
NA: 0x237CA7C
length:
NA: 0x4
Expand Down
Loading