diff --git a/data/json/emit.json b/data/json/emit.json index b58dc4fc6c4f1..b19139d212c35 100644 --- a/data/json/emit.json +++ b/data/json/emit.json @@ -293,11 +293,5 @@ "field": "fd_fog", "intensity": 2, "qty": 200 - }, - { - "id": "emit_bees", - "type": "emit", - "field": "fd_bees", - "qty": 3 } ] diff --git a/data/json/furniture_and_terrain/furniture-flora.json b/data/json/furniture_and_terrain/furniture-flora.json index 0417ebc47c344..15a818826aa11 100644 --- a/data/json/furniture_and_terrain/furniture-flora.json +++ b/data/json/furniture_and_terrain/furniture-flora.json @@ -286,32 +286,5 @@ "sound_fail": "whump.", "items": [ { "item": "withered", "count": [ 45, 50 ] } ] } - }, - { - "type": "furniture", - "id": "f_shrub_bee_hive", - "name": "shrub with bee hive", - "looks_like": "t_underbrush", - "description": "Shrub with a bee hive hidden somewhere deep inside. A constant buzzing is heard near it.", - "symbol": "#", - "color": "light_green", - "move_cost_mod": 3, - "required_str": -1, - "flags": [ "TRANSPARENT", "DIGGABLE", "FLAMMABLE_ASH", "THIN_OBSTACLE", "SHRUB", "SHORT", "EMITTER" ], - "emissions": [ "emit_bees" ], - "examine_action": "harvest_furn", - "harvest_by_season": [ - { - "seasons": [ "spring", "summer", "autumn" ], - "entries": [ { "drop": "honeycomb", "base_num": [ 0, 4 ] }, { "drop": "wax", "base_num": [ 0, 4 ] } ] - } - ], - "bash": { - "str_min": 1, - "str_max": 6, - "sound": "crunch.", - "sound_fail": "brush.", - "items": [ { "item": "honeycomb", "prob": 30, "count": [ 0, 4 ] }, { "item": "wax", "prob": 30, "count": [ 0, 4 ] } ] - } } ] diff --git a/data/json/regional_map_settings.json b/data/json/regional_map_settings.json index 680a09d703d8a..a473f0c119d0f 100644 --- a/data/json/regional_map_settings.json +++ b/data/json/regional_map_settings.json @@ -118,8 +118,7 @@ "f_dandelion": 8, "f_boulder_small": 1, "f_boulder_medium": 0.6666, - "f_boulder_large": 0.3333, - "f_shrub_bee_hive": 0.1 + "f_boulder_large": 0.3333 }, "boost_chance": 0.833, "boosted_percent_coverage": 2.5, diff --git a/src/iexamine.cpp b/src/iexamine.cpp index a30167f441eeb..72bfc433f2fe8 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -3376,7 +3376,6 @@ void iexamine::shrub_wildveggies( player &p, const tripoint &examp ) } add_msg( _( "You forage through the %s." ), g->m.tername( examp ) ); - ///\EFFECT_SURVIVAL speeds up foraging int move_cost = 100000 / ( 2 * p.get_skill_level( skill_survival ) + 5 ); ///\EFFECT_PER randomly speeds up foraging diff --git a/src/map_field.cpp b/src/map_field.cpp index d4cf64fe5233e..a559e9bb487ac 100644 --- a/src/map_field.cpp +++ b/src/map_field.cpp @@ -1230,11 +1230,10 @@ bool map::process_fields_in_submap( submap *const current_submap, // Kill them at the end of processing. cur.set_field_intensity( 0 ); } else { - // 50% chance for bees to chase the player if in range, wander randomly otherwise. + // Bees chase the player if in range, wander randomly otherwise. if( !g->u.is_underwater() && rl_dist( p, g->u.pos() ) < 10 && - clear_path( p, g->u.pos(), 10, 1, 100 ) && - one_in( 2 ) ) { + clear_path( p, g->u.pos(), 10, 0, 100 ) ) { std::vector candidate_positions = squares_in_direction( p.xy(), point( g->u.posx(), g->u.posy() ) ); @@ -1603,22 +1602,47 @@ void map::player_in_field( player &u ) if( ft == fd_bees ) { // Player is immune to bees while underwater. if( !u.is_underwater() ) { + int times_stung = 0; const int intensity = cur.get_field_intensity(); - // Bees will try to sting you in random body parts, up to 8 times. - for( int i = 0; i < rng( 1, 7 ); i++ ) { - body_part bp = random_body_part(); - int sum_cover = 0; - for( const item &i : u.worn ) { - if( i.covers( bp ) ) { - sum_cover += i.get_coverage(); - } - } - // Get stung if [clothing on a body part isn't thick enough (like t-shirt) OR clothing covers less than 100% of body part] - // AND clothing on affected body part has low environmental protection value - if( ( u.get_armor_cut( bp ) <= 1 || ( sum_cover < 100 && x_in_y( 100 - sum_cover, 100 ) ) ) && - u.add_env_effect( effect_stung, bp, intensity, 9_minutes ) ) { - u.add_msg_if_player( m_bad, _( "The bees sting you in %s!" ), body_part_name_accusative( bp ) ); - } + // If the bees can get at you, they cause steadily increasing pain. + // TODO: Specific stinging messages. + times_stung += one_in( 4 ) && + u.add_env_effect( effect_stung, bp_torso, intensity, 9_minutes ); + times_stung += one_in( 4 ) && + u.add_env_effect( effect_stung, bp_torso, intensity, 9_minutes ); + times_stung += one_in( 4 ) && + u.add_env_effect( effect_stung, bp_torso, intensity, 9_minutes ); + times_stung += one_in( 4 ) && + u.add_env_effect( effect_stung, bp_torso, intensity, 9_minutes ); + times_stung += one_in( 4 ) && + u.add_env_effect( effect_stung, bp_torso, intensity, 9_minutes ); + times_stung += one_in( 4 ) && + u.add_env_effect( effect_stung, bp_torso, intensity, 9_minutes ); + times_stung += one_in( 4 ) && + u.add_env_effect( effect_stung, bp_torso, intensity, 9_minutes ); + times_stung += one_in( 4 ) && + u.add_env_effect( effect_stung, bp_torso, intensity, 9_minutes ); + switch( times_stung ) { + case 0: + // Woo, unscathed! + break; + case 1: + u.add_msg_if_player( m_bad, _( "The bees sting you!" ) ); + break; + case 2: + case 3: + u.add_msg_if_player( m_bad, _( "The bees sting you several times!" ) ); + break; + case 4: + case 5: + u.add_msg_if_player( m_bad, _( "The bees sting you many times!" ) ); + break; + case 6: + case 7: + case 8: + default: + u.add_msg_if_player( m_bad, _( "The bees sting you all over your body!" ) ); + break; } } }