diff --git a/data/json/mapgen/map_extras/dormants.json b/data/json/mapgen/map_extras/dormants.json new file mode 100644 index 0000000000000..cdf61f9e08fb0 --- /dev/null +++ b/data/json/mapgen/map_extras/dormants.json @@ -0,0 +1,8 @@ +[ + { + "type": "mapgen", + "method": "json", + "update_mapgen_id": "mx_dormant", + "object": { "monsters": { " ": { "monster": "GROUP_VANILLA_DORMANT", "chance": 10, "density": 0.02 } } } + } +] diff --git a/data/json/overmap/map_extras.json b/data/json/overmap/map_extras.json index 67e271a7fb03b..6e0168bee616e 100644 --- a/data/json/overmap/map_extras.json +++ b/data/json/overmap/map_extras.json @@ -23,6 +23,17 @@ "autonote": true, "flags": [ "MAN_MADE", "CLASSIC" ] }, + { + "id": "mx_dormant", + "type": "map_extra", + "name": { "str": "Corpses" }, + "description": "There are a lot of dead corpses here.", + "generator": { "generator_method": "update_mapgen", "generator_id": "mx_dormant" }, + "min_max_zlevel": [ -7, 7 ], + "sym": "d", + "color": "light_red", + "flags": [ "MAN_MADE", "CLASSIC" ] + }, { "id": "mx_drugdeal", "type": "map_extra", diff --git a/data/json/regional_map_settings.json b/data/json/regional_map_settings.json index f5dac0ec764a7..a0274521bfe30 100644 --- a/data/json/regional_map_settings.json +++ b/data/json/regional_map_settings.json @@ -723,6 +723,7 @@ "mx_military": 5, "mx_science": 7, "mx_collegekids": 15, + "mx_dormant": 30, "mx_portal": 5, "mx_portal_in": 3, "mx_point_burned_ground": 5, @@ -732,7 +733,10 @@ } }, "marloss": { "chance": 20, "extras": { "mx_marloss_pilgrimage": 100 } }, - "subway": { "chance": 100, "extras": { "mx_military": 5, "mx_science": 12, "mx_drugdeal": 5, "mx_casings": 10 } }, + "subway": { + "chance": 100, + "extras": { "mx_military": 5, "mx_science": 12, "mx_drugdeal": 5, "mx_casings": 10, "mx_dormant": 10 } + }, "lab_subway": { "chance": 25, "extras": { "mx_military": 5, "mx_science": 15, "mx_portal": 3, "mx_portal_in": 3 } }, "research_facility_lot": { "chance": 3, diff --git a/src/trapfunc.cpp b/src/trapfunc.cpp index 86cef67b07b65..c79d170af1129 100644 --- a/src/trapfunc.cpp +++ b/src/trapfunc.cpp @@ -1573,17 +1573,6 @@ bool trapfunc::cast_spell( const tripoint_bub_ms &p, Creature *critter, item * ) if( !tr.has_flag( json_flag_UNCONSUMED ) ) { here.remove_trap( p ); } - if( tr.has_flag( json_flag_PROXIMITY ) ) { - // remove all traps in 3-3 area area - for( int x = p.x() - 1; x <= p.x() + 1; x++ ) { - for( int y = p.y() - 1; y <= p.y() + 1; y++ ) { - tripoint_bub_ms pt( x, y, p.z() ); - if( here.tr_at( pt ).loadid == tr.loadid ) { - here.remove_trap( pt ); - } - } - } - } // we remove the trap before casting the spell because otherwise if we teleport we might be elsewhere at the end and p is no longer valid trap_spell.cast_all_effects( dummy, p ); trap_spell.make_sound( p, get_player_character() );