Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////////////
- 0x80249198 - Reads index of selected badge(?)
- 0x80270180 - Badge ID used to index an array here that is a sorted copy of Mario's badges
- Each entry in the array is a 2 byte item ID (items and badges, etc. are
- all apart of the same "list") just like the actual badge array
- 0x800E7884 - After calling the below
- 0x800E9D48 - Returns number of HP Plus badges equipped in V0 (arguments are unknown)
- .org 0x800EA074
- BEQL V1, V0, 0x800EA07C
- ADDIU A1, A1, 0x0001 ;Increments number of badges equipped
- ;-------------------------------;of the current kind being checked
- .org 0x800EA07C
- V0 is the "effect value" of the current badge type being checked and V1 is the "effect value"
- of the badge currently being tested against V0 from the array of equipped badges,
- which is located at 0x8010F498 and contains 0x40 2 byte entries
- The "effect value" is an unsigned byte value obtained by using the badge ID to index an array
- of structs located at 0x800878F8 which are in this format:
- typedef struct {
- byte[2] unk_bytes_1;
- u8 effectVal;
- byte[29] unk_bytes_2;
- } badge_data; // Size == 32
- 0x800E9DBC
- Usually 0x84430208
- Change to 0x24030114 to make the game think 64 Lucky Day badges are equipped
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .org 0x80263B60
- LH V0, 0x0208 (A1) ;Reads a badge ID from the array of equipped
- ;-------------------------------;badges and increments Mario's attack power by 1
- ;-------------------------------;if the loaded badge is a Power Plus badge
- ;-------------------------------;(obviously this instruction is part of a loop)
- .org 0x800E9FC8
- J 0x800EA074
- ADDIU V0, R0, 0x0048 ;Comparing to Lucky Day's "effect value"
- 0x800299FC - Seems to be the routine that returns randomly generated percentages
- Takes an int argument such that the output is between 0 and that argument
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .org 0x802773B8
- JAL 0x800299FC
- ADDIU A0, R0, 0x0064 ;
- SLTI V0, V0, 0x0014 ;Lucky Day's effectiveness chance
- BEQ V0, R0, 0x802773D4
- ;-------------------------------;Above instruction's value is 0x10400003
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Always Dodge (requires Lucky Day):
- D12773C4 1040
- 812773C4 2400
- Lucky Day Effect Always On (don't need Lucky Day):
- D10E9FCC 2402
- 810E9FCC 0060
- D10E9FCE 0048
- 810E9FCE 1025
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .org 0x80277390
- JAL 0x800299FC
- ADDIU A0, R0, 0x0064 ;
- SLTI V0, V0, 0x001E ;Close Call's effectiveness chance
- BNEL V0, R0, 0x802773D0
- ADDIU S1, R0, 0x0005 ;
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- .org 0x80277358
- JAL 0x800299FC
- ADDIU A0, R0, 0x0064 ;
- SLTI V0, V0, 0x000A ;Pretty Lucky's effectiveness chance
- BNEL V0, R0, 0x802773D0
- ADDIU S1, R0, 0x0005 ;
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Lucky Day's effect ID is 0x48
- Close Call's effect ID is 0x47
- Pretty Lucky's effect ID is 0x42
- - Apparently Close Call only works if it's one of the first 56 badges you equip?!
- (The loop only goes through the first 0x38 elements of the equipped badges array
- when checking for Close Call equips)
- - The badges all stack the way you'd expect: A separate check is done for each type
- (not each badge) to see if they successfully dodge the attack. If any succeed,
- they all do, meaning Mario's dodge rate is 1 - .9(P).8(L).7(C), where
- P, L and C are 1 (and 0 otherwise) if Mario is wearing Pretty Lucky,
- Lucky Day and Close Call (in Danger mode), respectively.
- The maximum dodge rate therefore is 49.6%
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement