Don't allow auto-roulette to get challenging items

This commit is contained in:
Sally Coolatta 2024-05-05 18:22:04 -04:00
parent 715cbd5590
commit e01234285b

View file

@ -565,6 +565,18 @@ static boolean K_DenyShieldOdds(kartitems_t item)
return false;
}
static boolean K_DenyAutoRouletteOdds(kartitems_t item)
{
// Deny items that are too hard for newbies
switch (item)
{
case KITEM_GARDENTOP:
return true;
default:
return false;
}
}
/*--------------------------------------------------
static fixed_t K_AdjustSPBOdds(const itemroulette_t *roulette, UINT8 position)
@ -738,6 +750,14 @@ INT32 K_KartGetItemOdds(const player_t *player, itemroulette_t *const roulette,
return 0;
}
if (roulette->autoroulette == true)
{
if (K_DenyAutoRouletteOdds(item))
{
return 0;
}
}
if (gametype == GT_BATTLE)
{
I_Assert(pos < 2); // DO NOT allow positions past the bounds of the table