Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upAdrenaline Pump CBM glitch #14719
Comments
This comment has been minimized.
This comment has been minimized.
|
This also happens with the regular adrenaline injector. One turn of comedown, the rush kicks in at 199 turns. Additional injections give 30 points on the counter, but the code says 80 (with a side of possible death, woot). I don't think the death code is working either, but I can't find it so... adrenaline injector : iuse.cpp line 6015 |
This comment has been minimized.
This comment has been minimized.
|
Hahaha...death code works, no worries there. Help me savescum, you're my only hope... |
This comment has been minimized.
This comment has been minimized.
|
It's only a minor issue, but I discovered this bug during an extremely critical moment in a fight with a super big monster. It -nearly- costed my character her life, as the one turn of it not applying was absolutely critical. I'm sure lots of other people using their adrenaline during key moments would also be similarly imperiled. |
This comment has been minimized.
This comment has been minimized.
|
The more vexing issue imo is the fact that neither one gives the correct And it gives an error message so...mustbefixed.
|
This comment has been minimized.
This comment has been minimized.
|
Ok, so turns out there's a dur_add_perc field. If the effect is present, then it adds duration * dur_add_perc / 100, so the cbm is giving the correct amount. The injector is giving slightly more than double what it should at 30 turns. 80 * 15 / 100 is 12. I'm confused. And the intensity thing is checked in 3 different spots with the same message at each, good times. |
This comment has been minimized.
This comment has been minimized.
|
Heh. The default value for the intensity variable in add_effect() is 0. The function is called to add adrenaline without specifying the intensity, so it always has 0 intensity, leading to the debug message. The CBM and injector should call add_effect() with intensity = 2, corresponding to an adrenaline high. Leaving it to the default of 0 causes it to be reset to 1 (with attendant debug message), causing 1 turn of adrenaline comedown, before again being reset to 2 (because the duration is so long). The default value for intensity in add_effect() should also probably be changed since it causes an error message in the same function. |
This comment has been minimized.
This comment has been minimized.
|
Ah, thanks for explaining what was going on, I got lost trying to follow add_effect. This sounds like an easy fix, something like: |
This comment has been minimized.
This comment has been minimized.
|
Not quite, since there are several parameters in between.
|
This comment has been minimized.
This comment has been minimized.
|
you beat the compiler on correcting me, but just barely haha. I want those to stay at their default value's...hmm. I will study more...GOOGLE! |
This comment has been minimized.
This comment has been minimized.
|
Ok, the compiler didn't choke on |
Malkeus
added a commit
to Malkeus/Cataclysm-DDA
that referenced
this issue
Jan 5, 2016
This was referenced Jan 5, 2016
Rivet-the-Zombie
closed this
in
#14733
Jan 15, 2016
This comment has been minimized.
This comment has been minimized.
TravisDean
commented
Jan 16, 2017
|
Was this ever pushed into origin? |
Malkeus commentedJan 5, 2016
Ok, so this is another one from the forum. The adrenaline pump cbm gives the player the adrenaline comedown debuff, instantly upon use, but displays the expected "YOu feel a rush of adrenaline" message. During testing with debug mode on, I got this message "Bad Intensity, ID:adrenaline". After waiting one turn, the adrenaline comedown vanished and was replaced with Adrenaline rush and gave all its proper bonuses. The duration at that point for adrenaline rush was 199, so we've lost 1 turn of adrenaline rush to the glitch. Upon reaching 149, adrenaline comedown kicks in as expected. Then I tried activating the pump again...and the counter went to 156. Just 7 more turns of adrenaline rush for 50 power.
I went and found the relevant code, and adrenaline pump cbm gives an initial duration of 200, with additional activations giving 50 duration. I'm trying to work out the math in add_effect, but it's not exactly my strong suit.
So two errors to report;
1 "Bad Intensity, ID:adrenaline" at activation, leading to 1 turn of adrenaline comedown before the rush kicks in.
2. Activating adrenaline pump while already affected with adrenaline only gives about 7 turns of additional bonus, should give 50.
Adrenaline pump cbm : bionics.cpp line 895
add_effect(): creature.cpp line 772