Skip to content

Commit

Permalink
Rebalance adrenaline
Browse files Browse the repository at this point in the history
  • Loading branch information
Coolthulhu committed Nov 21, 2023
1 parent 4b5f240 commit eab0364
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
5 changes: 3 additions & 2 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,10 @@
"apply_message": "You feel a surge of adrenaline!",
"rating": "good",
"removes_effects": [ "winded" ],
"max_duration": "5 m",
"base_mods": { "speed_mod": [ 20 ], "str_mod": [ 2 ], "dex_mod": [ 2 ], "int_mod": [ -8 ], "per_mod": [ 1 ], "stamina_min": [ 2 ] },
"blood_analysis_description": "Adrenaline Spike",
"effects_on_remove": [ { "allow_on_remove": true, "effect_type": "adrenaline_comedown", "duration": "150s" } ]
"effects_on_remove": [ { "allow_on_remove": true, "effect_type": "adrenaline_comedown", "duration": "1 m" } ]
},
{
"type": "effect_type",
Expand All @@ -1286,7 +1287,7 @@
"rating": "bad",
"decay_messages": [ [ "Your adrenaline rush wears off. You feel AWFUL!", "bad" ] ],
"miss_messages": [ [ "Your comedown throws you off.", 1 ] ],
"max_duration": "1 h",
"max_duration": "5 m",
"base_mods": {
"speed_mod": [ -10 ],
"str_mod": [ -2 ],
Expand Down
3 changes: 1 addition & 2 deletions src/bionics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@ bool Character::activate_bionic( bionic &bio, bool eff_only, bool *close_bionics
remove_effect( eff );
}
// Purging the substance won't remove the fatigue it caused
force_comedown( get_effect( effect_adrenaline ) );
force_comedown( get_effect( effect_meth ) );
set_painkiller( 0 );
set_stim( 0 );
Expand Down Expand Up @@ -826,7 +825,7 @@ bool Character::activate_bionic( bionic &bio, bool eff_only, bool *close_bionics
return false;
} else {
add_msg_activate();
add_effect( effect_adrenaline, 20_minutes );
add_effect( effect_adrenaline, 3_minutes );
}
} else if( bio.id == bio_emp ) {
if( const std::optional<tripoint> pnt = choose_adjacent( _( "Create an EMP where?" ) ) ) {
Expand Down
10 changes: 3 additions & 7 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ void Character::set_pain( int npain )

int Character::get_perceived_pain() const
{
if( get_effect_int( effect_adrenaline ) > 1 ) {
if( has_effect( effect_adrenaline ) ) {
return 0;
}

Expand Down Expand Up @@ -5103,10 +5103,6 @@ void Character::check_needs_extremes()
}
g->events().send<event_type::dies_from_drug_overdose>( getID(), effect_jetinjector );
set_part_hp_cur( bodypart_id( "torso" ), 0 );
} else if( get_effect_dur( effect_adrenaline ) > 50_minutes ) {
add_msg_if_player( m_bad, _( "Your heart spasms and stops." ) );
g->events().send<event_type::dies_from_drug_overdose>( getID(), effect_adrenaline );
set_part_hp_cur( bodypart_id( "torso" ), 0 );
} else if( get_effect_int( effect_drunk ) > 4 ) {
add_msg_if_player( m_bad, _( "Your breathing slows down to a stop." ) );
g->events().send<event_type::dies_from_drug_overdose>( getID(), effect_drunk );
Expand Down Expand Up @@ -8782,7 +8778,7 @@ void Character::on_hurt( Creature *source, bool disturb /*= true*/ )
if( has_trait( trait_ADRENALINE ) && !has_effect( effect_adrenaline ) &&
( get_part_hp_cur( bodypart_id( "head" ) ) < 25 ||
get_part_hp_cur( bodypart_id( "torso" ) ) < 15 ) ) {
add_effect( effect_adrenaline, 20_minutes );
add_effect( effect_adrenaline, 3_minutes );
}

if( disturb ) {
Expand Down Expand Up @@ -9973,7 +9969,7 @@ void Character::on_item_takeoff( const item &it )
void Character::on_effect_int_change( const efftype_id &effect_type, int intensity,
const bodypart_str_id &bp )
{
// Adrenaline can reduce perceived pain (or increase it when you enter comedown).
// Adrenaline can reduce perceived pain (or increase it when it times out).
// See @ref get_perceived_pain()
if( effect_type == effect_adrenaline ) {
// Note that calling this does no harm if it wasn't changed.
Expand Down
6 changes: 3 additions & 3 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5250,7 +5250,7 @@ int iuse::artifact( player *p, item *it, bool, const tripoint & )

case AEA_ADRENALINE:
p->add_msg_if_player( m_good, _( "You're filled with a roaring energy!" ) );
p->add_effect( effect_adrenaline, rng( 20_minutes, 25_minutes ) );
p->add_effect( effect_adrenaline, rng( 2_minutes, 3_minutes ) );
break;

case AEA_MAP: {
Expand Down Expand Up @@ -5694,7 +5694,7 @@ int iuse::unfold_generic( player *p, item *it, bool, const tripoint & )

int iuse::adrenaline_injector( player *p, item *it, bool, const tripoint & )
{
if( p->is_npc() && p->get_effect_dur( effect_adrenaline ) >= 30_minutes ) {
if( p->is_npc() && p->get_effect_dur( effect_adrenaline ) >= 3_minutes ) {
return 0;
}

Expand All @@ -5710,7 +5710,7 @@ int iuse::adrenaline_injector( player *p, item *it, bool, const tripoint & )
p->mod_healthy( -20 );
}

p->add_effect( effect_adrenaline, 20_minutes );
p->add_effect( effect_adrenaline, 2_minutes );

return it->type->charges_to_use();
}
Expand Down
3 changes: 0 additions & 3 deletions src/memorial_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,6 @@ void memorial_logger::notify( const cata::event &e )
} else if( effect == effect_jetinjector ) {
add( pgettext( "memorial_male", "Died of a healing stimulant overdose." ),
pgettext( "memorial_female", "Died of a healing stimulant overdose." ) );
} else if( effect == effect_adrenaline ) {
add( pgettext( "memorial_male", "Died of adrenaline overdose." ),
pgettext( "memorial_female", "Died of adrenaline overdose." ) );
} else if( effect == effect_drunk ) {
add( pgettext( "memorial_male", "Died of an alcohol overdose." ),
pgettext( "memorial_female", "Died of an alcohol overdose." ) );
Expand Down
2 changes: 1 addition & 1 deletion src/suffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ void Character::suffer_feral_kill_withdrawl()
if( !one_in( 4 ) ) {
add_msg_if_player( m_bad, _( "You jolt awake in a panic attack!" ) );
wake_up();
add_effect( effect_adrenaline, rng( 3_minutes, 5_minutes ) );
add_effect( effect_adrenaline, rng( 1_minutes, 2_minutes ) );
mod_stim( rng( 5, 10 ) );
add_morale( MORALE_FEELING_BAD, -5, -25, 10_minutes, 3_minutes, true );
} else {
Expand Down

0 comments on commit eab0364

Please sign in to comment.