finish off dungeon random and few simple status funcs

This commit is contained in:
Seth Barberee 2022-04-04 10:55:21 -07:00
parent 7289155f83
commit 16cdcfe04b
20 changed files with 178 additions and 251 deletions

View File

@ -206,7 +206,7 @@ _0804B16A:
beq _0804B17E
movs r0, 0x2
movs r1, 0x9
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
movs r0, 0x2
movs r1, 0x8
@ -214,12 +214,12 @@ _0804B16A:
_0804B17E:
movs r0, 0x2
movs r1, 0x5
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
movs r0, 0x2
movs r1, 0x4
_0804B18C:
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
cmp r5, 0x6
bgt _0804B19A
@ -1145,11 +1145,11 @@ _0804B8B4:
subs r5, 0x3
movs r0, 0x5
adds r1, r4, 0
bl sub_808411C
bl DungeonRandomRange
mov r8, r0
movs r0, 0x4
adds r1, r5, 0
bl sub_808411C
bl DungeonRandomRange
adds r6, r0, 0
mov r2, r8
subs r4, r2
@ -1279,12 +1279,12 @@ _0804B9F4:
subs r4, r3
subs r4, 0x3
adds r1, r0, r1
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
adds r4, r6, r4
adds r0, r6, 0
adds r1, r4, 0
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
strh r5, [r7]
adds r0, r5, 0x1
@ -1756,11 +1756,11 @@ _0804BDD8:
subs r5, 0x3
movs r0, 0x5
adds r1, r4, 0
bl sub_808411C
bl DungeonRandomRange
mov r8, r0
movs r0, 0x4
adds r1, r5, 0
bl sub_808411C
bl DungeonRandomRange
adds r6, r0, 0
mov r0, r8
subs r4, r0
@ -1887,12 +1887,12 @@ _0804BF00:
subs r4, r3
subs r4, 0x3
adds r1, r0, r1
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
add r4, r8
mov r0, r8
adds r1, r4, 0
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
strh r5, [r7]
adds r0, r5, 0x1
@ -3308,11 +3308,11 @@ _0804CA3C:
subs r5, 0x3
movs r0, 0xA
adds r1, r4, 0
bl sub_808411C
bl DungeonRandomRange
mov r8, r0
movs r0, 0x10
adds r1, r5, 0
bl sub_808411C
bl DungeonRandomRange
adds r6, r0, 0
mov r0, r8
subs r4, r0
@ -3528,13 +3528,13 @@ _0804CC52:
ldrsh r0, [r4, r1]
movs r2, 0x4
ldrsh r1, [r4, r2]
bl sub_808411C
bl DungeonRandomRange
adds r7, r0, 0
movs r3, 0x2
ldrsh r0, [r4, r3]
movs r2, 0x6
ldrsh r1, [r4, r2]
bl sub_808411C
bl DungeonRandomRange
adds r6, r0, 0
movs r0, 0x4
bl DungeonRandomCapped
@ -4474,11 +4474,11 @@ _0804D352:
_0804D35A:
movs r0, 0x5
adds r1, r4, 0
bl sub_808411C
bl DungeonRandomRange
adds r6, r0, 0
movs r0, 0x4
mov r1, r8
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
movs r1, 0x1
adds r0, r6, 0
@ -4663,14 +4663,14 @@ _0804D4BA:
adds r1, r5, r4
subs r1, r3
str r2, [sp, 0x30]
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
ldr r1, [sp, 0x18]
adds r0, r1, r6
add r1, r8
ldr r2, [sp, 0x30]
subs r1, r2
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
strh r5, [r7]
adds r0, r5, 0x1
@ -5398,7 +5398,7 @@ _0804D9E0:
movs r3, 0x4
ldrsh r1, [r4, r3]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
mov r9, r0
movs r1, 0x2
ldrsh r0, [r4, r1]
@ -5406,7 +5406,7 @@ _0804D9E0:
movs r2, 0x6
ldrsh r1, [r4, r2]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
b _0804DA1A
.align 2, 0
@ -5433,7 +5433,7 @@ _0804DA1A:
movs r3, 0x4
ldrsh r1, [r6, r3]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r2, r0, 0
b _0804DA44
_0804DA40:
@ -5481,7 +5481,7 @@ _0804DA74:
movs r2, 0x24
ldrsh r1, [r5, r2]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r2, r0, 0
b _0804DAA0
_0804DA9C:
@ -5530,7 +5530,7 @@ _0804DAD4:
movs r2, 0x6
ldrsh r1, [r7, r2]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r3, r0, 0
b _0804DAFE
_0804DAFA:
@ -5578,7 +5578,7 @@ _0804DB2E:
movs r3, 0x6
ldrsh r1, [r1, r3]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r3, r0, 0
b _0804DB5C
_0804DB56:
@ -7121,7 +7121,7 @@ _0804E63C:
movs r2, 0x4
ldrsh r1, [r4, r2]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
str r0, [sp, 0x24]
movs r3, 0x2
ldrsh r0, [r4, r3]
@ -7129,7 +7129,7 @@ _0804E63C:
movs r5, 0x6
ldrsh r1, [r4, r5]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
ldr r0, [sp, 0x20]
cmp r0, 0
@ -7153,7 +7153,7 @@ _0804E63C:
movs r2, 0x4
ldrsh r1, [r4, r2]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
movs r3, 0x2
ldrsh r0, [r4, r3]
@ -7161,7 +7161,7 @@ _0804E63C:
movs r2, 0x6
ldrsh r1, [r4, r2]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
b _0804E6AC
.align 2, 0
_0804E6A4: .4byte 0xfffffe20
@ -7217,7 +7217,7 @@ _0804E6DC:
movs r4, 0x24
ldrsh r1, [r6, r4]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
movs r1, 0x22
ldrsh r0, [r6, r1]
@ -7225,7 +7225,7 @@ _0804E6DC:
movs r2, 0x26
ldrsh r1, [r6, r2]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
b _0804E728
_0804E724:
movs r3, 0x20
@ -7276,14 +7276,14 @@ _0804E758:
movs r2, 0x4
ldrsh r1, [r7, r2]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
movs r3, 0x2
ldrsh r0, [r7, r3]
adds r0, 0x1
movs r4, 0x6
ldrsh r1, [r7, r4]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r3, r0, 0
b _0804E79E
_0804E79A:
@ -7335,7 +7335,7 @@ _0804E7C8:
movs r4, 0x4
ldrsh r1, [r2, r4]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
mov r1, r8
movs r2, 0x2
ldrsh r0, [r1, r2]
@ -7343,7 +7343,7 @@ _0804E7C8:
movs r3, 0x6
ldrsh r1, [r1, r3]
subs r1, 0x1
bl sub_808411C
bl DungeonRandomRange
adds r3, r0, 0
b _0804E818
_0804E812:
@ -9728,7 +9728,7 @@ _0804F9EC:
_0804F9FC:
adds r0, r2, 0x2
subs r1, r3, 0x3
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
movs r5, 0x2
ldrsh r0, [r7, r5]
@ -9736,7 +9736,7 @@ _0804F9FC:
movs r2, 0x6
ldrsh r1, [r7, r2]
subs r1, 0x3
bl sub_808411C
bl DungeonRandomRange
mov r10, r0
movs r3, 0
ldrsh r0, [r7, r3]
@ -9744,7 +9744,7 @@ _0804F9FC:
movs r5, 0x4
ldrsh r1, [r7, r5]
subs r1, 0x3
bl sub_808411C
bl DungeonRandomRange
mov r9, r0
movs r1, 0x2
ldrsh r0, [r7, r1]
@ -9752,7 +9752,7 @@ _0804F9FC:
movs r2, 0x6
ldrsh r1, [r7, r2]
subs r1, 0x3
bl sub_808411C
bl DungeonRandomRange
adds r6, r0, 0
ldr r1, _0804FA94
ldr r0, [r1]
@ -10631,7 +10631,7 @@ _08050092:
beq _080500FA
subs r0, r4, 0x2
adds r1, r4, 0x2
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
cmp r4, 0
bgt _080500BC
@ -10708,7 +10708,7 @@ _08050128:
beq _0805018E
subs r0, r4, 0x2
adds r1, r4, 0x2
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
cmp r4, 0
ble _0805018E
@ -10800,7 +10800,7 @@ _080501E4:
bl __divsi3
adds r1, r0, 0
adds r0, r4, 0
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
cmp r4, 0x5
bgt _08050208
@ -10933,7 +10933,7 @@ _080502F0:
mov r2, r10
ldrb r1, [r2, 0x10]
lsrs r0, r1, 1
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
cmp r4, 0
ble _08050356
@ -11107,7 +11107,7 @@ sub_8050438:
cmp r1, 0
ble _08050478
lsrs r0, r1, 1
bl sub_808411C
bl DungeonRandomRange
adds r7, r0, 0
cmp r7, 0
bgt _0805047A
@ -11346,7 +11346,7 @@ _08050608:
bl __divsi3
adds r1, r0, 0
adds r0, r5, 0
bl sub_808411C
bl DungeonRandomRange
adds r7, r0, 0
cmp r7, 0
bne _0805063E
@ -11495,7 +11495,7 @@ _08050746:
str r0, [sp, 0x78]
movs r0, 0x2
movs r1, 0x36
bl sub_808411C
bl DungeonRandomRange
mov r9, r0
movs r2, 0
str r2, [sp, 0x6C]
@ -11934,11 +11934,11 @@ _08050A98:
bgt _08050AC2
movs r0, 0
movs r1, 0x38
bl sub_808411C
bl DungeonRandomRange
mov r9, r0
movs r0, 0
movs r1, 0x20
bl sub_808411C
bl DungeonRandomRange
mov r8, r0
mov r0, r9
subs r0, 0x1
@ -12689,11 +12689,11 @@ _08051020:
beq _0805108C
adds r0, r3, 0
adds r1, r4, 0
bl sub_808411C
bl DungeonRandomRange
adds r6, r0, 0
adds r0, r5, 0
adds r1, r7, 0
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
movs r1, 0x1
adds r0, r6, 0
@ -12858,7 +12858,7 @@ _08051162:
adds r1, r5, r4
subs r1, r3
str r2, [sp, 0x34]
bl sub_808411C
bl DungeonRandomRange
adds r5, r0, 0
ldr r2, [sp, 0x34]
mov r1, r10
@ -12866,7 +12866,7 @@ _08051162:
adds r1, r7
mov r2, r8
subs r1, r2
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
strh r5, [r6]
adds r0, r5, 0x1
@ -13512,7 +13512,7 @@ sub_8051654:
subs r1, r0
subs r1, 0x2
movs r0, 0x3
bl sub_808411C
bl DungeonRandomRange
mov r8, r0
cmp r0, 0x2
bgt _0805167C
@ -13524,7 +13524,7 @@ _0805167C:
subs r1, r0
subs r1, 0x2
movs r0, 0x3
bl sub_808411C
bl DungeonRandomRange
mov r9, r0
cmp r0, 0x2
bgt _08051694
@ -13533,7 +13533,7 @@ _0805167C:
_08051694:
movs r0, 0x2
movs r1, 0x4
bl sub_808411C
bl DungeonRandomRange
mov r10, r0
movs r5, 0
cmp r5, r10

