diff options
Diffstat (limited to 'src/field_specials.c')
-rw-r--r-- | src/field_specials.c | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/src/field_specials.c b/src/field_specials.c index dce9d8efa..22467cfee 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1330,15 +1330,40 @@ void BufferEReaderTrainerName(void) u16 GetSlotMachineId(void) { - static const u8 sSlotMachineRandomSeeds[] = {12, 2, 4, 5, 1, 8, 7, 11, 3, 10, 9, 6}; - static const u8 sSlotMachineIds[] = {0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5}; - static const u8 sSlotMachineServiceDayIds[] = {3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5}; + static const u8 sSlotMachineRandomSeeds[SLOT_MACHINE_COUNT] = {12, 2, 4, 5, 1, 8, 7, 11, 3, 10, 9, 6}; + static const u8 sSlotMachineIds[SLOT_MACHINE_COUNT] = { + SLOT_MACHINE_UNLUCKIEST, + SLOT_MACHINE_UNLUCKIER, + SLOT_MACHINE_UNLUCKIER, + SLOT_MACHINE_UNLUCKY, + SLOT_MACHINE_UNLUCKY, + SLOT_MACHINE_UNLUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIEST + }; + static const u8 sSlotMachineServiceDayIds[SLOT_MACHINE_COUNT] = { + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKY, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIER, + SLOT_MACHINE_LUCKIEST, + SLOT_MACHINE_LUCKIEST + }; u32 rnd = gSaveBlock1Ptr->dewfordTrends[0].trendiness + gSaveBlock1Ptr->dewfordTrends[0].rand + sSlotMachineRandomSeeds[gSpecialVar_0x8004]; - if (GetPriceReduction(POKENEWS_GAME_CORNER)) - { + if (IsPokeNewsActive(POKENEWS_GAME_CORNER)) return sSlotMachineServiceDayIds[rnd % SLOT_MACHINE_COUNT]; - } + return sSlotMachineIds[rnd % SLOT_MACHINE_COUNT]; } |