On second thought don't stack HD when merging. Merge monster flags when merging. Merging costs the merged slime a turn.
AT4J3B6LI4J5YYAAG6OHHQMZRVL5WUOTL5Q6NBSAX4UX3PBICBBAC merge_to->hit_dice += initial_slime->hit_dice;
// Merge monster flags (mostly so that MF_CREATUED_NEUTRAL etc. are// passed on if the merged slime subsequently splits. Hopefully// this won't do anything weird.merge_to->flags |= initial_slime->flags;// Merging costs the combined slime some energy.monsterentry* entry = get_monster_data(merge_to->type);merge_to->speed_increment -= entry->energy_usage.move;// This is dumb. With that said, the idea is that if 2 slimes merge// you can gain a space by moving away the turn after (maybe this// is too nice but there will probably be a lot of complaints about// the damage on higher level slimes). So we subtracted some energy// above but if merge_to hasn't moved yet this turn that will just// cancel its turn in this round of world_reacts. So we are going// to see if merge_to has gone already by checking its mindex// (this works because handle_monsters just iterates over env.mons// in ascending order)if(initial_slime->mindex() < merge_to->mindex())merge_to->speed_increment -= entry->energy_usage.move;