Changes

903 bytes added ,  19:11, 17 September 2022
Line 118: Line 118:  
:::I broke the <samp>else if</samp> conditions up into separate <samp>if</samp> statements, and the failure is happening on <samp>if (r.NextDouble() < 0.044)</samp>. But, only after drinking Oil of Garlic. This doesn't make sense to me at all.  
 
:::I broke the <samp>else if</samp> conditions up into separate <samp>if</samp> statements, and the failure is happening on <samp>if (r.NextDouble() < 0.044)</samp>. But, only after drinking Oil of Garlic. This doesn't make sense to me at all.  
 
:::Therefore, I'm going to add it to the page without a code reference. It's repeatedly reproduceable in-game, so I believe it's a true statement. If anyone can provide any insight into the game code, it will be appreciated! [[User:Margotbean|margotbean]] ([[User talk:Margotbean|talk]]) 15:27, 13 September 2022 (UTC)
 
:::Therefore, I'm going to add it to the page without a code reference. It's repeatedly reproduceable in-game, so I believe it's a true statement. If anyone can provide any insight into the game code, it will be appreciated! [[User:Margotbean|margotbean]] ([[User talk:Margotbean|talk]]) 15:27, 13 September 2022 (UTC)
 +
 +
:::: Ah! It's subtle, but explainable! Randoms always produce numbers in a specific order. So what was happening was roughly:
 +
* Without Oil of Garlic: passes !this.AnyOnlineFarmerHasBuff(23), asks the Random r for a random number, fails somewhere in the next few checks, goes to else if, asks the Random for another random number, passes that check.
 +
* With Oil of Garlic: fails !this.AnyOnlineFarmerHasBuff(23), doesn't ask the Random r in the if statement and goes to the else if directly. Because the random wasn't queried, the numbers produced will in effect shift by one, which then caused it to fail (which is very likely, given there's only a 4.4% chance of passing).
 +
 +
I suspect it's perfectly possible to get a quarry floor with Oil of Garlic, what you're seeing is just a consequence of how Random works. [[User:Atravita|Atravita]] ([[User talk:Atravita|talk]]) 19:11, 17 September 2022 (UTC)
528

edits