View File

@ -5694,7 +5694,7 @@ _080554E6:
b _08055530
_08055510:
mov r0, r8
bl sub_8057088
bl MoveCausesPaused
lsls r0, 24
cmp r0, 0
beq _08055530
@ -9149,41 +9149,4 @@ _08057060:
_0805706C: .4byte gUnknown_203B438
thumb_func_end sub_8056F80
thumb_func_start sub_8057070
sub_8057070:
push {lr}
bl GetMoveHitCount
cmp r0, 0
bne _08057082
movs r0, 0x2
movs r1, 0x6
bl sub_808411C
_08057082:
pop {r1}
bx r1
thumb_func_end sub_8057070
thumb_func_start sub_8057088
sub_8057088:
push {lr}
ldrh r1, [r0, 0x2]
cmp r1, 0xEE
beq _080570A4
cmp r1, 0xEF
beq _080570A4
cmp r1, 0xF2
beq _080570A4
movs r0, 0x88
lsls r0, 1
cmp r1, r0
beq _080570A4
movs r0, 0
b _080570A6
_080570A4:
movs r0, 0x1
_080570A6:
pop {r1}
bx r1
thumb_func_end sub_8057088
.align 2, 0
.align 2, 0

View File

@ -248,41 +248,4 @@ _08057302:
bx r1
thumb_func_end sub_805727C
thumb_func_start sub_8057308
sub_8057308:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
bl EntityExists
lsls r0, 24
cmp r0, 0
bne _0805731C
movs r0, 0
b _08057340
_0805731C:
cmp r4, 0
bne _08057324
movs r0, 0x1
b _08057340
_08057324:
adds r0, r5, 0
movs r1, 0x26
bl HasAbility
lsls r0, 24
cmp r0, 0
bne _08057336
adds r0, r4, 0
b _08057338
_08057336:
lsls r0, r4, 1
_08057338:
bl RollPercentChance_2
lsls r0, 24
lsrs r0, 24
_08057340:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8057308
.align 2, 0
.align 2, 0

