SUPER CHARGED KARMA ITEMS

They give equal chance on a lot of good shit, instead of the normal boring pool of items, mwahaha

(also calls P_CheckRacers when someone spectates)
This commit is contained in:
TehRealSalt 2018-06-03 20:58:52 -04:00
parent e3008407d1
commit 6d57d39e12
5 changed files with 37 additions and 27 deletions

View file

@ -702,7 +702,7 @@ void D_SRB2Loop(void)
else if (rendertimeout < entertic) // in case the server hang or netsplit
{
// Lagless camera! Yay!
/*
/* Not yay, it ruins Kart's drift :y
if (gamestate == GS_LEVEL && netgame)
{
if (camera.chase)

View file

@ -3235,6 +3235,8 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
P_CheckSurvivors();
else if (G_BattleGametype())
K_CheckBalloons(); // SRB2Kart
else if (G_RaceGametype())
K_CheckRacers(); // also SRB2Kart
}
//

View file

@ -262,6 +262,7 @@ typedef enum
k_offroad, // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
k_roulettetype, // Used for the roulette, for deciding type (currently only used for Battle, to give you better items from Karma items)
k_itemclose, // Used to animate the item window closing (was "pw_psychic")
// Some items use timers for their duration or effects

View file

@ -385,30 +385,30 @@ static INT32 K_KartItemOddsDistance_Retro[NUMKARTITEMS][9] =
/*Feather*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0 } // Feather
};
static INT32 K_KartItemOddsBalloons[NUMKARTITEMS][5] =
static INT32 K_KartItemOddsBalloons[NUMKARTITEMS][6] =
{
//P-Odds 0 1 2 3 4
/*Magnet*/ { 0, 0, 0, 0, 0 }, // Magnet
/*Boo*/ { 0, 0, 1, 1, 0 }, // Boo
/*Mushroom*/ { 0, 1, 2, 1, 0 }, // Mushroom
/*Triple Mushroom*/ { 0, 0, 0, 0, 0 }, // Triple Mushroom
/*Mega Mushroom*/ { 1, 2, 0, 0, 0 }, // Mega Mushroom
/*Gold Mushroom*/ { 0, 0, 0, 0, 0 }, // Gold Mushroom
/*Star*/ { 1, 2, 0, 0, 0 }, // Star
//P-Odds 0 1 2 3 4 5
/*Magnet*/ { 0, 0, 0, 0, 0, 0 }, // Magnet
/*Boo*/ { 0, 0, 1, 1, 0, 0 }, // Boo
/*Mushroom*/ { 0, 1, 2, 1, 0, 1 }, // Mushroom
/*Triple Mushroom*/ { 0, 0, 0, 0, 0, 0 }, // Triple Mushroom
/*Mega Mushroom*/ { 1, 2, 0, 0, 0, 1 }, // Mega Mushroom
/*Gold Mushroom*/ { 0, 0, 0, 0, 0, 0 }, // Gold Mushroom
/*Star*/ { 1, 2, 0, 0, 0, 1 }, // Star
/*Triple Banana*/ { 0, 1, 1, 0, 0 }, // Triple Banana
/*Fake Item*/ { 0, 0, 2, 1, 1 }, // Fake Item
/*Banana*/ { 0, 0, 3, 1, 1 }, // Banana
/*Green Shell*/ { 0, 0, 5, 3, 2 }, // Green Shell
/*Red Shell*/ { 0, 3, 3, 0, 0 }, // Red Shell
/*Triple Green Shell*/ { 0, 1, 1, 0, 0 }, // Triple Green Shell
/*Bob-omb*/ { 0, 3, 3, 0, 0 }, // Bob-omb
/*Blue Shell*/ { 0, 0, 0, 0, 0 }, // Blue Shell
/*Fire Flower*/ { 0, 3, 3, 0, 0 }, // Fire Flower
/*Triple Red Shell*/ { 1, 2, 0, 0, 0 }, // Triple Red Shell
/*Lightning*/ { 0, 0, 0, 0, 0 }, // Lightning
/*Triple Banana*/ { 0, 1, 1, 0, 0, 1 }, // Triple Banana
/*Fake Item*/ { 0, 0, 2, 1, 1, 0 }, // Fake Item
/*Banana*/ { 0, 0, 3, 1, 1, 0 }, // Banana
/*Green Shell*/ { 0, 0, 5, 3, 2, 0 }, // Green Shell
/*Red Shell*/ { 0, 3, 3, 0, 0, 1 }, // Red Shell
/*Triple Green Shell*/ { 0, 1, 1, 0, 0, 1 }, // Triple Green Shell
/*Bob-omb*/ { 0, 3, 3, 0, 0, 1 }, // Bob-omb
/*Blue Shell*/ { 0, 0, 0, 0, 0, 0 }, // Blue Shell
/*Fire Flower*/ { 0, 3, 3, 0, 0, 1 }, // Fire Flower
/*Triple Red Shell*/ { 1, 2, 0, 0, 0, 1 }, // Triple Red Shell
/*Lightning*/ { 0, 0, 0, 0, 0, 0 }, // Lightning
/*Feather*/ { 0, 0, 1, 1, 0 } // Feather
/*Feather*/ { 0, 0, 1, 1, 0, 0 } // Feather
};
/** \brief Item Roulette for Kart
@ -593,11 +593,16 @@ static void K_KartItemRouletteByDistance(player_t *player, ticcmd_t *cmd)
if (G_BattleGametype()) // Battle Mode
{
useodds = (player->kartstuff[k_balloon]-avgballoon)+2; // 0 is two balloons below average, 2 is average, 4 is two balloons above average
if (useodds > 4)
useodds = 4;
if (useodds < 0)
useodds = 0;
if (player->kartstuff[k_roulettetype] == 1)
useodds = 5;
else
{
useodds = (player->kartstuff[k_balloon]-avgballoon)+2; // 0 is two balloons below average, 2 is average, 4 is two balloons above average
if (useodds > 4)
useodds = 4;
if (useodds < 0)
useodds = 0;
}
}
else
{

View file

@ -1710,6 +1710,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (netgame && cv_hazardlog.value)
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[thing->player-players], player_names[tmthing->player-players]);
tmthing->player->kartstuff[k_itemroulette] = 1;
tmthing->player->kartstuff[k_roulettetype] = 1;
if (thing->player->kartstuff[k_comebackpoints] >= 3)
K_StealBalloon(thing->player, tmthing->player, true);
thing->player->kartstuff[k_comebacktimer] = comebacktime;
@ -1724,6 +1725,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (netgame && cv_hazardlog.value)
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[tmthing->player-players], player_names[thing->player-players]);
thing->player->kartstuff[k_itemroulette] = 1;
thing->player->kartstuff[k_roulettetype] = 1;
if (tmthing->player->kartstuff[k_comebackpoints] >= 3)
K_StealBalloon(tmthing->player, thing->player, true);
tmthing->player->kartstuff[k_comebacktimer] = comebacktime;