Add KIF_HYUCANTSTEAL

- Prevents the given item from ever being stolen by Hyudoro
- Useful for those extra-special items that you really want the player to use
This commit is contained in:
yamamama 2026-02-16 16:45:03 -05:00
parent d5ca5516de
commit 542648e948
3 changed files with 10 additions and 2 deletions

View file

@ -1599,6 +1599,7 @@ struct int_const_s const INT_CONST[] = {
{"KIF_DARKBG",KIF_DARKBG},
{"KIF_COLPATCH2PLAYER",KIF_COLPATCH2PLAYER},
{"KIF_HIDEFROMROULETTE",KIF_HIDEFROMROULETTE},
{"KIF_HYUCANTSTEAL",KIF_HYUCANTSTEAL},
// kartresultflags_e
{"KRF_INDIRECTITEM",KRF_INDIRECTITEM},

View file

@ -1779,8 +1779,14 @@ static void K_DoHyudoroSteal(player_t *player)
&& !(players[i].itemflags & IF_ITEMOUT)
&& !players[i].itemblink))
{
playerswappable[numplayers] = i;
numplayers++;
kartitemflags_e flags = K_GetItemFlags(players[i].itemtype);
// I'd have liked for this to be a result-based thing, but that'd need a rework in of itself.
if ((flags & KIF_HYUCANTSTEAL) != KIF_HYUCANTSTEAL)
{
playerswappable[numplayers] = i;
numplayers++;
}
}
}

View file

@ -84,6 +84,7 @@ typedef enum
KIF_DARKBG = 1<<3, // use dark item roulette BG
KIF_COLPATCH2PLAYER = 1<<4, // colourize patch to player
KIF_HIDEFROMROULETTE = 1<<5, // don't show this item in the roulette (inversion of xItem's showInRoulette item flag)
KIF_HYUCANTSTEAL = 1<<7, // Prevents the item from being stolen by a Hyudoro
} ATTRPACK kartitemflags_e;
// result flags relevant to the roulette