View File

@ -2467,7 +2467,7 @@ sub_8058C48:
movs r1, 0xC0
lsls r1, 1
movs r0, 0x80
bl sub_808411C
bl DungeonRandomRange
adds r3, r0, 0
ldr r0, [r4, 0x70]
ldrb r0, [r0, 0x9]
@ -9928,49 +9928,4 @@ _0805C450:
_0805C458: .4byte gUnknown_80FF678
thumb_func_end sub_805C3F8
thumb_func_start sub_805C45C
sub_805C45C:
push {lr}
bl sub_807F43C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C45C
thumb_func_start sub_805C468
sub_805C468:
push {lr}
bl sub_8078F50
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C468
thumb_func_start sub_805C474
sub_805C474:
push {lr}
bl sub_8077E4C
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C474
thumb_func_start sub_805C480
sub_805C480:
push {lr}
bl sub_8079570
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C480
thumb_func_start sub_805C48C
sub_805C48C:
push {lr}
bl sub_80795C4
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_805C48C
.align 2, 0
.align 2, 0

View File

@ -7237,7 +7237,7 @@ _0807ACB4:
ldr r1, _0807AD78
movs r4, 0
ldrsh r1, [r1, r4]
bl sub_808411C
bl DungeonRandomRange
adds r7, r0, 0
cmp r7, r8
blt _0807ACCC
@ -9183,4 +9183,4 @@ sub_807BB78:
bx lr
thumb_func_end sub_807BB78
.align 2, 0
.align 2, 0

