Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if( id == effect_toxin_buildup ) {
- // Loosely based on toxic man-made compounds (mostly pesticides) which don't degrade
- // easily, leading to build-up in muscle and fat tissue through bioaccumulation.
- // Symptoms vary, and many are too long-term to be relevant in C:DDA (i.e. carcinogens),
- // but lowered immune response and neurotoxicity (i.e. seizures, migraines) are common.
- if( in_sleep_state() ) {
- return;
- }
- // Modifier for symptom frequency.
- // Each symptom is twice as frequent for each level of intensity above the one it first appears for.
- int mod = 1;
- switch( intense ) {
- case 3:
- // Tonic-clonic seizure (full body convulsive seizure)
- if( one_turn_in( 3_days ) && !has_effect( effect_valium ) ) {
- add_msg_if_player( m_bad, _( "You lose control of your body as it begins to convulse!" ) );
- time_duration td = rng( 30_seconds, 4_minutes );
- add_effect( effect_motor_seizure, td );
- add_effect( effect_downed, td );
- add_effect( effect_stunned, td );
- if( one_in( 3 ) ) {
- add_msg_if_player( m_bad, _( "You lose consciousness!" ) );
- fall_asleep( td );
- }
- }
- mod *= 2;
- /* fallthrough */
- case 2:
- // Myoclonic seizure (muscle spasm)
- if( one_turn_in( 2_hours / mod ) && !has_effect( effect_valium ) ) {
- std::string limb = random_entry<std::vector<std::string>>( {
- translate_marker( "arm" ), translate_marker( "hand" ), translate_marker( "leg" )
- } );
- add_msg_if_player( m_bad, string_format(
- _( "Your %s suddenly jerks in an unexpected direction!" ), _( limb ) ) );
- if( limb == "arm" ) {
- mod_dex_bonus( -8 );
- recoil = MAX_RECOIL;
- } else if( limb == "hand" ) {
- if( is_armed() && can_unwield( weapon ).success() ) {
- if( dice( 4, 4 ) > get_dex() ) {
- put_into_vehicle_or_drop( *this, item_drop_reason::tumbling, { remove_weapon() } );
- } else {
- add_msg_if_player( m_neutral, _( "However, you manage to keep hold of your weapon." ) );
- }
- }
- } else if( limb == "leg" ) {
- if( dice( 4, 4 ) > get_dex() ) {
- add_effect( effect_downed, rng( 5_seconds, 10_seconds ) );
- } else {
- add_msg_if_player( m_neutral, _( "However, you manage to keep your footing." ) );
- }
- }
- }
- // Atonic seizure (a.k.a. drop seizure)
- if( one_turn_in( 2_days / mod ) && !has_effect( effect_valium ) ) {
- add_msg_if_player( m_bad,
- _( "You suddenly lose all muscle tone, and can't support your own weight!" ) );
- add_effect( effect_motor_seizure, rng( 1_seconds, 2_seconds ) );
- add_effect( effect_downed, rng( 5_seconds, 10_seconds ) );
- }
- mod *= 2;
- /* fallthrough */
- case 1:
- // Migraine
- if( one_turn_in( 2_days / mod ) ) {
- add_msg_if_player( m_bad, _( "You have a splitting headache." ) );
- mod_pain( 12 );
- }
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement