Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Lusamine/70caf012f367e1875d7e45d56b331c60 to your computer and use it in GitHub Desktop.
Save Lusamine/70caf012f367e1875d7e45d56b331c60 to your computer and use it in GitHub Desktop.
int32_t __fastcall Dpr_Battle_Logic_Capture__getBallCaptureRatio(
Dpr_Battle_Logic_MainModule_o *mainModule,
Dpr_Battle_Logic_BattleEnv_o *battleEnv,
Dpr_Battle_Logic_BTL_POKEPARAM_o *userPoke,
Dpr_Battle_Logic_BTL_POKEPARAM_o *targetPoke,
uint16_t itemID)
{
int32_t result; // w0
unsigned int Value; // w8
unsigned int v10; // w8
float v11; // s0
int32_t v12; // w8
unsigned __int8 v13; // w20
unsigned __int8 v14; // w0
int user_species_no; // w23
char user_species_gender; // w20
uint16_t target_species_no; // w21
char target_species_gender; // w0
uint16_t MonsNo; // w0
const MethodInfo *v20; // x2
Dpr_Battle_Logic_BTL_POKEPARAM_o *poke; // [xsp+8h] [xbp-28h] BYREF
poke = targetPoke;
if ( itemID > 498u )
{
if ( itemID == 576 ) // Dream Ball
{
if ( Dpr_Battle_Logic_BTL_POKEPARAM__CheckNemuri(targetPoke, 1, 0LL) )
return 0x4000;
}
else if ( itemID == 851 ) // Beast Ball
{
if ( Dpr_Battle_Logic_UltraBeast__IsUltraBeast_485368872736(&poke, 0LL) )
return 0x5000;
else
return 0x19A;
}
return 0x1000;
}
result = 0x2000;
switch ( itemID )
{
case 2u: // Ultra Ball
return result;
case 3u: // Great Ball
case 5u: // Safari Ball
return 0x1800;
case 4u: // Poke Ball
case 11u: // Luxury Ball
case 12u: // Premier Ball
case 14u: // Heal Ball
return 0x1000;
case 6u: // Net Ball
if ( !Dpr_Battle_Logic_BTL_POKEPARAM__IsMatchType(targetPoke, 10u, 0LL)
&& !Dpr_Battle_Logic_BTL_POKEPARAM__IsMatchType(targetPoke, 6u, 0LL) )
{
return 0x1000;
}
goto LABEL_25;
case 7u: // Dive Ball
if ( !Dpr_Battle_Logic_MainModule__GetSetupStatusFlag(mainModule, 1, 0LL)
&& !Dpr_Battle_Logic_MainModule__GetSetupStatusFlag(mainModule, 2, 0LL) )
{
return 0x1000;
}
goto LABEL_25;
case 8u: // Nest Ball
Value = (unsigned __int16)Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(targetPoke, 17, 0LL);
if ( Value > 29 )
return 0x1000;
v10 = (unsigned __int16)(41 - Value);
v11 = (float)v10;
if ( v10 >= 41 )
v11 = 40.0;
return Dpr_Battle_Logic_FX32__CONST_485362011504(v11, 0LL) / 10;
case 9u: // Repeat Ball
if ( !Dpr_Battle_Logic_MainModule__IsZukanRegistered_485369585120(mainModule, targetPoke, 0LL) )
return 0x1000;
LABEL_25:
result = 0x3800;
break;
case 10u: // Timer Ball
v12 = 0x4CD * Dpr_Battle_Logic_BattleCounter__Get(battleEnv->fields.m_counter, 0, 0LL) + 0x1000;
if ( v12 >= 0x4000 )
result = 0x4000;
else
result = v12;
break;
case 13u: // Dusk Ball
if ( !Dpr_Battle_Logic_MainModule__GetFieldSituation(mainModule, 0LL)->fields.bgComponent->fields.enableDarkBall )
{
if ( (byte_7104ED5633 & 1) == 0 )
{
sub_710009AD20(10881LL);
byte_7104ED5633 = 1;
}
if ( (GameManager_TypeInfo->_2.bitflags2 & 2) != 0 && !GameManager_TypeInfo->_2.cctor_finished )
sub_710009AE30((__int64)GameManager_TypeInfo);
if ( (unsigned int)(GameManager__get_currentPeriodOfDay(0LL) - 2) > 2 )
return 0x1000;
}
result = 0x3000;
break;
case 15u: // Quick Ball
if ( Dpr_Battle_Logic_BattleCounter__Get(battleEnv->fields.m_counter, 0, 0LL) )
return 0x1000;
result = 0x5000;
break;
default:
switch ( itemID )
{
case 492u: // Fast Ball
if ( Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(targetPoke, 25, 0LL) >= 100 )
return 0x4000;
return 0x1000;
case 493u: // Level Ball
v13 = Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(userPoke, 17, 0LL);
v14 = Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(targetPoke, 17, 0LL);
if ( v14 <= (unsigned int)(v13 >> 2) )
return 0x8000;
if ( v14 <= (unsigned int)(v13 >> 1) )
return 0x4000;
if ( v14 >= (unsigned int)v13 )
result = 0x1000;
else
result = 0x2000;
break;
case 494u: // Lure Ball
if ( !Dpr_Battle_Logic_MainModule__GetSetupStatusFlag(mainModule, 1, 0LL) )
return 0x1000;
return 0x4000;
case 496u:
user_species_no = Dpr_Battle_Logic_BTL_POKEPARAM__GetMonsNo(userPoke, 0LL);
user_species_gender = Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(userPoke, 20, 0LL);
target_species_no = Dpr_Battle_Logic_BTL_POKEPARAM__GetMonsNo(targetPoke, 0LL);
target_species_gender = Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(targetPoke, 20, 0LL);
if ( user_species_no != target_species_no || target_species_gender == user_species_gender )
return 0x1000;
return 0x8000;
case 498u: // Moon Ball
MonsNo = Dpr_Battle_Logic_BTL_POKEPARAM__GetMonsNo(targetPoke, 0LL);
if ( !Dpr_Battle_Logic_Capture__checkMoonBallEffective(MonsNo, targetPoke->fields.m_formNo, v20) )
return 0x1000;
return 0x4000;
default:
return 0x1000;
}
break;
}
return result;
}
-----
.text.1:00000071021707B0 ; int32_t __fastcall Dpr_Battle_Logic_Capture__getBallCaptureRatio(Dpr_Battle_Logic_MainModule_o *mainModule, Dpr_Battle_Logic_BattleEnv_o *battleEnv, Dpr_Battle_Logic_BTL_POKEPARAM_o *userPoke, Dpr_Battle_Logic_BTL_POKEPARAM_o *targetPoke, uint16_t itemID)
.text.1:00000071021707B0 Dpr.Battle.Logic.Capture$$getBallCaptureRatio
.text.1:00000071021707B0 ; CODE XREF: Dpr.Battle.Logic.Capture$$calcCaptureIndicator+214↑p
.text.1:00000071021707B0 ; Dpr.Battle.Logic.Capture$$calcBallCaptureRatio+18↑p
.text.1:00000071021707B0 ; DATA XREF: ...
.text.1:00000071021707B0
.text.1:00000071021707B0 var_30 = -0x30
.text.1:00000071021707B0 poke = -0x28
.text.1:00000071021707B0 var_20 = -0x20
.text.1:00000071021707B0 var_10 = -0x10
.text.1:00000071021707B0 var_s0 = 0
.text.1:00000071021707B0
.text.1:00000071021707B0 STR X23, [SP,#-0x10+var_30]!
.text.1:00000071021707B4 STP X22, X21, [SP,#0x30+var_20]
.text.1:00000071021707B8 STP X20, X19, [SP,#0x30+var_10]
.text.1:00000071021707BC STP X29, X30, [SP,#0x30+var_s0]
.text.1:00000071021707C0 ADD X29, SP, #0x30
.text.1:00000071021707C4 AND W8, W4, #0xFFFF
.text.1:00000071021707C8 MOV X19, X3
.text.1:00000071021707CC STR X3, [SP,#0x30+poke]
.text.1:00000071021707D0 CMP W8, #0x1F2
.text.1:00000071021707D4 B.HI loc_710217080C
.text.1:00000071021707D8 SUB W9, W8, #2 ; switch 14 cases
.text.1:00000071021707DC MOV X20, X0
.text.1:00000071021707E0 CMP W9, #0xD
.text.1:00000071021707E4 B.HI def_7102170800 ; jumptable 0000007102170800 default case
.text.1:00000071021707E8 ADRL X8, jpt_7102170800
.text.1:00000071021707F0 ADR X10, loc_7102170804 ; jumptable 0000007102170800 cases 3,5
.text.1:00000071021707F4 LDRB W11, [X8,X9]
.text.1:00000071021707F8 ADD X10, X10, X11,LSL#2
.text.1:00000071021707FC MOV W0, #0x2000
.text.1:0000007102170800 BR X10 ; switch jump
.text.1:0000007102170804 ; ---------------------------------------------------------------------------
.text.1:0000007102170804
.text.1:0000007102170804 loc_7102170804 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:0000007102170804 ; DATA XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+40↑o
.text.1:0000007102170804 MOV W0, #0x1800 ; jumptable 0000007102170800 cases 3,5
.text.1:0000007102170808 B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:000000710217080C ; ---------------------------------------------------------------------------
.text.1:000000710217080C
.text.1:000000710217080C loc_710217080C ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+24↑j
.text.1:000000710217080C CMP W8, #0x240
.text.1:0000007102170810 B.EQ loc_7102170880
.text.1:0000007102170814 CMP W8, #0x353
.text.1:0000007102170818 B.NE def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170818 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:000000710217081C ADD X0, SP, #0x30+poke ; poke
.text.1:0000007102170820 MOV X1, XZR ; method
.text.1:0000007102170824 BL Dpr.Battle.Logic.UltraBeast$$IsUltraBeast_485368872736
.text.1:0000007102170828 TST W0, #1
.text.1:000000710217082C MOV W8, #0x19A
.text.1:0000007102170830 MOV W9, #0x5000
.text.1:0000007102170834 CSEL W0, W9, W8, NE
.text.1:0000007102170838 B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:000000710217083C ; ---------------------------------------------------------------------------
.text.1:000000710217083C
.text.1:000000710217083C def_7102170800 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+34↑j
.text.1:000000710217083C SUB W8, W8, #0x1EC ; jumptable 0000007102170800 default case
.text.1:0000007102170840 CMP W8, #6
.text.1:0000007102170844 B.HI def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170844 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170848 ADRL X9, jpt_7102170860
.text.1:0000007102170850 ADR X10, loc_7102170864 ; jumptable 0000007102170860 case 492
.text.1:0000007102170854 LDRB W11, [X9,X8]
.text.1:0000007102170858 ADD X10, X10, X11,LSL#2
.text.1:000000710217085C MOV X21, X2
.text.1:0000007102170860 BR X10 ; switch jump
.text.1:0000007102170864 ; ---------------------------------------------------------------------------
.text.1:0000007102170864
.text.1:0000007102170864 loc_7102170864 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+B0↑j
.text.1:0000007102170864 ; DATA XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+A0↑o
.text.1:0000007102170864 MOV W1, #0x19 ; jumptable 0000007102170860 case 492
.text.1:0000007102170868 MOV X0, X19 ; this
.text.1:000000710217086C MOV X2, XZR ; method
.text.1:0000007102170870 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue
.text.1:0000007102170874 CMP W0, #0x64 ; 'd'
.text.1:0000007102170878 B.LT def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170878 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:000000710217087C B loc_7102170894
.text.1:0000007102170880 ; ---------------------------------------------------------------------------
.text.1:0000007102170880
.text.1:0000007102170880 loc_7102170880 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+60↑j
.text.1:0000007102170880 MOV X0, X19 ; this
.text.1:0000007102170884 MOV W1, #1 ; checkMode
.text.1:0000007102170888 MOV X2, XZR ; method
.text.1:000000710217088C BL Dpr.Battle.Logic.BTL_POKEPARAM$$CheckNemuri
.text.1:0000007102170890 TBZ W0, #0, def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170890 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170894
.text.1:0000007102170894 loc_7102170894 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+CC↑j
.text.1:0000007102170894 ; Dpr.Battle.Logic.Capture$$getBallCaptureRatio+2BC↓j ...
.text.1:0000007102170894 MOV W0, #0x4000
.text.1:0000007102170898 B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:000000710217089C ; ---------------------------------------------------------------------------
.text.1:000000710217089C
.text.1:000000710217089C loc_710217089C ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:000000710217089C MOV W1, #0xA ; jumptable 0000007102170800 case 6
.text.1:00000071021708A0 MOV X0, X19 ; this
.text.1:00000071021708A4 MOV X2, XZR ; method
.text.1:00000071021708A8 BL Dpr.Battle.Logic.BTL_POKEPARAM$$IsMatchType
.text.1:00000071021708AC TBNZ W0, #0, loc_7102170968
.text.1:00000071021708B0 MOV X0, X19 ; this
.text.1:00000071021708B4 MOV W1, #6 ; type
.text.1:00000071021708B8 MOV X2, XZR ; method
.text.1:00000071021708BC BL Dpr.Battle.Logic.BTL_POKEPARAM$$IsMatchType
.text.1:00000071021708C0 TBNZ W0, #0, loc_7102170968
.text.1:00000071021708C4 B def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:00000071021708C4 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:00000071021708C8 ; ---------------------------------------------------------------------------
.text.1:00000071021708C8
.text.1:00000071021708C8 loc_71021708C8 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:00000071021708C8 MOV X0, X20 ; jumptable 0000007102170800 case 7
.text.1:00000071021708CC MOV W1, #1 ; flag
.text.1:00000071021708D0 MOV X2, XZR ; method
.text.1:00000071021708D4 BL Dpr.Battle.Logic.MainModule$$GetSetupStatusFlag
.text.1:00000071021708D8 TBNZ W0, #0, loc_7102170968
.text.1:00000071021708DC MOV X0, X20 ; this
.text.1:00000071021708E0 MOV W1, #2 ; flag
.text.1:00000071021708E4 MOV X2, XZR ; method
.text.1:00000071021708E8 BL Dpr.Battle.Logic.MainModule$$GetSetupStatusFlag
.text.1:00000071021708EC TBNZ W0, #0, loc_7102170968
.text.1:00000071021708F0 B def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:00000071021708F0 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:00000071021708F4 ; ---------------------------------------------------------------------------
.text.1:00000071021708F4
.text.1:00000071021708F4 loc_71021708F4 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:00000071021708F4 MOV W1, #0x11 ; jumptable 0000007102170800 case 8
.text.1:00000071021708F8 MOV X0, X19 ; this
.text.1:00000071021708FC MOV X2, XZR ; method
.text.1:0000007102170900 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue
.text.1:0000007102170904 AND W8, W0, #0xFFFF
.text.1:0000007102170908 CMP W8, #0x1D
.text.1:000000710217090C B.HI def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:000000710217090C ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170910 MOV W9, #0x29 ; ')'
.text.1:0000007102170914 SUB W8, W9, W8
.text.1:0000007102170918 AND W8, W8, #0xFFFF
.text.1:000000710217091C UCVTF S0, W8
.text.1:0000007102170920 CMP W8, #0x29 ; ')'
.text.1:0000007102170924 MOV W8, #0x42200000
.text.1:0000007102170928 FMOV S1, W8
.text.1:000000710217092C FCSEL S0, S0, S1, CC ; x
.text.1:0000007102170930 MOV X0, XZR ; method
.text.1:0000007102170934 BL Dpr.Battle.Logic.FX32$$CONST_485362011504
.text.1:0000007102170938 MOV W8, #0x66666667
.text.1:0000007102170940 SMULL X8, W0, W8
.text.1:0000007102170944 LSR X9, X8, #0x3F ; '?'
.text.1:0000007102170948 ASR X8, X8, #0x22 ; '"'
.text.1:000000710217094C ADD W0, W8, W9
.text.1:0000007102170950 B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:0000007102170954 ; ---------------------------------------------------------------------------
.text.1:0000007102170954
.text.1:0000007102170954 loc_7102170954 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:0000007102170954 MOV X0, X20 ; jumptable 0000007102170800 case 9
.text.1:0000007102170958 MOV X1, X19 ; bpp
.text.1:000000710217095C MOV X2, XZR ; method
.text.1:0000007102170960 BL Dpr.Battle.Logic.MainModule$$IsZukanRegistered_485369585120
.text.1:0000007102170964 TBZ W0, #0, def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170964 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170968
.text.1:0000007102170968 loc_7102170968 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+FC↑j
.text.1:0000007102170968 ; Dpr.Battle.Logic.Capture$$getBallCaptureRatio+110↑j ...
.text.1:0000007102170968 MOV W0, #0x3800
.text.1:000000710217096C B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:0000007102170970 ; ---------------------------------------------------------------------------
.text.1:0000007102170970
.text.1:0000007102170970 loc_7102170970 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:0000007102170970 LDR X0, [X1,#0x90] ; jumptable 0000007102170800 case 10
.text.1:0000007102170974 MOV W1, WZR ; counterID
.text.1:0000007102170978 MOV X2, XZR ; method
.text.1:000000710217097C BL Dpr.Battle.Logic.BattleCounter$$Get
.text.1:0000007102170980 MOV W8, #0x4CD
.text.1:0000007102170984 MOV W9, #0x1000
.text.1:0000007102170988 MADD W8, W0, W8, W9
.text.1:000000710217098C MOV W9, #0x4000
.text.1:0000007102170990 CMP W8, #4,LSL#12
.text.1:0000007102170994 CSEL W0, W8, W9, LT
.text.1:0000007102170998 B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:000000710217099C ; ---------------------------------------------------------------------------
.text.1:000000710217099C
.text.1:000000710217099C loc_710217099C ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:000000710217099C MOV X0, X20 ; jumptable 0000007102170800 case 13
.text.1:00000071021709A0 MOV X1, XZR ; method
.text.1:00000071021709A4 BL Dpr.Battle.Logic.MainModule$$GetFieldSituation
.text.1:00000071021709A8 LDR X8, [X0,#0x10]
.text.1:00000071021709AC LDRB W8, [X8,#0x18]
.text.1:00000071021709B0 CBNZ W8, loc_7102170A0C
.text.1:00000071021709B4 ADRP X19, #byte_7104ED5633@PAGE
.text.1:00000071021709B8 LDRB W8, [X19,#byte_7104ED5633@PAGEOFF]
.text.1:00000071021709BC TBNZ W8, #0, loc_71021709D8
.text.1:00000071021709C0 ADRP X8, #off_7104BDE9C8@PAGE
.text.1:00000071021709C4 LDR X8, [X8,#off_7104BDE9C8@PAGEOFF]
.text.1:00000071021709C8 LDR W0, [X8]
.text.1:00000071021709CC BL sub_710009AD20
.text.1:00000071021709D0 MOV W8, #1
.text.1:00000071021709D4 STRB W8, [X19,#byte_7104ED5633@PAGEOFF]
.text.1:00000071021709D8
.text.1:00000071021709D8 loc_71021709D8 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+20C↑j
.text.1:00000071021709D8 ADRP X8, #off_7104B98EB0@PAGE
.text.1:00000071021709DC LDR X8, [X8,#off_7104B98EB0@PAGEOFF]
.text.1:00000071021709E0 LDR X0, [X8] ; GameManager_TypeInfo
.text.1:00000071021709E4 LDRB W8, [X0,#0x12F]
.text.1:00000071021709E8 TBZ W8, #1, loc_71021709F8
.text.1:00000071021709EC LDR W8, [X0,#0xE0]
.text.1:00000071021709F0 CBNZ W8, loc_71021709F8
.text.1:00000071021709F4 BL sub_710009AE30
.text.1:00000071021709F8
.text.1:00000071021709F8 loc_71021709F8 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+238↑j
.text.1:00000071021709F8 ; Dpr.Battle.Logic.Capture$$getBallCaptureRatio+240↑j
.text.1:00000071021709F8 MOV X0, XZR ; method
.text.1:00000071021709FC BL GameManager$$get_currentPeriodOfDay
.text.1:0000007102170A00 SUB W8, W0, #2
.text.1:0000007102170A04 CMP W8, #2
.text.1:0000007102170A08 B.HI def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170A08 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170A0C
.text.1:0000007102170A0C loc_7102170A0C ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+200↑j
.text.1:0000007102170A0C MOV W0, #0x3000
.text.1:0000007102170A10 B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:0000007102170A14 ; ---------------------------------------------------------------------------
.text.1:0000007102170A14
.text.1:0000007102170A14 loc_7102170A14 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:0000007102170A14 LDR X0, [X1,#0x90] ; jumptable 0000007102170800 case 15
.text.1:0000007102170A18 MOV W1, WZR ; counterID
.text.1:0000007102170A1C MOV X2, XZR ; method
.text.1:0000007102170A20 BL Dpr.Battle.Logic.BattleCounter$$Get
.text.1:0000007102170A24 CBNZ X0, def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170A24 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170A28 MOV W0, #0x5000
.text.1:0000007102170A2C B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:0000007102170A30 ; ---------------------------------------------------------------------------
.text.1:0000007102170A30
.text.1:0000007102170A30 loc_7102170A30 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+B0↑j
.text.1:0000007102170A30 MOV W22, #0x11 ; jumptable 0000007102170860 case 493
.text.1:0000007102170A34 MOV X0, X21 ; this
.text.1:0000007102170A38 MOV W1, W22 ; vid
.text.1:0000007102170A3C MOV X2, XZR ; method
.text.1:0000007102170A40 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue
.text.1:0000007102170A44 MOV W20, W0
.text.1:0000007102170A48 MOV X0, X19 ; this
.text.1:0000007102170A4C MOV W1, W22 ; vid
.text.1:0000007102170A50 MOV X2, XZR ; method
.text.1:0000007102170A54 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue
.text.1:0000007102170A58 AND W8, W0, #0xFF
.text.1:0000007102170A5C AND W9, W20, #0xFF
.text.1:0000007102170A60 CMP W8, W9,LSR#2
.text.1:0000007102170A64 B.LS loc_7102170AFC
.text.1:0000007102170A68 CMP W8, W9,LSR#1
.text.1:0000007102170A6C B.LS loc_7102170894
.text.1:0000007102170A70 AND W8, W0, #0xFF
.text.1:0000007102170A74 CMP W8, W20,UXTB
.text.1:0000007102170A78 MOV W8, #0x1000
.text.1:0000007102170A7C MOV W9, #0x2000
.text.1:0000007102170A80 CSEL W0, W9, W8, CC
.text.1:0000007102170A84 B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:0000007102170A88 ; ---------------------------------------------------------------------------
.text.1:0000007102170A88
.text.1:0000007102170A88 loc_7102170A88 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+B0↑j
.text.1:0000007102170A88 MOV X0, X20 ; jumptable 0000007102170860 case 494
.text.1:0000007102170A8C MOV W1, #1 ; flag
.text.1:0000007102170A90 MOV X2, XZR ; method
.text.1:0000007102170A94 BL Dpr.Battle.Logic.MainModule$$GetSetupStatusFlag
.text.1:0000007102170A98 TBNZ W0, #0, loc_7102170894
.text.1:0000007102170A9C B def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170A9C ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170AA0 ; ---------------------------------------------------------------------------
.text.1:0000007102170AA0
.text.1:0000007102170AA0 loc_7102170AA0 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+B0↑j
.text.1:0000007102170AA0 MOV X0, X21 ; jumptable 0000007102170860 case 496
.text.1:0000007102170AA4 MOV X1, XZR ; method
.text.1:0000007102170AA8 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetMonsNo
.text.1:0000007102170AAC MOV W22, #0x14
.text.1:0000007102170AB0 AND W23, W0, #0xFFFF
.text.1:0000007102170AB4 MOV X0, X21 ; this
.text.1:0000007102170AB8 MOV W1, W22 ; vid
.text.1:0000007102170ABC MOV X2, XZR ; method
.text.1:0000007102170AC0 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue
.text.1:0000007102170AC4 MOV W20, W0
.text.1:0000007102170AC8 MOV X0, X19 ; this
.text.1:0000007102170ACC MOV X1, XZR ; method
.text.1:0000007102170AD0 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetMonsNo
.text.1:0000007102170AD4 MOV W21, W0
.text.1:0000007102170AD8 MOV X0, X19 ; this
.text.1:0000007102170ADC MOV W1, W22 ; vid
.text.1:0000007102170AE0 MOV X2, XZR ; method
.text.1:0000007102170AE4 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue
.text.1:0000007102170AE8 CMP W23, W21,UXTH
.text.1:0000007102170AEC B.NE def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170AEC ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170AF0 EOR W8, W0, W20
.text.1:0000007102170AF4 TST W8, #0xFF
.text.1:0000007102170AF8 B.EQ def_7102170860 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170AF8 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170AFC
.text.1:0000007102170AFC loc_7102170AFC ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+2B4↑j
.text.1:0000007102170AFC MOV W0, #0x8000
.text.1:0000007102170B00 B loc_7102170B24 ; jumptable 0000007102170800 case 2
.text.1:0000007102170B04 ; ---------------------------------------------------------------------------
.text.1:0000007102170B04
.text.1:0000007102170B04 loc_7102170B04 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+B0↑j
.text.1:0000007102170B04 MOV X0, X19 ; jumptable 0000007102170860 case 498
.text.1:0000007102170B08 MOV X1, XZR ; method
.text.1:0000007102170B0C BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetMonsNo
.text.1:0000007102170B10 LDRB W1, [X19,#0x3D] ; formno
.text.1:0000007102170B14 AND W0, W0, #0xFFFF ; monsno
.text.1:0000007102170B18 BL Dpr.Battle.Logic.Capture$$checkMoonBallEffective
.text.1:0000007102170B1C TBNZ W0, #0, loc_7102170894
.text.1:0000007102170B20
.text.1:0000007102170B20 def_7102170860 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:0000007102170B20 ; Dpr.Battle.Logic.Capture$$getBallCaptureRatio+68↑j ...
.text.1:0000007102170B20 MOV W0, #0x1000 ; jumptable 0000007102170800 cases 4,11,12,14
.text.1:0000007102170B20 ; jumptable 0000007102170860 default case, cases 495,497
.text.1:0000007102170B24
.text.1:0000007102170B24 loc_7102170B24 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j
.text.1:0000007102170B24 ; Dpr.Battle.Logic.Capture$$getBallCaptureRatio+58↑j ...
.text.1:0000007102170B24 LDP X29, X30, [SP,#0x30+var_s0] ; jumptable 0000007102170800 case 2
.text.1:0000007102170B28 LDP X20, X19, [SP,#0x30+var_10]
.text.1:0000007102170B2C LDP X22, X21, [SP,#0x30+var_20]
.text.1:0000007102170B30 LDR X23, [SP+0x30+var_30],#0x40
.text.1:0000007102170B34 RET
.text.1:0000007102170B34 ; ---------------------------------------------------------------------------
.text.1:0000007102170B38 ALIGN 0x20
.text.1:0000007102170B38 ; End of function Dpr.Battle.Logic.Capture$$getBallCaptureRatio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment