Fix: Prevent certain items from being marked as "major" (#2496)

* fix certain items being marked as major

* simplify check

* avoid string check
This commit is contained in:
Adam Bird 2023-02-17 07:14:43 -05:00 committed by GitHub
parent deb47ea430
commit 3f3f4ff3ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -95,8 +95,12 @@ public:
if (type == ITEMTYPE_DUNGEONREWARD && (ShuffleRewards.Is(REWARDSHUFFLE_END_OF_DUNGEON))) {
return false;
}
// PURPLE TODO: LOCALIZATION
if (name.GetEnglish().find("Bombchus") != std::string::npos && !BombchusInLogic) {
if ((randomizerGet == RG_BOMBCHU_5 || randomizerGet == RG_BOMBCHU_10 || randomizerGet == RG_BOMBCHU_20) && !BombchusInLogic) {
return false;
}
if (hintKey == HEART_CONTAINER || hintKey == PIECE_OF_HEART || hintKey == TREASURE_GAME_HEART) {
return false;
}

View File

@ -190,9 +190,9 @@ void ItemTable_Init() { // RandomizerGet
itemTable[BOMBS_5] = Item(RG_BOMBS_5, Text{"Bombs (5)", "Bombes (5)", "Bombas (5)"}, ITEMTYPE_REFILL, GI_BOMBS_5, false, &noVariable, BOMBS_5);
itemTable[BOMBS_10] = Item(RG_BOMBS_10, Text{"Bombs (10)", "Bombes (10)", "Bombas (10)"}, ITEMTYPE_REFILL, GI_BOMBS_10, false, &noVariable, BOMBS_10);
itemTable[BOMBS_20] = Item(RG_BOMBS_20, Text{"Bombs (20)", "Bombes (20)", "Bombas (20)"}, ITEMTYPE_REFILL, GI_BOMBS_20, false, &noVariable, BOMBS_20);
itemTable[BOMBCHU_5] = Item(RG_BOMBCHU_5, Text{"Bombchu (5)", "Missiles (5)", "Bombchus (5)"}, ITEMTYPE_REFILL, GI_BOMBCHUS_5, true, &Bombchus5, BOMBCHU_5);
itemTable[BOMBCHU_10] = Item(RG_BOMBCHU_10, Text{"Bombchu (10)", "Missiles (10)", "Bombchus (10)"}, ITEMTYPE_REFILL, GI_BOMBCHUS_10, true, &Bombchus10, BOMBCHU_10);
itemTable[BOMBCHU_20] = Item(RG_BOMBCHU_20, Text{"Bombchu (20)", "Missiles (20)", "Bombchus (20)"}, ITEMTYPE_REFILL, GI_BOMBCHUS_20, true, &Bombchus20, BOMBCHU_20);
itemTable[BOMBCHU_5] = Item(RG_BOMBCHU_5, Text{"Bombchus (5)", "Missiles (5)", "Bombchus (5)"}, ITEMTYPE_REFILL, GI_BOMBCHUS_5, true, &Bombchus5, BOMBCHU_5);
itemTable[BOMBCHU_10] = Item(RG_BOMBCHU_10, Text{"Bombchus (10)", "Missiles (10)", "Bombchus (10)"}, ITEMTYPE_REFILL, GI_BOMBCHUS_10, true, &Bombchus10, BOMBCHU_10);
itemTable[BOMBCHU_20] = Item(RG_BOMBCHU_20, Text{"Bombchus (20)", "Missiles (20)", "Bombchus (20)"}, ITEMTYPE_REFILL, GI_BOMBCHUS_20, true, &Bombchus20, BOMBCHU_20);
itemTable[BOMBCHU_DROP] = Item(RG_BOMBCHU_DROP, Text{"Bombchu Drop", "Drop Missiles", "Bombchus"}, ITEMTYPE_DROP, GI_BOMBCHUS_10, true, &BombchuDrop, NONE);
itemTable[ARROWS_5] = Item(RG_ARROWS_5, Text{"Arrows (5)", "Flèches (5)", "Flechas (5)"}, ITEMTYPE_REFILL, GI_ARROWS_SMALL, false, &noVariable, ARROWS_5);
itemTable[ARROWS_10] = Item(RG_ARROWS_10, Text{"Arrows (10)", "Flèches (10)", "Flechas (10)"}, ITEMTYPE_REFILL, GI_ARROWS_MEDIUM, false, &noVariable, ARROWS_10);