Talk:Luck
This talk page is for discussing Luck. | |
---|---|
|
|
Luck Value
Would love further explanation of how much "+1 Luck" stat modifies the Luck value. It's a bit confusing how the buffs correlate to the specific Luck value, eg. does +1 Luck equate to the next tier on the Fortune Telling show? Zonesville (talk) 17:32, 18 May 2021 (UTC)
- This talk page could be useful: Talk:Luck. Horizon98 (talk) 18:00, 18 May 2021 (UTC)
- Oh man what a rookie mistake, I didn't know which wiki I was on. Appreciate the link, feel free to delete! Zonesville (talk) 14:07, 18 May 2021 (UTC)
Play Luck not took into account on dayUpdate?
I'm not an advanced expert about the game code, but I don't get why player luck would not be taken into account in FarmAnimal::dayUpdate (which is called by AnimalHouse::DayUpdate and Farm::DayUpdate, which are called by Game1::_newDayAfterFade in foreach (GameLocation location2 in locations))
Extract of FarmAnimal::dayUpdate code:
float num3 = ((&.op_Implicit((&)(object)happiness) > 200) ? ((float)(int)&.op_Implicit((&)(object)happiness) * 1.5f) : ((float)((&.op_Implicit((&)(object)happiness) <= 100) ? (&.op_Implicit((&)(object)happiness) - 100) : 0)));
if (((&)(object)type).get_Value().Equals("Duck") && random.NextDouble() < (double)((float)&.op_Implicit((&)(object)friendshipTowardFarmer) + num3) / 4750.0 + Game1.player.team.AverageDailyLuck() + Game1.player.team.AverageLuckLevel() * 0.01)
{
num2 = &.op_Implicit((&)(object)deluxeProduceIndex);
}
else if (((&)(object)type).get_Value().Equals("Rabbit") && random.NextDouble() < (double)((float)&.op_Implicit((&)(object)friendshipTowardFarmer) + num3) / 5000.0 + Game1.player.team.AverageDailyLuck() + Game1.player.team.AverageLuckLevel() * 0.02)
{
num2 = &.op_Implicit((&)(object)deluxeProduceIndex);
}
(NetFieldBase specifications replaced with & for readability)
Game1.player.team.AverageLuckLevel() appears on both formula. Why and more importantly how would it be neutralized?
FarmerTeam::AverageLuckLevel just compute the average LuckLevel of Game1.getOnlineFarmers() and Farmer::LuckLevel is just a get/set (get is luckLevel + addedLuckLevel, the first being as a skill and the second one obtained from buffs).
-- Charly (talk) 21:34, 15 November 2021 (UTC)
- Because no luck buffs are active when the player sleeps, which is when the code executes. margotbean (talk) 21:38, 15 November 2021 (UTC)