Move/Jump +X Calculation
Jump to navigation
Jump to search
Move/Jump +X Calculation (CAN BE USED TO LOAD DATA AT START OF BATTL E 0005c8ec: 14a00005 bne r5,r0,0x0005c904 Branch if not Setting Current HP/MP to Max 0005c8f0: 00000000 nop 0005c8f4: 9482002a lhu r2,0x002a(r4) Load Unit's Max HP 0005c8f8: 9483002e lhu r3,0x002e(r4) Load Unit's Max MP 0005c8fc: a4820028 sh r2,0x0028(r4) Store Current HP = Max HP 0005c900: a483002c sh r3,0x002c(r4) Store Current MP = Max MP 0005c904: 9085003a lbu r5,0x003a(r4) Load Unit's Move 0005c908: 90860093 lbu r6,0x0093(r4) Load Unit's 1st set of Movements 0005c90c: 9083003b lbu r3,0x003b(r4) Load Unit's Jump 0005c910: 30c20080 andi r2,r6,0x0080 0005c914: 10400002 beq r2,r0,0x0005c920 Branch if Unit doesn't have Move +1 0005c918: 30c20040 andi r2,r6,0x0040 0005c91c: 24a50001 addiu r5,r5,0x0001 Move += 1 0005c920: 10400002 beq r2,r0,0x0005c92c Branch if Unit doesn't have Move +2 0005c924: 30c20020 andi r2,r6,0x0020 0005c928: 24a50002 addiu r5,r5,0x0002 Move += 2 0005c92c: 10400002 beq r2,r0,0x0005c938 Branch if Unit doesn't have Move +3 0005c930: 30c20010 andi r2,r6,0x0010 0005c934: 24a50003 addiu r5,r5,0x0003 Move += 3 0005c938: 10400002 beq r2,r0,0x0005c944 Branch if Unit doesn't have Jump +1 0005c93c: 30c20008 andi r2,r6,0x0008 0005c940: 24630001 addiu r3,r3,0x0001 Jump += 1 0005c944: 10400002 beq r2,r0,0x0005c950 Branch if Unit doesn't have Jump +2 0005c948: 30c20004 andi r2,r6,0x0004 0005c94c: 24630002 addiu r3,r3,0x0002 Jump += 2 0005c950: 10400002 beq r2,r0,0x0005c95c Branch if Unit doesn't have Jump +3 0005c954: 30a2ffff andi r2,r5,0xffff 0005c958: 24630003 addiu r3,r3,0x0003 Jump += 3 0005c95c: 2c4200fd sltiu r2,r2,0x00fd 0005c960: 14400002 bne r2,r0,0x0005c96c Branch if Unit's Move < 253 0005c964: 3062ffff andi r2,r3,0xffff 0005c968: 340500fc ori r5,r0,0x00fc Move = 252 0005c96c: 2c420008 sltiu r2,r2,0x0008 0005c970: 14400002 bne r2,r0,0x0005c97c Branch if Unit's Jump < 8 0005c974: a085003a sb r5,0x003a(r4) Store Move 0005c978: 34030007 ori r3,r0,0x0007 Jump = 7 0005c97c: 03e00008 jr r31 0005c980: a083003b sb r3,0x003b(r4) Store Jump
Return Locations
0005ab24: Equipment/Move/Jump +X/Name Storing/Generation 0005d6fc: Status Setting/Checking + Equip/R/S/M Stats