I'm working on a formula used currently in a game and I'm having issues. There are two such formulas in this game that I'm working on, and I've already figured out one - I'll post it as an example that may/may not help in figuring out the formula I'm working on now. Available operations are: addition, subtraction, multiplication, division, flooring, rounding.
I think the best way to explain the pattern is to show what I have, and explain what needs to change. Feel free to ask questions if clarification is needed. Latex doesn't seem to like flooring/rounding from what I can tell, so I do apologize for not using it.
y = round(floor(x / 5) * .1)
In the above formula, x can be an integer 1-155. The formula works for it's intended purpose; y increases by 1 every 10th x starting at x=5. What I need is an extremely similar formula where everything is the same except y will not increase at: x=25, x=65, x=105, x=25+(40*n). As far as I know, there is no limitation on the number of decimal places pre-rounding/flooring, but after only integers should exist.
I did come up with the original formula posted above, but finding one to match the modification has been elusive for me. Any assistance with this would be greatly appreciated!