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

Add persistent boomer bile effect that causes a stench and skin irritation #74920

Merged
merged 33 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
13c8415
Add bile effect
zachary-kaelan Jun 24, 2024
2254cc5
Add EOC_boomer_bile_affliction
zachary-kaelan Jun 24, 2024
b242194
Adjust resistances
zachary-kaelan Jun 25, 2024
95543a5
Add morale_bile
zachary-kaelan Jun 25, 2024
9c8b229
Add morale effect to EOC_boomer_bile_affliction
zachary-kaelan Jun 25, 2024
e9bc9aa
Add new scent sc_bile
zachary-kaelan Jun 25, 2024
285d155
Split bile effect into bile_stink and bile_irritant
zachary-kaelan Jun 25, 2024
5f720d1
Remove vomiting from boomered and add more resist_traits to bile_stink
zachary-kaelan Jun 25, 2024
31d4084
Update EOC_boomer_bile_affliction to reflect split of bile effect
zachary-kaelan Jun 25, 2024
2cc0ac8
Allow towel to wipe off bile
zachary-kaelan Jun 26, 2024
f6f95aa
Add `bile_irritant` to `effects_description_for_creature`
zachary-kaelan Jun 26, 2024
b71a618
Allow swimming to remove bile from the skin
zachary-kaelan Jun 28, 2024
6f62919
Add bile_irritant to towel test
zachary-kaelan Jun 28, 2024
a6058d2
Give resistance to bile morale impact with certain traits
zachary-kaelan Jun 28, 2024
9dc4a00
Merge branch 'bile_stink' of https://github.com/zachary-kaelan/Catacl…
zachary-kaelan Jun 28, 2024
873153b
Apply suggestions from code review
zachary-kaelan Jul 5, 2024
3730f50
Remove social modifiers from bile_stink and add intimidate to bile_ir…
zachary-kaelan Jul 5, 2024
440e227
Remove intimidation bonus from bile_irritant
zachary-kaelan Jul 5, 2024
1c90e42
Fix misc_effect_on_condition.json merge conflict
zachary-kaelan Jul 6, 2024
8fb7148
Merge remote-tracking branch 'upstream/master' into bile-stink
zachary-kaelan Jul 6, 2024
bdc7ecb
Tweak effect values
zachary-kaelan Jul 9, 2024
67b812e
Change health mods to daily health mods
zachary-kaelan Jul 9, 2024
0bccf25
Add bite effect duration scaling
zachary-kaelan Jul 9, 2024
e6eb6ee
Add decay messages
zachary-kaelan Jul 14, 2024
3f9b808
Fix towel test
zachary-kaelan Jul 14, 2024
9b77f52
Make being covered in bile not a happy occasion
zachary-kaelan Jul 14, 2024
6d9c63d
Fix IRRITANT_IMMUNE check
zachary-kaelan Jul 14, 2024
a040087
Reorder effects
zachary-kaelan Jul 14, 2024
ee29ba3
Fix cringe merge conflicts
zachary-kaelan Jul 19, 2024
08cc5aa
Merge remote-tracking branch 'upstream/master' into bile_stink
zachary-kaelan Jul 19, 2024
7c93236
Merge branch 'bile_stink' of https://github.com/zachary-kaelan/Catacl…
zachary-kaelan Jul 19, 2024
57deed8
Update data/json/effects.json
kevingranade Jul 22, 2024
54dd7e4
Update data/json/effects.json
Maleclypse Jul 23, 2024
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
39 changes: 38 additions & 1 deletion data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,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 },
Expand All @@ -2073,6 +2073,43 @@
"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!",
"rating": "bad",
"resist_traits": [ "SAPROVORE", "EATDEAD" ],
"base_mods": { "vomit_chance": [ 500, 2000 ] },
Maleclypse marked this conversation as resolved.
Show resolved Hide resolved
"enchantments": [ { "values": [ { "value": "SCENT_MASK", "add": 500 } ] } ],
zachary-kaelan marked this conversation as resolved.
Show resolved Hide resolved
"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." ],
"rating": "bad",
"resist_traits": [ "POISRESIST" ],
"resist_effects": [ "wet" ],
"immune_flags": [ "ACID_IMMUNE", "IRRITANT_IMMUNE" ],
"base_mods": {
"pain_min": [ 1 ],
"pain_max_val": [ 8, 6 ],
"pain_chance": [ 150, 300 ],
"health_min_val": [ -30, -10 ],
"health_min": [ -1 ],
"health_chance": [ 1 ],
"health_chance_bot": [ 300, 1200 ],
"int_mod": [ -1 ]
},
"enchantments": [ { "values": [ { "value": "SOCIAL_INTIMIDATE", "add": 4 } ] } ],
zachary-kaelan marked this conversation as resolved.
Show resolved Hide resolved
"max_duration": "15 m"
},
{
"type": "effect_type",
"id": "skunk_spray",
Expand Down
49 changes: 49 additions & 0 deletions data/json/effects_on_condition/misc_effect_on_condition.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,54 @@
]
}
]
},
{
"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" ] }
}
]
}
]
}
]
5 changes: 5 additions & 0 deletions data/json/morale_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,5 +438,10 @@
"id": "morale_asocial",
"type": "morale_type",
"text": "Spent time alone"
},
{
"id": "morale_bile",
"type": "morale_type",
"text": "Covered in bile"
}
]
26 changes: 26 additions & 0 deletions data/json/scent_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
]
5 changes: 5 additions & 0 deletions src/avatar_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand Down Expand Up @@ -637,6 +638,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 );

Expand Down
10 changes: 7 additions & 3 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ static const efftype_id effect_antibiotic( "antibiotic" );
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_bile_irritant( "bile_irritant" );
static const efftype_id effect_beartrap( "beartrap" );
static const efftype_id effect_bleed( "bleed" );
static const efftype_id effect_blind( "blind" );
Expand Down Expand Up @@ -4948,7 +4949,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" );

Expand All @@ -4960,10 +4962,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 );

Expand Down Expand Up @@ -5871,9 +5874,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 <color_red>red dot</color> on body. " ) ) },
{ effect_boomered, ef_con( to_translation( " is covered in <color_magenta>bile</color>. " ) ) },
{ effect_boomered, ef_con( to_translation( " has <color_magenta>bile</color> covering their eyes. " ) ) },
{ effect_glowing, ef_con( to_translation( " is covered in <color_yellow>glowing goo</color>. " ) ) },
{ effect_slimed, ef_con( to_translation( " is covered in <color_green>thick goo</color>. " ) ) },
{ effect_bile_irritant, ef_con( to_translation( " is covered in <color_magenta>bile</color>. " ) ) },
{ effect_corroding, ef_con( to_translation( " is covered in <color_light_green>acid</color>. " ) ) },
{ effect_sap, ef_con( to_translation( " is coated in <color_brown>sap</color>. " ) ) },
{ effect_webbed, ef_con( to_translation( " is covered in <color_dark_gray>webs</color>. " ) ) },
Expand Down
5 changes: 4 additions & 1 deletion tests/iuse_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand Down Expand Up @@ -463,13 +464,14 @@ 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 );
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 ) );
Expand All @@ -479,6 +481,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() );
Expand Down
Loading