Unknown absorption problem
Closed this issue · 9 comments
I just played a game in which I had two absorption bugs. First, I killed the bomb and nothing happened -- I didn't heal and I didn't get a power. Then, I killed the Repaer, and I got health but no power. I have no idea what was causing this.
Some context: I had killed the overmind, and was walking around with a level 4 power. The overmind had called both the bomb and the reaper. I had teleported the bomb with a grenade. The game contained a mausoleum with Drakul. ... Nothing else comes to mind. I'll keep an eye out for more of this stuff happening!
I think I've seen something like this too. I'll be on the lookout now.
Do you remember if they were killed during normal combat hits?
Here's a transcript with a number of interesting features:
It seems to show the absorption bug happening with the chain golem - I got healed but didn't get the chain golem's power, like Victor did with the Reaper. This was also an overmind game, plus I had just sacrificed a different Level 2 power to Nomos.
I also discovered a few other issues:
If you have an unloaded crossbow and the Nomos bonus goes off, the crossbow fails to fire but the Nomos bonus does not get canceled. I discovered that the only way to get out of the loop was to ready another weapon as a reaction.
Going into a dream with Mercy radiance creates a weird message where the radiance gets canceled in the wrong place. I had the Tungausy dream, and so "the player" was in a different body.
Once you get to tiny size with Mercy power, you stop gaining radiance. I can't remember if I intended that or not. I was disappointed, but maybe it keeps the ability from getting too powerful. What do you think?
I bet "now guy accompanies the overmind" has something to do with it:
Carry out the overmind overmind-calling:
let n be potential overmind allies;
if n is 0:
say "The overmind attempts to calls its allies, but the machine doesn't seem to function.";
otherwise:
if concentration of the overmind is less than 3 or n is 1:
call an ally;
otherwise:
call all allies;
[ Make overmind allies in the location accompany the overmind ]
repeat with guy running through all npc alive people in the location of the overmind:
if level of guy is less than 4 and guy does not oppose the overmind:
now guy accompanies the overmind;
now concentration of the overmind is 0.
Another piece of the puzzle:
To do the absorption with (guy - a person):
have the guy disappear;
if the guy is a sole survivor:
if guy is grouper and guy is not group leading:
[Is is really necessary to check for group leading? If it is, we should do it elsewhere too]
now guy is the leader of guy;
unless guy is already-granted:
increase score by level of guy;
now test subject is guy;
unless absorption is stopped:
do power transferral with the guy;
heal fully because the guy is slain;
now guy is already-granted;
do achievement awarding for the guy.
I'm trying to figure out what happened here. When the overmind called the jumping bomb, the chain golem and the imp were in the room, so the overmind was made the leader of both of them.
When the chain golem dies, the increment died and kill stats rule fires, and records both defeats. This tells me that the chain golem was considered a "sole survivor" (and the overmind wasn't, when it died).
Aha! Here's what happens. "now guy is the leader of guy" changes the event from absorbing the chain golem's soul to absorbing the overmind's soul. And since the overmind was already absorbed, nothing happens!
I guess my question is, what is the point of "now guy accompanies the overmind?" What outcome is this phrase attempting to ensure?
I might speculate that in Victor's game the jumping bomb and the Reaper were both accompanying the overmind, but when the jumping bomb was killed, it wasn't the sole survivor of the Overmind's group, so he didn't even get healed. That changed when the Reaper died, but it was still the Overmind's soul he was trying to absorb.
Accompanying wasn't originally envisioned for leveled enemies. It was for Mouser and Fafhrd to ensure the Mindslug got their kills. It's also for Israfel to ensure killing its split forms works correctly.
In this context I think if you're killed by an accompanying leveled enemy both it and its leader should get the kill credit.
If you kill a leveled enemy you need to absorb their powers regardless of whether they are accompanying.
When the overmind is killed we should degroup all of its followers because that could have some weird after-effects.
Thanks, Dannii. I might look into it over the weekend.
I've been thinking about this system and I might try to clarify it a bit for Kerkerkruip 11. It sounds like grouping has two separate purposes: granting powers and claiming kills. The fact that they align sometimes might be more coincidental than the current system suggests.
I've also been imagining a new monster group with a more complicated mechanism - a group which includes monsters of different or changing levels, and the order you kill monsters in determines what level power you get from the group, and whether some of them become your allies. I'm going to keep all of this in mind for that, but I'll hold off on doing anything till Kerkerkruip 10 is done...
I'm taking out those lines in the overmind code. Dannii, they come from this commit of yours (long live the new "blame" feature of Github!):
Any idea why they're there? Is it something important?
I think I added it so that the kills would be awarded correctly. I think Mike is correct that we should split this system up. There might be some duplicated code, but it would make it all simpler overall, and much safer.
Do you think we need to work around it for now, to make the kills be counted correctly? (I guess the idea is that these monsters's kills count for the overmind?) Otherwise, let's keep this issue closed.
Mike, can you put the stuff you'd like to do for Kruip 11 as a new issue?