; NAME: Item Shop Shopkeeper Editor
; GAMES: MP3_USA
; EXECUTION: Direct
; PARAM: Number|BabyBowserChance

ADDIU SP SP -120
SW RA 116(SP)
SW S0 112(SP)
SW S1 108(SP) 
SW S2 104(SP)
SW S3 100(SP)
SW S4 96(SP) 
SW S5 92(SP) 
SW S6 88(SP)
SW S7 84(SP)
SW FP 80(SP)



; Normally, on Mario Party 3, there's a 66% chance for Toad to show up in the Item Shop,
; and a 33% chance for Baby Bowser to show up. This event allows you to set the percent
; chance for Baby Bowser to show up. Make sure the number is between 0 and 100. When
; using this event, place it on the Item Shop Space FIRST and THEN place the "Visit 
; Item Shop" event right AFTER in the same space.
JAL RNGPercentChance ; 1 if Baby Bowser, 0 if Toad
LI A0 BabyBowserChance ; Baby Bowser % chance
ADDIU V0 V0 1 ; Add 1 to get Toad's Index (1) and Baby Bowser's Index (2)

LUI T0 0x800C
ORI T0 T0 0xCD0AC ; Item Shopkeeper Index
SH V0 0(T0) ; Store Shopkeeper's Index



LW S0 112(SP)
LW S1 108(SP) 
LW S2 104(SP)
LW S3 100(SP)
LW S4 96(SP) 
LW S5 92(SP) 
LW S6 88(SP)
LW S7 84(SP)
LW FP 80(SP)
LW RA 116(SP)
JR RA
ADDIU SP SP 120


