Talk:Oil of Garlic

From Stardew Valley Wiki
Revision as of 18:38, 23 November 2021 by Charly (talk | contribs) (Add topic: Effect on monster spawning)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)