Label slot machine ids, fix GetPriceReduction
This commit is contained in:
+31
-6
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user