diff --git a/data/json/monstergroups/zombies.json b/data/json/monstergroups/zombies.json index 33f9fa50c298f..251c75fcd26c7 100644 --- a/data/json/monstergroups/zombies.json +++ b/data/json/monstergroups/zombies.json @@ -294,7 +294,8 @@ "default": "mon_zombie_gasbag", "monsters": [ { "monster": "mon_zombie_gasbag", "freq": 20, "cost_multiplier": 0 }, - { "monster": "mon_boomer", "freq": 480, "cost_multiplier": 2 } + { "monster": "mon_boomer", "freq": 480, "cost_multiplier": 2 }, + { "monster": "mon_zombie_necro_boomer", "freq": 1, "cost_multiplier": 27 } ] }, { @@ -335,6 +336,7 @@ { "monster": "mon_zombie_shrieker", "freq": 45, "cost_multiplier": 5 }, { "monster": "mon_zombie_acidic", "freq": 45, "cost_multiplier": 2 }, { "monster": "mon_zombie_necro", "freq": 8, "cost_multiplier": 25 }, + { "monster": "mon_zombie_necro_boomer", "freq": 6, "cost_multiplier": 27 }, { "monster": "mon_boomer", "freq": 45, "cost_multiplier": 5 }, { "monster": "mon_zombie_brute", "freq": 23, "cost_multiplier": 15 }, { "monster": "mon_zombie_master", "freq": 2, "cost_multiplier": 30 }, diff --git a/data/json/monsters/zed_misc.json b/data/json/monsters/zed_misc.json index 78fa1a32ba32f..ed67862064d12 100644 --- a/data/json/monsters/zed_misc.json +++ b/data/json/monsters/zed_misc.json @@ -707,6 +707,15 @@ "FILTHY" ] }, + { + "id": "mon_zombie_necro_boomer", + "type": "MONSTER", + "name": { "str": "zombie necro-boomer" }, + "description": "At first this creature looks like nothing more than a grotesque and oleaginous husk, bloated and punctured by jet-black pustules. When approached its glowing red eyes and an aching grin take form; its skin tears and guts teem with unmatched fecundity, as its gaze inspires fear of nothing less than cosmic, inhuman ecstasy.", + "copy-from": "mon_zombie_necro", + "diff": 25, + "death_function": [ "NECRO_BOOMER" ] + }, { "id": "mon_zombie_runner", "type": "MONSTER", diff --git a/src/mondeath.cpp b/src/mondeath.cpp index 5eb1568d063ef..6d795414ddfab 100644 --- a/src/mondeath.cpp +++ b/src/mondeath.cpp @@ -899,3 +899,27 @@ void mdeath::conflagration( monster &z ) sounds::sound( z.pos(), 24, sounds::sound_t::combat, explode, false, "explosion", "small" ); } + +void mdeath::necro_boomer( monster &z ) +{ + std::string explode = string_format( _( "a %s explodes!" ), z.name() ); + sounds::sound( z.pos(), 24, sounds::sound_t::combat, explode, false, "explosion", "small" ); + for( const tripoint &aoe : g->m.points_in_radius( z.pos(), 10 ) ) { + for( item &corpse : g->m.i_at( aoe ) ) { + if( !corpse.is_corpse() ) { + continue; + } + if( g->revive_corpse( aoe, corpse ) ) { + g->m.i_rem( aoe, &corpse ); + break; + } + } + } + for( const tripoint &aoe : g->m.points_in_radius( z.pos(), 10 ) ) { + monster *mon = g->critter_at( aoe ); + if( mon != nullptr && one_in( 10 ) ) { + mon->allow_upgrade(); + mon->try_upgrade( false ); + } + } +} diff --git a/src/mondeath.h b/src/mondeath.h index 0e914960654d1..c47671331207b 100644 --- a/src/mondeath.h +++ b/src/mondeath.h @@ -80,6 +80,8 @@ void preg_roach( monster &z ); void fireball( monster &z ); // Similar to above but bigger and guaranteed. void conflagration( monster &z ); +// raises and then upgrades all zombies in a radius +void necro_boomer( monster &z ); // Game over! Defense mode void gameover( monster &z ); diff --git a/src/monstergenerator.cpp b/src/monstergenerator.cpp index 418dbcc7835e0..3b6130928198b 100644 --- a/src/monstergenerator.cpp +++ b/src/monstergenerator.cpp @@ -501,6 +501,8 @@ void MonsterGenerator::init_death() death_map["FIREBALL"] = &mdeath::fireball; // Explode in a huge fireball death_map["CONFLAGRATION"] = &mdeath::conflagration; + // resurrect all zombies in the area and upgrade all zombies in the area + death_map["NECRO_BOOMER"] = &mdeath::necro_boomer; /* Currently Unimplemented */ // Screams loudly