Ok…Did some experimenting. It’s giving an error “Bad Intensity, ID:adrenaline” and initially gives the adrenaline comedown. However, after one turn passes the adrenaline comedown becomes adrenaline rush, and proceeds to countdown as expected. So it does work, but not instantly. I will keep poking at it, I brought a sharp stick.
Thanks man! I’m just now learning how to do github, and I’ve only got a very minor amount of experience with coding. But this kind of issue is well beyond my experience. I just know how to take existing code and adapt it for my purposes.
Hah, same here. I’m learning as I go. Github is an intimidating bastard, but it’s worth the effort. I’ve learned some more about the code trying to figure out this little problem, but I’m stumped now. I don’t know why it starts out with the comedown and then kicks in. It has something to do with the intensity as it initializes the effect, but I can’t figure out what’s going on with that. Essentially if the intensity is less than 1, that error message is thrown, but I’m not sure where it gets the intensity to begin with…
The adding duration to existing effect thing turned out to be correct for the cbm, it works out to 50 * 15 / 100 = 7.5, which is what I saw while testing. Adrenaline injector still makes no sense though it gives 30 but 80 * 15 / 100 =12. We’ll see if anybody chimes in on Git.
It looks like the problem is just that when they are being applied they are applied at intensity level 1, and it isn’t until the next tick that the duration-linked intensity is properly applied. As the person who wrote this code I can assure you that this bug has been there from the beginning in this particular case, it was just something I forgot to do.
I also posted on your github PR about the proper way that you should go about fixing this particular issue, which just requires a small tweak to the add_effect() code rather than changing all of the possible application points for any duration-based intensity effect.
Thanks for pointing me in the right direction. I’m learning as I go and tend to get fixated on the first thing I figure out. I had considered making a change to the add_effect function, but I didn’t have a good idea of where to start. Now I do.
Ok, I made another attempt and this one seems a lot more solid. To me, anyway. PR here, long winded explanation of what I did in there, mostly for my own benefit. This involved a lot more thinking and a lot less lines of code than my original idea would have needed to do the same thing. I learned a few things though, so it was enjoyable.