I made one code tweak: In your original code, hp_gain is set to 0 when merging with a large abomination, which means that the code in that chunk that adds hp_gain to hp and mhp is redundant, so I removed that code. (Or was hp_gain supposed to be set to something else there?)

(0022134)
khalil (reporter)2013-04-04 21:04

No, I was just confused as to what was happening. There's actually a few problems with it, among other things large abominations don't stop absorbing crawlers when fully healed. Here's a fixed version.

(0022136)
dolorous (updater)2013-04-04 23:11

Thanks; I've made a second trunk patch from it (labeled version 2 in the commit message).

I still needed to tweak a few bits. willmerge is no longer needed (if a large abomination is fully healed, _do_merge_crawlies() can just return false), and hp and mhp need to be initialized as merge_to->hit points and merge_to->max_hit_points before doing any healing (so that the large abomination doesn't destroy itself by setting its HP to 0).

(0022139)
khalil (reporter)2013-04-05 01:00

There's a check to make sure that if healing would put hp over mhp, it just sets one to be equal to the other.
else if (merge_to->max_hit_points <= merge_to->hit_points + merge_to->max_hit_points/10){hp = mhp;}
Wouldn't that do the trick?

before modifying hp or mhp at all, as it is in the new version of the patch.

(0022141)
khalil (reporter)2013-04-05 02:11

Oh. Sorry, I'm a bit new to this.

(0022142)
dolorous (updater)2013-04-05 02:14

No problem.

(0024696)
neil (administrator)2013-12-11 18:09

In trunk (0.14-a0-1419-g2e2cdf5), thanks. We'll need to look into other uses of abominations: Abyss is probably fine and MarvinPA says XXX is probably fine, but vaults that use aboms like Cigotuvi's wizlab might need tweaking to deal with the no-regen aspect.

Leaving this bug open since I don't think this is the only TR balance change that will be needed.

(0025768)
MarvinPA (developer)2014-04-03 16:29

Resolving this since the changes have been in for a while, if more changes are needed that can probably be discussed elsewhere at this point.