Calculate HP% damage
Jump to navigation
Jump to search
Calculate % of damage 00186624: 3c028019 lui r2,0x8019 00186628: 8c422d98 lw r2,0x2d98(r2) Load Defender's Stats 0018662c: 00000000 nop 00186630: 9443002a lhu r3,0x002a(r2) Load Defender's Max HP 00186634: 3c028019 lui r2,0x8019 00186638: 904238fa lbu r2,0x38fa(r2) Load Abilities Y 0018663c: 00000000 nop 00186640: 00620018 mult r3,r2 Max HP * Y 00186644: 3c0351eb lui r3,0x51eb 00186648: 00001012 mflo r2 Move to R2 0018664c: 3463851f ori r3,r3,0x851f 00186650: 24420063 addiu r2,r2,0x0063 00186654: 00430018 mult r2,r3 00186658: 3c038019 lui r3,0x8019 0018665c: 8c632d90 lw r3,0x2d90(r3) Load Current Action Data Pointer 00186660: 00000000 nop 00186664: 90620025 lbu r2,0x0025(r3) Load Attack Flag 00186668: 27bdfff8 addiu r29,r29,0xfff8 0018666c: 34420080 ori r2,r2,0x0080 00186670: a0620025 sb r2,0x0025(r3) Store Attack Flag as HP Damage 00186674: 00001010 mfhi r2 Move Hi to r2 00186678: 00021143 sra r2,r2,0x05 0018667c: a4620004 sh r2,0x0004(r3) Store HP Damage 00186680: 27bd0008 addiu r29,r29,0x0008 00186684: 03e00008 jr r31 00186688: 00000000 nop