Talk:Oil of Garlic

From Stardew Valley Wiki
Revision as of 21:06, 23 November 2021 by Margotbean (talk | contribs)
Jump to navigation Jump to search
This talk page is for discussing Oil of Garlic.
  • Sign and date your posts by typing four tildes (~~~~).
  • Put new text below old text.
  • Be polite.
  • Assume good faith.
  • Don't delete discussions.

Effect on Monster Spawning

I was looking at the code, and saw this:

In Locations\MineShaft::adjustLevelChances (systematically called by MineShaft::populateLevel)

bool num = AnyOnlineFarmerHasBuff(23);
flag = AnyOnlineFarmerHasBuff(24);
if (num && getMineArea() != 121)
{
	if (!flag)
	{
		monsterChance = 0.0;
	}
}

23 is Oil of Garlic, 24 is Monster Musk (can be double checked in Buffs.cs)

I don't see any modification to monsterChance after adjustLevelChances() has been called. I guess it would mean using Oil of Garlic (without Monster Musk) remove all monsters in the Mines (not in Skull Cavern, for which getMineArea() == 121).

I checked in-game quickly. I encountered no monster in the Mines, except on "quarry levels" (this is specified in the code right after my excerpt in the same function), and level 91; looking in the game code I don't find why, probably just a bug?

-- Charly (talk) 18:38, 23 November 2021 (UTC)

Well, this is huge! The game didn't used to function this way, I remember thinking Oil of Garlic was pretty much worthless if I was carrying a staircase, because it only prevented swarms/infested levels. I wonder when it changed?
Anyway, thanks for doing the work and for testing in-game. I'm not sure what to report as the bug -- if preventing all monsters in the mines was intended (why wasn't it in the change notes?), or just limiting it to "weak" monsters (not including Haunted Skulls). ??? margotbean (talk) 21:06, 23 November 2021 (UTC)