diff --git a/data/json/effects.json b/data/json/effects.json index 1f1171b4dcd03..460e5b3c05d25 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -2058,7 +2058,7 @@ "desc": [ "Your vision is obscured by a disgusting splatter of bile." ], "apply_message": "You're covered in bile!", "rating": "bad", - "base_mods": { "per_mod": [ -3 ], "vomit_chance": [ 500 ] }, + "base_mods": { "per_mod": [ -3 ] }, "max_duration": "30 s", "limb_score_mods": [ { "limb_score": "vision", "modifier": 0.1 }, @@ -2077,6 +2077,45 @@ "rating": "bad", "base_mods": { "vomit_chance": [ 500 ] } }, + { + "type": "effect_type", + "id": "bile_stink", + "name": [ "Bile Stink" ], + "desc": [ "You're splattered with a greasy layer of liquified putrescence." ], + "apply_message": "You're covered in a foul smelling fluid!", + "decay_messages": [ [ "The rancid smell of corpse bile finally goes away.", "good" ] ], + "rating": "bad", + "resist_traits": [ "SAPROVORE", "EATDEAD" ], + "base_mods": { "vomit_chance": [ 500, 2000 ] }, + "enchantments": [ { "values": [ { "value": "SCENT_MASK", "add": 500 } ] } ], + "limb_score_mods": [ { "limb_score": "breathing", "modifier": 0.95, "resist_modifier": 1 } ], + "flags": [ "EFFECT_LIMB_SCORE_MOD" ], + "max_duration": "60 m", + "show_in_info": true + }, + { + "type": "effect_type", + "id": "bile_irritant", + "name": [ "Bile Irritant" ], + "desc": [ "Acidic boomer bile is irritating your skin." ], + "decay_messages": [ [ "Your skin irritation stops.", "good" ] ], + "rating": "bad", + "resist_traits": [ "POISRESIST" ], + "resist_effects": [ "wet" ], + "immune_flags": [ "ACID_IMMUNE", "IRRITANT_IMMUNE" ], + "base_mods": { + "pain_amount": [ 1 ], + "pain_min": [ 1 ], + "pain_max_val": [ 4, 2 ], + "pain_chance": [ 150, 300 ], + "h_mod_min": [ -1 ], + "h_mod_chance": [ 1 ], + "h_mod_chance_bot": [ 120, 360 ], + "int_mod": [ -1, 0 ] + }, + "effect_dur_scaling": [ { "effect_id": "bite", "modifier": 1.5, "same_bp": false } ], + "max_duration": "15 m" + }, { "type": "effect_type", "id": "skunk_spray", @@ -2103,6 +2142,7 @@ "name": [ "Conjunctivitis" ], "desc": [ "Your eyes are inflamed." ], "apply_message": "The chemical irritant damaged your eyes!", + "decay_messages": [ [ "The irritation in your eyes stops.", "good" ] ], "rating": "bad", "resist_traits": [ "POISRESIST", "PER_SLIME_OK" ], "immune_flags": [ "POISIMMUNE", "SEESLEEP" ], diff --git a/data/json/effects_on_condition/misc_effect_on_condition.json b/data/json/effects_on_condition/misc_effect_on_condition.json index fe992969b0b0c..d07e2e6d16749 100644 --- a/data/json/effects_on_condition/misc_effect_on_condition.json +++ b/data/json/effects_on_condition/misc_effect_on_condition.json @@ -221,6 +221,55 @@ } ] }, + { + "type": "effect_on_condition", + "id": "EOC_boomer_bile_affliction", + "eoc_type": "EVENT", + "required_event": "character_gains_effect", + "condition": { "and": [ { "compare_string": [ "boomered", { "context_val": "effect" } ] } ] }, + "effect": [ + { + "math": [ "BILE_STINK_DURATION", "=", "u_effect_duration('bile_stink') > 0 ? u_effect_duration('bile_stink') + 300 : 600" ] + }, + { "math": [ "MORALE_MULTIPLIER", "=", "u_has_trait('SQUEAMISH') ? -2 : -1" ] }, + { "u_add_effect": "bile_stink", "duration": { "global_val": "BILE_STINK_DURATION" } }, + { + "if": { "not": { "or": [ { "u_has_flag": "IRRITANT_IMMUNE" }, { "u_has_worn_with_flag": "IRRITANT_IMMUNE" } ] } }, + "then": [ + { + "math": [ + "BILE_IRRITANT_DURATION", + "=", + "u_effect_duration('bile_irritant') > 0 ? u_effect_duration('bile_irritant') + 120 + rand(90) : 240 + rand(180)" + ] + }, + { "math": [ "MORALE_MULTIPLIER", "*=", "u_has_trait('SQUEAMISH') ? 4 : 2" ] }, + { "u_add_effect": "bile_irritant", "duration": { "global_val": "BILE_IRRITANT_DURATION" } } + ] + }, + { + "if": { "not": { "u_has_any_trait": [ "SAPROVORE", "EATDEAD", "THRESH_SLIME" ] } }, + "then": [ + { + "u_add_morale": "morale_bile", + "bonus": { "math": [ "MORALE_MULTIPLIER * 3" ] }, + "max_bonus": { "math": [ "MORALE_MULTIPLIER * 6" ] }, + "duration": { "global_val": "BILE_STINK_DURATION" }, + "decay_start": { "math": [ "BILE_STINK_DURATION / 2" ] } + } + ], + "else": [ + { + "u_add_morale": "morale_bile", + "bonus": { "math": [ "MORALE_MULTIPLIER" ] }, + "max_bonus": { "math": [ "MORALE_MULTIPLIER * 2" ] }, + "duration": { "global_val": "BILE_STINK_DURATION / 2" }, + "decay_start": { "math": [ "BILE_STINK_DURATION / 4" ] } + } + ] + } + ] + }, { "type": "effect_on_condition", "id": "sunrise_morale_buff", diff --git a/data/json/morale_types.json b/data/json/morale_types.json index bf483b0c96aec..c730601a2ce2c 100644 --- a/data/json/morale_types.json +++ b/data/json/morale_types.json @@ -439,6 +439,11 @@ "type": "morale_type", "text": "Spent time alone" }, + { + "id": "morale_bile", + "type": "morale_type", + "text": "Covered in bile" + }, { "id": "morale_sunrise", "type": "morale_type", diff --git a/data/json/scent_types.json b/data/json/scent_types.json index 40528e7d42a6b..1f63b5e633d86 100644 --- a/data/json/scent_types.json +++ b/data/json/scent_types.json @@ -54,5 +54,31 @@ "HUMAN", "UNKNOWN" ] + }, + { + "type": "scent_type", + "id": "sc_bile", + "receptive_species": [ + "MAMMAL", + "BIRD", + "AMPHIBIAN", + "REPTILE", + "FISH", + "MUTANT", + "NETHER", + "SLIME", + "FUNGUS", + "INSECT", + "CENTIPEDE", + "SPIDER", + "PLANT", + "MOLLUSK", + "WORM", + "HORROR", + "ABERRATION", + "HALLUCINATION", + "HUMAN", + "UNKNOWN" + ] } ] diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index 785f9474dcd87..edbe8b1f1b587 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -62,6 +62,7 @@ #include "vpart_position.h" static const efftype_id effect_amigara( "amigara" ); +static const efftype_id effect_bile_irritant( "bile_irritant" ); static const efftype_id effect_glowing( "glowing" ); static const efftype_id effect_harnessed( "harnessed" ); static const efftype_id effect_hunger_engorged( "hunger_engorged" ); @@ -641,6 +642,10 @@ void avatar_action::swim( map &m, avatar &you, const tripoint &p ) add_msg( _( "The water washes off the glowing goo!" ) ); you.remove_effect( effect_glowing ); } + if( you.has_effect( effect_bile_irritant ) ) { + add_msg( _( "The water washes off the acidic bile!" ) ); + you.remove_effect( effect_bile_irritant ); + } g->water_affect_items( you ); diff --git a/src/iuse.cpp b/src/iuse.cpp index 3a38d8562b648..42140c9ab3caf 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -154,6 +154,7 @@ static const efftype_id effect_antibiotic_visible( "antibiotic_visible" ); static const efftype_id effect_antifungal( "antifungal" ); static const efftype_id effect_asthma( "asthma" ); static const efftype_id effect_beartrap( "beartrap" ); +static const efftype_id effect_bile_irritant( "bile_irritant" ); static const efftype_id effect_bleed( "bleed" ); static const efftype_id effect_blind( "blind" ); static const efftype_id effect_blood_spiders( "blood_spiders" ); @@ -4958,7 +4959,8 @@ int iuse::towel_common( Character *p, item *it, bool ) bool slime = p->has_effect( effect_slimed ); bool boom = p->has_effect( effect_boomered ); bool glow = p->has_effect( effect_glowing ); - int mult = slime + boom + glow; // cleaning off more than one at once makes it take longer + bool bile = p->has_effect( effect_bile_irritant ); + int mult = slime + boom + glow + bile; // cleaning off more than one at once makes it take longer bool towelUsed = false; const std::string name = it ? it->tname() : _( "towel" ); @@ -4970,10 +4972,11 @@ int iuse::towel_common( Character *p, item *it, bool ) p->add_msg_if_player( m_info, _( "That %s is too wet to soak up any more liquid!" ), it->tname() ); // clean off the messes first, more important - } else if( slime || boom || glow ) { + } else if( slime || boom || glow || bile ) { p->remove_effect( effect_slimed ); // able to clean off all at once p->remove_effect( effect_boomered ); p->remove_effect( effect_glowing ); + p->remove_effect( effect_bile_irritant ); p->add_msg_if_player( _( "You use the %s to clean yourself off, saturating it with slime!" ), name ); @@ -5881,9 +5884,10 @@ static std::string effects_description_for_creature( Creature *const creature, s { effect_beartrap, ef_con( to_translation( " is stuck in beartrap. " ) ) }, // NOLINTNEXTLINE(cata-text-style): spaces required for concatenation { effect_laserlocked, ef_con( to_translation( " have tiny red dot on body. " ) ) }, - { effect_boomered, ef_con( to_translation( " is covered in bile. " ) ) }, + { effect_boomered, ef_con( to_translation( " has bile covering their eyes. " ) ) }, { effect_glowing, ef_con( to_translation( " is covered in glowing goo. " ) ) }, { effect_slimed, ef_con( to_translation( " is covered in thick goo. " ) ) }, + { effect_bile_irritant, ef_con( to_translation( " is covered in bile. " ) ) }, { effect_corroding, ef_con( to_translation( " is covered in acid. " ) ) }, { effect_sap, ef_con( to_translation( " is coated in sap. " ) ) }, { effect_webbed, ef_con( to_translation( " is covered in webs. " ) ) }, diff --git a/tests/iuse_test.cpp b/tests/iuse_test.cpp index 604faddcbae88..63b68c3decb59 100644 --- a/tests/iuse_test.cpp +++ b/tests/iuse_test.cpp @@ -15,6 +15,7 @@ static const efftype_id effect_antifungal( "antifungal" ); static const efftype_id effect_asthma( "asthma" ); +static const efftype_id effect_bile_irritant( "bile_irritant" ); static const efftype_id effect_bloodworms( "bloodworms" ); static const efftype_id effect_boomered( "boomered" ); static const efftype_id effect_brainworms( "brainworms" ); @@ -491,13 +492,15 @@ TEST_CASE( "towel", "[iuse][towel]" ) } } - GIVEN( "avatar is slimed, boomered, and glowing" ) { + GIVEN( "avatar is slimed, boomered, glowing, and bile irritated." ) { dummy.add_effect( effect_slimed, 1_hours ); dummy.add_effect( effect_boomered, 1_hours ); dummy.add_effect( effect_glowing, 1_hours ); + dummy.add_effect( effect_bile_irritant, 1_hours ); REQUIRE( dummy.has_effect( effect_slimed ) ); REQUIRE( dummy.has_effect( effect_boomered ) ); REQUIRE( dummy.has_effect( effect_glowing ) ); + REQUIRE( dummy.has_effect( effect_bile_irritant ) ); WHEN( "they use a dry towel" ) { REQUIRE_FALSE( towel.has_flag( flag_WET ) ); @@ -507,6 +510,7 @@ TEST_CASE( "towel", "[iuse][towel]" ) CHECK_FALSE( dummy.has_effect( effect_slimed ) ); CHECK_FALSE( dummy.has_effect( effect_boomered ) ); CHECK_FALSE( dummy.has_effect( effect_glowing ) ); + CHECK_FALSE( dummy.has_effect( effect_bile_irritant ) ); AND_THEN( "the towel becomes filthy" ) { CHECK( towel.is_filthy() );