View File

@ -2004,7 +2004,7 @@ _0807F64E:
_0807F654:
ldr r0, [r4]
ldr r1, [r4, 0x8]
bl sub_808411C
bl DungeonRandomRange
lsls r0, 16
lsrs r0, 16
ldr r2, _0807F6A0
@ -2014,7 +2014,7 @@ _0807F654:
str r1, [r6]
ldr r0, [r4, 0x4]
ldr r1, [r4, 0xC]
bl sub_808411C
bl DungeonRandomRange
lsls r0, 16
ldrh r1, [r6]
orrs r1, r0

View File

@ -1,31 +0,0 @@
#include "asm/constants/gba_constants.inc"
#include "asm/macros.inc"
.syntax unified
.text
thumb_func_start sub_808411C
sub_808411C:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
cmp r5, r4
beq _0808413C
cmp r5, r4
blt _08084134
subs r0, r5, r4
bl DungeonRandomCapped
adds r0, r4
b _0808413C
_08084134:
subs r0, r4, r5
bl DungeonRandomCapped
adds r0, r5
_0808413C:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_808411C
.align 2, 0

View File

@ -15,7 +15,7 @@ sub_808417C:
ldrsh r0, [r1, r2]
movs r2, 0x2
ldrsh r1, [r1, r2]
bl sub_808411C
bl DungeonRandomRange
adds r4, r0, 0
adds r0, r5, 0
bl EntityExists

