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XTQ4TZIAOD6ZLOFJG7GQMBTY23Y2BKSAC DAQ2V7UKJZGPMSL63L5CU2BQ77QPTV4AV2EQAEIOBKTM7MROTNVAC 2BGXBH5OMEFAX2XTS2OWIRODUGW6V2FJR4QRJIQTV4C2WIJI22BQC // What to do about any enchantments these two slimes may have?// For now we are averaging the durations -caostatic void _merge_ench_durations(monsters * initial_slime, monsters * merge_to)
// What to do about any enchantments these two slimes may have? For// now, we are averaging the durations. -caostatic void _merge_ench_durations(monsters *initial_slime, monsters *merge_to)
// Merge monster flags (mostly so that MF_CREATUED_NEUTRAL etc. are// passed on if the merged slime subsequently splits. Hopefully
// Merge monster flags (mostly so that MF_CREATED_NEUTRAL, etc. are// passed on if the merged slime subsequently splits. Hopefully
// 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())
// 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())
// We can merge if we find another adjacent slime which isn't// already at the merge cap and is closer to the target than// our current position.if(other_thing&& other_thing->mons_species() == MONS_SLIME_CREATURE&& other_thing->attitude == thing->attitude&& other_thing->is_summoned() == thing->is_summoned()&& !mons_is_shapeshifter(other_thing))
// We can merge if we find another adjacent slime which// isn't already at the merge cap and is closer to the// target than our current position.if (other_thing&& other_thing->mons_species() == MONS_SLIME_CREATURE&& other_thing->attitude == thing->attitude&& other_thing->is_summoned() == thing->is_summoned()&& !mons_is_shapeshifter(other_thing))
if(new_blob_count <= max_slime_merge&& grid_distance(thing->target, thing->pos()) >grid_distance(thing->target, target))
if (new_blob_count <= max_slime_merge&& grid_distance(thing->target, thing->pos()) >grid_distance(thing->target, target))
// Prevents unfriendlies from nuking you from offscreen.// How nice!// Slime creatures can split when offscreenif (friendly_or_near || monster->type == MONS_TEST_SPAWNER
if (friendly_or_near|| monster->type == MONS_TEST_SPAWNER// Slime creatures can split when offscreen.
// [ds] Special abilities shouldn't overwhelm spellcasting// in monsters that have both. This aims to give them both// roughly the same weight.
// [ds] Special abilities shouldn't overwhelm// spellcasting in monsters that have both. This aims// to give them both roughly the same weight.
// Hacks to make merged slime creatures not worth so much// exp. We will calculate the experience we would get for 1// blob then just multiply it so that exp is linear with blobs// merged. -caoif(monster->mons_species() == MONS_SLIME_CREATURE){
// Hacks to make merged slime creatures not worth so much exp. We// will calculate the experience we would get for 1 blob, and then// just multiply it so that exp is linear with blobs merged. -caoif (monster->mons_species() == MONS_SLIME_CREATURE)
// Slime creature exp hack part 2, scale exp back up by the// number of blobs merged. -caoif(monster->mons_species() == MONS_SLIME_CREATURE){
// Slime creature exp hack part 2: Scale exp back up by the number// of blobs merged. -caoif (monster->mons_species() == MONS_SLIME_CREATURE)