Bug - Fixed Steely-Eyed Squint is being counted twice for +item, causing infinite bloat

r26198; I've had at least two other users report this issue to me.
I have to attach some images; my mafia became more or less unusable:

unknown.png


unknown.png

unknown.png

After restarting mafia, another modtrace gave me:
unknown.png

Across all of these, I'm seeing the commonality of Squint appearing twice and giving insane quantities of +item; I suspect that it is doubling itself, and it is doing so repeatedly. I'm not sure what causes it to recurse. I'll scour my logs in a moment, but I figured I'd get this up sooner rather than later.
 
Based on the fact that it was tamped back down when I logged back in, I think that it doesn't immediately jump into infinite descent, but instead doubles or quadruples or so every time that it gets re-evaluated.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Huh ok. I'll fix this.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Ok this is merged.

It actually turns out that mod() doesn't do anything at all, and all the effect doublers are defined at the end of recalculateAdjustments manually. I suppose I could refactor the effect-based ones to actually look at mod as intended there? But we should either make use of it or remove it, because this was really confusing.
 

lostcalpolydude

Developer
Staff member
Ok this is merged.

It actually turns out that mod() doesn't do anything at all, and all the effect doublers are defined at the end of recalculateAdjustments manually. I suppose I could refactor the effect-based ones to actually look at mod as intended there? But we should either make use of it or remove it, because this was really confusing.
I agree that the code was confusing, when I made it work (I haven't looked at it in a while). To the point where I was surprised that having two doubling effects worked correctly, but since it was working I stopped touching it.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
We just need to remove that modifier expression, it currently always returns zero and then we handle it manually at the end of recalculateAdjustments.
 

lostcalpolydude

Developer
Staff member
I feel like some of the code was there to handle predictions (from the Maximizer) as opposed to current calculations for effects on hand.

I haven't set up an IDE since the transition to github, so I'm not in a position to even try looking at it.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Both calculated at the end of recalculateAdjustments, not with mod(), as far as I can tell.
 
Top