59 –Lvl(1) Hit (MA+X)%

From Final Fantasy Hacktics Wiki
(Redirected from 0018a908 - 0018a97c)
Jump to navigation Jump to search
[59]
0018a908: 27bdffe8 addiu r29,r29,-0x0018    |
0018a90c: afbf0010 sw r31,0x0010(r29)       |
0018a910: 0c06216e jal 0x001885b8           |-->Magical_Evade_Calculation If Abillity is evadeable roll Ability Evade byte against Ability base Hit / Returns r2
0018a914: 00000000 nop                      |
0018a918: 14400015 bne r2,r0,0x0018a970     #If Attack is not evaded
0018a91c: 00000000 nop                          |
0018a920: 0c0622a1 jal 0x00188a84               |-->MA + X without faith Set XA ans YA, applies magical modifier (no faith) and compat, uses XA+YA as Hit% - returns r2
0018a924: 00000000 nop                          |
0018a928: 14400011 bne r2,r0,0x0018a970         #If Attack hits
0018a92c: 00000000 nop                              |
0018a930: 3c028019 lui r2,0x8019                    |
0018a934: 8c422d98 lw r2,0x2d98(r2)                 |r2 = Target data pointer
0018a938: 00000000 nop                              |
0018a93c: 90420022 lbu r2,0x0022(r2)                |r2 = Target's Lv
0018a940: 00000000 nop                              |
0018a944: 2c420002 sltiu r2,r2,0x0002               |r2 = 0x01 if Target Lv is 1
0018a948: 10400003 beq r2,r0,0x0018a958             #If Target Lv is 1
0018a94c: 00000000 nop                                  |
0018a950: 0c0610c3 jal 0x0018430c                       |-->Force_Attack_Miss Hit Flag = Miss Hit% = 0 - Evade type = 0x07
0018a954: 00000000 nop                                  |
0018a958: 3c028019 lui r2,0x8019                    |
0018a95c: 8c422d90 lw r2,0x2d90(r2)                 |r2 = Target Current Action (TCA) data pointer
0018a960: 34030100 ori r3,r0,0x0100                 |r3 = 0x0100
0018a964: a4430010 sh r3,0x0010(r2)                 |Enable TCA special flag 2 0x01 (-1 Lv)
0018a968: 34030001 ori r3,r0,0x0001                 |r3 = 0x01
0018a96c: a0430025 sb r3,0x0025(r2)                 |Set TCA Attack type as pseudostatus
0018a970: 8fbf0010 lw r31,0x0010(r29)       END
0018a974: 27bd0018 addiu r29,r29,0x0018
0018a978: 03e00008 jr r31
0018a97c: 00000000 nop

Return location

Battle.bin
0018b97c : Pre Formula Setup