Difference between revisions of "Weather Elemental effects"
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
00186ee8: 00000000 nop | 00186ee8: 00000000 nop | ||
00186eec: 00402821 addu r5,r2,r0 //r5 = [[Weather]] (+3 if snowing flag is set) | 00186eec: 00402821 addu r5,r2,r0 //r5 = [[Weather]] (+3 if snowing flag is set) | ||
− | 00186ef0: 24a2fffd addiu r2,r5,0xfffd //r2 = weather - | + | 00186ef0: 24a2fffd addiu r2,r5,0xfffd //r2 = weather - 3 |
00186ef4: 2c420002 sltiu r2,r2,0x0002 //r2 = true if weather is rain or thunder | 00186ef4: 2c420002 sltiu r2,r2,0x0002 //r2 = true if weather is rain or thunder | ||
00186ef8: 1040001e beq r2,r0,0x00186f74 branch if not ?? //branch if not raining/thunder during the day | 00186ef8: 1040001e beq r2,r0,0x00186f74 branch if not ?? //branch if not raining/thunder during the day |
Revision as of 04:56, 2 January 2022
Elemental Section? 00186ed0: 27bdffe8 addiu r29,r29,0xffe8 00186ed4: afb00010 sw r16,0x0010(r29) 00186ed8: 3c108019 lui r16,0x8019 00186edc: 921038f7 lbu r16,0x38f7(r16) Load Abilities Element 00186ee0: afbf0014 sw r31,0x0014(r29) 00186ee4: 0c063998 jal 0x0018e660 0018e660 - 0018e6b4 // obtains weather state? 00186ee8: 00000000 nop 00186eec: 00402821 addu r5,r2,r0 //r5 = Weather (+3 if snowing flag is set) 00186ef0: 24a2fffd addiu r2,r5,0xfffd //r2 = weather - 3 00186ef4: 2c420002 sltiu r2,r2,0x0002 //r2 = true if weather is rain or thunder 00186ef8: 1040001e beq r2,r0,0x00186f74 branch if not ?? //branch if not raining/thunder during the day 00186efc: 32020080 andi r2,r16,0x0080 00186f00: 1040000e beq r2,r0,0x00186f3c branch if element isn't fire 00186f04: 32020040 andi r2,r16,0x0040 00186f08: 3c048019 lui r4,0x8019 00186f0c: 8c842d90 lw r4,0x2d90(r4) 00186f10: 00000000 nop 00186f14: 84830004 lh r3,0x0004(r4) Load HP Damage 00186f18: 00000000 nop 00186f1c: 00031040 sll r2,r3,0x01 HP Damage * 2 00186f20: 00431021 addu r2,r2,r3 HP Damage * 3 00186f24: 04410002 bgez r2,0x00186f30 00186f28: 00000000 nop 00186f2c: 24420003 addiu r2,r2,0x0003 00186f30: 00021083 sra r2,r2,0x02 HP Damage * 3 / 4 00186f34: a4820004 sh r2,0x0004(r4) Store New HP Damage 00186f38: 32020040 andi r2,r16,0x0040 00186f3c: 1040000e beq r2,r0,0x00186f78 branch if element isn't lightning 00186f40: 24a2fffa addiu r2,r5,0xfffa //r2 = weather - 6 00186f44: 3c048019 lui r4,0x8019 00186f48: 8c842d90 lw r4,0x2d90(r4) 00186f4c: 00000000 nop 00186f50: 84830004 lh r3,0x0004(r4) Load HP Damage 00186f54: 00000000 nop 00186f58: 00031080 sll r2,r3,0x02 HP Damage * 4 00186f5c: 00431021 addu r2,r2,r3 HP Damage * 5 00186f60: 04410002 bgez r2,0x00186f6c 00186f64: 00000000 nop 00186f68: 24420003 addiu r2,r2,0x0003 00186f6c: 00021083 sra r2,r2,0x02 HP Damage * 5 /4 00186f70: a4820004 sh r2,0x0004(r4) Store new HP Damage 00186f74: 24a2fffa addiu r2,r5,0xfffa //weather - 6 00186f78: 2c420002 sltiu r2,r2,0x0002 //r2 = true if snowing 00186f7c: 1040000f beq r2,r0,0x00186fbc branch if weather isn't ?? //branch if weather is not snowing 00186f80: 32020020 andi r2,r16,0x0020 00186f84: 1040000d beq r2,r0,0x00186fbc branch if element isn't Ice 00186f88: 00000000 nop 00186f8c: 3c048019 lui r4,0x8019 00186f90: 8c842d90 lw r4,0x2d90(r4) 00186f94: 00000000 nop 00186f98: 84830004 lh r3,0x0004(r4) Load HP Damage 00186f9c: 00000000 nop 00186fa0: 00031080 sll r2,r3,0x02 HP Damage * 4 00186fa4: 00431021 addu r2,r2,r3 HP Damage * 5 00186fa8: 04410002 bgez r2,0x00186fb4 00186fac: 00000000 nop 00186fb0: 24420003 addiu r2,r2,0x0003 00186fb4: 00021083 sra r2,r2,0x02 HP Damage * 5 / 4 00186fb8: a4820004 sh r2,0x0004(r4) Store new HP Damage 00186fbc: 8fbf0014 lw r31,0x0014(r29) 00186fc0: 8fb00010 lw r16,0x0010(r29) 00186fc4: 27bd0018 addiu r29,r29,0x0018 00186fc8: 03e00008 jr r31 00186fcc: 00000000 nop