Difference between revisions of "Elemental Damage Modification"
Jump to navigation
Jump to search
m |
m (jal link) |
||
Line 24: | Line 24: | ||
00184ef0: 10400005 beq r2,r0,0x00184f08 Branch if Weapon's Element is not Nullified | 00184ef0: 10400005 beq r2,r0,0x00184f08 Branch if Weapon's Element is not Nullified | ||
00184ef4: 00000000 nop | 00184ef4: 00000000 nop | ||
− | 00184ef8: 0c061390 jal 0x00184e40 | + | 00184ef8: 0c061390 jal 0x00184e40 [[Elemental_Nullification]] |
00184efc: 00000000 nop | 00184efc: 00000000 nop | ||
00184f00: 080613e3 j 0x00184f8c | 00184f00: 080613e3 j 0x00184f8c |
Revision as of 20:49, 16 May 2021
Elemental Damage Modification (Halve, Null, Absorb, Weak) (r4 = Weapon's Element) 00184e98: 3c028019 lui r2,0x8019 00184e9c: 8c422d98 lw r2,0x2d98(r2) Load Target Data Pointer 00184ea0: 27bdffe8 addiu r29,r29,0xffe8 00184ea4: afbf0010 sw r31,0x0010(r29) 00184ea8: 9042006d lbu r2,0x006d(r2) Load Target's Elemental Absorption 00184eac: 00802821 addu r5,r4, r0 r5 = Weapon's Element 00184eb0: 00451024 and r2,r2,r 5 00184eb4: 10400008 beq r2,r0,0x00184ed8 Branch if Weapon's Element is not absorbed 00184eb8: 00000000 nop 00184ebc: 3c038019 lui r3,0x8019 00184ec0: 8c632d90 lw r3,0x2d90(r3) Load Current Action Data Pointer 00184ec4: 00000000 nop 00184ec8: 94620010 lhu r2,0x0010(r3) Load ? 00184ecc: 00000000 nop 00184ed0: 34420400 ori r2,r2,0x0400 Enable 0x04 Flag 00184ed4: a4620010 sh r2,0x0010(r3) Store ? 00184ed8: 3c038019 lui r3,0x8019 00184edc: 8c632d98 lw r3,0x2d98(r3) Load Target Data Pointer 00184ee0: 00000000 nop 00184ee4: 9062006e lbu r2,0x006e(r3) Load Target's Elemental Nullification 00184ee8: 00000000 nop 00184eec: 00451024 and r2,r2,r5 00184ef0: 10400005 beq r2,r0,0x00184f08 Branch if Weapon's Element is not Nullified 00184ef4: 00000000 nop 00184ef8: 0c061390 jal 0x00184e40 Elemental_Nullification 00184efc: 00000000 nop 00184f00: 080613e3 j 0x00184f8c 00184f04: 00000000 nop 00184f08: 9062006f lbu r2,0x006f(r3) Load Target's Elemental Halving 00184f0c: 00000000 nop 00184f10: 00451024 and r2,r2,r 5 00184f14: 1040000c beq r2,r0,0x00184f48 Branch if Weapon's Element is not Halved 00184f18: 00000000 nop 00184f1c: 3c028019 lui r2,0x8019 00184f20: 8c422d90 lw r2,0x2d90(r2) Load Current Action Data Pointer 00184f24: 00000000 nop 00184f28: 94430004 lhu r3,0x0004(r2) Load HP Damage 00184f2c: 00000000 nop 00184f30: 00031c00 sll r3,r3,0x10 HP Damage * 65536 00184f34: 00032403 sra r4,r3,0x10 HP Damage * 65536 / 65536... 00184f38: 00031fc2 srl r3,r3,0x1f 00184f3c: 00832021 addu r4,r4,r3 00184f40: 00042043 sra r4,r4,0x01 HP Damage / 2 00184f44: a4440004 sh r4,0x0004(r2) Store new HP Damage 00184f48: 3c028019 lui r2,0x8019 00184f4c: 8c422d98 lw r2,0x2d98(r2) Load Target Data Pointer 00184f50: 00000000 nop 00184f54: 90420070 lbu r2,0x0070(r2) Load Target's Elemental Weakness 00184f58: 00000000 nop 00184f5c: 00451024 and r2,r2,r5 00184f60: 1040000a beq r2,r0,0x00184f8c Branch if Weapon's Element is not a Weakness 00184f64: 00000000 nop 00184f68: 3c028019 lui r2,0x8019 00184f6c: 8c422d90 lw r2,0x2d90(r2) Load Current Action Data Pointer 00184f70: 00000000 nop 00184f74: 94430010 lhu r3,0x0010(r2) Load ? (Current action special Flag1 and special flag2 - halfword) 00184f78: 84440004 lh r4,0x0004(r2) Load HP Damage 00184f7c: 34630800 ori r3,r3,0x0800 Enable 0x08 Flag (on special flag 2 = weakness) 00184f80: 00042040 sll r4,r4,0x01 HP Damage * 2 00184f84: a4430010 sh r3,0x0010(r2) Store ? (special flag 1 and 2 - with weakness enabled) 00184f88: a4440004 sh r4,0x0004(r2) Store new HP Damage 00184f8c: 8fbf0010 lw r31,0x0010(r29) 00184f90: 27bd0018 addiu r29,r29,0x0018 00184f94: 03e00008 jr r31 00184f98: 00000000 nop
Return Locations
00186fe0: Elemental Damage Modification (Prep) 001870e0: Ability Elemental? Apply Elemental - Glain