Difference between revisions of "Distribute Usability"
Jump to navigation
Jump to search
(Created page with " Distribute Usability: 0018d2a8: 3c058019 lui r5,0x8019 0018d2ac: 8ca52d98 lw r5,0x2d98(r5) Load Defender's Stats 0018d2b0: 3c048019 lui r4,0x8019 0018...") |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | Distribute | + | Checks if there's an excedent heal, if yes roll random Vs Brave%. If succesful, store Distribute ID in TCA 0x0e and Excedent heal amount in TCA 0x26 |
− | 0018d2a8: 3c058019 lui r5,0x8019 | + | |
− | 0018d2ac: 8ca52d98 lw r5,0x2d98(r5) | + | TCA = Targeted Unit Current Action |
− | 0018d2b0: 3c048019 lui r4,0x8019 | + | -------------------------------------------------------------------------------------------------------- |
− | 0018d2b4: 8c842d90 lw r4,0x2d90(r4) | + | 0018d2a8: 3c058019 lui r5,0x8019 | |
− | 0018d2b8: 27bdffe8 addiu r29,r29, | + | 0018d2ac: 8ca52d98 lw r5,0x2d98(r5) |{{f/adr|<nowiki>r5 = Targeted Unit data pointer</nowiki>}} |
− | 0018d2bc: afbf0014 sw r31,0x0014(r29) | + | 0018d2b0: 3c048019 lui r4,0x8019 | |
− | 0018d2c0: afb00010 sw r16,0x0010(r29) | + | 0018d2b4: 8c842d90 lw r4,0x2d90(r4) |{{f/adr|<nowiki>r4 = TCA data pointer</nowiki>}} |
− | 0018d2c4: 94a2002a lhu r2,0x002a(r5) | + | 0018d2b8: 27bdffe8 addiu r29,r29,-0x0018 | |
− | 0018d2c8: 94a30028 lhu r3,0x0028(r5) | + | 0018d2bc: afbf0014 sw r31,0x0014(r29) | |
− | 0018d2cc: 84840006 lh r4,0x0006(r4) | + | 0018d2c0: afb00010 sw r16,0x0010(r29) | |
− | 0018d2d0: 00431023 subu r2,r2,r3 | + | 0018d2c4: 94a2002a lhu r2,0x002a(r5) |{{f/load|<nowiki>r2 = Targeted Unit Max HP</nowiki>}} |
− | 0018d2d4: 00828023 subu r16,r4,r2 | + | 0018d2c8: 94a30028 lhu r3,0x0028(r5) |{{f/load|<nowiki>r3 = Targeted Unit Current HP</nowiki>}} |
− | 0018d2d8: 1a00000a blez r16,0x0018d304 | + | 0018d2cc: 84840006 lh r4,0x0006(r4) |{{f/load|<nowiki>r4 = TCA HP recovery (amount)</nowiki>}} |
− | 0018d2dc: 00000000 nop | + | 0018d2d0: 00431023 subu r2,r2,r3 |{{f/std|<nowiki>r2 = Targeted Unit Missing HP</nowiki>}} |
− | 0018d2e0: 0c0634e1 jal 0x0018d384 | + | 0018d2d4: 00828023 subu r16,r4,r2 |{{f/std|<nowiki>r16 = Excedent Heal (TCA HP recovery - Targeted Unit missing HP)</nowiki>}} |
− | 0018d2e4: 00a02021 addu r4,r5,r0 | + | 0018d2d8: 1a00000a blez r16,0x0018d304 {{f/Cond|If TCA Excedent Heal > 0x00}} |
− | 0018d2e8: 14400006 bne r2,r0,0x0018d304 | + | 0018d2dc: 00000000 nop |{{f/std|}} |
− | 0018d2ec: 340201bc ori r2,r0,0x01bc | + | 0018d2e0: 0c0634e1 jal 0x0018d384 |{{f/jal|Chance to React|Chance to React}} Returns r2 = 0x00 If Unit will react (Chances are Br%) |
− | 0018d2f0: 3c038019 lui r3,0x8019 | + | 0018d2e4: 00a02021 addu r4,r5,r0 | |
− | 0018d2f4: 8c632d90 lw r3,0x2d90(r3) | + | 0018d2e8: 14400006 bne r2,r0,0x0018d304 {{f/Cond|If Targeted Unit is reacting}} |
− | 0018d2f8: 00000000 nop | + | 0018d2ec: 340201bc ori r2,r0,0x01bc |{{f/std|<nowiki>r2 = 0x1bc (Distribute ID)</nowiki>}} |
− | 0018d2fc: a4700026 sh r16,0x0026(r3) | + | 0018d2f0: 3c038019 lui r3,0x8019 | |
− | 0018d300: a462000e sh r2,0x000e(r3) | + | 0018d2f4: 8c632d90 lw r3,0x2d90(r3) |{{f/adr|<nowiki>r3 = TCA data pointer</nowiki>}} |
− | 0018d304: 8fbf0014 lw r31,0x0014(r29) | + | 0018d2f8: 00000000 nop | |
− | 0018d308: 8fb00010 lw r16,0x0010(r29) | + | 0018d2fc: a4700026 sh r16,0x0026(r3) |{{f/store|Store Excendent Heal in TCA 0x26 (Uni's 0x1b2)}} |
− | 0018d30c: 27bd0018 addiu r29,r29,0x0018 | + | 0018d300: a462000e sh r2,0x000e(r3) |{{f/store|Store Distribute Ability ID in TCA 0x0e (Unit's 0x19a)}} |
− | 0018d310: 03e00008 jr r31 | + | 0018d304: 8fbf0014 lw r31,0x0014(r29) |
− | 0018d314: 00000000 nop | + | 0018d308: 8fb00010 lw r16,0x0010(r29) |
+ | 0018d30c: 27bd0018 addiu r29,r29,0x0018 | ||
+ | 0018d310: 03e00008 jr r31 | ||
+ | 0018d314: 00000000 nop | ||
+ | === Return location === | ||
+ | '''Battle.bin''' | ||
+ | 0018cca4: [[MP_Switch,_Distribute,_and_Damage_Split_usability]] |
Latest revision as of 21:06, 16 March 2022
Checks if there's an excedent heal, if yes roll random Vs Brave%. If succesful, store Distribute ID in TCA 0x0e and Excedent heal amount in TCA 0x26 TCA = Targeted Unit Current Action -------------------------------------------------------------------------------------------------------- 0018d2a8: 3c058019 lui r5,0x8019 | 0018d2ac: 8ca52d98 lw r5,0x2d98(r5) |r5 = Targeted Unit data pointer 0018d2b0: 3c048019 lui r4,0x8019 | 0018d2b4: 8c842d90 lw r4,0x2d90(r4) |r4 = TCA data pointer 0018d2b8: 27bdffe8 addiu r29,r29,-0x0018 | 0018d2bc: afbf0014 sw r31,0x0014(r29) | 0018d2c0: afb00010 sw r16,0x0010(r29) | 0018d2c4: 94a2002a lhu r2,0x002a(r5) |r2 = Targeted Unit Max HP 0018d2c8: 94a30028 lhu r3,0x0028(r5) |r3 = Targeted Unit Current HP 0018d2cc: 84840006 lh r4,0x0006(r4) |r4 = TCA HP recovery (amount) 0018d2d0: 00431023 subu r2,r2,r3 |r2 = Targeted Unit Missing HP 0018d2d4: 00828023 subu r16,r4,r2 |r16 = Excedent Heal (TCA HP recovery - Targeted Unit missing HP) 0018d2d8: 1a00000a blez r16,0x0018d304 #If TCA Excedent Heal > 0x00 0018d2dc: 00000000 nop | 0018d2e0: 0c0634e1 jal 0x0018d384 |-->Chance to React Returns r2 = 0x00 If Unit will react (Chances are Br%) 0018d2e4: 00a02021 addu r4,r5,r0 | 0018d2e8: 14400006 bne r2,r0,0x0018d304 #If Targeted Unit is reacting 0018d2ec: 340201bc ori r2,r0,0x01bc |r2 = 0x1bc (Distribute ID) 0018d2f0: 3c038019 lui r3,0x8019 | 0018d2f4: 8c632d90 lw r3,0x2d90(r3) |r3 = TCA data pointer 0018d2f8: 00000000 nop | 0018d2fc: a4700026 sh r16,0x0026(r3) |Store Excendent Heal in TCA 0x26 (Uni's 0x1b2) 0018d300: a462000e sh r2,0x000e(r3) |Store Distribute Ability ID in TCA 0x0e (Unit's 0x19a) 0018d304: 8fbf0014 lw r31,0x0014(r29) 0018d308: 8fb00010 lw r16,0x0010(r29) 0018d30c: 27bd0018 addiu r29,r29,0x0018 0018d310: 03e00008 jr r31 0018d314: 00000000 nop
Return location
Battle.bin 0018cca4: MP_Switch,_Distribute,_and_Damage_Split_usability