Observations on stamina:
Here are the error arrays for sta:
- Code: Select all
err1sta =
0 0 0 -1
0 0 1 0
0 0 1 0
err2sta =
0 0 0 0
0 -1 0 0
0 -1 0 0
e1sta has trouble when talented, but without BoK (i.e. the second floor being redundant). That means that floor((base+gear+cons)*(1+tbtl)) is in error. If it weren't, we wouldn't get an erroneous result in column 3.
e2sta doesn't have this problem in columns 1 or 3. Just to check, here's base*(1+tbtl) and (gear+cons)*(1+tbtl):
- Code: Select all
ans =
152.0000 152.0000 174.8000 174.8000
152.0000 152.0000 174.8000 174.8000
152.0000 152.0000 174.8000 174.8000
>> (gear.sta+cons.sta).*(1+mdf.TbtL)
ans =
0 0 0 0
3298.00 3298.00 3792.70 3792.70
3338.00 3338.00 3838.70 3838.70
Note that for column 3, we have 0.8 from the first contribution and 0.7 from the second. As expected, if we floor them individually they round down to xxx+yyy, and if we floor them together it's xxx+yyy+1. The data suggests that the correct answer is xxx+yyy, so we have to conclude that equation 2 has the correct implementation of TbtL. I.e.
floor(base*(1+tbtl))+floor((gear+cons)*(1+tbtl)) is correct within the limitations of the data set.
The real question is how to implement BoK to fix this. Here are the two obvious guesses:
floor(floor(base*(1+tbtl))*BoK)+floor(floor((gear+cons)*(1+tbtl))*BoK)
floor([floor(base*(1+tbtl))+floor((gear+cons)*(1+tbtl))]*BoK) (brackets used for clarity)
Yet neither of these work. Here are the error results:
- Code: Select all
e3sta=floor(floor(base.sta.*(1+mdf.TbtL)).*mdf.BoK)+floor(floor((gear.sta+cons.sta).*(1+mdf.TbtL)).*mdf.BoK);
e4sta=floor((floor(base.sta.*(1+mdf.TbtL))+floor((gear.sta+cons.sta).*(1+mdf.TbtL))).*mdf.BoK);
err3sta =
0 0 0 -1
0 -1 0 -2
0 -1 0 -2
err4sta =
0 0 0 -1
0 0 0 -1
0 0 0 -1
The second one is certainly closer, but it's still spitting out errors for the combination of TbtL and BoK. I'm toying around with ways to fix this as we speak.