Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new zombie: necro-boomer #40230

Merged
merged 5 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion data/json/monstergroups/zombies.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
]
},
{
Expand Down Expand Up @@ -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 },
Expand Down
9 changes: 9 additions & 0 deletions data/json/monsters/zed_misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
24 changes: 24 additions & 0 deletions src/mondeath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<monster>( aoe );
if( mon != nullptr && one_in( 10 ) ) {
mon->allow_upgrade();
mon->try_upgrade( false );
}
}
}
2 changes: 2 additions & 0 deletions src/mondeath.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 2 additions & 0 deletions src/monstergenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down