mirror of
https://github.com/pret/pmd-red.git
synced 2026-04-24 15:07:09 -05:00
Match sub_8070BC0
This commit is contained in:
parent
b2b62e9705
commit
2c3f95abb6
|
|
@ -1,91 +0,0 @@
|
|||
#include "asm/constants/gba_constants.inc"
|
||||
#include "asm/macros.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_8070BC0
|
||||
sub_8070BC0:
|
||||
push {r4-r6,lr}
|
||||
adds r4, r0, 0
|
||||
ldr r5, [r4, 0x70]
|
||||
movs r1, 0
|
||||
bl IsCharging
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08070C56
|
||||
adds r6, r5, 0
|
||||
adds r6, 0xA8
|
||||
ldrb r0, [r6]
|
||||
cmp r0, 0x4
|
||||
beq _08070C56
|
||||
cmp r0, 0x3
|
||||
beq _08070C56
|
||||
adds r0, r4, 0
|
||||
bl ShouldMonsterRunAway
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08070C56
|
||||
adds r0, r5, 0
|
||||
adds r0, 0xEC
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
beq _08070C56
|
||||
adds r0, r5, 0
|
||||
adds r0, 0xB0
|
||||
ldrb r1, [r0]
|
||||
cmp r1, 0x6
|
||||
beq _08070C56
|
||||
cmp r1, 0x1
|
||||
beq _08070C56
|
||||
adds r0, r5, 0
|
||||
adds r0, 0xBC
|
||||
ldrb r3, [r0]
|
||||
adds r4, r0, 0
|
||||
cmp r3, 0x2
|
||||
beq _08070C56
|
||||
ldrb r2, [r6]
|
||||
cmp r2, 0x1
|
||||
beq _08070C56
|
||||
adds r0, r5, 0
|
||||
adds r0, 0xE4
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x1
|
||||
beq _08070C56
|
||||
cmp r2, 0x5
|
||||
beq _08070C56
|
||||
cmp r3, 0x1
|
||||
beq _08070C56
|
||||
cmp r1, 0x3
|
||||
beq _08070C56
|
||||
cmp r1, 0x4
|
||||
beq _08070C56
|
||||
adds r0, r5, 0
|
||||
adds r0, 0xE8
|
||||
ldrb r1, [r0]
|
||||
cmp r1, 0x2
|
||||
beq _08070C56
|
||||
adds r0, r5, 0
|
||||
adds r0, 0xC8
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x2
|
||||
beq _08070C56
|
||||
cmp r1, 0x1
|
||||
beq _08070C56
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0x7
|
||||
beq _08070C56
|
||||
cmp r0, 0x3
|
||||
beq _08070C56
|
||||
movs r0, 0x1
|
||||
b _08070C58
|
||||
_08070C56:
|
||||
movs r0, 0
|
||||
_08070C58:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_8070BC0
|
||||
|
||||
.align 2, 0
|
||||
|
|
@ -4,5 +4,6 @@
|
|||
#include "dungeon_entity.h"
|
||||
|
||||
bool8 CannotMove(struct Entity *pokemon, bool8 checkBlinker);
|
||||
bool8 sub_8070BC0(struct Entity* entity);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -230,7 +230,6 @@ SECTIONS {
|
|||
src/dungeon_movement.o(.text);
|
||||
src/status_checks_1.o(.text);
|
||||
src/dungeon_capabilities.o(.text);
|
||||
asm/code_8070BC0.o(.text);
|
||||
src/dungeon_capabilities_1.o(.text);
|
||||
src/dungeon_ai_targeting.o(.text);
|
||||
src/dungeon_pokemon_attributes.o(.text);
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@
|
|||
#include "dungeon_capabilities.h"
|
||||
|
||||
#include "constants/status.h"
|
||||
#include "charge_move.h"
|
||||
#include "dungeon_ai_targeting.h"
|
||||
|
||||
bool8 CannotMove(struct Entity *pokemon, bool8 checkBlinker)
|
||||
{
|
||||
struct EntityInfo *pokemonInfo = pokemon->info;
|
||||
|
||||
if ((checkBlinker && pokemonInfo->eyesightStatus == STATUS_BLINKER)
|
||||
|| pokemonInfo->sleep == STATUS_SLEEP
|
||||
|| pokemonInfo->sleep == STATUS_NAPPING
|
||||
|
|
@ -13,13 +16,48 @@ bool8 CannotMove(struct Entity *pokemon, bool8 checkBlinker)
|
|||
|| pokemonInfo->volatileStatus == STATUS_PAUSED
|
||||
|| pokemonInfo->volatileStatus == STATUS_INFATUATED
|
||||
|| pokemonInfo->immobilizeStatus == STATUS_PETRIFIED)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (pokemonInfo->terrifiedTurns != 0)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 sub_8070BC0(struct Entity* entity)
|
||||
{
|
||||
struct EntityInfo *entityInfo = entity->info;
|
||||
|
||||
if (IsCharging(entity, FALSE)
|
||||
|| entityInfo->sleep == STATUS_YAWNING
|
||||
|| entityInfo->sleep == STATUS_NIGHTMARE
|
||||
|| ShouldMonsterRunAway(entity)
|
||||
|| entityInfo->muzzled == TRUE
|
||||
|| entityInfo->immobilizeStatus == STATUS_PETRIFIED
|
||||
|| entityInfo->immobilizeStatus == STATUS_FROZEN)
|
||||
return FALSE;
|
||||
|
||||
if (entityInfo->volatileStatus == STATUS_CONFUSED)
|
||||
return FALSE;
|
||||
if (entityInfo->sleep == STATUS_SLEEP)
|
||||
return FALSE;
|
||||
if (entityInfo->transformStatus == STATUS_INVISIBLE
|
||||
|| entityInfo->sleep == STATUS_NAPPING)
|
||||
return FALSE;
|
||||
if (entityInfo->volatileStatus == STATUS_CRINGE)
|
||||
return FALSE;
|
||||
if (entityInfo->immobilizeStatus == STATUS_WRAP)
|
||||
return FALSE;
|
||||
if (entityInfo->immobilizeStatus == STATUS_WRAPPED
|
||||
|| entityInfo->eyesightStatus == STATUS_CROSS_EYED)
|
||||
return FALSE;
|
||||
if (entityInfo->waitingStatus == STATUS_DECOY)
|
||||
return FALSE;
|
||||
if (entityInfo->eyesightStatus == STATUS_BLINKER)
|
||||
return FALSE;
|
||||
if (entityInfo->volatileStatus != STATUS_INFATUATED
|
||||
&& entityInfo->volatileStatus != STATUS_PAUSED)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user