From 4cd04441b92f3f4f62f6bd2e8c9b45be6c1ece07 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Sat, 23 Nov 2024 14:36:16 -0500 Subject: [PATCH] Renamed HasTactic to IsTacticSet --- asm/include/itcm.inc | 2 +- asm/include/overlay_29_02300BF8.inc | 6 +++--- asm/itcm.s | 10 +++++----- asm/overlay_29_02300BF8.s | 2 +- asm/overlay_29_023016A8.s | 6 +++--- src/dungeon_ai_targeting.c | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/asm/include/itcm.inc b/asm/include/itcm.inc index 77850681..c440050a 100644 --- a/asm/include/itcm.inc +++ b/asm/include/itcm.inc @@ -123,13 +123,13 @@ .public GetVisibilityRange .public GetWindow .public HasDropeyeStatus -.public HasTactic .public InitMove .public IqSkillIsEnabled .public IsBagFull .public IsChargingTwoTurnMove .public IsMonster__0231A9D4 .public IsMonsterCornered +.public IsTacticSet .public MemcpyFast .public MemsetFast .public OS_IRQTable diff --git a/asm/include/overlay_29_02300BF8.inc b/asm/include/overlay_29_02300BF8.inc index 4daf9224..45a6b5d7 100644 --- a/asm/include/overlay_29_02300BF8.inc +++ b/asm/include/overlay_29_02300BF8.inc @@ -9,11 +9,9 @@ .public IsChargingAnyTwoTurnMove .public IsCurrentTilesetBackground .public IsExperienceLocked +.public IsTacticSet .public ItemIsActive__022FF898 -.public SECONDARY_TERRAIN_TYPES -.public ShouldMonsterRunAway .public ov29_023008DC -.public HasTactic .public ov29_0235171E .public ov29_02352770 .public ov29_02352778 @@ -21,3 +19,5 @@ .public ov29_02352788 .public ov29_02352790 .public ov29_02352798 +.public SECONDARY_TERRAIN_TYPES +.public ShouldMonsterRunAway diff --git a/asm/itcm.s b/asm/itcm.s index f285670a..a8bf65cb 100644 --- a/asm/itcm.s +++ b/asm/itcm.s @@ -2829,7 +2829,7 @@ AiMovement: ; 0x01FFA3C4 strb r2, [r8, #0x7e] mov r1, #7 strb r2, [r8, #0x7f] - bl HasTactic + bl IsTacticSet cmp r0, #0 beq _01FFA428 ldrsh r2, [r8, #0x12] @@ -2847,7 +2847,7 @@ AiMovement: ; 0x01FFA3C4 _01FFA428: mov r0, r4 mov r1, #9 - bl HasTactic + bl IsTacticSet cmp r0, #0 bne _01FFA44C mov r0, r4 @@ -3439,7 +3439,7 @@ _01FFAC6C: strh r5, [sl, #0x80] strb r2, [sl, #0x7e] str r3, [sl, #0x120 + AI_MOVEMENT_OFFSET] - bl HasTactic + bl IsTacticSet cmp r0, #0 beq _01FFAD0C mov r0, r4 @@ -3466,7 +3466,7 @@ _01FFAD0C: _01FFAD14: mov r0, r4 mov r1, #1 - bl HasTactic + bl IsTacticSet cmp r0, #0 bne _01FFAD7C ldrb r0, [sl, #6] @@ -4179,7 +4179,7 @@ ChooseAiMove: ; 0x01FFB658 _01FFB6CC: mov r0, sl mov r1, #8 - bl HasTactic + bl IsTacticSet cmp r0, #0 bne _01FFBD0C ldrb r0, [r7, #0xd0] diff --git a/asm/overlay_29_02300BF8.s b/asm/overlay_29_02300BF8.s index b09db53f..9692985d 100644 --- a/asm/overlay_29_02300BF8.s +++ b/asm/overlay_29_02300BF8.s @@ -921,7 +921,7 @@ ov29_02301594: ; 0x02301594 stmdb sp!, {r4, lr} mov r4, r1 mov r1, #3 - bl HasTactic + bl IsTacticSet cmp r0, #0 cmpne r4, #0 movne r0, #1 diff --git a/asm/overlay_29_023016A8.s b/asm/overlay_29_023016A8.s index 04fbcfe5..41ca3355 100644 --- a/asm/overlay_29_023016A8.s +++ b/asm/overlay_29_023016A8.s @@ -765,8 +765,8 @@ CanSeeInvisibleMonsters: ; 0x02301EEC ldmia sp!, {r3, pc} arm_func_end CanSeeInvisibleMonsters - arm_func_start HasTactic -HasTactic: ; 0x02301F20 + arm_func_start IsTacticSet +IsTacticSet: ; 0x02301F20 ldr r2, [r0, #0xb4] ldrb r0, [r2, #7] cmp r0, #0 @@ -781,7 +781,7 @@ _02301F40: movne r0, #0 and r0, r0, #0xff bx lr - arm_func_end HasTactic + arm_func_end IsTacticSet arm_func_start HasDropeyeStatus HasDropeyeStatus: ; 0x02301F50 diff --git a/src/dungeon_ai_targeting.c b/src/dungeon_ai_targeting.c index aee436d6..b20790e5 100644 --- a/src/dungeon_ai_targeting.c +++ b/src/dungeon_ai_targeting.c @@ -3,7 +3,7 @@ #include "overlay_29_023000E4.h" extern bool8 AbilityIsActive(struct entity *entity, enum ability_id ability_id); -extern bool8 HasTactic(struct entity *entity, enum tactic_id tactic); +extern bool8 IsTacticSet(struct entity *entity, enum tactic_id tactic); bool8 ShouldMonsterRunAway(struct entity *pokemon) { @@ -28,10 +28,10 @@ bool8 ShouldMonsterRunAway(struct entity *pokemon) return TRUE; } - if (HasTactic(pokemon, TACTIC_GET_AWAY_FROM_HERE)) + if (IsTacticSet(pokemon, TACTIC_GET_AWAY_FROM_HERE)) return TRUE; - if (HasTactic(pokemon, TACTIC_AVOID_TROUBLE)) + if (IsTacticSet(pokemon, TACTIC_AVOID_TROUBLE)) { s32 max_hp = pokemon_info->max_hp_stat + pokemon_info->max_hp_boost; if (max_hp > 999)