Physical Evade Calculation
Jump to navigation
Jump to search
No Parameters Returns r2 = 0x00 if Attack Hits and if Ability is not Evadeable Set the 4 Ability Evade bytes - 0x801938de - Accessory Evade - 0x801938df - RH Evade (weapon or shield) - 0x801938e0 - LH Evade (weapon or shield) - 0x801938e1 - Class Evade Set Ability Base Hit to 100 (0x801938dc) Modify Evade bytes and base Hit according to Statuses/Ability/Facing/Weather etc.. Roll Each Ability Evade byte against Ability Base Hit (So something halvering Ability Base hit, will in fact doubles all Evade bytes) ---------------------------------------------------------------------------------------------- 00188510: 27bdffe8 addiu r29,r29,-0x0018 00188514: afbf0010 sw r31,0x0010(r29) 00188518: 0c0613e7 jal 0x00184f9c |-->Equipment Evasion Setting (Physical) Set the 4 Ability Evade byte , set Ability base hit to 100 0018851c: 00000000 nop | 00188520: 0c0614b9 jal 0x001852e4 |-->Concentrate Calculation Nullify the 4 Ability Evade byte if Attacker uses Concentration 00188524: 00000000 nop | 00188528: 0c0614ca jal 0x00185328 |-->Dark/Confuse Caclulation Ability Base Hit/2 if attacker blinded or confused / Nullify the 4 Ability Evade byte if attacker is transparent 0018852c: 00000000 nop | 00188530: 0c0614df jal 0x0018537c |-->Abandon Calculation If target as abandon (and it is usable) --> Ability Base Hit/2 00188534: 00000000 nop | 00188538: 0c0614fd jal 0x001853f4 |-->Evasion Changes due to Statuses Nullify the 4 Ability evade byte based on Target status - Ability Base Hit/2 if target defending 0018853c: 00000000 nop | 00188540: 0c0615ce jal 0x00185738 |-->Weather effects on Bows With Bows/Crossbows : Night = Ability base Hit * 0,75 and/or If Stormy weather Ability base hit *0,75 00188544: 00000000 nop | 00188548: 0c06153f jal 0x001854fc |-->Facing Evade Calculation Side Attack cancels Class evasion, Back Attack additionnaly cancels Right/Left hand evasion 0018854c: 00000000 nop | 00188550: 0c062122 jal 0x00188488 |-->Calculate Hit % If Ability is evadeable : Roll the 4 Ability Evade byte (one after another) against Ability base Hit 00188554: 00000000 nop 00188558: 8fbf0010 lw r31,0x0010(r29) 0018855c: 27bd0018 addiu r29,r29,0x0018 00188560: 03e00008 jr r31 00188564: 00000000 nop
Return Locations
Battle.bin 00188b74: Formula 01 : Dmg (Weapon) 00188bb4: Formula 02 : Dmg (Weapon) 00188d04: Formula 06 : AbsHP (Weapon) 0018972c: Formula 25 : Equipped: Break Hit (PA+WP+X)% 001897d0: Formula 26 : Equipped: Steal Hit (SP+X)% 00189838: Formula 27 : StealGil (CasLVL*SP) Hit (SP+X)% 00189880: Formula 28 : StealExp (Lowest of TarCurExp & SP+Y) Hit (SP+X)% 00189aa0: Formula 2b : Hit (PA+X)% // -PA/MA/SP (X) 00189ae8: Formula 2c : DmgMP (X)% Hit (PA+Y)% 00189b30: Formula 2d : Dmg (PA*(WP+Y)) 100% Status 00189ba4: Formula 2e : Equipped:Break Dmg (PA*WP) 00189c60: Formula 2f : AbsMP (PA*WP) 00189ca0: Formula 30 : AbsHP (PA*WP) 00189ce0: Formula 31 : Dmg ((PA+Y)/2*PA) 00189d84: Formula 32 : Dmg (Rdm(1…X)*(PA*3+Y)) 00189f94: Formula 37 : Dmg (Rdm(1…Y)*PA) 0018a3e0: Formula 4d : AbsHP (Y)% Hit (MA+X)% 0018a468: Formula 4f : Dmg (CasMaxHP-CasCurHP) Hit (PA+X)% 0018a4b0: Formula 50 : Hit (MA+X)% 0018abcc: Formula 63 : Dmg (SP*WP)