Line 75: |
Line 75: |
| | | |
| ::-- [[User:Charly|Charly]] ([[User talk:Charly|talk]]) 01:21, 24 November 2021 (UTC) | | ::-- [[User:Charly|Charly]] ([[User talk:Charly|talk]]) 01:21, 24 November 2021 (UTC) |
| + | |
| + | |
| + | ==Quarry Levels== |
| + | In-game testing shows that Oil of Garlic prevents floors from being Quarry levels, except in the dangerous mines. |
| + | |
| + | The relevant code seems to be <samp>MineShaft::loadLevel</samp>. |
| + | <syntaxhighlight lang="C#"> |
| + | if ((!this.AnyOnlineFarmerHasBuff(23) || this.getMineArea() == 121) && r.NextDouble() < 0.044 && mapNumberToLoad % 5 != 0 && mapNumberToLoad % 40 > 5 && mapNumberToLoad % 40 < 30 && mapNumberToLoad % 40 != 19) |
| + | { |
| + | if (r.NextDouble() < 0.5) |
| + | { |
| + | this.isMonsterArea = true; |
| + | } |
| + | else |
| + | { |
| + | this.isSlimeArea = true; |
| + | } |
| + | if (this.getMineArea() == 121 && this.mineLevel > 126 && r.NextDouble() < 0.5) |
| + | { |
| + | this.isDinoArea = true; |
| + | this.isSlimeArea = false; |
| + | this.isMonsterArea = false; |
| + | } |
| + | } |
| + | else if (this.mineLevel < 121 && r.NextDouble() < 0.044 && Utility.doesMasterPlayerHaveMailReceivedButNotMailForTomorrow("ccCraftsRoom") && Game1.MasterPlayer.hasOrWillReceiveMail("VisitedQuarryMine") && mapNumberToLoad % 40 > 1 && mapNumberToLoad % 5 != 0) |
| + | { |
| + | this.isQuarryArea = true; |
| + | if (r.NextDouble() < 0.25) |
| + | { |
| + | this.isMonsterArea = true; |
| + | } |
| + | } |
| + | </syntaxhighlight> |
| + | The "<samp>else if</samp>" conditions aren't met when I step through the code, and I don't know why. <samp>mineLevel</samp> is < 121, the save has the Quarry Mine unlocked, and the levels I tried were 22 & 63. Both were persistent quarry levels, until I drank Oil of Garlic. Any insights are very much appreciated! |
| + | |
| + | Also, there seems to be a 4.4% chance of a level being a quarry level, but I found that levels 22 & 63 were consistently quarry levels (until I drank Oil of Garlic). This is also odd to me. I'm stumped. [[User:Margotbean|margotbean]] ([[User talk:Margotbean|talk]]) 19:34, 11 September 2022 (UTC) |