Skip to content

Instantly share code, notes, and snippets.

@Lusamine
Last active December 6, 2025 02:53
Show Gist options
  • Select an option

  • Save Lusamine/cc6a038e0012b6f1e6d508c0512f4b1d to your computer and use it in GitHub Desktop.

Select an option

Save Lusamine/cc6a038e0012b6f1e6d508c0512f4b1d to your computer and use it in GitHub Desktop.
unsigned __int32 __fastcall pml::battle::logic::calc::DamageBase(base_damage_param *a1)
{
return a1->attack_power * a1->base_power * (2 * a1->level / 5u + 2) / a1->defense_power / 50 + 2;
}
----
.text:00000071006BD750 ; unsigned __int32 __fastcall pml::battle::logic::calc::DamageBase(base_damage_param *a1)
.text:00000071006BD750 pml__battle__logic__calc__DamageBase ; CODE XREF: pml__battle__logic__EventLauncher__Event_CalcDamage+764↑p
.text:00000071006BD750 LDP W8, W9, [X0]
.text:00000071006BD754 LSL W9, W9, #1
.text:00000071006BD758 LDP W10, W11, [X0,#8]
.text:00000071006BD75C MUL W8, W10, W8
.text:00000071006BD760 MOV W10, #0xCCCCCCCD
.text:00000071006BD768 UMULL X9, W9, W10
.text:00000071006BD76C LSR X9, X9, #0x22 ; '"'
.text:00000071006BD770 ADD W9, W9, #2
.text:00000071006BD774 MUL W8, W8, W9
.text:00000071006BD778 MOV W9, #0x51EB851F
.text:00000071006BD780 UDIV W8, W8, W11
.text:00000071006BD784 UMULL X8, W8, W9
.text:00000071006BD788 LSR X8, X8, #0x24 ; '$'
.text:00000071006BD78C ADD W0, W8, #2
.text:00000071006BD790 RET
.text:00000071006BD790 ; End of function pml__battle__logic__calc__DamageBase

Comments are disabled for this gist.