Defense UP routine
Jump to navigation
Jump to search
No Parameters - Returns Nothing If Target uses Defend Up : Modifiy Ability XA (0x801938ce) to 66% of its initial value ---------------------------------------------------------------------------------------------- 001862cc: 3c028019 lui r2,0x8019 001862d0: 8c422d98 lw r2,0x2d98(r2) |r2 = Target's Data Pointer 001862d4: 00000000 nop | 001862d8: 90420090 lbu r2,0x0090(r2) |r2 = Target's 2nd set of Support byte 001862dc: 00000000 nop | 001862e0: 30420008 andi r2,r2,0x0008 |r2 = 0x08 if Target uses Defend Up 001862e4: 1040000b beq r2,r0,0x00186314 #If Target uses [Defense Up] 001862e8: 3c025555 lui r2,0x5555 | 001862ec: 3c048019 lui r4,0x8019 | 001862f0: 248438ce addiu r4,r4,0x38ce |r4 = 0x801938ce (Ability XA pointer) 801938ce 001862f4: 84830000 lh r3,0x0000(r4) |r3 = Abililty XA 001862f8: 34425556 ori r2,r2,0x5556 |r2 = 0x55555556 (0,33* 2^32) 001862fc: 00031840 sll r3,r3,0x01 |r3 = XA*2 00186300: 00620018 mult r3,r2 |XA*2 * 0,33 * 2^32 00186304: 00031fc3 sra r3,r3,0x1f |r3 = Higher bit of r3 (should be 0x00) 00186308: 00001010 mfhi r2 |r2 = XA*2/3 0018630c: 00431023 subu r2,r2,r3 |r2 = XA*2/3 - 0x00 00186310: a4820000 sh r2,0x0000(r4) |Store XA (66% of initial value) 00186314: 03e00008 jr r31 END 00186318: 00000000 nop
Return Locations
Battle.bin 00188618: Physical XA Modifying Statuses/Support 00188af4: Cluster of Physical Routines 001898a8: 28 StealExp_(Lowest of TarCurExp & SP+Y) Hit_(SP+X)%