View File

@ -3,5 +3,7 @@
s32 DungeonRandom(void);
s32 DungeonRandomCapped(s32 cap);
s32 DungeonRandomRange(s32 low, s32 high);
bool8 RollPercentChance(s32 percentChance);
bool8 RollPercentChance_2(s32 percentChance);
#endif

View File

@ -1,6 +0,0 @@
#ifndef GUARD_DUNGEON_RANDOM_1_H
#define GUARD_DUNGEON_RANDOM_1_H
bool8 RollPercentChance(s32 percentChance);
#endif

View File

@ -12,7 +12,7 @@ void InitZeroedPPPokemonMove(struct PokemonMove *move, u16 moveID);
s16 GetMoveTargetingFlags(struct PokemonMove *move, u32 isAI);
u8 GetMoveType(struct PokemonMove *move);
u8 GetMoveWeight(struct PokemonMove *move);
u8 GetMoveHitCount(struct PokemonMove *move);
u32 GetMoveHitCount(struct PokemonMove *move);
s32 GetMovePower(struct PokemonMove *move);
s32 GetMoveAccuracy(struct PokemonMove *move, u32 accuracyType);
u32 GetMoveMaxPP(struct PokemonMove *move);

View File

@ -258,8 +258,6 @@ SECTIONS {
src/dungeon_range.o(.text);
asm/code_808333C.o(.text);
src/dungeon_random.o(.text);
asm/code_808411C.o(.text);
src/dungeon_random_1.o(.text);
asm/code_808417C.o(.text);
src/code_80848F0.o(.text);
asm/code_80848F0.o(.text);

View File

@ -3,7 +3,9 @@
#include "constants/move_id.h"
#include "constants/status.h"
#include "dungeon_random.h"
#include "dungeon_util.h"
#include "moves.h"
struct MultiTurnChargeMove
{
@ -39,6 +41,26 @@ const u32 gMultiTurnChargingStatuses[10] = {
ALIGNED(4) const char chargingStatusFill[] = "pksdir0";
u32 sub_8057070(struct PokemonMove *move)
{
u32 hitCount;
hitCount = GetMoveHitCount(move);
if(hitCount == 0)
return DungeonRandomRange(2, 6);
else
return hitCount;
}
bool8 MoveCausesPaused(struct PokemonMove *move)
{
if(move->moveID == MOVE_FRENZY_PLANT) return TRUE;
if(move->moveID == MOVE_HYDRO_CANNON) return TRUE;
if(move->moveID == MOVE_HYPER_BEAM) return TRUE;
if(move->moveID == MOVE_BLAST_BURN) return TRUE;
return FALSE;
}
bool8 MoveMatchesChargingStatus(struct DungeonEntity *pokemon, struct PokemonMove *move)
{
if (!EntityExists(pokemon))
@ -99,4 +121,4 @@ bool8 IsCharging(struct DungeonEntity *pokemon, bool8 checkCharge)
}
return FALSE;
}
}
}

View File

@ -19,7 +19,6 @@
#include "dungeon_map_access.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_random.h"
#include "dungeon_random_1.h"
#include "dungeon_util.h"
#include "dungeon_visibility.h"
#include "move_util.h"

View File

@ -17,7 +17,6 @@
#include "dungeon_map_access.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_random.h"
#include "dungeon_random_1.h"
#include "dungeon_util.h"
#include "dungeon_visibility.h"
#include "item.h"

View File

