-
-
Save Lusamine/f9f31109e59dab27207dbb4abb54acb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool __fastcall Dpr_Battle_Logic_Safari__IsCritDoroEsa( | |
Dpr_Battle_Logic_MainModule_o *mainModule, | |
const MethodInfo *method) | |
{ | |
if ( (byte_7104ED7A11 & 1) == 0 ) | |
{ | |
sub_710009AD20(29982LL); | |
byte_7104ED7A11 = 1; | |
} | |
if ( (Dpr_Battle_Logic_calc_TypeInfo->_2.bitflags2 & 2) != 0 && !Dpr_Battle_Logic_calc_TypeInfo->_2.cctor_finished ) | |
sub_710009AE30((__int64)Dpr_Battle_Logic_calc_TypeInfo); | |
return Dpr_Battle_Logic_calc__GetRand(10u, 0LL) == 0; | |
} | |
----- | |
.text.1:0000007102507B20 ; bool __fastcall Dpr_Battle_Logic_Safari__IsCritDoroEsa(Dpr_Battle_Logic_MainModule_o *mainModule, const MethodInfo *method) | |
.text.1:0000007102507B20 Dpr.Battle.Logic.Safari$$IsCritDoroEsa ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwEsa+68↓p | |
.text.1:0000007102507B20 ; Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwDoro+64↓p ... | |
.text.1:0000007102507B20 | |
.text.1:0000007102507B20 var_10 = -0x10 | |
.text.1:0000007102507B20 var_s0 = 0 | |
.text.1:0000007102507B20 | |
.text.1:0000007102507B20 STR X19, [SP,#-0x10+var_10]! | |
.text.1:0000007102507B24 STP X29, X30, [SP,#0x10+var_s0] | |
.text.1:0000007102507B28 ADD X29, SP, #0x10 | |
.text.1:0000007102507B2C ADRP X19, #byte_7104ED7A11@PAGE | |
.text.1:0000007102507B30 LDRB W8, [X19,#byte_7104ED7A11@PAGEOFF] | |
.text.1:0000007102507B34 TBNZ W8, #0, loc_7102507B50 | |
.text.1:0000007102507B38 ADRP X8, #off_7104C014D8@PAGE | |
.text.1:0000007102507B3C LDR X8, [X8,#off_7104C014D8@PAGEOFF] | |
.text.1:0000007102507B40 LDR W0, [X8] | |
.text.1:0000007102507B44 BL sub_710009AD20 | |
.text.1:0000007102507B48 MOV W8, #1 | |
.text.1:0000007102507B4C STRB W8, [X19,#byte_7104ED7A11@PAGEOFF] | |
.text.1:0000007102507B50 | |
.text.1:0000007102507B50 loc_7102507B50 ; CODE XREF: Dpr.Battle.Logic.Safari$$IsCritDoroEsa+14↑j | |
.text.1:0000007102507B50 ADRP X8, #off_7104BA54B0@PAGE | |
.text.1:0000007102507B54 LDR X8, [X8,#off_7104BA54B0@PAGEOFF] | |
.text.1:0000007102507B58 LDR X0, [X8] ; Dpr.Battle.Logic.calc_TypeInfo | |
.text.1:0000007102507B5C LDRB W8, [X0,#0x12F] | |
.text.1:0000007102507B60 TBZ W8, #1, loc_7102507B70 | |
.text.1:0000007102507B64 LDR W8, [X0,#0xE0] | |
.text.1:0000007102507B68 CBNZ W8, loc_7102507B70 | |
.text.1:0000007102507B6C BL sub_710009AE30 | |
.text.1:0000007102507B70 | |
.text.1:0000007102507B70 loc_7102507B70 ; CODE XREF: Dpr.Battle.Logic.Safari$$IsCritDoroEsa+40↑j | |
.text.1:0000007102507B70 ; Dpr.Battle.Logic.Safari$$IsCritDoroEsa+48↑j | |
.text.1:0000007102507B70 MOV W0, #0xA ; range | |
.text.1:0000007102507B74 MOV X1, XZR ; method | |
.text.1:0000007102507B78 BL Dpr.Battle.Logic.calc$$GetRand | |
.text.1:0000007102507B7C LDP X29, X30, [SP,#0x10+var_s0] | |
.text.1:0000007102507B80 CMP W0, #0 | |
.text.1:0000007102507B84 CSET W0, EQ | |
.text.1:0000007102507B88 LDR X19, [SP+0x10+var_10],#0x20 | |
.text.1:0000007102507B8C RET | |
.text.1:0000007102507B8C ; End of function Dpr.Battle.Logic.Safari$$IsCritDoroEsa | |
----- | |
bool __fastcall Dpr_Battle_Logic_Safari__JudgeSafariEscape( | |
int32_t monsNo, | |
int32_t formNo, | |
int32_t escape_count, | |
const MethodInfo *method) | |
{ | |
int32_t EscapeRatio; // w19 | |
if ( (byte_7104ED7A0F & 1) == 0 ) | |
{ | |
sub_710009AD20(29983LL); | |
byte_7104ED7A0F = 1; | |
} | |
if ( (Dpr_Battle_Logic_Safari_TypeInfo->_2.bitflags2 & 2) != 0 && !Dpr_Battle_Logic_Safari_TypeInfo->_2.cctor_finished ) | |
sub_710009AE30((__int64)Dpr_Battle_Logic_Safari_TypeInfo); | |
EscapeRatio = Dpr_Battle_Logic_Safari__GetEscapeRatio(monsNo, formNo, escape_count, method); | |
if ( (Dpr_Battle_Logic_calc_TypeInfo->_2.bitflags2 & 2) != 0 && !Dpr_Battle_Logic_calc_TypeInfo->_2.cctor_finished ) | |
sub_710009AE30((__int64)Dpr_Battle_Logic_calc_TypeInfo); | |
return Dpr_Battle_Logic_calc__GetRand(255u, 0LL) <= (__int64)EscapeRatio; | |
} | |
----- | |
.text.1:00000071025077E0 ; bool __fastcall Dpr_Battle_Logic_Safari__JudgeSafariEscape(int32_t monsNo, int32_t formNo, int32_t escape_count, const MethodInfo *method) | |
.text.1:00000071025077E0 Dpr.Battle.Logic.Safari$$JudgeSafariEscape | |
.text.1:00000071025077E0 ; CODE XREF: Dpr.Battle.Logic.BTL_CLIENT$$buildActionParam_Safari+A0↑p | |
.text.1:00000071025077E0 ; DATA XREF: .data:0000007104999B10↓o | |
.text.1:00000071025077E0 | |
.text.1:00000071025077E0 var_20 = -0x20 | |
.text.1:00000071025077E0 var_10 = -0x10 | |
.text.1:00000071025077E0 var_s0 = 0 | |
.text.1:00000071025077E0 | |
.text.1:00000071025077E0 STP X22, X21, [SP,#-0x10+var_20]! | |
.text.1:00000071025077E4 STP X20, X19, [SP,#0x20+var_10] | |
.text.1:00000071025077E8 STP X29, X30, [SP,#0x20+var_s0] | |
.text.1:00000071025077EC ADD X29, SP, #0x20 | |
.text.1:00000071025077F0 ADRP X22, #byte_7104ED7A0F@PAGE | |
.text.1:00000071025077F4 LDRB W8, [X22,#byte_7104ED7A0F@PAGEOFF] | |
.text.1:00000071025077F8 MOV W19, W2 | |
.text.1:00000071025077FC MOV W20, W1 | |
.text.1:0000007102507800 MOV W21, W0 | |
.text.1:0000007102507804 TBNZ W8, #0, loc_7102507820 | |
.text.1:0000007102507808 ADRP X8, #off_7104C014B8@PAGE | |
.text.1:000000710250780C LDR X8, [X8,#off_7104C014B8@PAGEOFF] | |
.text.1:0000007102507810 LDR W0, [X8] | |
.text.1:0000007102507814 BL sub_710009AD20 | |
.text.1:0000007102507818 MOV W8, #1 | |
.text.1:000000710250781C STRB W8, [X22,#byte_7104ED7A0F@PAGEOFF] | |
.text.1:0000007102507820 | |
.text.1:0000007102507820 loc_7102507820 ; CODE XREF: Dpr.Battle.Logic.Safari$$JudgeSafariEscape+24↑j | |
.text.1:0000007102507820 ADRP X8, #off_7104BDE9B8@PAGE | |
.text.1:0000007102507824 LDR X8, [X8,#off_7104BDE9B8@PAGEOFF] | |
.text.1:0000007102507828 LDR X0, [X8] ; Dpr.Battle.Logic.Safari_TypeInfo | |
.text.1:000000710250782C LDRB W8, [X0,#0x12F] | |
.text.1:0000007102507830 TBZ W8, #1, loc_7102507840 | |
.text.1:0000007102507834 LDR W8, [X0,#0xE0] | |
.text.1:0000007102507838 CBNZ W8, loc_7102507840 | |
.text.1:000000710250783C BL sub_710009AE30 | |
.text.1:0000007102507840 | |
.text.1:0000007102507840 loc_7102507840 ; CODE XREF: Dpr.Battle.Logic.Safari$$JudgeSafariEscape+50↑j | |
.text.1:0000007102507840 ; Dpr.Battle.Logic.Safari$$JudgeSafariEscape+58↑j | |
.text.1:0000007102507840 MOV W0, W21 ; monsNo | |
.text.1:0000007102507844 MOV W1, W20 ; formNo | |
.text.1:0000007102507848 MOV W2, W19 ; escape_count | |
.text.1:000000710250784C BL Dpr.Battle.Logic.Safari$$GetEscapeRatio | |
.text.1:0000007102507850 ADRP X8, #off_7104BA54B0@PAGE | |
.text.1:0000007102507854 LDR X8, [X8,#off_7104BA54B0@PAGEOFF] | |
.text.1:0000007102507858 MOV W19, W0 | |
.text.1:000000710250785C LDR X0, [X8] ; Dpr.Battle.Logic.calc_TypeInfo | |
.text.1:0000007102507860 LDRB W8, [X0,#0x12F] | |
.text.1:0000007102507864 TBZ W8, #1, loc_7102507874 | |
.text.1:0000007102507868 LDR W8, [X0,#0xE0] | |
.text.1:000000710250786C CBNZ W8, loc_7102507874 | |
.text.1:0000007102507870 BL sub_710009AE30 | |
.text.1:0000007102507874 | |
.text.1:0000007102507874 loc_7102507874 ; CODE XREF: Dpr.Battle.Logic.Safari$$JudgeSafariEscape+84↑j | |
.text.1:0000007102507874 ; Dpr.Battle.Logic.Safari$$JudgeSafariEscape+8C↑j | |
.text.1:0000007102507874 MOV W0, #0xFF ; range | |
.text.1:0000007102507878 MOV X1, XZR ; method | |
.text.1:000000710250787C BL Dpr.Battle.Logic.calc$$GetRand | |
.text.1:0000007102507880 MOV W8, W0 | |
.text.1:0000007102507884 CMP X8, W19,SXTW | |
.text.1:0000007102507888 CSET W0, LE | |
.text.1:000000710250788C LDP X29, X30, [SP,#0x20+var_s0] | |
.text.1:0000007102507890 LDP X20, X19, [SP,#0x20+var_10] | |
.text.1:0000007102507894 LDP X22, X21, [SP+0x20+var_20],#0x30 | |
.text.1:0000007102507898 RET | |
.text.1:0000007102507898 ; --------------------------------------------------------------------------- | |
.text.1:000000710250789C ALIGN 0x20 | |
.text.1:000000710250789C ; End of function Dpr.Battle.Logic.Safari$$JudgeSafariEscape | |
----- | |
void __fastcall Dpr_Battle_Logic_Section_Root_ProcessActions_Safari__throwEsa( | |
Dpr_Battle_Logic_Section_Root_ProcessActions_Safari_o *this, | |
uint8_t pokeID, | |
const MethodInfo *method) | |
{ | |
Dpr_Battle_Logic_MainModule_o *m_pMainModule; // x21 | |
bool IsCritDoroEsa; // w21 | |
uint8_t v7; // w3 | |
if ( (byte_7104ED8147 & 1) == 0 ) | |
{ | |
sub_710009AD20(30912LL); | |
byte_7104ED8147 = 1; | |
} | |
m_pMainModule = this->fields.m_pMainModule; | |
if ( (Dpr_Battle_Logic_Safari_TypeInfo->_2.bitflags2 & 2) != 0 && !Dpr_Battle_Logic_Safari_TypeInfo->_2.cctor_finished ) | |
sub_710009AE30((__int64)Dpr_Battle_Logic_Safari_TypeInfo); | |
IsCritDoroEsa = Dpr_Battle_Logic_Safari__IsCritDoroEsa(m_pMainModule, 0LL); | |
Dpr_Battle_Logic_ServerCommandPutter__IncBattleCount(this->fields.m_pServerCmdPutter, 2u, 0LL); | |
if ( IsCritDoroEsa ) | |
{ | |
v7 = 1; | |
} | |
else | |
{ | |
Dpr_Battle_Logic_ServerCommandPutter__IncBattleCount(this->fields.m_pServerCmdPutter, 3u, 0LL); | |
v7 = 0; | |
} | |
Dpr_Battle_Logic_ServerCommandPutter__SafariAct(this->fields.m_pServerCmdPutter, pokeID, 0, v7, 0LL); | |
} | |
----- | |
.text.1:00000071025CD510 ; void __fastcall Dpr_Battle_Logic_Section_Root_ProcessActions_Safari__throwEsa(Dpr_Battle_Logic_Section_Root_ProcessActions_Safari_o *this, uint8_t pokeID, const MethodInfo *method) | |
.text.1:00000071025CD510 Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwEsa | |
.text.1:00000071025CD510 ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$processPlayer+D8↑p | |
.text.1:00000071025CD510 ; DATA XREF: .data:0000007104996908↓o | |
.text.1:00000071025CD510 | |
.text.1:00000071025CD510 var_20 = -0x20 | |
.text.1:00000071025CD510 var_10 = -0x10 | |
.text.1:00000071025CD510 var_s0 = 0 | |
.text.1:00000071025CD510 | |
.text.1:00000071025CD510 STR X21, [SP,#-0x10+var_20]! | |
.text.1:00000071025CD514 STP X20, X19, [SP,#0x20+var_10] | |
.text.1:00000071025CD518 STP X29, X30, [SP,#0x20+var_s0] | |
.text.1:00000071025CD51C ADD X29, SP, #0x20 | |
.text.1:00000071025CD520 ADRP X21, #byte_7104ED8147@PAGE | |
.text.1:00000071025CD524 LDRB W8, [X21,#byte_7104ED8147@PAGEOFF] | |
.text.1:00000071025CD528 MOV W19, W1 | |
.text.1:00000071025CD52C MOV X20, X0 | |
.text.1:00000071025CD530 TBNZ W8, #0, loc_71025CD54C | |
.text.1:00000071025CD534 ADRP X8, #off_7104C083F8@PAGE | |
.text.1:00000071025CD538 LDR X8, [X8,#off_7104C083F8@PAGEOFF] | |
.text.1:00000071025CD53C LDR W0, [X8] | |
.text.1:00000071025CD540 BL sub_710009AD20 | |
.text.1:00000071025CD544 MOV W8, #1 | |
.text.1:00000071025CD548 STRB W8, [X21,#byte_7104ED8147@PAGEOFF] | |
.text.1:00000071025CD54C | |
.text.1:00000071025CD54C loc_71025CD54C ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwEsa+20↑j | |
.text.1:00000071025CD54C ADRP X8, #off_7104BDE9B8@PAGE | |
.text.1:00000071025CD550 LDR X8, [X8,#off_7104BDE9B8@PAGEOFF] | |
.text.1:00000071025CD554 LDR X0, [X8] ; Dpr.Battle.Logic.Safari_TypeInfo | |
.text.1:00000071025CD558 LDR X21, [X20,#0x10] | |
.text.1:00000071025CD55C LDRB W8, [X0,#0x12F] | |
.text.1:00000071025CD560 TBZ W8, #1, loc_71025CD570 | |
.text.1:00000071025CD564 LDR W8, [X0,#0xE0] | |
.text.1:00000071025CD568 CBNZ W8, loc_71025CD570 | |
.text.1:00000071025CD56C BL sub_710009AE30 | |
.text.1:00000071025CD570 | |
.text.1:00000071025CD570 loc_71025CD570 ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwEsa+50↑j | |
.text.1:00000071025CD570 ; Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwEsa+58↑j | |
.text.1:00000071025CD570 MOV X0, X21 ; mainModule | |
.text.1:00000071025CD574 MOV X1, XZR ; method | |
.text.1:00000071025CD578 BL Dpr.Battle.Logic.Safari$$IsCritDoroEsa | |
.text.1:00000071025CD57C MOV W21, W0 | |
.text.1:00000071025CD580 LDR X0, [X20,#0x28] ; this | |
.text.1:00000071025CD584 MOV W1, #2 ; counterID | |
.text.1:00000071025CD588 MOV X2, XZR ; method | |
.text.1:00000071025CD58C BL Dpr.Battle.Logic.ServerCommandPutter$$IncBattleCount | |
.text.1:00000071025CD590 TBZ W21, #0, loc_71025CD59C | |
.text.1:00000071025CD594 MOV W3, #1 | |
.text.1:00000071025CD598 B loc_71025CD5B0 | |
.text.1:00000071025CD59C ; --------------------------------------------------------------------------- | |
.text.1:00000071025CD59C | |
.text.1:00000071025CD59C loc_71025CD59C ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwEsa+80↑j | |
.text.1:00000071025CD59C LDR X0, [X20,#0x28] ; this | |
.text.1:00000071025CD5A0 MOV W1, #3 ; counterID | |
.text.1:00000071025CD5A4 MOV X2, XZR ; method | |
.text.1:00000071025CD5A8 BL Dpr.Battle.Logic.ServerCommandPutter$$IncBattleCount | |
.text.1:00000071025CD5AC MOV W3, WZR ; param1 | |
.text.1:00000071025CD5B0 | |
.text.1:00000071025CD5B0 loc_71025CD5B0 ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwEsa+88↑j | |
.text.1:00000071025CD5B0 LDR X0, [X20,#0x28] ; this | |
.text.1:00000071025CD5B4 MOV W1, W19 ; pokeID | |
.text.1:00000071025CD5B8 MOV W2, WZR ; param0 | |
.text.1:00000071025CD5BC LDP X29, X30, [SP,#0x20+var_s0] | |
.text.1:00000071025CD5C0 MOV X4, XZR ; method | |
.text.1:00000071025CD5C4 LDP X20, X19, [SP,#0x20+var_10] | |
.text.1:00000071025CD5C8 LDR X21, [SP+0x20+var_20],#0x30 | |
.text.1:00000071025CD5CC B Dpr.Battle.Logic.ServerCommandPutter$$SafariAct | |
.text.1:00000071025CD5CC ; End of function Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwEsa | |
----- | |
void __fastcall Dpr_Battle_Logic_Section_Root_ProcessActions_Safari__throwDoro( | |
Dpr_Battle_Logic_Section_Root_ProcessActions_Safari_o *this, | |
uint8_t pokeID, | |
const MethodInfo *method) | |
{ | |
Dpr_Battle_Logic_MainModule_o *m_pMainModule; // x21 | |
uint8_t v6; // w21 | |
if ( (byte_7104ED8148 & 1) == 0 ) | |
{ | |
sub_710009AD20(30911LL); | |
byte_7104ED8148 = 1; | |
} | |
m_pMainModule = this->fields.m_pMainModule; | |
if ( (Dpr_Battle_Logic_Safari_TypeInfo->_2.bitflags2 & 2) != 0 && !Dpr_Battle_Logic_Safari_TypeInfo->_2.cctor_finished ) | |
{ | |
sub_710009AE30((__int64)Dpr_Battle_Logic_Safari_TypeInfo); | |
if ( Dpr_Battle_Logic_Safari__IsCritDoroEsa(m_pMainModule, 0LL) ) | |
goto LABEL_6; | |
LABEL_8: | |
Dpr_Battle_Logic_ServerCommandPutter__DecBattleCount(this->fields.m_pServerCmdPutter, 2u, 0LL); | |
v6 = 0; | |
goto LABEL_9; | |
} | |
if ( !Dpr_Battle_Logic_Safari__IsCritDoroEsa(this->fields.m_pMainModule, 0LL) ) | |
goto LABEL_8; | |
LABEL_6: | |
v6 = 1; | |
LABEL_9: | |
Dpr_Battle_Logic_ServerCommandPutter__DecBattleCount(this->fields.m_pServerCmdPutter, 3u, 0LL); | |
Dpr_Battle_Logic_ServerCommandPutter__SafariAct(this->fields.m_pServerCmdPutter, pokeID, 1u, v6, 0LL); | |
} | |
----- | |
.text.1:00000071025CD5D0 ; void __fastcall Dpr_Battle_Logic_Section_Root_ProcessActions_Safari__throwDoro(Dpr_Battle_Logic_Section_Root_ProcessActions_Safari_o *this, uint8_t pokeID, const MethodInfo *method) | |
.text.1:00000071025CD5D0 Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwDoro | |
.text.1:00000071025CD5D0 ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$processPlayer+F4↑p | |
.text.1:00000071025CD5D0 ; DATA XREF: .data:0000007104996910↓o | |
.text.1:00000071025CD5D0 | |
.text.1:00000071025CD5D0 var_20 = -0x20 | |
.text.1:00000071025CD5D0 var_10 = -0x10 | |
.text.1:00000071025CD5D0 var_s0 = 0 | |
.text.1:00000071025CD5D0 | |
.text.1:00000071025CD5D0 STR X21, [SP,#-0x10+var_20]! | |
.text.1:00000071025CD5D4 STP X20, X19, [SP,#0x20+var_10] | |
.text.1:00000071025CD5D8 STP X29, X30, [SP,#0x20+var_s0] | |
.text.1:00000071025CD5DC ADD X29, SP, #0x20 | |
.text.1:00000071025CD5E0 ADRP X21, #byte_7104ED8148@PAGE | |
.text.1:00000071025CD5E4 LDRB W8, [X21,#byte_7104ED8148@PAGEOFF] | |
.text.1:00000071025CD5E8 MOV W19, W1 | |
.text.1:00000071025CD5EC MOV X20, X0 | |
.text.1:00000071025CD5F0 TBNZ W8, #0, loc_71025CD60C | |
.text.1:00000071025CD5F4 ADRP X8, #off_7104C08400@PAGE | |
.text.1:00000071025CD5F8 LDR X8, [X8,#off_7104C08400@PAGEOFF] | |
.text.1:00000071025CD5FC LDR W0, [X8] | |
.text.1:00000071025CD600 BL sub_710009AD20 | |
.text.1:00000071025CD604 MOV W8, #1 | |
.text.1:00000071025CD608 STRB W8, [X21,#byte_7104ED8148@PAGEOFF] | |
.text.1:00000071025CD60C | |
.text.1:00000071025CD60C loc_71025CD60C ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwDoro+20↑j | |
.text.1:00000071025CD60C ADRP X8, #off_7104BDE9B8@PAGE | |
.text.1:00000071025CD610 LDR X8, [X8,#off_7104BDE9B8@PAGEOFF] | |
.text.1:00000071025CD614 LDR X0, [X8] ; Dpr.Battle.Logic.Safari_TypeInfo | |
.text.1:00000071025CD618 LDR X21, [X20,#0x10] | |
.text.1:00000071025CD61C LDRB W8, [X0,#0x12F] | |
.text.1:00000071025CD620 TBZ W8, #1, loc_71025CD62C | |
.text.1:00000071025CD624 LDR W8, [X0,#0xE0] | |
.text.1:00000071025CD628 CBZ W8, loc_71025CD644 | |
.text.1:00000071025CD62C | |
.text.1:00000071025CD62C loc_71025CD62C ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwDoro+50↑j | |
.text.1:00000071025CD62C MOV X0, X21 ; mainModule | |
.text.1:00000071025CD630 MOV X1, XZR ; method | |
.text.1:00000071025CD634 BL Dpr.Battle.Logic.Safari$$IsCritDoroEsa | |
.text.1:00000071025CD638 TBZ W0, #0, loc_71025CD658 | |
.text.1:00000071025CD63C | |
.text.1:00000071025CD63C loc_71025CD63C ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwDoro+84↓j | |
.text.1:00000071025CD63C MOV W21, #1 | |
.text.1:00000071025CD640 B loc_71025CD66C | |
.text.1:00000071025CD644 ; --------------------------------------------------------------------------- | |
.text.1:00000071025CD644 | |
.text.1:00000071025CD644 loc_71025CD644 ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwDoro+58↑j | |
.text.1:00000071025CD644 BL sub_710009AE30 | |
.text.1:00000071025CD648 MOV X0, X21 ; mainModule | |
.text.1:00000071025CD64C MOV X1, XZR ; method | |
.text.1:00000071025CD650 BL Dpr.Battle.Logic.Safari$$IsCritDoroEsa | |
.text.1:00000071025CD654 TBNZ W0, #0, loc_71025CD63C | |
.text.1:00000071025CD658 | |
.text.1:00000071025CD658 loc_71025CD658 ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwDoro+68↑j | |
.text.1:00000071025CD658 LDR X0, [X20,#0x28] ; this | |
.text.1:00000071025CD65C MOV W1, #2 ; counterID | |
.text.1:00000071025CD660 MOV X2, XZR ; method | |
.text.1:00000071025CD664 BL Dpr.Battle.Logic.ServerCommandPutter$$DecBattleCount | |
.text.1:00000071025CD668 MOV W21, WZR | |
.text.1:00000071025CD66C | |
.text.1:00000071025CD66C loc_71025CD66C ; CODE XREF: Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwDoro+70↑j | |
.text.1:00000071025CD66C LDR X0, [X20,#0x28] ; this | |
.text.1:00000071025CD670 MOV W1, #3 ; counterID | |
.text.1:00000071025CD674 MOV X2, XZR ; method | |
.text.1:00000071025CD678 BL Dpr.Battle.Logic.ServerCommandPutter$$DecBattleCount | |
.text.1:00000071025CD67C LDR X0, [X20,#0x28] ; this | |
.text.1:00000071025CD680 MOV W1, W19 ; pokeID | |
.text.1:00000071025CD684 MOV W2, #1 ; param0 | |
.text.1:00000071025CD688 LDP X29, X30, [SP,#0x20+var_s0] | |
.text.1:00000071025CD68C MOV W3, W21 ; param1 | |
.text.1:00000071025CD690 LDP X20, X19, [SP,#0x20+var_10] | |
.text.1:00000071025CD694 MOV X4, XZR ; method | |
.text.1:00000071025CD698 LDR X21, [SP+0x20+var_20],#0x30 | |
.text.1:00000071025CD69C B Dpr.Battle.Logic.ServerCommandPutter$$SafariAct | |
.text.1:00000071025CD69C ; End of function Dpr.Battle.Logic.Section_Root_ProcessActions_Safari$$throwDoro | |
----- | |
void __fastcall Dpr_Battle_Logic_BTL_CLIENT__buildActionParam_Safari( | |
Dpr_Battle_Logic_BTL_CLIENT_o *this, | |
Dpr_Battle_Logic_BTL_ACTION_PARAM_o *actionParam, | |
uint8_t actPokeIndex, | |
Dpr_Battle_Logic_BTL_POKEPARAM_o *actPoke, | |
const MethodInfo *method) | |
{ | |
uint16_t MonsNo; // w22 | |
int32_t m_formNo; // w21 | |
int32_t escape_count; // w23 | |
bool v11; // w21 | |
int ID; // w0 | |
__int64 v13; // x9 | |
if ( (byte_7104ED6F06 & 1) == 0 ) | |
{ | |
sub_710009AD20(7853LL); | |
byte_7104ED6F06 = 1; | |
} | |
MonsNo = Dpr_Battle_Logic_BTL_POKEPARAM__GetMonsNo(actPoke, 0LL); | |
m_formNo = actPoke->fields.m_formNo; | |
escape_count = Dpr_Battle_Logic_BattleCounter__Get(this->fields.m_pBattleEnv->fields.m_counter, 3u, 0LL); | |
if ( (Dpr_Battle_Logic_Safari_TypeInfo->_2.bitflags2 & 2) != 0 && !Dpr_Battle_Logic_Safari_TypeInfo->_2.cctor_finished ) | |
sub_710009AE30((__int64)Dpr_Battle_Logic_Safari_TypeInfo); | |
v11 = Dpr_Battle_Logic_Safari__JudgeSafariEscape(MonsNo, m_formNo, escape_count, 0LL); | |
ID = Dpr_Battle_Logic_BTL_POKEPARAM__GetID(actPoke, 0LL); | |
v13 = 13LL; | |
if ( v11 ) | |
v13 = 4LL; | |
actionParam->fields.raw = (16 * ID) & 496LL | actionParam->fields.raw & 0xFFFFFFFFFFFFFE00LL | v13; | |
} | |
----- | |
.text.1:00000071023B9A40 ; void __fastcall Dpr_Battle_Logic_BTL_CLIENT__buildActionParam_Safari(Dpr_Battle_Logic_BTL_CLIENT_o *this, Dpr_Battle_Logic_BTL_ACTION_PARAM_o *actionParam, uint8_t actPokeIndex, Dpr_Battle_Logic_BTL_POKEPARAM_o *actPoke, const MethodInfo *method) | |
.text.1:00000071023B9A40 Dpr.Battle.Logic.BTL_CLIENT$$buildActionParam_Safari | |
.text.1:00000071023B9A40 ; CODE XREF: Dpr.Battle.Logic.BTL_CLIENT$$SubProc_AI_SelectAction+554↑p | |
.text.1:00000071023B9A40 ; DATA XREF: .data:000000710499A8A0↓o | |
.text.1:00000071023B9A40 | |
.text.1:00000071023B9A40 var_30 = -0x30 | |
.text.1:00000071023B9A40 var_20 = -0x20 | |
.text.1:00000071023B9A40 var_10 = -0x10 | |
.text.1:00000071023B9A40 var_s0 = 0 | |
.text.1:00000071023B9A40 | |
.text.1:00000071023B9A40 STR X23, [SP,#-0x10+var_30]! | |
.text.1:00000071023B9A44 STP X22, X21, [SP,#0x30+var_20] | |
.text.1:00000071023B9A48 STP X20, X19, [SP,#0x30+var_10] | |
.text.1:00000071023B9A4C STP X29, X30, [SP,#0x30+var_s0] | |
.text.1:00000071023B9A50 ADD X29, SP, #0x30 | |
.text.1:00000071023B9A54 ADRP X21, #byte_7104ED6F06@PAGE | |
.text.1:00000071023B9A58 LDRB W8, [X21,#byte_7104ED6F06@PAGEOFF] | |
.text.1:00000071023B9A5C MOV X20, X3 | |
.text.1:00000071023B9A60 MOV X19, X1 | |
.text.1:00000071023B9A64 MOV X23, X0 | |
.text.1:00000071023B9A68 TBNZ W8, #0, loc_71023B9A84 | |
.text.1:00000071023B9A6C ADRP X8, #off_7104BF6490@PAGE | |
.text.1:00000071023B9A70 LDR X8, [X8,#off_7104BF6490@PAGEOFF] | |
.text.1:00000071023B9A74 LDR W0, [X8] | |
.text.1:00000071023B9A78 BL sub_710009AD20 | |
.text.1:00000071023B9A7C MOV W8, #1 | |
.text.1:00000071023B9A80 STRB W8, [X21,#byte_7104ED6F06@PAGEOFF] | |
.text.1:00000071023B9A84 | |
.text.1:00000071023B9A84 loc_71023B9A84 ; CODE XREF: Dpr.Battle.Logic.BTL_CLIENT$$buildActionParam_Safari+28↑j | |
.text.1:00000071023B9A84 MOV X0, X20 ; this | |
.text.1:00000071023B9A88 MOV X1, XZR ; method | |
.text.1:00000071023B9A8C BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetMonsNo | |
.text.1:00000071023B9A90 LDR X8, [X23,#0x18] | |
.text.1:00000071023B9A94 MOV W22, W0 | |
.text.1:00000071023B9A98 MOV W1, #3 ; counterID | |
.text.1:00000071023B9A9C LDRB W21, [X20,#0x3D] | |
.text.1:00000071023B9AA0 MOV X2, XZR ; method | |
.text.1:00000071023B9AA4 LDR X0, [X8,#0x90] ; this | |
.text.1:00000071023B9AA8 BL Dpr.Battle.Logic.BattleCounter$$Get | |
.text.1:00000071023B9AAC ADRP X8, #off_7104BDE9B8@PAGE | |
.text.1:00000071023B9AB0 LDR X8, [X8,#off_7104BDE9B8@PAGEOFF] | |
.text.1:00000071023B9AB4 MOV X23, X0 | |
.text.1:00000071023B9AB8 LDR X0, [X8] ; Dpr.Battle.Logic.Safari_TypeInfo | |
.text.1:00000071023B9ABC LDRB W8, [X0,#0x12F] | |
.text.1:00000071023B9AC0 TBZ W8, #1, loc_71023B9AD0 | |
.text.1:00000071023B9AC4 LDR W8, [X0,#0xE0] | |
.text.1:00000071023B9AC8 CBNZ W8, loc_71023B9AD0 | |
.text.1:00000071023B9ACC BL sub_710009AE30 | |
.text.1:00000071023B9AD0 | |
.text.1:00000071023B9AD0 loc_71023B9AD0 ; CODE XREF: Dpr.Battle.Logic.BTL_CLIENT$$buildActionParam_Safari+80↑j | |
.text.1:00000071023B9AD0 ; Dpr.Battle.Logic.BTL_CLIENT$$buildActionParam_Safari+88↑j | |
.text.1:00000071023B9AD0 AND W0, W22, #0xFFFF ; monsNo | |
.text.1:00000071023B9AD4 MOV W1, W21 ; formNo | |
.text.1:00000071023B9AD8 MOV W2, W23 ; escape_count | |
.text.1:00000071023B9ADC MOV X3, XZR ; method | |
.text.1:00000071023B9AE0 BL Dpr.Battle.Logic.Safari$$JudgeSafariEscape | |
.text.1:00000071023B9AE4 MOV W21, W0 | |
.text.1:00000071023B9AE8 MOV X0, X20 ; this | |
.text.1:00000071023B9AEC MOV X1, XZR ; method | |
.text.1:00000071023B9AF0 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetID | |
.text.1:00000071023B9AF4 LDR X8, [X19] | |
.text.1:00000071023B9AF8 LSL W9, W0, #4 | |
.text.1:00000071023B9AFC AND X9, X9, #0x1F0 | |
.text.1:00000071023B9B00 TST W21, #1 | |
.text.1:00000071023B9B04 AND X8, X8, #0xFFFFFFFFFFFFFE00 | |
.text.1:00000071023B9B08 ORR X8, X9, X8 | |
.text.1:00000071023B9B0C MOV W9, #0xD | |
.text.1:00000071023B9B10 MOV W10, #4 | |
.text.1:00000071023B9B14 CSEL X9, X10, X9, NE | |
.text.1:00000071023B9B18 ORR X8, X8, X9 | |
.text.1:00000071023B9B1C STR X8, [X19] | |
.text.1:00000071023B9B20 LDP X29, X30, [SP,#0x30+var_s0] | |
.text.1:00000071023B9B24 LDP X20, X19, [SP,#0x30+var_10] | |
.text.1:00000071023B9B28 LDP X22, X21, [SP,#0x30+var_20] | |
.text.1:00000071023B9B2C LDR X23, [SP+0x30+var_30],#0x40 | |
.text.1:00000071023B9B30 RET | |
.text.1:00000071023B9B30 ; --------------------------------------------------------------------------- | |
.text.1:00000071023B9B34 ALIGN 0x20 | |
.text.1:00000071023B9B34 ; End of function Dpr.Battle.Logic.BTL_CLIENT$$buildActionParam_Safari | |
----- | |
// Namespace: | |
public enum BattleCounter.UniqueCounter // TypeDefIndex: 9838 | |
{ | |
// Fields | |
public byte value__; // 0x0 | |
public const BattleCounter.UniqueCounter BATTLE_TURN_COUNT = 0; | |
public const BattleCounter.UniqueCounter ESCAPE_TRIED_COUNT = 1; | |
public const BattleCounter.UniqueCounter SAFARI_GET_COUNT = 2; | |
public const BattleCounter.UniqueCounter SAFARI_ESCAPE_COUNT = 3; | |
public const BattleCounter.UniqueCounter SAFARI_BALL_COUNT = 4; | |
public const BattleCounter.UniqueCounter NUM = 5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment