Skip to content

Commit

Permalink
Remove obsolete zombie grenadier (#40298)
Browse files Browse the repository at this point in the history
  • Loading branch information
anothersimulacrum authored May 7, 2020
1 parent 5963736 commit e00bfab
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 202 deletions.
25 changes: 0 additions & 25 deletions data/json/monsterdrops/zombie.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,6 @@
{ "item": "depowered_armor", "count": [ 0, 1 ], "prob": 20 }
]
},
{
"type": "item_group",
"subtype": "collection",
"id": "mon_zombie_grenadier",
"entries": [
{ "item": "tacvest", "damage": [ 1, 4 ] },
{ "item": "bot_grenade_hack", "count": [ 0, 3 ] },
{ "item": "bot_flashbang_hack", "prob": 50 },
{ "item": "bot_gasbomb_hack", "prob": 50 }
]
},
{
"type": "item_group",
"subtype": "collection",
"id": "mon_zombie_grenadier_elite",
"entries": [
{ "item": "tacvest", "damage": [ 1, 4 ] },
{ "item": "molle_pack", "damage": [ 1, 4 ] },
{ "item": "bot_grenade_hack", "count": [ 0, 4 ] },
{ "item": "bot_flashbang_hack", "count": [ 1, 2 ], "prob": 50 },
{ "item": "bot_gasbomb_hack", "count": [ 1, 2 ], "prob": 50 },
{ "item": "bot_c4_hack", "count": [ 1, 2 ], "prob": 20 },
{ "item": "bot_mininuke_hack", "prob": 1 }
]
},
{
"type": "item_group",
"subtype": "collection",
Expand Down
101 changes: 0 additions & 101 deletions data/json/monsters/zed_explosive.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,106 +163,5 @@
"death_drops": "default_zombie_items",
"death_function": [ "GAS" ],
"flags": [ "SEES", "HEARS", "SMELLS", "STUMBLES", "WARM", "POISON", "NO_BREATHE", "REVIVES", "FILTHY" ]
},
{
"//": "Heads up: these zombies are pending removal sometime before 0.E.",
"id": "mon_zombie_grenadier",
"type": "MONSTER",
"name": { "str": "zombie grenadier" },
"description": "Once a soldier, it is dressed head to toe in combat gear. Its hands constantly fumble at its many pouches.",
"default_faction": "zombie",
"bodytype": "human",
"species": [ "ZOMBIE", "HUMAN" ],
"diff": 20,
"volume": "62500 ml",
"weight": "81500 g",
"hp": 100,
"speed": 90,
"material": [ "flesh" ],
"symbol": "Z",
"color": "blue_green",
"aggression": 5,
"morale": 100,
"melee_skill": 5,
"melee_dice": 2,
"melee_dice_sides": 4,
"melee_cut": 0,
"armor_bash": 6,
"armor_cut": 6,
"armor_bullet": 5,
"vision_day": 35,
"vision_night": 3,
"harvest": "exempt",
"starting_ammo": { "bot_c4_hack": 2, "bot_flashbang_hack": 3, "bot_gasbomb_hack": 3, "bot_grenade_hack": 10 },
"special_attacks": [ [ "GRENADIER", 6 ] ],
"death_drops": { "subtype": "collection", "groups": [ [ "mon_zombie_soldier_death_drops", 100 ], [ "mon_zombie_grenadier", 100 ] ] },
"death_function": [ "DETONATE" ],
"burn_into": "mon_zombie_scorched",
"flags": [
"SEES",
"HEARS",
"SMELLS",
"WARM",
"BASHES",
"GROUP_BASH",
"POISON",
"BLEED",
"NO_BREATHE",
"REVIVES",
"PUSH_MON",
"FILTHY"
]
},
{
"id": "mon_zombie_grenadier_elite",
"type": "MONSTER",
"name": { "str": "zombie elite grenadier" },
"description": "Once a soldier, it is dressed head to toe in combat gear and wearing a MOLLE pack. Its hands quickly open and close its many pouches.",
"default_faction": "zombie",
"bodytype": "human",
"species": [ "ZOMBIE", "HUMAN" ],
"diff": 30,
"volume": "62500 ml",
"weight": "81500 g",
"hp": 100,
"speed": 100,
"material": [ "flesh" ],
"symbol": "Z",
"color": "blue_magenta",
"aggression": 5,
"morale": 100,
"melee_skill": 5,
"melee_dice": 2,
"melee_dice_sides": 6,
"melee_cut": 0,
"dodge": 1,
"armor_bash": 8,
"armor_cut": 12,
"armor_bullet": 10,
"vision_day": 35,
"vision_night": 3,
"harvest": "exempt",
"starting_ammo": { "bot_c4_hack": 10, "bot_flashbang_hack": 10, "bot_gasbomb_hack": 10, "bot_grenade_hack": 20, "bot_mininuke_hack": 1 },
"special_attacks": [ [ "GRENADIER_ELITE", 3 ] ],
"death_drops": {
"subtype": "collection",
"groups": [ [ "mon_zombie_soldier_death_drops", 100 ], [ "mon_zombie_grenadier_elite", 100 ] ]
},
"death_function": [ "DETONATE" ],
"burn_into": "mon_zombie_scorched",
"flags": [
"SEES",
"HEARS",
"SMELLS",
"WARM",
"BASHES",
"GROUP_BASH",
"POISON",
"BLEED",
"NO_BREATHE",
"REVIVES",
"PUSH_MON",
"FILTHY"
]
}
]
72 changes: 0 additions & 72 deletions src/mondeath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,78 +765,6 @@ void mdeath::kill_breathers( monster &/*z*/ )
}
}

void mdeath::detonate( monster &z )
{
weighted_int_list<std::string> amm_list;
for( const auto &amm : z.ammo ) {
amm_list.add( amm.first, amm.second );
}

std::vector<std::string> pre_dets;
for( int i = 0; i < 3; i++ ) {
if( amm_list.get_weight() <= 0 ) {
break;
}
// Grab one item
std::string tmp = *amm_list.pick();
// and reduce its weight by 1
amm_list.add_or_replace( tmp, amm_list.get_specific_weight( tmp ) - 1 );
// and stash it for use
pre_dets.push_back( tmp );
}

// Update any hardcoded explosion equivalencies
std::vector<std::pair<std::string, long>> dets;
for( const std::string &bomb_id : pre_dets ) {
if( bomb_id == "bot_grenade_hack" ) {
dets.push_back( std::make_pair( "grenade_act", 5 ) );
} else if( bomb_id == "bot_flashbang_hack" ) {
dets.push_back( std::make_pair( "flashbang_act", 5 ) );
} else if( bomb_id == "bot_gasbomb_hack" ) {
dets.push_back( std::make_pair( "gasbomb_act", 20 ) );
} else if( bomb_id == "bot_c4_hack" ) {
dets.push_back( std::make_pair( "c4armed", 10 ) );
} else if( bomb_id == "bot_mininuke_hack" ) {
dets.push_back( std::make_pair( "mininuke_act", 20 ) );
} else {
// Get the transformation item
const iuse_transform *actor = dynamic_cast<const iuse_transform *>(
item::find_type( bomb_id )->get_use( "transform" )->get_actor_ptr() );
if( actor == nullptr ) {
// Invalid bomb item, move to the next ammo item
add_msg( m_debug, "Invalid bomb type in detonate mondeath for %s.", z.name() );
continue;
}
dets.emplace_back( actor->target, actor->ammo_qty );
}
}

if( g->u.sees( z ) ) {
if( dets.empty() ) {
add_msg( m_info,
//~ %s is the possessive form of the monster's name
_( "The %s's hands fly to its pockets, but there's nothing left in them." ),
z.name() );
} else {
//~ %s is the possessive form of the monster's name
add_msg( m_bad, _( "The %s's hands fly to its remaining pockets, opening them!" ),
z.name() );
}
}
// HACK, used to stop them from having ammo on respawn
z.add_effect( effect_no_ammo, 1_turns, num_bp, true );

// First die normally
mdeath::normal( z );
// Then detonate our suicide bombs
for( const auto &bombs : dets ) {
item bomb_item( bombs.first, 0 );
bomb_item.charges = bombs.second;
bomb_item.active = true;
g->m.add_item_or_charges( z.pos(), bomb_item );
}
}

void mdeath::broken_ammo( monster &z )
{
if( g->u.sees( z.pos() ) ) {
Expand Down
2 changes: 0 additions & 2 deletions src/mondeath.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ void smokeburst( monster &z );
void fungalburst( monster &z );
// Snicker-snack!
void jabberwock( monster &z );
// Take the enemy with you
void detonate( monster &z );
// Breaks ammo and then itself
void broken_ammo( monster &z );
// Spawns 1-3 roach nymphs
Expand Down
2 changes: 0 additions & 2 deletions src/monstergenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,6 @@ void MonsterGenerator::init_death()
death_map["FUNGALBURST"] = &mdeath::fungalburst;
// Snicker-snack!
death_map["JABBERWOCKY"] = &mdeath::jabberwock;
// Take them with you
death_map["DETONATE"] = &mdeath::detonate;
// Game over! Defense mode
death_map["GAMEOVER"] = &mdeath::gameover;
// Spawn some cockroach nymphs
Expand Down

0 comments on commit e00bfab

Please sign in to comment.