@ -18,3 +18,36 @@ s32 DungeonRandomCapped(s32 cap)
{
return (((DungeonRandom() & 0xFFFF) * cap) >> 16) & 0xFFFF;
}
s32 DungeonRandomRange(s32 low, s32 high)
{
if(low == high)
return low;
else if(low < high)
{
return (DungeonRandomCapped(high - low) + low);
}
else
{
return (DungeonRandomCapped(low - high) + high);
}
}
bool8 RollPercentChance(s32 percentChance)
{
if (DungeonRandomCapped(100) < percentChance)
{
return TRUE;
}
return FALSE;
}
bool8 RollPercentChance_2(s32 percentChance)
{
if (DungeonRandomCapped(100) < percentChance)
{
return TRUE;
}
return FALSE;
}

View File

@ -1,22 +0,0 @@
#include "global.h"
#include "dungeon_random_1.h"
#include "dungeon_random.h"
bool8 RollPercentChance(s32 percentChance)
{
if (DungeonRandomCapped(100) < percentChance)
{
return TRUE;
}
return FALSE;
}
bool8 RollPercentChance_2(s32 percentChance)
{
if (DungeonRandomCapped(100) < percentChance)
{
return TRUE;
}
return FALSE;
}

View File

@ -1,9 +1,25 @@
#include "global.h"
#include "move_util.h"
#include "constants/ability.h"
#include "constants/move_id.h"
#include "constants/status.h"
#include "moves.h"
#include "dungeon_util.h"
#include "dungeon_pokemon_attributes.h"
#include "dungeon_random.h"
bool8 sub_8057308(struct DungeonEntity *pokemon, s32 chance)
{
if(!EntityExists(pokemon))
return FALSE;
if(chance == 0)
return TRUE;
if(HasAbility(pokemon, ABILITY_SERENE_GRACE))
return RollPercentChance_2(chance * 2);
else
return RollPercentChance_2(chance);
}
bool8 IsMoveIndexUsable(struct DungeonEntity *pokemon, s32 moveIndex, bool8 hasPPChecker)
{

View File

@ -240,7 +240,7 @@ u8 GetMoveWeight(struct PokemonMove *move)
return gMovesData[move->moveID].weight;
}
u8 GetMoveHitCount(struct PokemonMove *move)
u32 GetMoveHitCount(struct PokemonMove *move)
{
return gMovesData[move->moveID].hitCount;
}

View File

@ -18,6 +18,12 @@
#include "trap.h"
#include "weather.h"
extern void sub_807F43C(struct DungeonEntity *, struct DungeonEntity *);
extern void sub_8078F50(struct DungeonEntity *, struct DungeonEntity *);
extern void sub_8077E4C(struct DungeonEntity *, struct DungeonEntity *);
extern void sub_8079570(struct DungeonEntity *, struct DungeonEntity *);
extern void sub_80795C4(struct DungeonEntity *, struct DungeonEntity *);
// Array indices correspond to the current dungeon tileset.
const u8 gDungeonCamouflageTypes[76] = {
TYPE_WATER,
@ -98,6 +104,36 @@ const u8 gDungeonCamouflageTypes[76] = {
TYPE_ROCK
};
bool8 sub_805C45C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
{
sub_807F43C(pokemon, target);
return TRUE;
}
bool8 sub_805C468(struct DungeonEntity *pokemon, struct DungeonEntity *target)
{
sub_8078F50(pokemon, target);
return TRUE;
}
bool8 sub_805C474(struct DungeonEntity *pokemon, struct DungeonEntity *target)
{
sub_8077E4C(pokemon, target);
return TRUE;
}
bool8 sub_805C480(struct DungeonEntity *pokemon, struct DungeonEntity *target)
{
sub_8079570(pokemon, target);
return TRUE;
}
bool8 sub_805C48C(struct DungeonEntity *pokemon, struct DungeonEntity *target)
{
sub_80795C4(pokemon, target);
return TRUE;
}
bool8 CanUseOnSelfWithStatusChecker(struct DungeonEntity *pokemon, struct PokemonMove *move)
{
struct DungeonEntityData *pokemonData = pokemon->entityData;