diff --git a/data/json/mapgen_palettes/microlab.json b/data/json/mapgen_palettes/microlab.json index 50c60a66434f7..94a2cd9c47a8a 100644 --- a/data/json/mapgen_palettes/microlab.json +++ b/data/json/mapgen_palettes/microlab.json @@ -173,7 +173,10 @@ "N": { "item": "fireman_cabinet", "chance": 100 } }, "monster": { - " ": [ { "monster": "mon_zombie_living_wall", "chance": 3 }, { "monster": "mon_breather_hub", "chance": 1 } ], + " ": [ + { "monster": "mon_zombie_living_wall", "chance": 3 }, + { "group": "GROUP_AMALGAMATION_BREATHER_HUB_SPARSE", "chance": 1 } + ], "c": { "monster": "mon_zombie_living_wall", "chance": 3 }, "@": { "monster": "mon_zombie_living_wall", "chance": 80 } }, diff --git a/data/json/monster_special_attacks/monster_deaths.json b/data/json/monster_special_attacks/monster_deaths.json index 8eac867aaba5b..922811eea9e38 100644 --- a/data/json/monster_special_attacks/monster_deaths.json +++ b/data/json/monster_special_attacks/monster_deaths.json @@ -658,13 +658,13 @@ "valid_targets": [ "hostile", "ally" ], "effect": "attack", "shape": "blast", - "targeted_monster_ids": [ "mon_breather", "mon_breather_hub" ], + "targeted_monster_ids": [ "mon_breather", "mon_breather_hub", "mon_amalgamation_breather", "mon_amalgamation_breather_hub" ], "damage_type": "pure", "min_damage": 1000, "max_damage": 1000, - "min_aoe": 48, - "max_aoe": 48, - "aoe_increment": 48, + "min_aoe": 5, + "max_aoe": 5, + "aoe_increment": 5, "flags": [ "SILENT", "NO_EXPLOSION_SFX" ] }, { diff --git a/data/json/monstergroups/zombie_amalgamations.json b/data/json/monstergroups/zombie_amalgamations.json index 843172ab775f5..1be75e39ecdef 100644 --- a/data/json/monstergroups/zombie_amalgamations.json +++ b/data/json/monstergroups/zombie_amalgamations.json @@ -44,6 +44,11 @@ { "group": "GROUP_COCOON_MED_1", "weight": 1, "pack_size": [ 3, 3 ], "starts": "28 days" } ] }, + { + "name": "GROUP_AMALGAMATION_BREATHER_HUB_SPARSE", + "type": "monstergroup", + "monsters": [ { "monster": "mon_null", "weight": 9 }, { "monster": "mon_amalgamation_breather_hub" } ] + }, { "name": "GROUP_AMALGAMATION_SMALL", "type": "monstergroup", diff --git a/data/json/monsters/zed_amalgamation.json b/data/json/monsters/zed_amalgamation.json index 7c259af98d1a0..dd4bd22d44b55 100644 --- a/data/json/monsters/zed_amalgamation.json +++ b/data/json/monsters/zed_amalgamation.json @@ -82,6 +82,47 @@ "effect": { "id": "death_blood", "hit_self": true, "min_level": 3 } } }, + { + "id": "mon_amalgamation_breather", + "type": "MONSTER", + "name": { "str": "breather" }, + "description": "This is some sort of unearthly pink flesh sac; moist and ridged with veins, it is otherwise without discernible exterior features. Seemingly immobile and defenseless, it sits in place, swelling and collapsing upon itself as it breathes.", + "default_faction": "zombie", + "bodytype": "blob", + "species": [ "ZOMBIE", "ABERRATION" ], + "volume": "62500 ml", + "weight": "81500 g", + "hp": 100, + "speed": 100, + "symbol": "o", + "color": "pink", + "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], + "melee_training_cap": 2, + "harvest": "exempt", + "special_attacks": [ [ "BREATHE", 8 ] ], + "death_function": { "corpse_type": "NO_CORPSE", "message": "The %s melts away." }, + "flags": [ "IMMOBILE", "NOGIB" ] + }, + { + "id": "mon_amalgamation_breather_hub", + "type": "MONSTER", + "name": { "str": "breather" }, + "description": "A weird mass of immobile, breathing pink goo. The other breathers seem to originate from this one.", + "default_faction": "zombie", + "bodytype": "blob", + "species": [ "ZOMBIE", "ABERRATION" ], + "volume": "62500 ml", + "weight": "81500 g", + "hp": 100, + "speed": 100, + "symbol": "O", + "color": "pink", + "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], + "harvest": "exempt", + "special_attacks": [ [ "BREATHE", 8 ] ], + "death_function": { "effect": { "id": "death_kill_breathers", "hit_self": true }, "corpse_type": "NO_CORPSE" }, + "flags": [ "ACIDPROOF", "ACID_BLOOD", "IMMOBILE" ] + }, { "type": "MONSTER", "abstract": "mon_amalgamation_abstract_small", diff --git a/src/monattack.cpp b/src/monattack.cpp index b33274873563b..d967142f10084 100644 --- a/src/monattack.cpp +++ b/src/monattack.cpp @@ -192,6 +192,8 @@ static const mtype_id mon_blob( "mon_blob" ); static const mtype_id mon_blob_brain( "mon_blob_brain" ); static const mtype_id mon_blob_large( "mon_blob_large" ); static const mtype_id mon_blob_small( "mon_blob_small" ); +static const mtype_id mon_amalgamation_breather( "mon_amalgamation_breather" ); +static const mtype_id mon_amalgamation_breather_hub( "mon_amalgamation_breather_hub" ); static const mtype_id mon_breather( "mon_breather" ); static const mtype_id mon_breather_hub( "mon_breather_hub" ); static const mtype_id mon_creeper_hub( "mon_creeper_hub" ); @@ -3977,13 +3979,17 @@ bool mattack::breathe( monster *z ) { // It takes a while z->mod_moves( -to_moves( 1_seconds ) ); + bool old_breather_type = z->type->id == mon_breather || z->type->id == mon_breather_hub; + mtype_id breather_type = old_breather_type ? mon_breather : mon_amalgamation_breather; + mtype_id hub_type = old_breather_type ? mon_breather_hub : mon_amalgamation_breather_hub; + int spawn_radius = old_breather_type ? 3 : 2; - bool able = z->type->id == mon_breather_hub; + bool able = z->type->id == hub_type; creature_tracker &creatures = get_creature_tracker(); if( !able ) { - for( const tripoint &dest : get_map().points_in_radius( z->pos(), 3 ) ) { + for( const tripoint &dest : get_map().points_in_radius( z->pos(), spawn_radius ) ) { monster *const mon = creatures.creature_at( dest ); - if( mon && mon->type->id == mon_breather_hub ) { + if( mon && mon->type->id == hub_type ) { able = true; break; } @@ -3993,7 +3999,7 @@ bool mattack::breathe( monster *z ) return true; } - if( monster *const spawned = g->place_critter_around( mon_breather, z->pos(), 1 ) ) { + if( monster *const spawned = g->place_critter_around( breather_type, z->pos(), 1 ) ) { spawned->reset_special( "BREATHE" ); spawned->make_ally( *z ); }