From 1ee3c5367f30e154855006c3f345b253e8c774dc Mon Sep 17 00:00:00 2001 From: CountSerg Date: Wed, 18 Dec 2019 23:14:08 +0400 Subject: [PATCH 01/40] [WIP] Add heartrate function for character --- src/character.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ src/character.h | 1 + 2 files changed, 44 insertions(+) diff --git a/src/character.cpp b/src/character.cpp index 10740e870ac85..216574a3b2f5a 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7281,3 +7281,46 @@ void Character::use_fire( const int quantity ) return; } } + +int Character::heartrate_bpm() const +{ + //This function returns heartrate in BPM basing of health, physical state, tiredness, moral effects, stimulators and anything that should fit here. + //Some values are picked to make sense from math point of view and seem correct but effects may vary in real life + //This needs more attention from experienced contributors to work more smooth + //Average healthy bpm is 60-80. That's a simple imitation of mormal distribution. There's probably a better way to do that. Possibly this value should be generated with player creation. + const int average_heartbeat = 70 + rng( -5, 5 ) + rng( -5, 5 ); + const float stamina_level = float(get_stamina()) / float( get_stamina_max() ); + float stamina_effect = 0; + if( stamina_level >= 0.9 ) { + stamina_effect = 0; + } else if( stamina_level >= 0.8 ) { + stamina_effect = 0.2; + } else if( stamina_level >= 0.6 ) { + stamina_effect = 0.5; + } else if( stamina_level >= 0.4 ) { + stamina_effect = 1; + } else if( stamina_level >= 0.2 ) { + stamina_effect = 1.5; + } else { + stamina_effect = 2; + } + int heartbeat = average_heartbeat * ( 1 + stamina_effect );//can triple heartrate + const int stim_level = get_stim(); + int stim_modifer = 0; + if ( stim_level > 0 ) + { + //that's asymptotical function that is equal to 1 at around 30 stim level and slows down all the time almost reaching 2. Tweaking x*x multiplier will accordingly change effect accumulation + stim_modifer = 2.1 - 2/( 1 + 0.001 * stim_level * stim_level ); + } + heartbeat *= 1 + stim_modifer; + //add morale effects, mutations, fear(?), medication effects + //health effect that can make things better or worse is applied in the end. Based on get_max_healthy that already has bmi factored + const int healthy = get_max_healthy(); + float healthy_modifier = 0; + //a bit arbitary formula that can use some love + healthy_modifier = -0.05 * round( healthy / 20 ); + heartbeat *= 1 + healthy_modifier; + //A single clamp in the end should be enough + heartbeat = clamp( heartbeat, average_heartbeat, 250 ); + return heartbeat; +} diff --git a/src/character.h b/src/character.h index 64f16bd158a2a..326eb94a3aea0 100644 --- a/src/character.h +++ b/src/character.h @@ -1550,6 +1550,7 @@ class Character : public Creature, public visitable void drench( int saturation, const body_part_set &flags, bool ignore_waterproof ); /** Recalculates morale penalty/bonus from wetness based on mutations, equipment and temperature */ void apply_wetness_morale( int temperature ); + int heartrate_bpm() const; protected: Character(); From 53e0fa0e91925aabf12ef1788511697e64445759 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 01:38:44 +0400 Subject: [PATCH 02/40] Fixing lints --- src/character.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 216574a3b2f5a..98a85b8eec61a 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7317,10 +7317,10 @@ int Character::heartrate_bpm() const //health effect that can make things better or worse is applied in the end. Based on get_max_healthy that already has bmi factored const int healthy = get_max_healthy(); float healthy_modifier = 0; - //a bit arbitary formula that can use some love + //a bit arbitary formula that can use some love healthy_modifier = -0.05 * round( healthy / 20 ); heartbeat *= 1 + healthy_modifier; - //A single clamp in the end should be enough + //A single clamp in the end should be enough heartbeat = clamp( heartbeat, average_heartbeat, 250 ); return heartbeat; } From 9f776731c729ced0c6efa7607d44a0fd1cdaabd5 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Wed, 18 Dec 2019 19:07:25 +0400 Subject: [PATCH 03/40] [WIP] Add fitness band to evaluate heart beat and exercise amount --- data/json/item_actions.json | 5 +++++ data/json/items/tool_armor.json | 19 +++++++++++++++++++ src/item_factory.cpp | 1 + src/iuse.cpp | 16 ++++++++++++++++ 4 files changed, 41 insertions(+) diff --git a/data/json/item_actions.json b/data/json/item_actions.json index a8c339530e03a..3cb15243b1292 100644 --- a/data/json/item_actions.json +++ b/data/json/item_actions.json @@ -744,6 +744,11 @@ "id": "PORTABLE_GAME", "name": { "ctxt": "PORTABLE_GAME", "str": "Play" } }, + { + "type": "item_action", + "id": "FITNESS_CHECK", + "name": { "ctxt": "FITNESS_CHECK", "str": "Check health metrics" }//is this correct format in my case? + }, { "type": "item_action", "id": "deploy_tent", diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index c44998f2aeb70..2f24c57a9ca63 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -178,6 +178,25 @@ "use_action": "PORTABLE_GAME", "magazines": [ [ "battery", [ "light_minus_battery_cell", "light_minus_atomic_battery_cell", "light_minus_disposable_cell" ] ] ] }, + { + "type": "TOOL_ARMOR", + "id": "fitness_band", + "name": "fitness band", + "name_plural": "fitness bands", + "category": "clothing", + "volume": "100 ml", + "description": "A fitness band that can track your heartbeat, exercise level and also has a clocks. Activate to see your metrics.",//use another word instead of "metrics"? + "weight": "30 g",//they are really that lightweight + "to_hit": -1, + "color": "light_gray", + "covers": [ "HAND_EITHER" ], + "price": 5000, + "material": [ "plastic" ], + "flags": [ "WATCH", "WATER_FRIENDLY", "BELTED", "FRAGILE", "ALLOWS_NATURAL_ATTACKS", "OVERSIZE" ], + "coverage": 15, + "symbol": "[", + "use_action": "FITNESS_CHECK" + }, { "id": "holo_cloak", "type": "TOOL_ARMOR", diff --git a/src/item_factory.cpp b/src/item_factory.cpp index a2562458d6417..4e861096d79be 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -706,6 +706,7 @@ void Item_factory::init() add_iuse( "PLANTBLECH", &iuse::plantblech ); add_iuse( "POISON", &iuse::poison ); add_iuse( "PORTABLE_GAME", &iuse::portable_game ); + add_iuse( "FITNESS_CHECK", &iuse::fitness_check ); add_iuse( "PORTAL", &iuse::portal ); add_iuse( "PROZAC", &iuse::prozac ); add_iuse( "PURIFIER", &iuse::purifier ); diff --git a/src/iuse.cpp b/src/iuse.cpp index 9b481ed07e3bb..db645d7b188dd 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4410,6 +4410,22 @@ int iuse::portable_game( player *p, item *it, bool, const tripoint & ) return it->type->charges_to_use(); } +int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) +{ + if( p->has_trait( trait_ILLITERATE ) ) { + p->add_msg_if_player( m_info, _( "You're don't know what you're looking at." ) );//illiterate wouldn't know what he looks at too even if that's just numbers + return 0; + } else {//What else should block using f-band? + + p->add_msg_if_player( _( "You check your health metrics on your %s." ), it->tname() ); + //Add heartrate, exerscise level outputs here + int average_heartbeat = 70; //between 60 and 80, might as well randomize in this range + //Heartrate should be based on stamina level, weight, mutations, what else? How to get these values? + //Exerscise is best be based on existing value. Should add check if band is worn long enough if possible? How to get player's exercise level? + } + return it->type->charges_to_use(); +} + int iuse::hand_crank( player *p, item *it, bool, const tripoint & ) { if( p->is_npc() ) { From 2af692004d00af374f9b72eeedd63b078922f80b Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 18:25:55 +0400 Subject: [PATCH 04/40] Post-cherrypick changes. --- data/json/item_actions.json | 2 +- data/json/items/tool_armor.json | 4 ++-- src/iuse.cpp | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/json/item_actions.json b/data/json/item_actions.json index 3cb15243b1292..99889d2327192 100644 --- a/data/json/item_actions.json +++ b/data/json/item_actions.json @@ -747,7 +747,7 @@ { "type": "item_action", "id": "FITNESS_CHECK", - "name": { "ctxt": "FITNESS_CHECK", "str": "Check health metrics" }//is this correct format in my case? + "name": "Check health metrics" }, { "type": "item_action", diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 2f24c57a9ca63..72def6d2a6044 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -185,8 +185,8 @@ "name_plural": "fitness bands", "category": "clothing", "volume": "100 ml", - "description": "A fitness band that can track your heartbeat, exercise level and also has a clocks. Activate to see your metrics.",//use another word instead of "metrics"? - "weight": "30 g",//they are really that lightweight + "description": "A fitness band that can track your heartbeat, exercise level and also has a clocks. Activate to see your metrics.", + "weight": "30 g", "to_hit": -1, "color": "light_gray", "covers": [ "HAND_EITHER" ], diff --git a/src/iuse.cpp b/src/iuse.cpp index db645d7b188dd..2634ab886b29d 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4413,15 +4413,15 @@ int iuse::portable_game( player *p, item *it, bool, const tripoint & ) int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) { if( p->has_trait( trait_ILLITERATE ) ) { - p->add_msg_if_player( m_info, _( "You're don't know what you're looking at." ) );//illiterate wouldn't know what he looks at too even if that's just numbers + p->add_msg_if_player( m_info, _( "You're don't know what you're looking at." ) ); return 0; - } else {//What else should block using f-band? - + } else { + //What else should block using f-band? + const int bpm = p->heartrate_bpm(); p->add_msg_if_player( _( "You check your health metrics on your %s." ), it->tname() ); - //Add heartrate, exerscise level outputs here - int average_heartbeat = 70; //between 60 and 80, might as well randomize in this range - //Heartrate should be based on stamina level, weight, mutations, what else? How to get these values? - //Exerscise is best be based on existing value. Should add check if band is worn long enough if possible? How to get player's exercise level? + //Maybe should pick better words + p->add_msg_if_player( _( "Your heart's BPM is %i." ), bpm ); + //TODO add exercise level and whatever else makes sense (sleep quality, health level approximation?) } return it->type->charges_to_use(); } From 89f8ea52ca654a6a4eb1011d9c1d953e46737813 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 18:30:48 +0400 Subject: [PATCH 05/40] item_actions.json lint fix --- data/json/item_actions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/item_actions.json b/data/json/item_actions.json index 99889d2327192..47861cc2ffad7 100644 --- a/data/json/item_actions.json +++ b/data/json/item_actions.json @@ -747,7 +747,7 @@ { "type": "item_action", "id": "FITNESS_CHECK", - "name": "Check health metrics" + "name": "Check health metrics" }, { "type": "item_action", From e3cccf94a0c8eb08ad4c413ffa6a1ceda45af838 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 18:42:05 +0400 Subject: [PATCH 06/40] Grammar fix. --- src/iuse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iuse.cpp b/src/iuse.cpp index 2634ab886b29d..bb911b6c4dd3a 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4413,7 +4413,7 @@ int iuse::portable_game( player *p, item *it, bool, const tripoint & ) int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) { if( p->has_trait( trait_ILLITERATE ) ) { - p->add_msg_if_player( m_info, _( "You're don't know what you're looking at." ) ); + p->add_msg_if_player( m_info, _( "You don't know what you're looking at." ) ); return 0; } else { //What else should block using f-band? From 18529d3157dd27ce0471ac8c41a96d32b5b24c72 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 19:58:14 +0400 Subject: [PATCH 07/40] Traits, mutations and nicotine effect; isue declaration fix. --- src/character.cpp | 40 +++++++++++++++++++++++++++++++++++++--- src/iuse.h | 1 + 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 98a85b8eec61a..2d07e0b271faf 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -139,6 +139,7 @@ static const efftype_id effect_took_prozac( "took_prozac" ); static const efftype_id effect_took_xanax( "took_xanax" ); static const efftype_id effect_webbed( "webbed" ); static const efftype_id effect_winded( "winded" ); +static const efftype_id effect_cig( "cig" ); static const species_id ROBOT( "ROBOT" ); @@ -7287,8 +7288,20 @@ int Character::heartrate_bpm() const //This function returns heartrate in BPM basing of health, physical state, tiredness, moral effects, stimulators and anything that should fit here. //Some values are picked to make sense from math point of view and seem correct but effects may vary in real life //This needs more attention from experienced contributors to work more smooth - //Average healthy bpm is 60-80. That's a simple imitation of mormal distribution. There's probably a better way to do that. Possibly this value should be generated with player creation. - const int average_heartbeat = 70 + rng( -5, 5 ) + rng( -5, 5 ); + //Average healthy bpm is 60-80. That's a simple imitation of mormal distribution. There's probably a better way to do that. Possibly this value should be generated with player creation. + int average_heartbeat = 70 + rng( -5, 5 ) + rng( -5, 5 ); + //Chemical imbalance makes this less predictable. It's possible this range needs tweaking + if( has_trait( trait_CHEMIMBALANCE ) ) { + average_heartbeat += rng( -15, 15 ); + } + //Quick also raises basic BPM + if( has_trait( trait_QUICK ) ) { + average_heartbeat *= 1.1; + } + //Badtemper makes youк BPM raise from anger + if( has_trait( trait_BADTEMPER ) ) { + average_heartbeat *= 1.1; + } const float stamina_level = float(get_stamina()) / float( get_stamina_max() ); float stamina_effect = 0; if( stamina_level >= 0.9 ) { @@ -7313,6 +7326,15 @@ int Character::heartrate_bpm() const stim_modifer = 2.1 - 2/( 1 + 0.001 * stim_level * stim_level ); } heartbeat *= 1 + stim_modifer; + if ( p->get_effect_dur( effect_cig ) > 0 ) + { + //Nicotine-induced tachycardia + if( p->get_effect_dur( effect_cig ) > 10_minutes * ( p->addiction_level( ADD_CIG ) + 1 ) ) { + heartbeat *= 1.4; + } else { + heartbeat *= 1.1; + } + } //add morale effects, mutations, fear(?), medication effects //health effect that can make things better or worse is applied in the end. Based on get_max_healthy that already has bmi factored const int healthy = get_max_healthy(); @@ -7320,7 +7342,19 @@ int Character::heartrate_bpm() const //a bit arbitary formula that can use some love healthy_modifier = -0.05 * round( healthy / 20 ); heartbeat *= 1 + healthy_modifier; - //A single clamp in the end should be enough + //if something raised BPM at least by 20% for a player with ADRENALINE, it adds 20% of avg more to result + if ( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) + { + heartbeat += average_heartbeat * 0.2; + } + //Add dependencies for COLDBLOOD? + //Add effects from addictions + //A single clamp in the end should be enough heartbeat = clamp( heartbeat, average_heartbeat, 250 ); + //No heartbeat in omnicell + if ( has_trait( trait_SLIMESPAWNER ) ) + { + heartbeat = 0; + } return heartbeat; } diff --git a/src/iuse.h b/src/iuse.h index d96153e9f93f1..cdb1d05121fc3 100644 --- a/src/iuse.h +++ b/src/iuse.h @@ -138,6 +138,7 @@ class iuse int dive_tank( player *, item *, bool, const tripoint & ); int gasmask( player *, item *, bool, const tripoint & ); int portable_game( player *, item *, bool, const tripoint & ); + int fitness_check( player *p, item *it, bool, const tripoint & ); int vibe( player *, item *, bool, const tripoint & ); int hand_crank( player *, item *, bool, const tripoint & ); int vortex( player *, item *, bool, const tripoint & ); From ca398dda8c7c18b8b18e2c6c36746a767637eb28 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 20:13:51 +0400 Subject: [PATCH 08/40] Traits declaration. --- src/character.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/character.cpp b/src/character.cpp index 2d07e0b271faf..34ca286529f29 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -151,9 +151,11 @@ static const trait_id trait_ACIDPROOF( "ACIDPROOF" ); static const trait_id trait_ADRENALINE( "ADRENALINE" ); static const trait_id trait_BADBACK( "BADBACK" ); static const trait_id trait_BARK( "BARK" ); +static const trait_id trait_BADTEMPER( "BADTEMPER" ); static const trait_id trait_BIRD_EYE( "BIRD_EYE" ); static const trait_id trait_CEPH_EYES( "CEPH_EYES" ); static const trait_id trait_CEPH_VISION( "CEPH_VISION" ); +static const trait_id trait_CHEMIMBALANCE( "CHEMIMBALANCE" ); static const trait_id trait_DEAF( "DEAF" ); static const trait_id trait_DEBUG_CLOAK( "DEBUG_CLOAK" ); static const trait_id trait_DEBUG_NIGHTVISION( "DEBUG_NIGHTVISION" ); @@ -187,6 +189,7 @@ static const trait_id trait_PACKMULE( "PACKMULE" ); static const trait_id trait_PER_SLIME_OK( "PER_SLIME_OK" ); static const trait_id trait_PER_SLIME( "PER_SLIME" ); static const trait_id trait_PYROMANIA( "PYROMANIA" ); +static const trait_id trait_QUICK( "QUICK" ); static const trait_id trait_ROOTS2( "ROOTS2" ); static const trait_id trait_ROOTS3( "ROOTS3" ); static const trait_id trait_SEESLEEP( "SEESLEEP" ); @@ -195,6 +198,7 @@ static const trait_id trait_SHELL2( "SHELL2" ); static const trait_id trait_SHELL( "SHELL" ); static const trait_id trait_SHOUT2( "SHOUT2" ); static const trait_id trait_SHOUT3( "SHOUT3" ); +static const trait_id trait_SLIMESPAWNER( "SLIMESPAWNER" ); static const trait_id trait_SLIMY( "SLIMY" ); static const trait_id trait_STRONGSTOMACH( "STRONGSTOMACH" ); static const trait_id trait_THRESH_CEPHALOPOD( "THRESH_CEPHALOPOD" ); From 025deb2ad4fe013d641af5a88a232e4c7540fa6f Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 20:25:46 +0400 Subject: [PATCH 09/40] Declaration fix and relocating a line of effect. --- src/character.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 34ca286529f29..44a68dea02d47 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -95,6 +95,7 @@ static const efftype_id effect_bleed( "bleed" ); static const efftype_id effect_blind( "blind" ); static const efftype_id effect_blisters( "blisters" ); static const efftype_id effect_boomered( "boomered" ); +static const efftype_id effect_cig( "cig" ); static const efftype_id effect_cold( "cold" ); static const efftype_id effect_common_cold( "common_cold" ); static const efftype_id effect_contacts( "contacts" ); @@ -139,7 +140,6 @@ static const efftype_id effect_took_prozac( "took_prozac" ); static const efftype_id effect_took_xanax( "took_xanax" ); static const efftype_id effect_webbed( "webbed" ); static const efftype_id effect_winded( "winded" ); -static const efftype_id effect_cig( "cig" ); static const species_id ROBOT( "ROBOT" ); @@ -7330,10 +7330,10 @@ int Character::heartrate_bpm() const stim_modifer = 2.1 - 2/( 1 + 0.001 * stim_level * stim_level ); } heartbeat *= 1 + stim_modifer; - if ( p->get_effect_dur( effect_cig ) > 0 ) + if ( get_effect_dur( effect_cig ) > 0 ) { //Nicotine-induced tachycardia - if( p->get_effect_dur( effect_cig ) > 10_minutes * ( p->addiction_level( ADD_CIG ) + 1 ) ) { + if( get_effect_dur( effect_cig ) > 10_minutes * ( addiction_level( ADD_CIG ) + 1 ) ) { heartbeat *= 1.4; } else { heartbeat *= 1.1; From 2c367e38af6e7d82afb3498e771bbdecf2074876 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 20:37:30 +0400 Subject: [PATCH 10/40] Type cast fix. --- src/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/character.cpp b/src/character.cpp index 44a68dea02d47..3d97c1ccb502f 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7330,7 +7330,7 @@ int Character::heartrate_bpm() const stim_modifer = 2.1 - 2/( 1 + 0.001 * stim_level * stim_level ); } heartbeat *= 1 + stim_modifer; - if ( get_effect_dur( effect_cig ) > 0 ) + if ( to_turns( get_effect_dur( effect_cig ) ) > 0 ) { //Nicotine-induced tachycardia if( get_effect_dur( effect_cig ) > 10_minutes * ( addiction_level( ADD_CIG ) + 1 ) ) { From f3c9a9016b8134459e3888b6c33dbce95b68f552 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 20:54:23 +0400 Subject: [PATCH 11/40] Template function call fix. --- src/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/character.cpp b/src/character.cpp index 3d97c1ccb502f..fded8f1b0f5cd 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7330,7 +7330,7 @@ int Character::heartrate_bpm() const stim_modifer = 2.1 - 2/( 1 + 0.001 * stim_level * stim_level ); } heartbeat *= 1 + stim_modifer; - if ( to_turns( get_effect_dur( effect_cig ) ) > 0 ) + if ( to_turns( get_effect_dur( effect_cig ) ) > 0 ) { //Nicotine-induced tachycardia if( get_effect_dur( effect_cig ) > 10_minutes * ( addiction_level( ADD_CIG ) + 1 ) ) { From 1a1e7cf2dfac855df5f9734b94dc570e2e14284b Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 21:58:07 +0400 Subject: [PATCH 12/40] Style changes. --- src/character.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index fded8f1b0f5cd..a27c1a5f39cd2 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7324,14 +7324,12 @@ int Character::heartrate_bpm() const int heartbeat = average_heartbeat * ( 1 + stamina_effect );//can triple heartrate const int stim_level = get_stim(); int stim_modifer = 0; - if ( stim_level > 0 ) - { + if ( stim_level > 0 ) { //that's asymptotical function that is equal to 1 at around 30 stim level and slows down all the time almost reaching 2. Tweaking x*x multiplier will accordingly change effect accumulation stim_modifer = 2.1 - 2/( 1 + 0.001 * stim_level * stim_level ); } heartbeat *= 1 + stim_modifer; - if ( to_turns( get_effect_dur( effect_cig ) ) > 0 ) - { + if ( to_turns( get_effect_dur( effect_cig ) ) > 0 ){ //Nicotine-induced tachycardia if( get_effect_dur( effect_cig ) > 10_minutes * ( addiction_level( ADD_CIG ) + 1 ) ) { heartbeat *= 1.4; @@ -7347,8 +7345,7 @@ int Character::heartrate_bpm() const healthy_modifier = -0.05 * round( healthy / 20 ); heartbeat *= 1 + healthy_modifier; //if something raised BPM at least by 20% for a player with ADRENALINE, it adds 20% of avg more to result - if ( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) - { + if ( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) { heartbeat += average_heartbeat * 0.2; } //Add dependencies for COLDBLOOD? @@ -7356,8 +7353,7 @@ int Character::heartrate_bpm() const //A single clamp in the end should be enough heartbeat = clamp( heartbeat, average_heartbeat, 250 ); //No heartbeat in omnicell - if ( has_trait( trait_SLIMESPAWNER ) ) - { + if ( has_trait( trait_SLIMESPAWNER ) ) { heartbeat = 0; } return heartbeat; From c39d8b8bd324c3d00938d55847490c61ea006c43 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 23:06:15 +0400 Subject: [PATCH 13/40] Displaying exercise level on fitband. --- src/iuse.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/iuse.cpp b/src/iuse.cpp index bb911b6c4dd3a..0276a7a92200d 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4419,9 +4419,25 @@ int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) //What else should block using f-band? const int bpm = p->heartrate_bpm(); p->add_msg_if_player( _( "You check your health metrics on your %s." ), it->tname() ); - //Maybe should pick better words - p->add_msg_if_player( _( "Your heart's BPM is %i." ), bpm ); - //TODO add exercise level and whatever else makes sense (sleep quality, health level approximation?) + //Maybe should pick better words + p->add_msg_if_player( _( "Your %s displays your heart's BPM: %i." ), it->tname() , bpm ); + if ( bpm > 179 ) { + p->add_msg_if_player( _( "Your %s shows warning: 'Slow down! Your pulse is getting too high, champion!'" ), it->tname() ); + } + const std::string exercise = p->activity_level_str(); + if ( exercise == "NO_EXERCISE" ) { + p->add_msg_if_player( _( "Your %s shows your overall activity: 'You are not really active today. Try going for a walk!'." ), it->tname() ); + } else if ( exercise == "LIGHT_EXERCISE" ){ + p->add_msg_if_player( _( "Your %s shows your overall activity: 'Good start! Keep it up and move more.'" ), it->tname() ); + } else if ( exercise == "MODERATE_EXERCISE" ){ + p->add_msg_if_player( _( "Your %s shows your overall activity: 'Doing good! Don't stop, push the limit!'" ), it->tname() ); + } else if ( exercise == "ACTIVE_EXERCISE" ){ + //Ad will most likely need to go + p->add_msg_if_player( _( "Your %s shows your overall activity: 'Great job! Take a break from workout and refresh with a bottle of sport drink!'" ), it->tname() ); + } else { + p->add_msg_if_player( _( "Your %s shows your overall activity: 'You are too active! Avoid overextertion for your safety and health.'" ), it->tname() ); + } + //TODO add whatever else makes sense (sleep quality, health level approximation?) } return it->type->charges_to_use(); } From 5dba8964354c5a54a27f9ffa4e531cc3af12f11e Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 19 Dec 2019 23:08:14 +0400 Subject: [PATCH 14/40] Whitespace fixes. --- src/iuse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/iuse.cpp b/src/iuse.cpp index 0276a7a92200d..49d5001c17f67 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4427,11 +4427,11 @@ int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) const std::string exercise = p->activity_level_str(); if ( exercise == "NO_EXERCISE" ) { p->add_msg_if_player( _( "Your %s shows your overall activity: 'You are not really active today. Try going for a walk!'." ), it->tname() ); - } else if ( exercise == "LIGHT_EXERCISE" ){ + } else if ( exercise == "LIGHT_EXERCISE" ) { p->add_msg_if_player( _( "Your %s shows your overall activity: 'Good start! Keep it up and move more.'" ), it->tname() ); - } else if ( exercise == "MODERATE_EXERCISE" ){ + } else if ( exercise == "MODERATE_EXERCISE" ) { p->add_msg_if_player( _( "Your %s shows your overall activity: 'Doing good! Don't stop, push the limit!'" ), it->tname() ); - } else if ( exercise == "ACTIVE_EXERCISE" ){ + } else if ( exercise == "ACTIVE_EXERCISE" ) { //Ad will most likely need to go p->add_msg_if_player( _( "Your %s shows your overall activity: 'Great job! Take a break from workout and refresh with a bottle of sport drink!'" ), it->tname() ); } else { From 13a0743a04d40fa0a0c9e17c1b695563d0b980de Mon Sep 17 00:00:00 2001 From: CountSerg Date: Fri, 20 Dec 2019 17:22:25 +0400 Subject: [PATCH 15/40] Grammar fix and plural naming removal. --- data/json/items/tool_armor.json | 3 +-- src/iuse.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index 72def6d2a6044..acbd08bffec19 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -182,10 +182,9 @@ "type": "TOOL_ARMOR", "id": "fitness_band", "name": "fitness band", - "name_plural": "fitness bands", "category": "clothing", "volume": "100 ml", - "description": "A fitness band that can track your heartbeat, exercise level and also has a clocks. Activate to see your metrics.", + "description": "A fitness band that can track your heartbeat, exercise level and also has a clock. Activate to see your metrics.", "weight": "30 g", "to_hit": -1, "color": "light_gray", diff --git a/src/iuse.cpp b/src/iuse.cpp index 49d5001c17f67..11637af646231 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4435,7 +4435,7 @@ int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) //Ad will most likely need to go p->add_msg_if_player( _( "Your %s shows your overall activity: 'Great job! Take a break from workout and refresh with a bottle of sport drink!'" ), it->tname() ); } else { - p->add_msg_if_player( _( "Your %s shows your overall activity: 'You are too active! Avoid overextertion for your safety and health.'" ), it->tname() ); + p->add_msg_if_player( _( "Your %s shows your overall activity: 'You are too active! Avoid overexertion for your safety and health.'" ), it->tname() ); } //TODO add whatever else makes sense (sleep quality, health level approximation?) } From 981f3c7d4d10684394614a3ae220c10c410be7f8 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Fri, 20 Dec 2019 18:31:34 +0400 Subject: [PATCH 16/40] Lint fix. --- src/iuse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iuse.cpp b/src/iuse.cpp index 11637af646231..a074682c4f0fd 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4432,7 +4432,7 @@ int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) } else if ( exercise == "MODERATE_EXERCISE" ) { p->add_msg_if_player( _( "Your %s shows your overall activity: 'Doing good! Don't stop, push the limit!'" ), it->tname() ); } else if ( exercise == "ACTIVE_EXERCISE" ) { - //Ad will most likely need to go + //Ad will most likely need to go p->add_msg_if_player( _( "Your %s shows your overall activity: 'Great job! Take a break from workout and refresh with a bottle of sport drink!'" ), it->tname() ); } else { p->add_msg_if_player( _( "Your %s shows your overall activity: 'You are too active! Avoid overexertion for your safety and health.'" ), it->tname() ); From 6292293e18c5808212356cf9f28eee70c3c3ff88 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Fri, 20 Dec 2019 20:08:22 +0400 Subject: [PATCH 17/40] Style tweaks and meeting max line length with splitting strings. --- src/character.cpp | 25 ++++++++++++++++--------- src/iuse.cpp | 20 +++++++++++++------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index a27c1a5f39cd2..305eb28f08afe 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7289,10 +7289,13 @@ void Character::use_fire( const int quantity ) int Character::heartrate_bpm() const { - //This function returns heartrate in BPM basing of health, physical state, tiredness, moral effects, stimulators and anything that should fit here. - //Some values are picked to make sense from math point of view and seem correct but effects may vary in real life - //This needs more attention from experienced contributors to work more smooth - //Average healthy bpm is 60-80. That's a simple imitation of mormal distribution. There's probably a better way to do that. Possibly this value should be generated with player creation. + //This function returns heartrate in BPM basing of health, physical state, tiredness, + //moral effects, stimulators and anything that should fit here. + //Some values are picked to make sense from math point of view + //and seem correct but effects may vary in real life. + //This needs more attention from experienced contributors to work more smooth. + //Average healthy bpm is 60-80. That's a simple imitation of mormal distribution. + //Must a better way to do that. Possibly this value should be generated with player creation. int average_heartbeat = 70 + rng( -5, 5 ) + rng( -5, 5 ); //Chemical imbalance makes this less predictable. It's possible this range needs tweaking if( has_trait( trait_CHEMIMBALANCE ) ) { @@ -7321,11 +7324,14 @@ int Character::heartrate_bpm() const } else { stamina_effect = 2; } - int heartbeat = average_heartbeat * ( 1 + stamina_effect );//can triple heartrate + //can triple heartrate + int heartbeat = average_heartbeat * ( 1 + stamina_effect ); const int stim_level = get_stim(); int stim_modifer = 0; if ( stim_level > 0 ) { - //that's asymptotical function that is equal to 1 at around 30 stim level and slows down all the time almost reaching 2. Tweaking x*x multiplier will accordingly change effect accumulation + //that's asymptotical function that is equal to 1 at around 30 stim level + //and slows down all the time almost reaching 2. + //Tweaking x*x multiplier will accordingly change effect accumulation stim_modifer = 2.1 - 2/( 1 + 0.001 * stim_level * stim_level ); } heartbeat *= 1 + stim_modifer; @@ -7337,19 +7343,20 @@ int Character::heartrate_bpm() const heartbeat *= 1.1; } } - //add morale effects, mutations, fear(?), medication effects - //health effect that can make things better or worse is applied in the end. Based on get_max_healthy that already has bmi factored + //health effect that can make things better or worse is applied in the end. + //Based on get_max_healthy that already has bmi factored const int healthy = get_max_healthy(); float healthy_modifier = 0; //a bit arbitary formula that can use some love healthy_modifier = -0.05 * round( healthy / 20 ); heartbeat *= 1 + healthy_modifier; - //if something raised BPM at least by 20% for a player with ADRENALINE, it adds 20% of avg more to result + //if BPM raised at least by 20% for a player with ADRENALINE, it adds 20% of avg to result if ( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) { heartbeat += average_heartbeat * 0.2; } //Add dependencies for COLDBLOOD? //Add effects from addictions + //add morale effects, fear(?), medication effects //A single clamp in the end should be enough heartbeat = clamp( heartbeat, average_heartbeat, 250 ); //No heartbeat in omnicell diff --git a/src/iuse.cpp b/src/iuse.cpp index a074682c4f0fd..ec3f0c6f0b38e 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4420,22 +4420,28 @@ int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) const int bpm = p->heartrate_bpm(); p->add_msg_if_player( _( "You check your health metrics on your %s." ), it->tname() ); //Maybe should pick better words - p->add_msg_if_player( _( "Your %s displays your heart's BPM: %i." ), it->tname() , bpm ); + p->add_msg_if_player( _( "Your %s displays your heart's BPM: %i." ), it->tname(), bpm ); if ( bpm > 179 ) { - p->add_msg_if_player( _( "Your %s shows warning: 'Slow down! Your pulse is getting too high, champion!'" ), it->tname() ); + p->add_msg_if_player( _( "Your %s shows warning: 'Slow down! " + "Your pulse is getting too high, champion!'" ), it->tname() ); } const std::string exercise = p->activity_level_str(); if ( exercise == "NO_EXERCISE" ) { - p->add_msg_if_player( _( "Your %s shows your overall activity: 'You are not really active today. Try going for a walk!'." ), it->tname() ); + p->add_msg_if_player( _( "Your %s shows your overall activity: " + "'You are not really active today. Try going for a walk!'." ), it->tname() ); } else if ( exercise == "LIGHT_EXERCISE" ) { - p->add_msg_if_player( _( "Your %s shows your overall activity: 'Good start! Keep it up and move more.'" ), it->tname() ); + p->add_msg_if_player( _( "Your %s shows your overall activity: " + "'Good start! Keep it up and move more.'" ), it->tname() ); } else if ( exercise == "MODERATE_EXERCISE" ) { - p->add_msg_if_player( _( "Your %s shows your overall activity: 'Doing good! Don't stop, push the limit!'" ), it->tname() ); + p->add_msg_if_player( _( "Your %s shows your overall activity: " + "'Doing good! Don't stop, push the limit!'" ), it->tname() ); } else if ( exercise == "ACTIVE_EXERCISE" ) { //Ad will most likely need to go - p->add_msg_if_player( _( "Your %s shows your overall activity: 'Great job! Take a break from workout and refresh with a bottle of sport drink!'" ), it->tname() ); + p->add_msg_if_player( _( "Your %s shows your overall activity: 'Great job! " + "Take a break from workout and refresh with a bottle of sport drink!'" ), it->tname() ); } else { - p->add_msg_if_player( _( "Your %s shows your overall activity: 'You are too active! Avoid overexertion for your safety and health.'" ), it->tname() ); + p->add_msg_if_player( _( "Your %s shows your overall activity: " + "'You are too active! Avoid overexertion for your safety and health.'" ), it->tname() ); } //TODO add whatever else makes sense (sleep quality, health level approximation?) } From ce316c9ac74e4306d1d73a5fc29327668b83c8e0 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Fri, 20 Dec 2019 23:13:10 +0400 Subject: [PATCH 18/40] Astyle update --- src/character.cpp | 30 +++++++++++++++--------------- src/iuse.cpp | 10 +++++----- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 305eb28f08afe..8eb2b78d1a1bd 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7289,14 +7289,14 @@ void Character::use_fire( const int quantity ) int Character::heartrate_bpm() const { - //This function returns heartrate in BPM basing of health, physical state, tiredness, - //moral effects, stimulators and anything that should fit here. - //Some values are picked to make sense from math point of view + //This function returns heartrate in BPM basing of health, physical state, tiredness, + //moral effects, stimulators and anything that should fit here. + //Some values are picked to make sense from math point of view //and seem correct but effects may vary in real life. //This needs more attention from experienced contributors to work more smooth. - //Average healthy bpm is 60-80. That's a simple imitation of mormal distribution. - //Must a better way to do that. Possibly this value should be generated with player creation. - int average_heartbeat = 70 + rng( -5, 5 ) + rng( -5, 5 ); + //Average healthy bpm is 60-80. That's a simple imitation of mormal distribution. + //Must a better way to do that. Possibly this value should be generated with player creation. + int average_heartbeat = 70 + rng( -5, 5 ) + rng( -5, 5 ); //Chemical imbalance makes this less predictable. It's possible this range needs tweaking if( has_trait( trait_CHEMIMBALANCE ) ) { average_heartbeat += rng( -15, 15 ); @@ -7309,7 +7309,7 @@ int Character::heartrate_bpm() const if( has_trait( trait_BADTEMPER ) ) { average_heartbeat *= 1.1; } - const float stamina_level = float(get_stamina()) / float( get_stamina_max() ); + const float stamina_level = float( get_stamina() ) / float( get_stamina_max() ); float stamina_effect = 0; if( stamina_level >= 0.9 ) { stamina_effect = 0; @@ -7328,14 +7328,14 @@ int Character::heartrate_bpm() const int heartbeat = average_heartbeat * ( 1 + stamina_effect ); const int stim_level = get_stim(); int stim_modifer = 0; - if ( stim_level > 0 ) { - //that's asymptotical function that is equal to 1 at around 30 stim level - //and slows down all the time almost reaching 2. + if( stim_level > 0 ) { + //that's asymptotical function that is equal to 1 at around 30 stim level + //and slows down all the time almost reaching 2. //Tweaking x*x multiplier will accordingly change effect accumulation - stim_modifer = 2.1 - 2/( 1 + 0.001 * stim_level * stim_level ); + stim_modifer = 2.1 - 2 / ( 1 + 0.001 * stim_level * stim_level ); } heartbeat *= 1 + stim_modifer; - if ( to_turns( get_effect_dur( effect_cig ) ) > 0 ){ + if( to_turns( get_effect_dur( effect_cig ) ) > 0 ) { //Nicotine-induced tachycardia if( get_effect_dur( effect_cig ) > 10_minutes * ( addiction_level( ADD_CIG ) + 1 ) ) { heartbeat *= 1.4; @@ -7351,16 +7351,16 @@ int Character::heartrate_bpm() const healthy_modifier = -0.05 * round( healthy / 20 ); heartbeat *= 1 + healthy_modifier; //if BPM raised at least by 20% for a player with ADRENALINE, it adds 20% of avg to result - if ( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) { + if( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) { heartbeat += average_heartbeat * 0.2; } //Add dependencies for COLDBLOOD? //Add effects from addictions //add morale effects, fear(?), medication effects - //A single clamp in the end should be enough + //A single clamp in the end should be enough heartbeat = clamp( heartbeat, average_heartbeat, 250 ); //No heartbeat in omnicell - if ( has_trait( trait_SLIMESPAWNER ) ) { + if( has_trait( trait_SLIMESPAWNER ) ) { heartbeat = 0; } return heartbeat; diff --git a/src/iuse.cpp b/src/iuse.cpp index ec3f0c6f0b38e..f3f7542662c9e 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4421,21 +4421,21 @@ int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) p->add_msg_if_player( _( "You check your health metrics on your %s." ), it->tname() ); //Maybe should pick better words p->add_msg_if_player( _( "Your %s displays your heart's BPM: %i." ), it->tname(), bpm ); - if ( bpm > 179 ) { + if( bpm > 179 ) { p->add_msg_if_player( _( "Your %s shows warning: 'Slow down! " "Your pulse is getting too high, champion!'" ), it->tname() ); } const std::string exercise = p->activity_level_str(); - if ( exercise == "NO_EXERCISE" ) { + if( exercise == "NO_EXERCISE" ) { p->add_msg_if_player( _( "Your %s shows your overall activity: " "'You are not really active today. Try going for a walk!'." ), it->tname() ); - } else if ( exercise == "LIGHT_EXERCISE" ) { + } else if( exercise == "LIGHT_EXERCISE" ) { p->add_msg_if_player( _( "Your %s shows your overall activity: " "'Good start! Keep it up and move more.'" ), it->tname() ); - } else if ( exercise == "MODERATE_EXERCISE" ) { + } else if( exercise == "MODERATE_EXERCISE" ) { p->add_msg_if_player( _( "Your %s shows your overall activity: " "'Doing good! Don't stop, push the limit!'" ), it->tname() ); - } else if ( exercise == "ACTIVE_EXERCISE" ) { + } else if( exercise == "ACTIVE_EXERCISE" ) { //Ad will most likely need to go p->add_msg_if_player( _( "Your %s shows your overall activity: 'Great job! " "Take a break from workout and refresh with a bottle of sport drink!'" ), it->tname() ); From d421ddd13f940ccf0fb4e5364b53393e0922b814 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Sat, 21 Dec 2019 01:23:02 +0400 Subject: [PATCH 19/40] Dead state check and moving omnicell check ahead to avoid redundant calculations. --- src/character.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 8eb2b78d1a1bd..3c0ae50ad54da 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7289,6 +7289,14 @@ void Character::use_fire( const int quantity ) int Character::heartrate_bpm() const { + //Dead have no heartbeat usually + if( is_dead_state() ) { + heartbeat = 0; + } + //No heartbeat in omnicell + if( has_trait( trait_SLIMESPAWNER ) ) { + heartbeat = 0; + } //This function returns heartrate in BPM basing of health, physical state, tiredness, //moral effects, stimulators and anything that should fit here. //Some values are picked to make sense from math point of view @@ -7359,9 +7367,5 @@ int Character::heartrate_bpm() const //add morale effects, fear(?), medication effects //A single clamp in the end should be enough heartbeat = clamp( heartbeat, average_heartbeat, 250 ); - //No heartbeat in omnicell - if( has_trait( trait_SLIMESPAWNER ) ) { - heartbeat = 0; - } return heartbeat; } From 750386c3aac38cb54522e8d2c9aa09fb9899b382 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Sat, 21 Dec 2019 16:28:23 +0300 Subject: [PATCH 20/40] Fix to return value properly for simple cases. --- src/character.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 3c0ae50ad54da..ad4750993bd53 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7291,11 +7291,11 @@ int Character::heartrate_bpm() const { //Dead have no heartbeat usually if( is_dead_state() ) { - heartbeat = 0; + return 0; } //No heartbeat in omnicell if( has_trait( trait_SLIMESPAWNER ) ) { - heartbeat = 0; + return 0; } //This function returns heartrate in BPM basing of health, physical state, tiredness, //moral effects, stimulators and anything that should fit here. From e079e0ce34fce40c9f4a37297b2440f6fccafa46 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Sat, 21 Dec 2019 16:56:25 +0300 Subject: [PATCH 21/40] Uniting conditional statements. --- src/character.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index ad4750993bd53..8521fcbe52548 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7289,12 +7289,8 @@ void Character::use_fire( const int quantity ) int Character::heartrate_bpm() const { - //Dead have no heartbeat usually - if( is_dead_state() ) { - return 0; - } - //No heartbeat in omnicell - if( has_trait( trait_SLIMESPAWNER ) ) { + //Dead have no heartbeat usually and no heartbeat in omnicell + if( is_dead_state() || has_trait( trait_SLIMESPAWNER ) ) { return 0; } //This function returns heartrate in BPM basing of health, physical state, tiredness, From 000c4a38f43f8aee28ef8bc06128504a90ba1d40 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Sun, 22 Dec 2019 15:36:32 +0300 Subject: [PATCH 22/40] Add COLDBLOODs effects. --- src/character.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 8521fcbe52548..4a6e26845539d 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -156,6 +156,10 @@ static const trait_id trait_BIRD_EYE( "BIRD_EYE" ); static const trait_id trait_CEPH_EYES( "CEPH_EYES" ); static const trait_id trait_CEPH_VISION( "CEPH_VISION" ); static const trait_id trait_CHEMIMBALANCE( "CHEMIMBALANCE" ); +static const trait_id trait_COLDBLOOD( "COLDBLOOD" ); +static const trait_id trait_COLDBLOOD2( "COLDBLOOD2" ); +static const trait_id trait_COLDBLOOD3( "COLDBLOOD3" ); +static const trait_id trait_COLDBLOOD4( "COLDBLOOD4" ); static const trait_id trait_DEAF( "DEAF" ); static const trait_id trait_DEBUG_CLOAK( "DEBUG_CLOAK" ); static const trait_id trait_DEBUG_NIGHTVISION( "DEBUG_NIGHTVISION" ); @@ -7309,10 +7313,23 @@ int Character::heartrate_bpm() const if( has_trait( trait_QUICK ) ) { average_heartbeat *= 1.1; } - //Badtemper makes youк BPM raise from anger + //Badtemper makes your BPM raise from anger if( has_trait( trait_BADTEMPER ) ) { average_heartbeat *= 1.1; } + //COLDBLOOD dependencies, works almost same way as temperature effect for speed. + const int player_local_temp = g->weather.get_temperature( pos() ); + float temperature_modifier = 0; + if( has_trait( trait_id( "COLDBLOOD" ) ) ) { + temperature_modifier = 0.2; + } + if( has_trait( trait_id( "COLDBLOOD2" ) ) ) { + temperature_modifier = 0.333; + } + if( has_trait( trait_id( "COLDBLOOD3" ) ) || has_trait( trait_id( "COLDBLOOD4" ) ) ) { + temperature_modifier = 0.5; + } + average_heartbeat *= 1 + ( player_local_temp - 65 ) * temperature_modifier; const float stamina_level = float( get_stamina() ) / float( get_stamina_max() ); float stamina_effect = 0; if( stamina_level >= 0.9 ) { @@ -7336,7 +7353,7 @@ int Character::heartrate_bpm() const //that's asymptotical function that is equal to 1 at around 30 stim level //and slows down all the time almost reaching 2. //Tweaking x*x multiplier will accordingly change effect accumulation - stim_modifer = 2.1 - 2 / ( 1 + 0.001 * stim_level * stim_level ); + stim_modifer = 2 - 2 / ( 1 + 0.001 * stim_level * stim_level ); } heartbeat *= 1 + stim_modifer; if( to_turns( get_effect_dur( effect_cig ) ) > 0 ) { @@ -7358,9 +7375,8 @@ int Character::heartrate_bpm() const if( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) { heartbeat += average_heartbeat * 0.2; } - //Add dependencies for COLDBLOOD? //Add effects from addictions - //add morale effects, fear(?), medication effects + //add morale effects, fear(?) //A single clamp in the end should be enough heartbeat = clamp( heartbeat, average_heartbeat, 250 ); return heartbeat; From b88ce6c15a97b07f65b7deabbce74ca718348f9f Mon Sep 17 00:00:00 2001 From: CountSerg Date: Sun, 22 Dec 2019 15:43:09 +0300 Subject: [PATCH 23/40] Fix trait calls. --- src/character.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 4a6e26845539d..72a73a84c37a3 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7320,13 +7320,13 @@ int Character::heartrate_bpm() const //COLDBLOOD dependencies, works almost same way as temperature effect for speed. const int player_local_temp = g->weather.get_temperature( pos() ); float temperature_modifier = 0; - if( has_trait( trait_id( "COLDBLOOD" ) ) ) { + if( has_trait( trait_COLDBLOOD ) ) { temperature_modifier = 0.2; } - if( has_trait( trait_id( "COLDBLOOD2" ) ) ) { + if( has_trait( trait_COLDBLOOD2 ) ) { temperature_modifier = 0.333; } - if( has_trait( trait_id( "COLDBLOOD3" ) ) || has_trait( trait_id( "COLDBLOOD4" ) ) ) { + if( has_trait( trait_COLDBLOOD3 ) || has_trait( trait_COLDBLOOD4 ) ) { temperature_modifier = 0.5; } average_heartbeat *= 1 + ( player_local_temp - 65 ) * temperature_modifier; From 27425d1c694016f3f597aac70681e7f32b1c8143 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Sun, 22 Dec 2019 15:53:46 +0300 Subject: [PATCH 24/40] Add morale and pain effects. --- src/character.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 72a73a84c37a3..de575f512a141 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7371,12 +7371,27 @@ int Character::heartrate_bpm() const //a bit arbitary formula that can use some love healthy_modifier = -0.05 * round( healthy / 20 ); heartbeat *= 1 + healthy_modifier; + //Pain simply adds 2% per point after it reaches 5 (that's arbitary) + const int cur_pain = get_perceived_pain(); + float pain_modifier = 0; + if( cur_pain > 5 ) { + pain_modifier = 0.02 * ( cur_pain - 5 ); + } + heartbeat *= 1 + pain_modifier; //if BPM raised at least by 20% for a player with ADRENALINE, it adds 20% of avg to result if( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) { heartbeat += average_heartbeat * 0.2; } - //Add effects from addictions - //add morale effects, fear(?) + //Happy get it bit fatser and miserable some more. + //Morale effects might need more consideration + const int morale_level = get_morale_level(); + if( morale_level >= 20 ) { + heartbeat *= 1.1; + } + if( morale_level <= -20 ) { + heartbeat *= 1.2; + } + //add fear? //A single clamp in the end should be enough heartbeat = clamp( heartbeat, average_heartbeat, 250 ); return heartbeat; From 5ac4d83acecada0258bc766d8cc46ced98cf60af Mon Sep 17 00:00:00 2001 From: CountSerg Date: Sun, 22 Dec 2019 17:20:50 +0300 Subject: [PATCH 25/40] Fix for COLDBLOOD modifier. --- src/character.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/character.cpp b/src/character.cpp index de575f512a141..86da9e2ada7eb 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7329,7 +7329,10 @@ int Character::heartrate_bpm() const if( has_trait( trait_COLDBLOOD3 ) || has_trait( trait_COLDBLOOD4 ) ) { temperature_modifier = 0.5; } - average_heartbeat *= 1 + ( player_local_temp - 65 ) * temperature_modifier; + //Not sure about type conversions here but it shouldn't be 0 after division by 100 + average_heartbeat *= 1 + ( ( float( player_local_temp ) - 65 ) * temperature_modifier ) / 100; + //Limit avg from below with 20, arbitary + average_heartbeat = std::min( 20, average_heartbeat ); const float stamina_level = float( get_stamina() ) / float( get_stamina_max() ); float stamina_effect = 0; if( stamina_level >= 0.9 ) { From dfb72961000432a42b008504dd668a979fb93b49 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Sun, 22 Dec 2019 18:39:50 +0300 Subject: [PATCH 26/40] Fix ti numbers and limiting to max. --- src/character.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 86da9e2ada7eb..2dc2725209473 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7321,18 +7321,18 @@ int Character::heartrate_bpm() const const int player_local_temp = g->weather.get_temperature( pos() ); float temperature_modifier = 0; if( has_trait( trait_COLDBLOOD ) ) { - temperature_modifier = 0.2; + temperature_modifier = 0.002; } if( has_trait( trait_COLDBLOOD2 ) ) { - temperature_modifier = 0.333; + temperature_modifier = 0.00333; } if( has_trait( trait_COLDBLOOD3 ) || has_trait( trait_COLDBLOOD4 ) ) { - temperature_modifier = 0.5; + temperature_modifier = 0.005; } //Not sure about type conversions here but it shouldn't be 0 after division by 100 - average_heartbeat *= 1 + ( ( float( player_local_temp ) - 65 ) * temperature_modifier ) / 100; + average_heartbeat *= 1 + ( ( player_local_temp - 65 ) * temperature_modifier ); //Limit avg from below with 20, arbitary - average_heartbeat = std::min( 20, average_heartbeat ); + average_heartbeat = std::max( 20, average_heartbeat ); const float stamina_level = float( get_stamina() ) / float( get_stamina_max() ); float stamina_effect = 0; if( stamina_level >= 0.9 ) { From d27c8d966c60c0ab380f116a3d8fdf86bb00e912 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Mon, 23 Dec 2019 02:04:10 +0300 Subject: [PATCH 27/40] Review fixes. --- src/character.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 2dc2725209473..d80313552f659 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7329,11 +7329,10 @@ int Character::heartrate_bpm() const if( has_trait( trait_COLDBLOOD3 ) || has_trait( trait_COLDBLOOD4 ) ) { temperature_modifier = 0.005; } - //Not sure about type conversions here but it shouldn't be 0 after division by 100 average_heartbeat *= 1 + ( ( player_local_temp - 65 ) * temperature_modifier ); //Limit avg from below with 20, arbitary average_heartbeat = std::max( 20, average_heartbeat ); - const float stamina_level = float( get_stamina() ) / float( get_stamina_max() ); + const float stamina_level = static_cast( get_stamina() ) / get_stamina_max(); float stamina_effect = 0; if( stamina_level >= 0.9 ) { stamina_effect = 0; @@ -7359,7 +7358,7 @@ int Character::heartrate_bpm() const stim_modifer = 2 - 2 / ( 1 + 0.001 * stim_level * stim_level ); } heartbeat *= 1 + stim_modifer; - if( to_turns( get_effect_dur( effect_cig ) ) > 0 ) { + if( get_effect_dur( effect_cig ) > 0_turns ) { //Nicotine-induced tachycardia if( get_effect_dur( effect_cig ) > 10_minutes * ( addiction_level( ADD_CIG ) + 1 ) ) { heartbeat *= 1.4; @@ -7385,7 +7384,7 @@ int Character::heartrate_bpm() const if( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) { heartbeat += average_heartbeat * 0.2; } - //Happy get it bit fatser and miserable some more. + //Happy get it bit faster and miserable some more. //Morale effects might need more consideration const int morale_level = get_morale_level(); if( morale_level >= 20 ) { From 1f73f2c2fe588ad7619ecf3a23ee093c810218b8 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Tue, 24 Dec 2019 20:30:12 +0300 Subject: [PATCH 28/40] Review changes. --- src/character.cpp | 5 ++--- src/iuse.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index d80313552f659..8475e37b5ff0f 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7302,7 +7302,7 @@ int Character::heartrate_bpm() const //Some values are picked to make sense from math point of view //and seem correct but effects may vary in real life. //This needs more attention from experienced contributors to work more smooth. - //Average healthy bpm is 60-80. That's a simple imitation of mormal distribution. + //Average healthy bpm is 60-80. That's a simple imitation of normal distribution. //Must a better way to do that. Possibly this value should be generated with player creation. int average_heartbeat = 70 + rng( -5, 5 ) + rng( -5, 5 ); //Chemical imbalance makes this less predictable. It's possible this range needs tweaking @@ -7369,9 +7369,8 @@ int Character::heartrate_bpm() const //health effect that can make things better or worse is applied in the end. //Based on get_max_healthy that already has bmi factored const int healthy = get_max_healthy(); - float healthy_modifier = 0; //a bit arbitary formula that can use some love - healthy_modifier = -0.05 * round( healthy / 20 ); + float healthy_modifier = -0.05 * round( healthy / 20 ); heartbeat *= 1 + healthy_modifier; //Pain simply adds 2% per point after it reaches 5 (that's arbitary) const int cur_pain = get_perceived_pain(); diff --git a/src/iuse.cpp b/src/iuse.cpp index f3f7542662c9e..9c679109a58e2 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -4420,7 +4420,7 @@ int iuse::fitness_check( player *p, item *it, bool, const tripoint & ) const int bpm = p->heartrate_bpm(); p->add_msg_if_player( _( "You check your health metrics on your %s." ), it->tname() ); //Maybe should pick better words - p->add_msg_if_player( _( "Your %s displays your heart's BPM: %i." ), it->tname(), bpm ); + p->add_msg_if_player( _( "Your %s displays your heart's BPM: %i." ), it->tname(), bpm ); if( bpm > 179 ) { p->add_msg_if_player( _( "Your %s shows warning: 'Slow down! " "Your pulse is getting too high, champion!'" ), it->tname() ); From cfa150bd01789d5c15b551f17b8106acd1ceea6f Mon Sep 17 00:00:00 2001 From: CountSerg Date: Tue, 24 Dec 2019 21:45:47 +0300 Subject: [PATCH 29/40] Add fitness band to itemgroups. --- data/json/itemgroups/clothing.json | 6 ++++-- data/json/itemgroups/item_groups.json | 6 ++++-- data/json/itemgroups/locations.json | 3 ++- data/json/itemgroups/mall_item_groups.json | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/data/json/itemgroups/clothing.json b/data/json/itemgroups/clothing.json index 5a7b6381a3ed5..7edeba7516852 100644 --- a/data/json/itemgroups/clothing.json +++ b/data/json/itemgroups/clothing.json @@ -287,7 +287,8 @@ { "item": "sf_watch", "prob": 5 }, { "item": "pocketwatch", "prob": 30 }, { "item": "diving_watch", "prob": 20 }, - { "item": "game_watch", "prob": 20 } + { "item": "game_watch", "prob": 20 }, + { "item": "fitness_band", "prob": 10 } ] }, { @@ -462,7 +463,8 @@ [ "aspirin", 30 ], [ "water_clean", 30 ], [ "sports_drink", 30 ], - [ "1st_aid", 20 ] + [ "1st_aid", 20 ], + [ "fitness_band", 5 ] ] }, { diff --git a/data/json/itemgroups/item_groups.json b/data/json/itemgroups/item_groups.json index fbcf51ce1d9a5..b8de0ecff2556 100644 --- a/data/json/itemgroups/item_groups.json +++ b/data/json/itemgroups/item_groups.json @@ -1469,7 +1469,8 @@ [ "halter_top", 30 ], [ "linuxtshirt", 10 ], [ "iceaxe", 30 ], - [ "tourist_table", 30 ] + [ "tourist_table", 30 ], + [ "fitness_band", 10 ] ] }, { @@ -1881,7 +1882,8 @@ [ "tarp", 10 ], [ "esbit_stove", 10 ], [ "bottle_folding", 5 ], - [ "mess_tin", 10 ] + [ "mess_tin", 10 ], + [ "fitness_band", 10 ] ] }, { diff --git a/data/json/itemgroups/locations.json b/data/json/itemgroups/locations.json index b5a91a38beef1..e55c8fc7e142a 100644 --- a/data/json/itemgroups/locations.json +++ b/data/json/itemgroups/locations.json @@ -1105,7 +1105,8 @@ [ "briefs", 30 ], [ "yoghurt", 12 ], [ "vitamins", 10 ], - [ "aspirin", 10 ] + [ "aspirin", 10 ], + [ "fitness_band", 5 ] ] }, { diff --git a/data/json/itemgroups/mall_item_groups.json b/data/json/itemgroups/mall_item_groups.json index 934f64c980d13..36d1b114cd0d4 100644 --- a/data/json/itemgroups/mall_item_groups.json +++ b/data/json/itemgroups/mall_item_groups.json @@ -260,7 +260,8 @@ [ "cell_phone", 60 ], [ "smart_phone", 60 ], [ "wristwatch", 60 ], - [ "mobile_memory_card_used", 10 ] + [ "mobile_memory_card_used", 10 ], + [ "fitness_band", 5 ] ] }, { From 6169c5127312ac91e763a34f875bea2139d278e4 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 2 Jan 2020 19:44:06 +0300 Subject: [PATCH 30/40] Division fix for tests. --- src/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/character.cpp b/src/character.cpp index 1540a67370e85..df630e589e159 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7494,7 +7494,7 @@ int Character::heartrate_bpm() const //Based on get_max_healthy that already has bmi factored const int healthy = get_max_healthy(); //a bit arbitary formula that can use some love - float healthy_modifier = -0.05 * round( healthy / 20 ); + float healthy_modifier = -0.05 * round( healthy / 20.0f ); heartbeat *= 1 + healthy_modifier; //Pain simply adds 2% per point after it reaches 5 (that's arbitary) const int cur_pain = get_perceived_pain(); From 1bd12293d0ce1c636ae5077619114bf5c4878c68 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 2 Jan 2020 21:56:19 +0300 Subject: [PATCH 31/40] Type tweak. --- src/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/character.cpp b/src/character.cpp index df630e589e159..923e06f615937 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7494,7 +7494,7 @@ int Character::heartrate_bpm() const //Based on get_max_healthy that already has bmi factored const int healthy = get_max_healthy(); //a bit arbitary formula that can use some love - float healthy_modifier = -0.05 * round( healthy / 20.0f ); + float healthy_modifier = -0.05f * round( healthy / 20.0f ); heartbeat *= 1 + healthy_modifier; //Pain simply adds 2% per point after it reaches 5 (that's arbitary) const int cur_pain = get_perceived_pain(); From ce633d12492eb6f0243bb94a479f68e5a3bd96f8 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Tue, 14 Jan 2020 19:51:03 +0300 Subject: [PATCH 32/40] Post-conflict itemgroup tweak. --- data/json/itemgroups/locations_commercial.json | 3 ++- data/json/itemgroups/mansion.json | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/data/json/itemgroups/locations_commercial.json b/data/json/itemgroups/locations_commercial.json index d08cbbc71aa3e..4b7b1c48bd99a 100644 --- a/data/json/itemgroups/locations_commercial.json +++ b/data/json/itemgroups/locations_commercial.json @@ -1800,7 +1800,8 @@ [ "briefs", 30 ], [ "yoghurt", 12 ], [ "vitamins", 10 ], - [ "aspirin", 10 ] + [ "aspirin", 10 ], + [ "fitness_band", 10 ] ] }, { diff --git a/data/json/itemgroups/mansion.json b/data/json/itemgroups/mansion.json index f3cfbf037189c..546dfa54f7a54 100644 --- a/data/json/itemgroups/mansion.json +++ b/data/json/itemgroups/mansion.json @@ -1031,7 +1031,8 @@ [ "yoghurt", 12 ], [ "vitamins", 10 ], [ "aspirin", 15 ], - { "group": "corpse_mansion", "prob": 1 } + { "group": "corpse_mansion", "prob": 1 }, + [ "fitness_band", 3 ] ] }, { @@ -1112,7 +1113,8 @@ [ "vitamins", 10 ], [ "aspirin", 10 ], [ "karate_gi", 10 ], - [ "judo_gi", 5 ] + [ "judo_gi", 5 ], + [ "fitness_band", 5 ] ] }, { From 834e6dd93721e06bf72b990fd1e266a6f3946b13 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Tue, 14 Jan 2020 19:54:48 +0300 Subject: [PATCH 33/40] Lint fix for locations.json --- data/json/itemgroups/locations.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/itemgroups/locations.json b/data/json/itemgroups/locations.json index c04c47c3855fa..01f9bae3e3e4c 100644 --- a/data/json/itemgroups/locations.json +++ b/data/json/itemgroups/locations.json @@ -2389,4 +2389,4 @@ [ "pin_reamer", 3 ] ] } -] \ No newline at end of file +] From d799d5bdcd5d40724e2edaa6f1803a7a139a6c87 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 23 Jan 2020 22:40:04 +0300 Subject: [PATCH 34/40] Moving traits declaration to src/cata_string_consts.h --- src/cata_string_consts.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cata_string_consts.h b/src/cata_string_consts.h index 8199ba839957e..60a588b712356 100644 --- a/src/cata_string_consts.h +++ b/src/cata_string_consts.h @@ -287,6 +287,7 @@ static const trait_id trait_ARACHNID_ARMS( "ARACHNID_ARMS" ); static const trait_id trait_ARACHNID_ARMS_OK( "ARACHNID_ARMS_OK" ); static const trait_id trait_BADBACK( "BADBACK" ); static const trait_id trait_BARK( "BARK" ); +static const trait_id trait_BADTEMPER( "BADTEMPER" ); static const trait_id trait_BEAK_HUM( "BEAK_HUM" ); static const trait_id trait_BIRD_EYE( "BIRD_EYE" ); static const trait_id trait_BURROW( "BURROW" ); @@ -296,6 +297,7 @@ static const trait_id trait_CENOBITE( "CENOBITE" ); static const trait_id trait_CEPH_EYES( "CEPH_EYES" ); static const trait_id trait_CEPH_VISION( "CEPH_VISION" ); static const trait_id trait_CF_HAIR( "CF_HAIR" ); +static const trait_id trait_CHEMIMBALANCE( "CHEMIMBALANCE" ); static const trait_id trait_CHITIN2( "CHITIN2" ); static const trait_id trait_CHITIN3( "CHITIN3" ); static const trait_id trait_CHITIN_FUR( "CHITIN_FUR" ); @@ -303,6 +305,9 @@ static const trait_id trait_CHITIN_FUR2( "CHITIN_FUR2" ); static const trait_id trait_CHITIN_FUR3( "CHITIN_FUR3" ); static const trait_id trait_CHLOROMORPH( "CHLOROMORPH" ); static const trait_id trait_CLUMSY( "CLUMSY" ); +static const trait_id trait_COLDBLOOD( "COLDBLOOD" ); +static const trait_id trait_COLDBLOOD2( "COLDBLOOD2" ); +static const trait_id trait_COLDBLOOD3( "COLDBLOOD3" ); static const trait_id trait_COLDBLOOD4( "COLDBLOOD4" ); static const trait_id trait_COMPOUND_EYES( "COMPOUND_EYES" ); static const trait_id trait_DEAF( "DEAF" ); @@ -410,6 +415,7 @@ static const trait_id trait_PROJUNK( "PROJUNK" ); static const trait_id trait_PROJUNK2( "PROJUNK2" ); static const trait_id trait_PSYCHOPATH( "PSYCHOPATH" ); static const trait_id trait_PYROMANIA( "PYROMANIA" ); +static const trait_id trait_QUICK( "QUICK" ); static const trait_id trait_QUILLS( "QUILLS" ); static const trait_id trait_RADIOGENIC( "RADIOGENIC" ); static const trait_id trait_ROOTS2( "ROOTS2" ); From 6c6f186433d90174f897afa062467f17dabd7f93 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Thu, 23 Jan 2020 23:13:47 +0300 Subject: [PATCH 35/40] Change calculation method for more relaxed increase based on average heartbeat. --- src/character.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 3716d01983745..b85b4022a54bb 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -7831,13 +7831,13 @@ int Character::heartrate_bpm() const //Tweaking x*x multiplier will accordingly change effect accumulation stim_modifer = 2 - 2 / ( 1 + 0.001 * stim_level * stim_level ); } - heartbeat *= 1 + stim_modifer; + heartbeat += average_heartbeat * stim_modifer; if( get_effect_dur( effect_cig ) > 0_turns ) { //Nicotine-induced tachycardia if( get_effect_dur( effect_cig ) > 10_minutes * ( addiction_level( ADD_CIG ) + 1 ) ) { - heartbeat *= 1.4; + heartbeat += average_heartbeat * 0.4; } else { - heartbeat *= 1.1; + heartbeat += average_heartbeat * 0.1; } } //health effect that can make things better or worse is applied in the end. @@ -7845,14 +7845,14 @@ int Character::heartrate_bpm() const const int healthy = get_max_healthy(); //a bit arbitary formula that can use some love float healthy_modifier = -0.05f * round( healthy / 20.0f ); - heartbeat *= 1 + healthy_modifier; + heartbeat += average_heartbeat * healthy_modifier; //Pain simply adds 2% per point after it reaches 5 (that's arbitary) const int cur_pain = get_perceived_pain(); float pain_modifier = 0; if( cur_pain > 5 ) { pain_modifier = 0.02 * ( cur_pain - 5 ); } - heartbeat *= 1 + pain_modifier; + heartbeat += average_heartbeat * pain_modifier; //if BPM raised at least by 20% for a player with ADRENALINE, it adds 20% of avg to result if( has_trait( trait_ADRENALINE ) && heartbeat > average_heartbeat * 1.2 ) { heartbeat += average_heartbeat * 0.2; @@ -7861,13 +7861,14 @@ int Character::heartrate_bpm() const //Morale effects might need more consideration const int morale_level = get_morale_level(); if( morale_level >= 20 ) { - heartbeat *= 1.1; + heartbeat += average_heartbeat * 0.1; } if( morale_level <= -20 ) { - heartbeat *= 1.2; + heartbeat += average_heartbeat * 0.2; } //add fear? //A single clamp in the end should be enough - heartbeat = clamp( heartbeat, average_heartbeat, 250 ); + const int max_heartbeat = average_heartbeat * 3.5; + heartbeat = clamp( heartbeat, average_heartbeat, max_heartbeat ); return heartbeat; } From f64fc16be6ef78157e8e61bacef454db2fcbaa29 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Sun, 26 Jan 2020 22:30:19 +0300 Subject: [PATCH 36/40] Remove trait redeclaration --- src/cata_string_consts.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cata_string_consts.h b/src/cata_string_consts.h index 001b0597e2df3..30b5e82ad18b7 100644 --- a/src/cata_string_consts.h +++ b/src/cata_string_consts.h @@ -425,7 +425,6 @@ static const trait_id trait_BADBACK( "BADBACK" ); static const trait_id trait_BADKNEES( "BADKNEES" ); static const trait_id trait_BADTEMPER( "BADTEMPER" ); static const trait_id trait_BARK( "BARK" ); -static const trait_id trait_BADTEMPER( "BADTEMPER" ); static const trait_id trait_BEAK_HUM( "BEAK_HUM" ); static const trait_id trait_BEAK_PECK( "BEAK_PECK" ); static const trait_id trait_BEE( "BEE" ); From 36415d560dceb0c23ffa9cc2ef01be5b7d02259b Mon Sep 17 00:00:00 2001 From: CountSerg Date: Tue, 28 Jan 2020 01:27:16 +0300 Subject: [PATCH 37/40] Moving item to relocated item groups. --- data/json/itemgroups/activities_hobbies.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/json/itemgroups/activities_hobbies.json b/data/json/itemgroups/activities_hobbies.json index 96be7fa8e005d..fd4378639e0c4 100644 --- a/data/json/itemgroups/activities_hobbies.json +++ b/data/json/itemgroups/activities_hobbies.json @@ -111,7 +111,8 @@ [ "survnote", 1 ], [ "halter_top", 30 ], [ "iceaxe", 30 ], - [ "tourist_table", 30 ] + [ "tourist_table", 30 ], + [ "fitness_band", 5 ] ] }, { @@ -160,7 +161,8 @@ [ "slingshot", 10 ], [ "wristrocket", 5 ], [ "powered_earmuffs", 80 ], - [ "bandolier_wrist", 100 ] + [ "bandolier_wrist", 100 ], + [ "fitness_band", 5 ] ] }, { From 212ce78040603036ca999f06f0eb8b694bddb06b Mon Sep 17 00:00:00 2001 From: CountSerg Date: Tue, 24 Mar 2020 10:57:51 +0300 Subject: [PATCH 38/40] Return proper string declaration for strings and effects --- src/character.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/character.cpp b/src/character.cpp index 3ec75d4ab5d7a..1eedaa2a81515 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -83,6 +83,7 @@ static const efftype_id effect_bleed( "bleed" ); static const efftype_id effect_blind( "blind" ); static const efftype_id effect_blisters( "blisters" ); static const efftype_id effect_boomered( "boomered" ); +static const efftype_id effect_cig( "cig" ); static const efftype_id effect_cold( "cold" ); static const efftype_id effect_common_cold( "common_cold" ); static const efftype_id effect_contacts( "contacts" ); @@ -188,11 +189,17 @@ static const bionic_id str_bio_night( "bio_night" ); // Aftershock stuff! static const bionic_id afs_bio_linguistic_coprocessor( "afs_bio_linguistic_coprocessor" ); +static const trait_id trait_BADTEMPER( "BADTEMPER" ); static const trait_id trait_BARK( "BARK" ); static const trait_id trait_BIRD_EYE( "BIRD_EYE" ); static const trait_id trait_CEPH_EYES( "CEPH_EYES" ); -static const trait_id trait_CEPH_VISION( "CEPH_VISION" ); +static const trait_id trait_CEPH_VISION( "CEPH_VISION" ); +static const trait_id trait_CHEMIMBALANCE( "CHEMIMBALANCE" ); static const trait_id trait_CHLOROMORPH( "CHLOROMORPH" ); +static const trait_id trait_COLDBLOOD( "COLDBLOOD" ); +static const trait_id trait_COLDBLOOD2( "COLDBLOOD2" ); +static const trait_id trait_COLDBLOOD3( "COLDBLOOD3" ); +static const trait_id trait_COLDBLOOD4( "COLDBLOOD4" ); static const trait_id trait_DEAF( "DEAF" ); static const trait_id trait_DEBUG_CLOAK( "DEBUG_CLOAK" ); static const trait_id trait_DEBUG_LS( "DEBUG_LS" ); @@ -234,6 +241,7 @@ static const trait_id trait_PACKMULE( "PACKMULE" ); static const trait_id trait_PER_SLIME( "PER_SLIME" ); static const trait_id trait_PER_SLIME_OK( "PER_SLIME_OK" ); static const trait_id trait_PROF_FOODP( "PROF_FOODP" ); +static const trait_id trait_QUICK( "QUICK" ); static const trait_id trait_PYROMANIA( "PYROMANIA" ); static const trait_id trait_RADIOGENIC( "RADIOGENIC" ); static const trait_id trait_ROOTS2( "ROOTS2" ); @@ -244,6 +252,7 @@ static const trait_id trait_SHELL( "SHELL" ); static const trait_id trait_SHELL2( "SHELL2" ); static const trait_id trait_SHOUT2( "SHOUT2" ); static const trait_id trait_SHOUT3( "SHOUT3" ); +static const trait_id trait_SLIMESPAWNER( "SLIMESPAWNER" ); static const trait_id trait_SLIMY( "SLIMY" ); static const trait_id trait_STRONGSTOMACH( "STRONGSTOMACH" ); static const trait_id trait_THRESH_CEPHALOPOD( "THRESH_CEPHALOPOD" ); From bfef410cd231cce39df2f3aa756a5cb3fdb9c900 Mon Sep 17 00:00:00 2001 From: CountSerg Date: Tue, 24 Mar 2020 16:07:58 +0300 Subject: [PATCH 39/40] Automatic astyle fix --- src/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/character.cpp b/src/character.cpp index 1eedaa2a81515..18b71c7643626 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -193,7 +193,7 @@ static const trait_id trait_BADTEMPER( "BADTEMPER" ); static const trait_id trait_BARK( "BARK" ); static const trait_id trait_BIRD_EYE( "BIRD_EYE" ); static const trait_id trait_CEPH_EYES( "CEPH_EYES" ); -static const trait_id trait_CEPH_VISION( "CEPH_VISION" ); +static const trait_id trait_CEPH_VISION( "CEPH_VISION" ); static const trait_id trait_CHEMIMBALANCE( "CHEMIMBALANCE" ); static const trait_id trait_CHLOROMORPH( "CHLOROMORPH" ); static const trait_id trait_COLDBLOOD( "COLDBLOOD" ); From 7ffa2a797bfc48e14fb727bc9d2632cda437c71c Mon Sep 17 00:00:00 2001 From: CountSerg Date: Wed, 1 Apr 2020 21:35:59 +0300 Subject: [PATCH 40/40] Remove cata_string_consts.h --- src/cata_string_consts.h | 1396 -------------------------------------- 1 file changed, 1396 deletions(-) delete mode 100644 src/cata_string_consts.h diff --git a/src/cata_string_consts.h b/src/cata_string_consts.h deleted file mode 100644 index 418ba9b41886d..0000000000000 --- a/src/cata_string_consts.h +++ /dev/null @@ -1,1396 +0,0 @@ -#pragma once -#ifndef STRING_CONSTS_H -#define STRING_CONSTS_H - -#include "type_id.h" -#include "player_activity.h" - - -static const activity_id ACT_ADV_INVENTORY( "ACT_ADV_INVENTORY" ); -static const activity_id ACT_AIM( "ACT_AIM" ); -static const activity_id ACT_ARMOR_LAYERS( "ACT_ARMOR_LAYERS" ); -static const activity_id ACT_ATM( "ACT_ATM" ); -static const activity_id ACT_AUTODRIVE( "ACT_AUTODRIVE" ); -static const activity_id ACT_BUILD( "ACT_BUILD" ); -static const activity_id ACT_BURROW( "ACT_BURROW" ); -static const activity_id ACT_BUTCHER( "ACT_BUTCHER" ); -static const activity_id ACT_BUTCHER_FULL( "ACT_BUTCHER_FULL" ); -static const activity_id ACT_CHOP_LOGS( "ACT_CHOP_LOGS" ); -static const activity_id ACT_CHOP_PLANKS( "ACT_CHOP_PLANKS" ); -static const activity_id ACT_CHOP_TREE( "ACT_CHOP_TREE" ); -static const activity_id ACT_CHURN( "ACT_CHURN" ); -static const activity_id ACT_CLEAR_RUBBLE( "ACT_CLEAR_RUBBLE" ); -static const activity_id ACT_CONSUME_DRINK_MENU( "ACT_CONSUME_DRINK_MENU" ); -static const activity_id ACT_CONSUME_FOOD_MENU( "ACT_CONSUME_FOOD_MENU" ); -static const activity_id ACT_CONSUME_MEDS_MENU( "ACT_CONSUME_MEDS_MENU" ); -static const activity_id ACT_CRACKING( "ACT_CRACKING" ); -static const activity_id ACT_CRAFT( "ACT_CRAFT" ); -static const activity_id ACT_DIG( "ACT_DIG" ); -static const activity_id ACT_DIG_CHANNEL( "ACT_DIG_CHANNEL" ); -static const activity_id ACT_DISASSEMBLE( "ACT_DISASSEMBLE" ); -static const activity_id ACT_DISMEMBER( "ACT_DISMEMBER" ); -static const activity_id ACT_DISSECT( "ACT_DISSECT" ); -static const activity_id ACT_DROP( "ACT_DROP" ); -static const activity_id ACT_EAT_MENU( "ACT_EAT_MENU" ); -static const activity_id ACT_FERTILIZE_PLOT( "ACT_FERTILIZE_PLOT" ); -static const activity_id ACT_FETCH_REQUIRED( "ACT_FETCH_REQUIRED" ); -static const activity_id ACT_FIELD_DRESS( "ACT_FIELD_DRESS" ); -static const activity_id ACT_FILL_LIQUID( "ACT_FILL_LIQUID" ); -static const activity_id ACT_MILK( "ACT_MILK" ); -static const activity_id ACT_FILL_PIT( "ACT_FILL_PIT" ); -static const activity_id ACT_FIND_MOUNT( "ACT_FIND_MOUNT" ); -static const activity_id ACT_FIRSTAID( "ACT_FIRSTAID" ); -static const activity_id ACT_FISH( "ACT_FISH" ); -static const activity_id ACT_FORAGE( "ACT_FORAGE" ); -static const activity_id ACT_GAME( "ACT_GAME" ); -static const activity_id ACT_GENERIC_GAME( "ACT_GENERIC_GAME" ); -static const activity_id ACT_GUNMOD_ADD( "ACT_GUNMOD_ADD" ); -static const activity_id ACT_HACKING( "ACT_HACKING" ); -static const activity_id ACT_HACKSAW( "ACT_HACKSAW" ); -static const activity_id ACT_HAIRCUT( "ACT_HAIRCUT" ); -static const activity_id ACT_HAND_CRANK( "ACT_HAND_CRANK" ); -static const activity_id ACT_HEATING( "ACT_HEATING" ); -static const activity_id ACT_HOTWIRE_CAR( "ACT_HOTWIRE_CAR" ); -static const activity_id ACT_JACKHAMMER( "ACT_JACKHAMMER" ); -static const activity_id ACT_LONGSALVAGE( "ACT_LONGSALVAGE" ); -static const activity_id ACT_MAKE_ZLAVE( "ACT_MAKE_ZLAVE" ); -static const activity_id ACT_MEDITATE( "ACT_MEDITATE" ); -static const activity_id ACT_MEND_ITEM( "ACT_MEND_ITEM" ); -static const activity_id ACT_MIND_SPLICER( "ACT_MIND_SPLICER" ); -static const activity_id ACT_MOVE_ITEMS( "ACT_MOVE_ITEMS" ); -static const activity_id ACT_MOVE_LOOT( "ACT_MOVE_LOOT" ); -static const activity_id ACT_MULTIPLE_BUTCHER( "ACT_MULTIPLE_BUTCHER" ); -static const activity_id ACT_MULTIPLE_CHOP_PLANKS( "ACT_MULTIPLE_CHOP_PLANKS" ); -static const activity_id ACT_MULTIPLE_CHOP_TREES( "ACT_MULTIPLE_CHOP_TREES" ); -static const activity_id ACT_MULTIPLE_CONSTRUCTION( "ACT_MULTIPLE_CONSTRUCTION" ); -static const activity_id ACT_MULTIPLE_FARM( "ACT_MULTIPLE_FARM" ); -static const activity_id ACT_MULTIPLE_FISH( "ACT_MULTIPLE_FISH" ); -static const activity_id ACT_NULL( "ACT_NULL" ); -static const activity_id ACT_OPEN_GATE( "ACT_OPEN_GATE" ); -static const activity_id ACT_OPERATION( "ACT_OPERATION" ); -static const activity_id ACT_OXYTORCH( "ACT_OXYTORCH" ); -static const activity_id ACT_PICKAXE( "ACT_PICKAXE" ); -static const activity_id ACT_PICKUP( "ACT_PICKUP" ); -static const activity_id ACT_PLANT_SEED( "ACT_PLANT_SEED" ); -static const activity_id ACT_PLAY_WITH_PET( "ACT_PLAY_WITH_PET" ); -static const activity_id ACT_PULP( "ACT_PULP" ); -static const activity_id ACT_QUARTER( "ACT_QUARTER" ); -static const activity_id ACT_READ( "ACT_READ" ); -static const activity_id ACT_RELOAD( "ACT_RELOAD" ); -static const activity_id ACT_REPAIR_ITEM( "ACT_REPAIR_ITEM" ); -static const activity_id ACT_ROBOT_CONTROL( "ACT_ROBOT_CONTROL" ); -static const activity_id ACT_SHAVE( "ACT_SHAVE" ); -static const activity_id ACT_SKIN( "ACT_SKIN" ); -static const activity_id ACT_SOCIALIZE( "ACT_SOCIALIZE" ); -static const activity_id ACT_SPELLCASTING( "ACT_SPELLCASTING" ); -static const activity_id ACT_START_ENGINES( "ACT_START_ENGINES" ); -static const activity_id ACT_START_FIRE( "ACT_START_FIRE" ); -static const activity_id ACT_STASH( "ACT_STASH" ); -static const activity_id ACT_STUDY_SPELL( "ACT_STUDY_SPELL" ); -static const activity_id ACT_TIDY_UP( "ACT_TIDY_UP" ); -static const activity_id ACT_TOOLMOD_ADD( "ACT_TOOLMOD_ADD" ); -static const activity_id ACT_TRAIN( "ACT_TRAIN" ); -static const activity_id ACT_TRAVELLING( "ACT_TRAVELLING" ); -static const activity_id ACT_TREE_COMMUNION( "ACT_TREE_COMMUNION" ); -static const activity_id ACT_TRY_SLEEP( "ACT_TRY_SLEEP" ); -static const activity_id ACT_UNLOAD_MAG( "ACT_UNLOAD_MAG" ); -static const activity_id ACT_VEHICLE( "ACT_VEHICLE" ); -static const activity_id ACT_VEHICLE_DECONSTRUCTION( "ACT_VEHICLE_DECONSTRUCTION" ); -static const activity_id ACT_VEHICLE_REPAIR( "ACT_VEHICLE_REPAIR" ); -static const activity_id ACT_VIBE( "ACT_VIBE" ); -static const activity_id ACT_WAIT( "ACT_WAIT" ); -static const activity_id ACT_WAIT_NPC( "ACT_WAIT_NPC" ); -static const activity_id ACT_WAIT_STAMINA( "ACT_WAIT_STAMINA" ); -static const activity_id ACT_WAIT_WEATHER( "ACT_WAIT_WEATHER" ); -static const activity_id ACT_WASH( "ACT_WASH" ); -static const activity_id ACT_WEAR( "ACT_WEAR" ); - - -static const bionic_id bio_adrenaline( "bio_adrenaline" ); -static const bionic_id bio_ads( "bio_ads" ); -static const bionic_id bio_advreactor( "bio_advreactor" ); -static const bionic_id bio_alarm( "bio_alarm" ); -static const bionic_id bio_ankles( "bio_ankles" ); -static const bionic_id bio_armor_arms( "bio_armor_arms" ); -static const bionic_id bio_armor_eyes( "bio_armor_eyes" ); -static const bionic_id bio_armor_head( "bio_armor_head" ); -static const bionic_id bio_armor_legs( "bio_armor_legs" ); -static const bionic_id bio_armor_torso( "bio_armor_torso" ); -static const bionic_id bio_batteries( "bio_batteries" ); -static const bionic_id bio_blade( "bio_blade" ); -static const bionic_id bio_blade_weapon( "bio_blade_weapon" ); -static const bionic_id bio_blaster( "bio_blaster" ); -static const bionic_id bio_blindfold( "bio_blindfold" ); -static const bionic_id bio_blood_anal( "bio_blood_anal" ); -static const bionic_id bio_blood_filter( "bio_blood_filter" ); -static const bionic_id bio_carbon( "bio_carbon" ); -static const bionic_id bio_claws( "bio_claws" ); -static const bionic_id bio_claws_weapon( "bio_claws_weapon" ); -static const bionic_id bio_climate( "bio_climate" ); -static const bionic_id bio_cloak( "bio_cloak" ); -static const bionic_id bio_cqb( "bio_cqb" ); -static const bionic_id bio_deformity( "bio_deformity" ); -static const bionic_id bio_digestion( "bio_digestion" ); -static const bionic_id bio_dis_acid( "bio_dis_acid" ); -static const bionic_id bio_dis_shock( "bio_dis_shock" ); -static const bionic_id bio_drain( "bio_drain" ); -static const bionic_id bio_earplugs( "bio_earplugs" ); -static const bionic_id bio_ears( "bio_ears" ); -static const bionic_id bio_emp( "bio_emp" ); -static const bionic_id bio_evap( "bio_evap" ); -static const bionic_id bio_eye_optic( "bio_eye_optic" ); -static const bionic_id bio_face_mask( "bio_face_mask" ); -static const bionic_id bio_faraday( "bio_faraday" ); -static const bionic_id bio_fingerhack( "bio_fingerhack" ); -static const bionic_id bio_flashbang( "bio_flashbang" ); -static const bionic_id bio_flashlight( "bio_flashlight" ); -static const bionic_id bio_furnace( "bio_furnace" ); -static const bionic_id bio_geiger( "bio_geiger" ); -static const bionic_id bio_gills( "bio_gills" ); -static const bionic_id bio_glowy( "bio_glowy" ); -static const bionic_id bio_ground_sonar( "bio_ground_sonar" ); -static const bionic_id bio_heat_absorb( "bio_heat_absorb" ); -static const bionic_id bio_heatsink( "bio_heatsink" ); -static const bionic_id bio_hydraulics( "bio_hydraulics" ); -static const bionic_id bio_infrared( "bio_infrared" ); -static const bionic_id bio_itchy( "bio_itchy" ); -static const bionic_id bio_jointservo( "bio_jointservo" ); -static const bionic_id bio_laser( "bio_laser" ); -static const bionic_id bio_leaky( "bio_leaky" ); -static const bionic_id bio_leukocyte( "bio_leukocyte" ); -static const bionic_id bio_lighter( "bio_lighter" ); -static const bionic_id bio_lightning( "bio_chain_lightning" ); -static const bionic_id bio_lockpick( "bio_lockpick" ); -static const bionic_id bio_magnet( "bio_magnet" ); -static const bionic_id bio_membrane( "bio_membrane" ); -static const bionic_id bio_memory( "bio_memory" ); -static const bionic_id bio_meteorologist( "bio_meteorologist" ); -static const bionic_id bio_nanobots( "bio_nanobots" ); -static const bionic_id bio_night( "bio_night" ); -static const bionic_id bio_night_vision( "bio_night_vision" ); -static const bionic_id bio_noise( "bio_noise" ); -static const bionic_id bio_ods( "bio_ods" ); -static const bionic_id bio_painkiller( "bio_painkiller" ); -static const bionic_id bio_plut_filter( "bio_plut_filter" ); -static const bionic_id bio_plutdump( "bio_plutdump" ); -static const bionic_id bio_plutfilter( "bio_plutfilter" ); -static const bionic_id bio_power_storage( "bio_power_storage" ); -static const bionic_id bio_power_storage_mkII( "bio_power_storage_mkII" ); -static const bionic_id bio_power_weakness( "bio_power_weakness" ); -static const bionic_id bio_probability_travel( "bio_probability_travel" ); -static const bionic_id bio_radscrubber( "bio_radscrubber" ); -static const bionic_id bio_railgun( "bio_railgun" ); -static const bionic_id bio_razors( "bio_razors" ); -static const bionic_id bio_reactor( "bio_reactor" ); -static const bionic_id bio_recycler( "bio_recycler" ); -static const bionic_id bio_remote( "bio_remote" ); -static const bionic_id bio_resonator( "bio_resonator" ); -static const bionic_id bio_scent_mask( "bio_scent_mask" ); -static const bionic_id bio_scent_vision( "bio_scent_vision" ); -static const bionic_id bio_shakes( "bio_shakes" ); -static const bionic_id bio_shock( "bio_shock" ); -static const bionic_id bio_shock_absorber( "bio_shock_absorber" ); -static const bionic_id bio_shockwave( "bio_shockwave" ); -static const bionic_id bio_sleepy( "bio_sleepy" ); -static const bionic_id bio_soporific( "bio_soporific" ); -static const bionic_id bio_spasm( "bio_spasm" ); -static const bionic_id bio_speed( "bio_speed" ); -static const bionic_id bio_storage( "bio_storage" ); -static const bionic_id bio_sunglasses( "bio_sunglasses" ); -static const bionic_id bio_synaptic_regen( "bio_synaptic_regen" ); -static const bionic_id bio_syringe( "bio_syringe" ); -static const bionic_id bio_targeting( "bio_targeting" ); -static const bionic_id bio_taste_blocker( "bio_taste_blocker" ); -static const bionic_id bio_tattoo_led( "bio_tattoo_led" ); -static const bionic_id bio_teleport( "bio_teleport" ); -static const bionic_id bio_time_freeze( "bio_time_freeze" ); -static const bionic_id bio_tools( "bio_tools" ); -static const bionic_id bio_torsionratchet( "bio_torsionratchet" ); -static const bionic_id bio_trip( "bio_trip" ); -static const bionic_id bio_uncanny_dodge( "bio_uncanny_dodge" ); -static const bionic_id bio_ups( "bio_ups" ); -static const bionic_id bio_voice( "bio_voice" ); -static const bionic_id bio_watch( "bio_watch" ); -static const bionic_id bio_water_extractor( "bio_water_extractor" ); -static const bionic_id bionic_TOOLS_EXTEND( "bio_tools_extend" ); -static const bionic_id str_bio_cloak( "bio_cloak" ); -static const bionic_id str_bio_night( "bio_night" ); -// Aftershock stuff! -static const bionic_id afs_bio_linguistic_coprocessor( "afs_bio_linguistic_coprocessor" ); -static const bionic_id afs_bio_dopamine_stimulators( "afs_bio_dopamine_stimulators" ); - -static const efftype_id effect_adrenaline( "adrenaline" ); -static const efftype_id effect_adrenaline_mycus( "adrenaline_mycus" ); -static const efftype_id effect_alarm_clock( "alarm_clock" ); -static const efftype_id effect_allow_sleep( "allow_sleep" ); -static const efftype_id effect_amigara( "amigara" ); -static const efftype_id effect_antibiotic( "antibiotic" ); -static const efftype_id effect_antibiotic_visible( "antibiotic_visible" ); -static const efftype_id effect_asked_for_item( "asked_for_item" ); -static const efftype_id effect_asked_personal_info( "asked_personal_info" ); -static const efftype_id effect_asked_to_follow( "asked_to_follow" ); -static const efftype_id effect_asked_to_lead( "asked_to_lead" ); -static const efftype_id effect_asked_to_train( "asked_to_train" ); -static const efftype_id effect_assisted( "assisted" ); -static const efftype_id effect_asthma( "asthma" ); -static const efftype_id effect_attention( "attention" ); -static const efftype_id effect_badpoison( "badpoison" ); -static const efftype_id effect_bandaged( "bandaged" ); -static const efftype_id effect_beartrap( "beartrap" ); -static const efftype_id effect_bite( "bite" ); -static const efftype_id effect_bleed( "bleed" ); -static const efftype_id effect_blind( "blind" ); -static const efftype_id effect_blisters( "blisters" ); -static const efftype_id effect_bloodworms( "bloodworms" ); -static const efftype_id effect_boomered( "boomered" ); -static const efftype_id effect_bouldering( "bouldering" ); -static const efftype_id effect_bounced( "bounced" ); -static const efftype_id effect_brainworms( "brainworms" ); -static const efftype_id effect_catch_up( "catch_up" ); -static const efftype_id effect_cig( "cig" ); -static const efftype_id effect_cold( "cold" ); -static const efftype_id effect_common_cold( "common_cold" ); -static const efftype_id effect_contacts( "contacts" ); -static const efftype_id effect_controlled( "controlled" ); -static const efftype_id effect_corroding( "corroding" ); -static const efftype_id effect_cough_suppress( "cough_suppress" ); -static const efftype_id effect_countdown( "countdown" ); -static const efftype_id effect_crushed( "crushed" ); -static const efftype_id effect_cureall( "cureall" ); -static const efftype_id effect_currently_busy( "currently_busy" ); -static const efftype_id effect_darkness( "darkness" ); -static const efftype_id effect_datura( "datura" ); -static const efftype_id effect_dazed( "dazed" ); -static const efftype_id effect_deaf( "deaf" ); -static const efftype_id effect_depressants( "depressants" ); -static const efftype_id effect_dermatik( "dermatik" ); -static const efftype_id effect_disabled( "disabled" ); -static const efftype_id effect_disinfected( "disinfected" ); -static const efftype_id effect_docile( "docile" ); -static const efftype_id effect_downed( "downed" ); -static const efftype_id effect_dragging( "dragging" ); -static const efftype_id effect_drunk( "drunk" ); -static const efftype_id effect_earphones( "earphones" ); -static const efftype_id effect_emp( "emp" ); -static const efftype_id effect_evil( "evil" ); -static const efftype_id effect_fearparalyze( "fearparalyze" ); -static const efftype_id effect_flu( "flu" ); -static const efftype_id effect_flushot( "flushot" ); -static const efftype_id effect_foodpoison( "foodpoison" ); -static const efftype_id effect_formication( "formication" ); -static const efftype_id effect_frostbite( "frostbite" ); -static const efftype_id effect_frostbite_recovery( "frostbite_recovery" ); -static const efftype_id effect_fungus( "fungus" ); -static const efftype_id effect_gave_quest_item( "gave_quest_item" ); -static const efftype_id effect_glare( "glare" ); -static const efftype_id effect_glowing( "glowing" ); -static const efftype_id effect_glowing_led( "glowy_led" ); -static const efftype_id effect_glowy_led( "glowy_led" ); -static const efftype_id effect_got_checked( "got_checked" ); -static const efftype_id effect_grabbed( "grabbed" ); -static const efftype_id effect_grabbing( "grabbing" ); -static const efftype_id effect_grown_of_fuse( "grown_of_fuse" ); -static const efftype_id effect_hallu( "hallu" ); -static const efftype_id effect_happy( "happy" ); -static const efftype_id effect_harnessed( "harnessed" ); -static const efftype_id effect_has_bag( "has_bag" ); -static const efftype_id effect_haslight( "haslight" ); -static const efftype_id effect_heating_bionic( "heating_bionic" ); -static const efftype_id effect_heavysnare( "heavysnare" ); -static const efftype_id effect_high( "high" ); -static const efftype_id effect_hit_by_player( "hit_by_player" ); -static const efftype_id effect_hot( "hot" ); -static const efftype_id effect_hot_speed( "hot_speed" ); -static const efftype_id effect_in_pit( "in_pit" ); -static const efftype_id effect_infected( "infected" ); -static const efftype_id effect_infection( "infection" ); -static const efftype_id effect_iodine( "iodine" ); -static const efftype_id effect_irradiated( "irradiated" ); -static const efftype_id effect_jetinjector( "jetinjector" ); -static const efftype_id effect_lack_sleep( "lack_sleep" ); -static const efftype_id effect_laserlocked( "laserlocked" ); -static const efftype_id effect_lightsnare( "lightsnare" ); -static const efftype_id effect_lying_down( "lying_down" ); -static const efftype_id effect_melatonin_supplements( "melatonin" ); -static const efftype_id effect_masked_scent( "masked_scent" ); -static const efftype_id effect_mending( "mending" ); -static const efftype_id effect_meth( "meth" ); -static const efftype_id effect_milked( "milked" ); -static const efftype_id effect_monster_armor( "monster_armor" ); -static const efftype_id effect_motor_seizure( "motor_seizure" ); -static const efftype_id effect_music( "music" ); -static const efftype_id effect_narcosis( "narcosis" ); -static const efftype_id effect_nausea( "nausea" ); -static const efftype_id effect_no_ammo( "no_ammo" ); -static const efftype_id effect_no_sight( "no_sight" ); -static const efftype_id effect_npc_fire_bad( "npc_fire_bad" ); -static const efftype_id effect_npc_flee_player( "npc_flee_player" ); -static const efftype_id effect_npc_player_looking( "npc_player_still_looking" ); -static const efftype_id effect_npc_run_away( "npc_run_away" ); -static const efftype_id effect_npc_suspend( "npc_suspend" ); -static const efftype_id effect_on_roof( "on_roof" ); -static const efftype_id effect_onfire( "onfire" ); -static const efftype_id effect_operating( "operating" ); -static const efftype_id effect_pacified( "pacified" ); -static const efftype_id effect_paid( "paid" ); -static const efftype_id effect_paincysts( "paincysts" ); -static const efftype_id effect_panacea( "panacea" ); -static const efftype_id effect_paralyzepoison( "paralyzepoison" ); -static const efftype_id effect_pblue( "pblue" ); -static const efftype_id effect_pet( "pet" ); -static const efftype_id effect_pkill( "pkill" ); -static const efftype_id effect_pkill_l( "pkill_l" ); -static const efftype_id effect_pkill1( "pkill1" ); -static const efftype_id effect_pkill2( "pkill2" ); -static const efftype_id effect_pkill3( "pkill3" ); -static const efftype_id effect_playing_instrument( "playing_instrument" ); -static const efftype_id effect_poison( "poison" ); -static const efftype_id effect_pushed( "pushed" ); -static const efftype_id effect_raising( "raising" ); -static const efftype_id effect_rat( "rat" ); -static const efftype_id effect_recently_coughed( "recently_coughed" ); -static const efftype_id effect_recover( "recover" ); -static const efftype_id effect_relax_gas( "relax_gas" ); -static const efftype_id effect_ridden( "ridden" ); -static const efftype_id effect_riding( "riding" ); -static const efftype_id effect_run( "run" ); -static const efftype_id effect_sad( "sad" ); -static const efftype_id effect_saddled( "monster_saddled" ); -static const efftype_id effect_sap( "sap" ); -static const efftype_id effect_shakes( "shakes" ); -static const efftype_id effect_shrieking( "shrieking" ); -static const efftype_id effect_sleep( "sleep" ); -static const efftype_id effect_sleep_deprived( "sleep_deprived" ); -static const efftype_id effect_slept_through_alarm( "slept_through_alarm" ); -static const efftype_id effect_slimed( "slimed" ); -static const efftype_id effect_smoke( "smoke" ); -static const efftype_id effect_snow_glare( "snow_glare" ); -static const efftype_id effect_spores( "spores" ); -static const efftype_id effect_stim( "stim" ); -static const efftype_id effect_stim_overdose( "stim_overdose" ); -static const efftype_id effect_stimpack( "stimpack" ); -static const efftype_id effect_strong_antibiotic( "strong_antibiotic" ); -static const efftype_id effect_strong_antibiotic_visible( "strong_antibiotic_visible" ); -static const efftype_id effect_stung( "stung" ); -static const efftype_id effect_stunned( "stunned" ); -static const efftype_id effect_supercharged( "supercharged" ); -static const efftype_id effect_tapeworm( "tapeworm" ); -static const efftype_id effect_targeted( "targeted" ); -static const efftype_id effect_teargas( "teargas" ); -static const efftype_id effect_teleglow( "teleglow" ); -static const efftype_id effect_tetanus( "tetanus" ); -static const efftype_id effect_tied( "tied" ); -static const efftype_id effect_took_anticonvulsant_visible( "took_anticonvulsant_visible" ); -static const efftype_id effect_took_flumed( "took_flumed" ); -static const efftype_id effect_took_prozac( "took_prozac" ); -static const efftype_id effect_took_prozac_bad( "took_prozac_bad" ); -static const efftype_id effect_took_prozac_visible( "took_prozac_visible" ); -static const efftype_id effect_took_thorazine( "took_thorazine" ); -static const efftype_id effect_took_thorazine_bad( "took_thorazine_bad" ); -static const efftype_id effect_took_xanax( "took_xanax" ); -static const efftype_id effect_took_xanax_visible( "took_xanax_visible" ); -static const efftype_id effect_toxin_buildup( "toxin_buildup" ); -static const efftype_id effect_under_op( "under_operation" ); -static const efftype_id effect_valium( "valium" ); -static const efftype_id effect_visuals( "visuals" ); -static const efftype_id effect_was_laserlocked( "was_laserlocked" ); -static const efftype_id effect_weak_antibiotic( "weak_antibiotic" ); -static const efftype_id effect_weak_antibiotic_visible( "weak_antibiotic_visible" ); -static const efftype_id effect_webbed( "webbed" ); -static const efftype_id effect_weed_high( "weed_high" ); -static const efftype_id effect_winded( "winded" ); -static const efftype_id effect_zapped( "zapped" ); - -static const trait_id trait_ACIDBLOOD( "ACIDBLOOD" ); -static const trait_id trait_ACIDPROOF( "ACIDPROOF" ); -static const trait_id trait_ADDICTIVE( "ADDICTIVE" ); -static const trait_id trait_ADRENALINE( "ADRENALINE" ); -static const trait_id trait_ALBINO( "ALBINO" ); -static const trait_id trait_ALCMET( "ALCMET" ); -static const trait_id trait_AMORPHOUS( "AMORPHOUS" ); -static const trait_id trait_ANIMALDISCORD( "ANIMALDISCORD" ); -static const trait_id trait_ANIMALDISCORD2( "ANIMALDISCORD2" ); -static const trait_id trait_ANIMALEMPATH( "ANIMALEMPATH" ); -static const trait_id trait_ANIMALEMPATH2( "ANIMALEMPATH2" ); -static const trait_id trait_ANTENNAE( "ANTENNAE" ); -static const trait_id trait_ANTIFRUIT( "ANTIFRUIT" ); -static const trait_id trait_ANTIJUNK( "ANTIJUNK" ); -static const trait_id trait_ANTIWHEAT( "ANTIWHEAT" ); -static const trait_id trait_ANTLERS( "ANTLERS" ); -static const trait_id trait_ARACHNID_ARMS( "ARACHNID_ARMS" ); -static const trait_id trait_ARACHNID_ARMS_OK( "ARACHNID_ARMS_OK" ); -static const trait_id trait_ARM_TENTACLES( "ARM_TENTACLES" ); -static const trait_id trait_ARM_TENTACLES_4( "ARM_TENTACLES_4" ); -static const trait_id trait_ARM_TENTACLES_8( "ARM_TENTACLES_8" ); -static const trait_id trait_ASTHMA( "ASTHMA" ); -static const trait_id trait_BADBACK( "BADBACK" ); -static const trait_id trait_BADKNEES( "BADKNEES" ); -static const trait_id trait_BADTEMPER( "BADTEMPER" ); -static const trait_id trait_BARK( "BARK" ); -static const trait_id trait_BEAK_HUM( "BEAK_HUM" ); -static const trait_id trait_BEAK_PECK( "BEAK_PECK" ); -static const trait_id trait_BEE( "BEE" ); -static const trait_id trait_BIRD_EYE( "BIRD_EYE" ); -static const trait_id trait_BURROW( "BURROW" ); -static const trait_id trait_CANNIBAL( "CANNIBAL" ); -static const trait_id trait_CARNIVORE( "CARNIVORE" ); -static const trait_id trait_CENOBITE( "CENOBITE" ); -static const trait_id trait_CEPH_EYES( "CEPH_EYES" ); -static const trait_id trait_CEPH_VISION( "CEPH_VISION" ); -static const trait_id trait_CF_HAIR( "CF_HAIR" ); -static const trait_id trait_CHAOTIC( "CHAOTIC" ); -static const trait_id trait_CHAOTIC_BAD( "CHAOTIC_BAD" ); -static const trait_id trait_CHEMIMBALANCE( "CHEMIMBALANCE" ); -static const trait_id trait_CHITIN_FUR( "CHITIN_FUR" ); -static const trait_id trait_CHITIN_FUR2( "CHITIN_FUR2" ); -static const trait_id trait_CHITIN_FUR3( "CHITIN_FUR3" ); -static const trait_id trait_CHITIN2( "CHITIN2" ); -static const trait_id trait_CHITIN3( "CHITIN3" ); -static const trait_id trait_CHLOROMORPH( "CHLOROMORPH" ); -static const trait_id trait_CLAWS( "CLAWS" ); -static const trait_id trait_CLAWS_RAT( "CLAWS_RAT" ); -static const trait_id trait_CLAWS_RETRACT( "CLAWS_RETRACT" ); -static const trait_id trait_CLAWS_ST( "CLAWS_ST" ); -static const trait_id trait_CLAWS_TENTACLE( "CLAWS_TENTACLE" ); -static const trait_id trait_CLUMSY( "CLUMSY" ); -static const trait_id trait_COLDBLOOD( "COLDBLOOD" ); -static const trait_id trait_COLDBLOOD2( "COLDBLOOD2" ); -static const trait_id trait_COLDBLOOD3( "COLDBLOOD3" ); -static const trait_id trait_COLDBLOOD4( "COLDBLOOD4" ); -static const trait_id trait_COMPOUND_EYES( "COMPOUND_EYES" ); -static const trait_id trait_DEAF( "DEAF" ); -static const trait_id trait_DEBUG_BIONIC_POWER( "DEBUG_BIONIC_POWER" ); -static const trait_id trait_DEBUG_BIONIC_POWERGEN( "DEBUG_BIONIC_POWERGEN" ); -static const trait_id trait_DEBUG_BIONICS( "DEBUG_BIONICS" ); -static const trait_id trait_DEBUG_CLOAK( "DEBUG_CLOAK" ); -static const trait_id trait_DEBUG_HS( "DEBUG_HS" ); -static const trait_id trait_DEBUG_LS( "DEBUG_LS" ); -static const trait_id trait_DEBUG_MIND_CONTROL( "DEBUG_MIND_CONTROL" ); -static const trait_id trait_DEBUG_NIGHTVISION( "DEBUG_NIGHTVISION" ); -static const trait_id trait_DEBUG_NODMG( "DEBUG_NODMG" ); -static const trait_id trait_DEBUG_NOSCENT( "DEBUG_NOSCENT" ); -static const trait_id trait_DEBUG_NOTEMP( "DEBUG_NOTEMP" ); -static const trait_id trait_DEBUG_SILENT( "DEBUG_SILENT" ); -static const trait_id trait_DEBUG_STORAGE( "DEBUG_STORAGE" ); -static const trait_id trait_DEFT( "DEFT" ); -static const trait_id trait_DEX_ALPHA( "DEX_ALPHA" ); -static const trait_id trait_DISORGANIZED( "DISORGANIZED" ); -static const trait_id trait_DISRESISTANT( "DISRESISTANT" ); -static const trait_id trait_DOWN( "DOWN" ); -static const trait_id trait_DRUNKEN( "DRUNKEN" ); -static const trait_id trait_EASYSLEEPER( "EASYSLEEPER" ); -static const trait_id trait_EASYSLEEPER2( "EASYSLEEPER2" ); -static const trait_id trait_EATDEAD( "EATDEAD" ); -static const trait_id trait_EATHEALTH( "EATHEALTH" ); -static const trait_id trait_EATPOISON( "EATPOISON" ); -static const trait_id trait_ELECTRORECEPTORS( "ELECTRORECEPTORS" ); -static const trait_id trait_ELFA_EARS( "ELFA_EARS" ); -static const trait_id trait_ELFA_FNV( "ELFA_FNV" ); -static const trait_id trait_ELFA_NV( "ELFA_NV" ); -static const trait_id trait_FANGS_SPIDER( "FANGS_SPIDER" ); -static const trait_id trait_FASTHEALER( "FASTHEALER" ); -static const trait_id trait_FASTHEALER2( "FASTHEALER2" ); -static const trait_id trait_FASTLEARNER( "FASTLEARNER" ); -static const trait_id trait_FAT( "FAT" ); -static const trait_id trait_FEATHERS( "FEATHERS" ); -static const trait_id trait_FEL_NV( "FEL_NV" ); -static const trait_id trait_FELINE_FUR( "FELINE_FUR" ); -static const trait_id trait_FLOWERS( "FLOWERS" ); -static const trait_id trait_FRESHWATEROSMOSIS( "FRESHWATEROSMOSIS" ); -static const trait_id trait_FUR( "FUR" ); -static const trait_id trait_GILLS( "GILLS" ); -static const trait_id trait_GILLS_CEPH( "GILLS_CEPH" ); -static const trait_id trait_GIZZARD( "GIZZARD" ); -static const trait_id trait_GLASSJAW( "GLASSJAW" ); -static const trait_id trait_GOURMAND( "GOURMAND" ); -static const trait_id trait_GRAZER( "GRAZER" ); -static const trait_id trait_HALLUCINATION( "HALLUCINATION" ); -static const trait_id trait_HATES_BOOKS( "HATES_BOOKS" ); -static const trait_id trait_HEAVYSLEEPER( "HEAVYSLEEPER" ); -static const trait_id trait_HEAVYSLEEPER2( "HEAVYSLEEPER2" ); -static const trait_id trait_HERBIVORE( "HERBIVORE" ); -static const trait_id trait_HIBERNATE( "HIBERNATE" ); -static const trait_id trait_HOARDER( "HOARDER" ); -static const trait_id trait_HOLLOW_BONES( "HOLLOW_BONES" ); -static const trait_id trait_HOOVES( "HOOVES" ); -static const trait_id trait_HORNS_POINTED( "HORNS_POINTED" ); -static const trait_id trait_HUGE( "HUGE" ); -static const trait_id trait_HUGE_OK( "HUGE_OK" ); -static const trait_id trait_HYPEROPIC( "HYPEROPIC" ); -static const trait_id trait_ILLITERATE( "ILLITERATE" ); -static const trait_id trait_INFIMMUNE( "INFIMMUNE" ); -static const trait_id trait_INFRARED( "INFRARED" ); -static const trait_id trait_INFRESIST( "INFRESIST" ); -static const trait_id trait_INSECT_ARMS( "INSECT_ARMS" ); -static const trait_id trait_INSECT_ARMS_OK( "INSECT_ARMS_OK" ); -static const trait_id trait_INSOMNIA( "INSOMNIA" ); -static const trait_id trait_INT_ALPHA( "INT_ALPHA" ); -static const trait_id trait_INT_SLIME( "INT_SLIME" ); -static const trait_id trait_JITTERY( "JITTERY" ); -static const trait_id trait_KILLER( "KILLER" ); -static const trait_id trait_LACTOSE( "LACTOSE" ); -static const trait_id trait_LARGE( "LARGE" ); -static const trait_id trait_LARGE_OK( "LARGE_OK" ); -static const trait_id trait_LEAVES( "LEAVES" ); -static const trait_id trait_LEAVES2( "LEAVES2" ); -static const trait_id trait_LEAVES3( "LEAVES3" ); -static const trait_id trait_LEG_TENT_BRACE( "LEG_TENT_BRACE" ); -static const trait_id trait_LEG_TENTACLES( "LEG_TENTACLES" ); -static const trait_id trait_LIGHT_BONES( "LIGHT_BONES" ); -static const trait_id trait_LIGHTFUR( "LIGHTFUR" ); -static const trait_id trait_LIGHTSTEP( "LIGHTSTEP" ); -static const trait_id trait_LIGHTWEIGHT( "LIGHTWEIGHT" ); -static const trait_id trait_LIZ_IR( "LIZ_IR" ); -static const trait_id trait_LOVES_BOOKS( "LOVES_BOOKS" ); -static const trait_id trait_LUPINE_FUR( "LUPINE_FUR" ); -static const trait_id trait_M_BLOOM( "M_BLOOM" ); -static const trait_id trait_M_BLOSSOMS( "M_BLOSSOMS" ); -static const trait_id trait_M_DEFENDER( "M_DEFENDER" ); -static const trait_id trait_M_DEPENDENT( "M_DEPENDENT" ); -static const trait_id trait_M_FERTILE( "M_FERTILE" ); -static const trait_id trait_M_IMMUNE( "M_IMMUNE" ); -static const trait_id trait_M_PROVENANCE( "M_PROVENANCE" ); -static const trait_id trait_M_SKIN2( "M_SKIN2" ); -static const trait_id trait_M_SKIN3( "M_SKIN3" ); -static const trait_id trait_M_SPORES( "M_SPORES" ); -static const trait_id trait_MANDIBLES( "MANDIBLES" ); -static const trait_id trait_MARLOSS( "MARLOSS" ); -static const trait_id trait_MARLOSS_AVOID( "MARLOSS_AVOID" ); -static const trait_id trait_MARLOSS_BLUE( "MARLOSS_BLUE" ); -static const trait_id trait_MARLOSS_YELLOW( "MARLOSS_YELLOW" ); -static const trait_id trait_MASOCHIST( "MASOCHIST" ); -static const trait_id trait_MASOCHIST_MED( "MASOCHIST_MED" ); -static const trait_id trait_MEATARIAN( "MEATARIAN" ); -static const trait_id trait_MEMBRANE( "MEMBRANE" ); -static const trait_id trait_MOODSWINGS( "MOODSWINGS" ); -static const trait_id trait_MOREPAIN( "MORE_PAIN" ); -static const trait_id trait_MOREPAIN2( "MORE_PAIN2" ); -static const trait_id trait_MOREPAIN3( "MORE_PAIN3" ); -static const trait_id trait_MOUTH_TENTACLES( "MOUTH_TENTACLES" ); -static const trait_id trait_MUT_JUNKIE( "MUT_JUNKIE" ); -static const trait_id trait_MUTAGEN_AVOID( "MUTAGEN_AVOID" ); -static const trait_id trait_MUTE( "MUTE" ); -static const trait_id trait_MYCUS_FRIEND( "MYCUS_FRIEND" ); -static const trait_id trait_MYCUS_THRESH( "MYCUS_THRESH" ); -static const trait_id trait_MYOPIC( "MYOPIC" ); -static const trait_id trait_NAILS( "NAILS" ); -static const trait_id trait_NARCOLEPTIC( "NARCOLEPTIC" ); -static const trait_id trait_NAUSEA( "NAUSEA" ); -static const trait_id trait_NIGHTVISION( "NIGHTVISION" ); -static const trait_id trait_NIGHTVISION2( "NIGHTVISION2" ); -static const trait_id trait_NIGHTVISION3( "NIGHTVISION3" ); -static const trait_id trait_NO_THIRST( "NO_THIRST" ); -static const trait_id trait_NOMAD( "NOMAD" ); -static const trait_id trait_NOMAD2( "NOMAD2" ); -static const trait_id trait_NOMAD3( "NOMAD3" ); -static const trait_id trait_NONADDICTIVE( "NONADDICTIVE" ); -static const trait_id trait_NONE( "NONE" ); -static const trait_id trait_NOPAIN( "NOPAIN" ); -static const trait_id trait_NPC_CONSTRUCTION_LEV_1( "NPC_CONSTRUCTION_LEV_1" ); -static const trait_id trait_NPC_CONSTRUCTION_LEV_2( "NPC_CONSTRUCTION_LEV_2" ); -static const trait_id trait_NPC_MISSION_LEV_1( "NPC_MISSION_LEV_1" ); -static const trait_id trait_NPC_STARTING_NPC( "NPC_STARTING_NPC" ); -static const trait_id trait_NPC_STATIC_NPC( "NPC_STATIC_NPC" ); -static const trait_id trait_OPTIMISTIC( "OPTIMISTIC" ); -static const trait_id trait_PACIFIST( "PACIFIST" ); -static const trait_id trait_PACKMULE( "PACKMULE" ); -static const trait_id trait_PADDED_FEET( "PADDED_FEET" ); -static const trait_id trait_PAINRESIST( "PAINRESIST" ); -static const trait_id trait_PAINRESIST_TROGLO( "PAINRESIST_TROGLO" ); -static const trait_id trait_PARAIMMUNE( "PARAIMMUNE" ); -static const trait_id trait_PARKOUR( "PARKOUR" ); -static const trait_id trait_PAWS( "PAWS" ); -static const trait_id trait_PAWS_LARGE( "PAWS_LARGE" ); -static const trait_id trait_PER_ALPHA( "PER_ALPHA" ); -static const trait_id trait_PER_SLIME( "PER_SLIME" ); -static const trait_id trait_PER_SLIME_OK( "PER_SLIME_OK" ); -static const trait_id trait_PHEROMONE_INSECT( "PHEROMONE_INSECT" ); -static const trait_id trait_PHEROMONE_MAMMAL( "PHEROMONE_MAMMAL" ); -static const trait_id trait_PLANT( "PLANT" ); -static const trait_id trait_POISONOUS( "POISONOUS" ); -static const trait_id trait_POISONOUS2( "POISONOUS2" ); -static const trait_id trait_PROBOSCIS( "PROBOSCIS" ); -static const trait_id trait_PROF_AUTODOC( "PROF_AUTODOC" ); -static const trait_id trait_PROF_CHURL( "PROF_CHURL" ); -static const trait_id trait_PROF_CYBERCO( "PROF_CYBERCO" ); -static const trait_id trait_PROF_DICEMASTER( "PROF_DICEMASTER" ); -static const trait_id trait_PROF_FED( "PROF_FED" ); -static const trait_id trait_PROF_FOODP( "PROF_FOODP" ); -static const trait_id trait_PROF_MED( "PROF_MED" ); -static const trait_id trait_PROF_PD_DET( "PROF_PD_DET" ); -static const trait_id trait_PROF_POLICE( "PROF_POLICE" ); -static const trait_id trait_PROF_SKATER( "PROF_SKATER" ); -static const trait_id trait_PROF_SWAT( "PROF_SWAT" ); -static const trait_id trait_PROJUNK( "PROJUNK" ); -static const trait_id trait_PROJUNK2( "PROJUNK2" ); -static const trait_id trait_PSYCHOPATH( "PSYCHOPATH" ); -static const trait_id trait_PYROMANIA( "PYROMANIA" ); -static const trait_id trait_QUICK( "QUICK" ); -static const trait_id trait_QUILLS( "QUILLS" ); -static const trait_id trait_RADIOACTIVE1( "RADIOACTIVE1" ); -static const trait_id trait_RADIOACTIVE2( "RADIOACTIVE2" ); -static const trait_id trait_RADIOACTIVE3( "RADIOACTIVE3" ); -static const trait_id trait_RADIOGENIC( "RADIOGENIC" ); -static const trait_id trait_REGEN( "REGEN" ); -static const trait_id trait_REGEN_LIZ( "REGEN_LIZ" ); -static const trait_id trait_ROBUST( "ROBUST" ); -static const trait_id trait_ROOTS1( "ROOTS1" ); -static const trait_id trait_ROOTS2( "ROOTS2" ); -static const trait_id trait_ROOTS3( "ROOTS3" ); -static const trait_id trait_RUMINANT( "RUMINANT" ); -static const trait_id trait_SABER_TEETH( "SABER_TEETH" ); -static const trait_id trait_SAPIOVORE( "SAPIOVORE" ); -static const trait_id trait_SAPROPHAGE( "SAPROPHAGE" ); -static const trait_id trait_SAPROVORE( "SAPROVORE" ); -static const trait_id trait_SAVANT( "SAVANT" ); -static const trait_id trait_SCHIZOPHRENIC( "SCHIZOPHRENIC" ); -static const trait_id trait_SEESLEEP( "SEESLEEP" ); -static const trait_id trait_SELFAWARE( "SELFAWARE" ); -static const trait_id trait_SHARKTEETH( "SHARKTEETH" ); -static const trait_id trait_SHELL( "SHELL" ); -static const trait_id trait_SHELL2( "SHELL2" ); -static const trait_id trait_SHOUT1( "SHOUT1" ); -static const trait_id trait_SHOUT2( "SHOUT2" ); -static const trait_id trait_SHOUT3( "SHOUT3" ); -static const trait_id trait_SLIMESPAWNER( "SLIMESPAWNER" ); -static const trait_id trait_SLIMY( "SLIMY" ); -static const trait_id trait_SLOWHEALER( "SLOWHEALER" ); -static const trait_id trait_SLOWLEARNER( "SLOWLEARNER" ); -static const trait_id trait_SMALL( "SMALL" ); -static const trait_id trait_SMALL_OK( "SMALL_OK" ); -static const trait_id trait_SMALL2( "SMALL2" ); -static const trait_id trait_SMELLY( "SMELLY" ); -static const trait_id trait_SORES( "SORES" ); -static const trait_id trait_SPINES( "SPINES" ); -static const trait_id trait_SPIRITUAL( "SPIRITUAL" ); -static const trait_id trait_SQUEAMISH( "SQUEAMISH" ); -static const trait_id trait_STIMBOOST( "STIMBOOST" ); -static const trait_id trait_STOCKY_TROGLO( "STOCKY_TROGLO" ); -static const trait_id trait_STR_ALPHA( "STR_ALPHA" ); -static const trait_id trait_STRONGSTOMACH( "STRONGSTOMACH" ); -static const trait_id trait_STYLISH( "STYLISH" ); -static const trait_id trait_SUNBURN( "SUNBURN" ); -static const trait_id trait_SUNLIGHT_DEPENDENT( "SUNLIGHT_DEPENDENT" ); -static const trait_id trait_TABLEMANNERS( "TABLEMANNERS" ); -static const trait_id trait_TAIL_CATTLE( "TAIL_CATTLE" ); -static const trait_id trait_TALONS( "TALONS" ); -static const trait_id trait_TERRIFYING( "TERRIFYING" ); -static const trait_id trait_THICK_SCALES( "THICK_SCALES" ); -static const trait_id trait_THORNS( "THORNS" ); -static const trait_id trait_THRESH_BIRD( "THRESH_BIRD" ); -static const trait_id trait_THRESH_CATTLE( "THRESH_CATTLE" ); -static const trait_id trait_THRESH_CEPHALOPOD( "THRESH_CEPHALOPOD" ); -static const trait_id trait_THRESH_FELINE( "THRESH_FELINE" ); -static const trait_id trait_THRESH_INSECT( "THRESH_INSECT" ); -static const trait_id trait_THRESH_LUPINE( "THRESH_LUPINE" ); -static const trait_id trait_THRESH_MARLOSS( "THRESH_MARLOSS" ); -static const trait_id trait_THRESH_MEDICAL( "THRESH_MEDICAL" ); -static const trait_id trait_THRESH_MYCUS( "THRESH_MYCUS" ); -static const trait_id trait_THRESH_PLANT( "THRESH_PLANT" ); -static const trait_id trait_THRESH_SPIDER( "THRESH_SPIDER" ); -static const trait_id trait_THRESH_URSINE( "THRESH_URSINE" ); -static const trait_id trait_TOLERANCE( "TOLERANCE" ); -static const trait_id trait_TOUGH_FEET( "TOUGH_FEET" ); -static const trait_id trait_TOXICFLESH( "TOXICFLESH" ); -static const trait_id trait_TRANSPIRATION( "TRANSPIRATION" ); -static const trait_id trait_TREE_COMMUNION( "TREE_COMMUNION" ); -static const trait_id trait_TROGLO( "TROGLO" ); -static const trait_id trait_TROGLO2( "TROGLO2" ); -static const trait_id trait_TROGLO3( "TROGLO3" ); -static const trait_id trait_UNSTABLE( "UNSTABLE" ); -static const trait_id trait_URSINE_EYE( "URSINE_EYE" ); -static const trait_id trait_URSINE_FUR( "URSINE_FUR" ); -static const trait_id trait_VEGETARIAN( "VEGETARIAN" ); -static const trait_id trait_VINES2( "VINES2" ); -static const trait_id trait_VINES3( "VINES3" ); -static const trait_id trait_VISCOUS( "VISCOUS" ); -static const trait_id trait_VOMITOUS( "VOMITOUS" ); -static const trait_id trait_WATERSLEEP( "WATERSLEEP" ); -static const trait_id trait_WAYFARER( "WAYFARER" ); -static const trait_id trait_WEAKSCENT( "WEAKSCENT" ); -static const trait_id trait_WEAKSTOMACH( "WEAKSTOMACH" ); -static const trait_id trait_WEB_RAPPEL( "WEB_RAPPEL" ); -static const trait_id trait_WEB_SPINNER( "WEB_SPINNER" ); -static const trait_id trait_WEB_WALKER( "WEB_WALKER" ); -static const trait_id trait_WEB_WEAVER( "WEB_WEAVER" ); -static const trait_id trait_WEBBED( "WEBBED" ); -static const trait_id trait_WHISKERS( "WHISKERS" ); -static const trait_id trait_WHISKERS_RAT( "WHISKERS_RAT" ); -static const trait_id trait_WINGS_BIRD( "WINGS_BIRD" ); -static const trait_id trait_WINGS_BUTTERFLY( "WINGS_BUTTERFLY" ); -static const trait_id trait_WINGS_INSECT( "WINGS_INSECT" ); -static const trait_id trait_WOOLALLERGY( "WOOLALLERGY" ); -static const trait_id trait_XS( "XS" ); -static const trait_id trait_XXXL( "XXXL" ); - -static const trait_id debug_nodmg( "DEBUG_NODMG" ); - -static const std::string trait_flag_CANNIBAL( "CANNIBAL" ); -static const std::string trait_flag_PSYCHOPATH( "PSYCHOPATH" ); -static const std::string trait_flag_SAPIOVORE( "SAPIOVORE" ); - -static const mongroup_id GROUP_BLOB( "GROUP_BLOB" ); -static const mongroup_id GROUP_BREATHER( "GROUP_BREATHER" ); -static const mongroup_id GROUP_BREATHER_HUB( "GROUP_BREATHER_HUB" ); -static const mongroup_id GROUP_CAVE( "GROUP_CAVE" ); -static const mongroup_id GROUP_CHUD( "GROUP_CHUD" ); -static const mongroup_id GROUP_DARK_WYRM( "GROUP_DARK_WYRM" ); -static const mongroup_id GROUP_DOG_THING( "GROUP_DOG_THING" ); -static const mongroup_id GROUP_FISH( "GROUP_FISH" ); -static const mongroup_id GROUP_FOREST( "GROUP_FOREST" ); -static const mongroup_id GROUP_FUNGI_FUNGALOID( "GROUP_FUNGI_FUNGALOID" ); -static const mongroup_id GROUP_HAZMATBOT( "GROUP_HAZMATBOT" ); -static const mongroup_id GROUP_LAB( "GROUP_LAB" ); -static const mongroup_id GROUP_LAB_CYBORG( "GROUP_LAB_CYBORG" ); -static const mongroup_id GROUP_LAB_FEMA( "GROUP_LAB_FEMA" ); -static const mongroup_id GROUP_MAYBE_MIL( "GROUP_MAYBE_MIL" ); -static const mongroup_id GROUP_MI_GO_CAMP_OM( "GROUP_MI-GO_CAMP_OM" ); -static const mongroup_id GROUP_MIL_WEAK( "GROUP_MIL_WEAK" ); -static const mongroup_id GROUP_NETHER( "GROUP_NETHER" ); -static const mongroup_id GROUP_NETHER_CAPTURED( "GROUP_NETHER_CAPTURED" ); -static const mongroup_id GROUP_NETHER_PORTAL( "GROUP_NETHER_PORTAL" ); -static const mongroup_id GROUP_PLAIN( "GROUP_PLAIN" ); -static const mongroup_id GROUP_RIVER( "GROUP_RIVER" ); -static const mongroup_id GROUP_ROBOT( "GROUP_ROBOT" ); -static const mongroup_id GROUP_ROBOT_SECUBOT( "GROUP_ROBOT_SECUBOT" ); -static const mongroup_id GROUP_SEWER( "GROUP_SEWER" ); -static const mongroup_id GROUP_SPIDER( "GROUP_SPIDER" ); -static const mongroup_id GROUP_SPIRAL( "GROUP_SPIRAL" ); -static const mongroup_id GROUP_STRAY_DOGS( "GROUP_STRAY_DOGS" ); -static const mongroup_id GROUP_SWAMP( "GROUP_SWAMP" ); -static const mongroup_id GROUP_TRIFFID( "GROUP_TRIFFID" ); -static const mongroup_id GROUP_TRIFFID_HEART( "GROUP_TRIFFID_HEART" ); -static const mongroup_id GROUP_TRIFFID_OUTER( "GROUP_TRIFFID_OUTER" ); -static const mongroup_id GROUP_TURRET( "GROUP_TURRET" ); -static const mongroup_id GROUP_VANILLA( "GROUP_VANILLA" ); -static const mongroup_id GROUP_WORM( "GROUP_WORM" ); -static const mongroup_id GROUP_ZOMBIE( "GROUP_ZOMBIE" ); -static const mongroup_id GROUP_ZOMBIE_COP( "GROUP_ZOMBIE_COP" ); - -static const mtype_id mon_amigara_horror( "mon_amigara_horror" ); -static const mtype_id mon_ant( "mon_ant" ); -static const mtype_id mon_ant_acid_larva( "mon_ant_acid_larva" ); -static const mtype_id mon_ant_acid_queen( "mon_ant_acid_queen" ); -static const mtype_id mon_ant_fungus( "mon_ant_fungus" ); -static const mtype_id mon_ant_larva( "mon_ant_larva" ); -static const mtype_id mon_ant_queen( "mon_ant_queen" ); -static const mtype_id mon_ant_soldier( "mon_ant_soldier" ); -static const mtype_id mon_bat( "mon_bat" ); -static const mtype_id mon_bear( "mon_bear" ); -static const mtype_id mon_beaver( "mon_beaver" ); -static const mtype_id mon_bee( "mon_bee" ); -static const mtype_id mon_beekeeper( "mon_beekeeper" ); -static const mtype_id mon_biollante( "mon_biollante" ); -static const mtype_id mon_black_rat( "mon_black_rat" ); -static const mtype_id mon_blob( "mon_blob" ); -static const mtype_id mon_blob_brain( "mon_blob_brain" ); -static const mtype_id mon_blob_large( "mon_blob_large" ); -static const mtype_id mon_blob_small( "mon_blob_small" ); -static const mtype_id mon_boomer( "mon_boomer" ); -static const mtype_id mon_boomer_fungus( "mon_boomer_fungus" ); -static const mtype_id mon_boomer_huge( "mon_boomer_huge" ); -static const mtype_id mon_breather( "mon_breather" ); -static const mtype_id mon_breather_hub( "mon_breather_hub" ); -static const mtype_id mon_chicken( "mon_chicken" ); -static const mtype_id mon_chipmunk( "mon_chipmunk" ); -static const mtype_id mon_cockatrice( "mon_cockatrice" ); -static const mtype_id mon_copbot( "mon_copbot" ); -static const mtype_id mon_cougar( "mon_cougar" ); -static const mtype_id mon_cow( "mon_cow" ); -static const mtype_id mon_coyote( "mon_coyote" ); -static const mtype_id mon_creeper_hub( "mon_creeper_hub" ); -static const mtype_id mon_creeper_vine( "mon_creeper_vine" ); -static const mtype_id mon_crows_m240( "mon_crows_m240" ); -static const mtype_id mon_dark_wyrm( "mon_dark_wyrm" ); -static const mtype_id mon_deer( "mon_deer" ); -static const mtype_id mon_defective_robot_nurse( "mon_nursebot_defective" ); -static const mtype_id mon_dermatik( "mon_dermatik" ); -static const mtype_id mon_dermatik_larva( "mon_dermatik_larva" ); -static const mtype_id mon_dispatch( "mon_dispatch" ); -static const mtype_id mon_dog( "mon_dog" ); -static const mtype_id mon_dog_thing( "mon_dog_thing" ); -static const mtype_id mon_duck( "mon_duck" ); -static const mtype_id mon_eyebot( "mon_eyebot" ); -static const mtype_id mon_fly( "mon_fly" ); -static const mtype_id mon_fox_gray( "mon_fox_gray" ); -static const mtype_id mon_fox_red( "mon_fox_red" ); -static const mtype_id mon_fungal_blossom( "mon_fungal_blossom" ); -static const mtype_id mon_fungal_hedgerow( "mon_fungal_hedgerow" ); -static const mtype_id mon_fungal_tendril( "mon_fungal_tendril" ); -static const mtype_id mon_fungal_wall( "mon_fungal_wall" ); -static const mtype_id mon_fungaloid( "mon_fungaloid" ); -static const mtype_id mon_fungaloid_young( "mon_fungaloid_young" ); -static const mtype_id mon_generator( "mon_generator" ); -static const mtype_id mon_giant_cockroach_nymph( "mon_giant_cockroach_nymph" ); -static const mtype_id mon_groundhog( "mon_groundhog" ); -static const mtype_id mon_grouse( "mon_grouse" ); -static const mtype_id mon_halfworm( "mon_halfworm" ); -static const mtype_id mon_hallu_multicooker( "mon_hallu_multicooker" ); -static const mtype_id mon_hare( "mon_hare" ); -static const mtype_id mon_headless_dog_thing( "mon_headless_dog_thing" ); -static const mtype_id mon_hologram( "mon_hologram" ); -static const mtype_id mon_horse( "mon_horse" ); -static const mtype_id mon_hound_tindalos_afterimage( "mon_hound_tindalos_afterimage" ); -static const mtype_id mon_jabberwock( "mon_jabberwock" ); -static const mtype_id mon_leech_blossom( "mon_leech_blossom" ); -static const mtype_id mon_leech_root_drone( "mon_leech_root_drone" ); -static const mtype_id mon_leech_root_runner( "mon_leech_root_runner" ); -static const mtype_id mon_leech_stalk( "mon_leech_stalk" ); -static const mtype_id mon_lemming( "mon_lemming" ); -static const mtype_id mon_manhack( "mon_manhack" ); -static const mtype_id mon_marloss_zealot_f( "mon_marloss_zealot_f" ); -static const mtype_id mon_marloss_zealot_m( "mon_marloss_zealot_m" ); -static const mtype_id mon_mink( "mon_mink" ); -static const mtype_id mon_moose( "mon_moose" ); -static const mtype_id mon_muskrat( "mon_muskrat" ); -static const mtype_id mon_opossum( "mon_opossum" ); -static const mtype_id mon_otter( "mon_otter" ); -static const mtype_id mon_pheasant( "mon_pheasant" ); -static const mtype_id mon_pig( "mon_pig" ); -static const mtype_id mon_player_blob( "mon_player_blob" ); -static const mtype_id mon_rabbit( "mon_rabbit" ); -static const mtype_id mon_rat_king( "mon_rat_king" ); -static const mtype_id mon_riotbot( "mon_riotbot" ); -static const mtype_id mon_secubot( "mon_secubot" ); -static const mtype_id mon_sewer_rat( "mon_sewer_rat" ); -static const mtype_id mon_sewer_snake( "mon_sewer_snake" ); -static const mtype_id mon_shadow( "mon_shadow" ); -static const mtype_id mon_shadow_snake( "mon_shadow_snake" ); -static const mtype_id mon_shia( "mon_shia" ); -static const mtype_id mon_skeleton( "mon_skeleton" ); -static const mtype_id mon_skeleton_brute( "mon_skeleton_brute" ); -static const mtype_id mon_skeleton_hulk( "mon_skeleton_hulk" ); -static const mtype_id mon_skeleton_hulk_fungus( "mon_skeleton_hulk_fungus" ); -static const mtype_id mon_spider_cellar_giant( "mon_spider_cellar_giant" ); -static const mtype_id mon_spider_cellar_giant_s( "mon_spider_cellar_giant_s" ); -static const mtype_id mon_spider_fungus( "mon_spider_fungus" ); -static const mtype_id mon_spider_web( "mon_spider_web" ); -static const mtype_id mon_spider_web_s( "mon_spider_web_s" ); -static const mtype_id mon_spider_widow_giant( "mon_spider_widow_giant" ); -static const mtype_id mon_spider_widow_giant_s( "mon_spider_widow_giant_s" ); -static const mtype_id mon_spore( "mon_spore" ); -static const mtype_id mon_squirrel( "mon_squirrel" ); -static const mtype_id mon_thing( "mon_thing" ); -static const mtype_id mon_triffid( "mon_triffid" ); -static const mtype_id mon_triffid_queen( "mon_triffid_queen" ); -static const mtype_id mon_triffid_young( "mon_triffid_young" ); -static const mtype_id mon_turkey( "mon_turkey" ); -static const mtype_id mon_turret_bmg( "mon_turret_bmg" ); -static const mtype_id mon_turret_rifle( "mon_turret_rifle" ); -static const mtype_id mon_turret_riot( "mon_turret_riot" ); -static const mtype_id mon_turret_searchlight( "mon_turret_searchlight" ); -static const mtype_id mon_vortex( "mon_vortex" ); -static const mtype_id mon_wasp( "mon_wasp" ); -static const mtype_id mon_weasel( "mon_weasel" ); -static const mtype_id mon_wolf( "mon_wolf" ); -static const mtype_id mon_zombie( "mon_zombie" ); -static const mtype_id mon_zombie_anklebiter( "mon_zombie_anklebiter" ); -static const mtype_id mon_zombie_bio_op( "mon_zombie_bio_op" ); -static const mtype_id mon_zombie_brute( "mon_zombie_brute" ); -static const mtype_id mon_zombie_brute_shocker( "mon_zombie_brute_shocker" ); -static const mtype_id mon_zombie_child( "mon_zombie_child" ); -static const mtype_id mon_zombie_child_fungus( "mon_zombie_child_fungus" ); -static const mtype_id mon_zombie_cop( "mon_zombie_cop" ); -static const mtype_id mon_zombie_crawler( "mon_zombie_crawler" ); -static const mtype_id mon_zombie_creepy( "mon_zombie_creepy" ); -static const mtype_id mon_zombie_dancer( "mon_zombie_dancer" ); -static const mtype_id mon_zombie_dog( "mon_zombie_dog" ); -static const mtype_id mon_zombie_electric( "mon_zombie_electric" ); -static const mtype_id mon_zombie_fat( "mon_zombie_fat" ); -static const mtype_id mon_zombie_fireman( "mon_zombie_fireman" ); -static const mtype_id mon_zombie_fungus( "mon_zombie_fungus" ); -static const mtype_id mon_zombie_gasbag( "mon_zombie_gasbag" ); -static const mtype_id mon_zombie_gasbag_crawler( "mon_zombie_gasbag_crawler" ); -static const mtype_id mon_zombie_gasbag_fungus( "mon_zombie_gasbag_fungus" ); -static const mtype_id mon_zombie_gasbag_impaler( "mon_zombie_gasbag_impaler" ); -static const mtype_id mon_zombie_grabber( "mon_zombie_grabber" ); -static const mtype_id mon_zombie_hazmat( "mon_zombie_hazmat" ); -static const mtype_id mon_zombie_hulk( "mon_zombie_hulk" ); -static const mtype_id mon_zombie_hunter( "mon_zombie_hunter" ); -static const mtype_id mon_zombie_jackson( "mon_zombie_jackson" ); -static const mtype_id mon_zombie_master( "mon_zombie_master" ); -static const mtype_id mon_zombie_military_pilot( "mon_zombie_military_pilot" ); -static const mtype_id mon_zombie_necro( "mon_zombie_necro" ); -static const mtype_id mon_zombie_rot( "mon_zombie_rot" ); -static const mtype_id mon_zombie_scientist( "mon_zombie_scientist" ); -static const mtype_id mon_zombie_shrieker( "mon_zombie_shrieker" ); -static const mtype_id mon_zombie_shriekling( "mon_zombie_shriekling" ); -static const mtype_id mon_zombie_skeltal_minion( "mon_zombie_skeltal_minion" ); -static const mtype_id mon_zombie_smoker( "mon_zombie_smoker" ); -static const mtype_id mon_zombie_smoker_fungus( "mon_zombie_smoker_fungus" ); -static const mtype_id mon_zombie_snotgobbler( "mon_zombie_snotgobbler" ); -static const mtype_id mon_zombie_soldier( "mon_zombie_soldier" ); -static const mtype_id mon_zombie_spitter( "mon_zombie_spitter" ); -static const mtype_id mon_zombie_sproglodyte( "mon_zombie_sproglodyte" ); -static const mtype_id mon_zombie_survivor( "mon_zombie_survivor" ); -static const mtype_id mon_zombie_swimmer( "mon_zombie_swimmer" ); -static const mtype_id mon_zombie_technician( "mon_zombie_technician" ); -static const mtype_id mon_zombie_tough( "mon_zombie_tough" ); -static const mtype_id mon_zombie_waif( "mon_zombie_waif" ); - - -static const std::string flag_ACID( "ACID" ); -static const std::string flag_ACT_IN_FIRE( "ACT_IN_FIRE" ); -static const std::string flag_ACTIVE_CLOAKING( "ACTIVE_CLOAKING" ); -static const std::string flag_ALARMED( "ALARMED" ); -static const std::string flag_ALLERGEN_EGG( "ALLERGEN_EGG" ); -static const std::string flag_ALLERGEN_FRUIT( "ALLERGEN_FRUIT" ); -static const std::string flag_ALLERGEN_JUNK( "ALLERGEN_JUNK" ); -static const std::string flag_ALLERGEN_MEAT( "ALLERGEN_MEAT" ); -static const std::string flag_ALLERGEN_MILK( "ALLERGEN_MILK" ); -static const std::string flag_ALLERGEN_VEGGY( "ALLERGEN_VEGGY" ); -static const std::string flag_ALLERGEN_WHEAT( "ALLERGEN_WHEAT" ); -static const std::string flag_ALLOWS_NATURAL_ATTACKS( "ALLOWS_NATURAL_ATTACKS" ); -static const std::string flag_ALLOWS_REMOTE_USE( "ALLOWS_REMOTE_USE" ); -static const std::string flag_ALWAYS_TWOHAND( "ALWAYS_TWOHAND" ); -static const std::string flag_ANESTHESIA( "ANESTHESIA" ); -static const std::string flag_AURA( "AURA" ); -static const std::string flag_AUT_START( "AUT_START" ); -static const std::string flag_AUTODOC( "AUTODOC" ); -static const std::string flag_AUTODOC_COUCH( "AUTODOC_COUCH" ); -static const std::string flag_BAD_DAY( "BAD_DAY" ); -static const std::string flag_BARRICADABLE_DOOR( "BARRICADABLE_DOOR" ); -static const std::string flag_BARRICADABLE_DOOR_DAMAGED( "BARRICADABLE_DOOR_DAMAGED" ); -static const std::string flag_BARRICADABLE_DOOR_REINFORCED( "BARRICADABLE_DOOR_REINFORCED" ); -static const std::string flag_BARRICADABLE_WINDOW_CURTAINS( "BARRICADABLE_WINDOW_CURTAINS" ); -static const std::string flag_BELTED( "BELTED" ); -static const std::string flag_BIPOD( "BIPOD" ); -static const std::string flag_BIRD( "BIRD" ); -static const std::string flag_BLIND( "BLIND" ); -static const std::string flag_BLIND_EASY( "BLIND_EASY" ); -static const std::string flag_BLIND_HARD( "BLIND_HARD" ); -static const std::string flag_BLOCK_WHILE_WORN( "BLOCK_WHILE_WORN" ); -static const std::string flag_BLOCKSDOOR( "BLOCKSDOOR" ); -static const std::string flag_BOMB( "BOMB" ); -static const std::string flag_BUTCHER_EQ( "BUTCHER_EQ" ); -static const std::string flag_BYPRODUCT( "BYPRODUCT" ); -static const std::string flag_CABLE_SPOOL( "CABLE_SPOOL" ); -static const std::string flag_CAN_SIT( "CAN_SIT" ); -static const std::string flag_CANNIBALISM( "CANNIBALISM" ); -static const std::string flag_CARNIVORE_OK( "CARNIVORE_OK" ); -static const std::string flag_CASING( "CASING" ); -static const std::string flag_CATTLE( "CATTLE" ); -static const std::string flag_CHALLENGE( "CHALLENGE" ); -static const std::string flag_CHARGEDIM( "CHARGEDIM" ); -static const std::string flag_CITY_START( "CITY_START" ); -static const std::string flag_CLIMB_SIMPLE( "CLIMB_SIMPLE" ); -static const std::string flag_CLIMBABLE( "CLIMBABLE" ); -static const std::string flag_COLD( "COLD" ); -static const std::string flag_COLLAPSES( "COLLAPSES" ); -static const std::string flag_COLLAPSIBLE_STOCK( "COLLAPSIBLE_STOCK" ); -static const std::string flag_CONDUCTIVE( "CONDUCTIVE" ); -static const std::string flag_CONSOLE( "CONSOLE" ); -static const std::string flag_CONSUMABLE( "CONSUMABLE" ); -static const std::string flag_CONTAINER( "CONTAINER" ); -static const std::string flag_COOKED( "COOKED" ); -static const std::string flag_CORPSE( "CORPSE" ); -static const std::string flag_CURRENT( "CURRENT" ); -static const std::string flag_DANGEROUS( "DANGEROUS" ); -static const std::string flag_DEAF( "DEAF" ); -static const std::string flag_DEEP_WATER( "DEEP_WATER" ); -static const std::string flag_DESTROY_ITEM( "DESTROY_ITEM" ); -static const std::string flag_DIAMOND( "DIAMOND" ); -static const std::string flag_DIFFICULT_Z( "DIFFICULT_Z" ); -static const std::string flag_DIG_TOOL( "DIG_TOOL" ); -static const std::string flag_DIGGABLE( "DIGGABLE" ); -static const std::string flag_DIMENSIONAL_ANCHOR( "DIMENSIONAL_ANCHOR" ); -static const std::string flag_DISABLE_SIGHTS( "DISABLE_SIGHTS" ); -static const std::string flag_DONT_REMOVE_ROTTEN( "DONT_REMOVE_ROTTEN" ); -static const std::string flag_DROP_ACTION_ONLY_IF_LIQUID( "DROP_ACTION_ONLY_IF_LIQUID" ); -static const std::string flag_DURABLE_MELEE( "DURABLE_MELEE" ); -static const std::string flag_EASY_DECONSTRUCT( "EASY_DECONSTRUCT" ); -static const std::string flag_EATEN_COLD( "EATEN_COLD" ); -static const std::string flag_EATEN_HOT( "EATEN_HOT" ); -static const std::string flag_EDIBLE_FROZEN( "EDIBLE_FROZEN" ); -static const std::string flag_EFFECT_INVISIBLE( "EFFECT_INVISIBLE" ); -static const std::string flag_EFFECT_NIGHT_VISION( "EFFECT_NIGHT_VISION" ); -static const std::string flag_EMITTER( "EMITTER" ); -static const std::string flag_ETHEREAL_ITEM( "ETHEREAL_ITEM" ); -static const std::string flag_FAKE_MILL( "FAKE_MILL" ); -static const std::string flag_FAKE_SMOKE( "FAKE_SMOKE" ); -static const std::string flag_FANCY( "FANCY" ); -static const std::string flag_FELINE( "FELINE" ); -static const std::string flag_FERTILIZER( "FERTILIZER" ); -static const std::string flag_FIELD_DRESS( "FIELD_DRESS" ); -static const std::string flag_FIELD_DRESS_FAILED( "FIELD_DRESS_FAILED" ); -static const std::string flag_FILTHY( "FILTHY" ); -static const std::string flag_FIRE( "FIRE" ); -static const std::string flag_FIRE_100( "FIRE_100" ); -static const std::string flag_FIRE_20( "FIRE_20" ); -static const std::string flag_FIRE_50( "FIRE_50" ); -static const std::string flag_FIRE_CONTAINER( "FIRE_CONTAINER" ); -static const std::string flag_FIRE_START( "FIRE_START" ); -static const std::string flag_FIRE_TWOHAND( "FIRE_TWOHAND" ); -static const std::string flag_FIRESTARTER( "FIRESTARTER" ); -static const std::string flag_FIREWOOD( "FIREWOOD" ); -static const std::string flag_FISH_GOOD( "FISH_GOOD" ); -static const std::string flag_FISH_POOR( "FISH_POOR" ); -static const std::string flag_FISHABLE( "FISHABLE" ); -static const std::string flag_FIT( "FIT" ); -static const std::string flag_FIX_FARSIGHT( "FIX_FARSIGHT" ); -static const std::string flag_FIX_NEARSIGHT( "FIX_NEARSIGHT" ); -static const std::string flag_FLAMING( "FLAMING" ); -static const std::string flag_FLAMMABLE( "FLAMMABLE" ); -static const std::string flag_FLAMMABLE_ASH( "FLAMMABLE_ASH" ); -static const std::string flag_FLASH_PROTECTION( "FLASH_PROTECTION" ); -static const std::string flag_FLAT( "FLAT" ); -static const std::string flag_FLAT_SURF( "FLAT_SURF" ); -static const std::string flag_FLOTATION( "FLOTATION" ); -static const std::string flag_FLOWER( "FLOWER" ); -static const std::string flag_FORAGE_HALLU( "FORAGE_HALLU" ); -static const std::string flag_FORAGE_POISON( "FORAGE_POISON" ); -static const std::string flag_FRAGILE_MELEE( "FRAGILE_MELEE" ); -static const std::string flag_FREEZERBURN( "FREEZERBURN" ); -static const std::string flag_FROZEN( "FROZEN" ); -static const std::string flag_FULL_MAGAZINE( "FULL_MAGAZINE" ); -static const std::string flag_FUNGAL_VECTOR( "FUNGAL_VECTOR" ); -static const std::string flag_FUNGUS( "FUNGUS" ); -static const std::string flag_GAS_DISCOUNT( "GAS_DISCOUNT" ); -static const std::string flag_GAS_PROOF( "GAS_PROOF" ); -static const std::string flag_GIBBED( "GIBBED" ); -static const std::string flag_GNV_EFFECT( "GNV_EFFECT" ); -static const std::string flag_GOES_DOWN( "GOES_DOWN" ); -static const std::string flag_GOES_UP( "GOES_UP" ); -static const std::string flag_GROWTH_HARVEST( "GROWTH_HARVEST" ); -static const std::string flag_GROWTH_MATURE( "GROWTH_MATURE" ); -static const std::string flag_GROWTH_SEEDLING( "GROWTH_SEEDLING" ); -static const std::string flag_HELI_CRASH( "HELI_CRASH" ); -static const std::string flag_HELMET_COMPAT( "HELMET_COMPAT" ); -static const std::string flag_HIDDEN_HALLU( "HIDDEN_HALLU" ); -static const std::string flag_HIDDEN_ITEM( "HIDDEN_ITEM" ); -static const std::string flag_HIDDEN_POISON( "HIDDEN_POISON" ); -static const std::string flag_HOOD( "HOOD" ); -static const std::string flag_HOT( "HOT" ); -static const std::string flag_HURT_WHEN_WIELDED( "HURT_WHEN_WIELDED" ); -static const std::string flag_IN_CBM( "IN_CBM" ); -static const std::string flag_INDOORS( "INDOORS" ); -static const std::string flag_INEDIBLE( "INEDIBLE" ); -static const std::string flag_INFECTED( "INFECTED" ); -static const std::string flag_INITIAL_PART( "INITIAL_PART" ); -static const std::string flag_IR_EFFECT( "IR_EFFECT" ); -static const std::string flag_IRREMOVABLE( "IRREMOVABLE" ); -static const std::string flag_IS_ARMOR( "IS_ARMOR" ); -static const std::string flag_IS_PET_ARMOR( "IS_PET_ARMOR" ); -static const std::string flag_IS_UPS( "IS_UPS" ); -static const std::string flag_KITCHEN( "KITCHEN" ); -static const std::string flag_LADDER( "LADDER" ); -static const std::string flag_LEAK_ALWAYS( "LEAK_ALWAYS" ); -static const std::string flag_LEAK_DAM( "LEAK_DAM" ); -static const std::string flag_LIQUID( "LIQUID" ); -static const std::string flag_LIQUIDCONT( "LIQUIDCONT" ); -static const std::string flag_LITCIG( "LITCIG" ); -static const std::string flag_LOCKED( "LOCKED" ); -static const std::string flag_LONE_START( "LONE_START" ); -static const std::string flag_LUPINE( "LUPINE" ); -static const std::string flag_MAG_BELT( "MAG_BELT" ); -static const std::string flag_MAG_DESTROY( "MAG_DESTROY" ); -static const std::string flag_MAG_EJECT( "MAG_EJECT" ); -static const std::string flag_MAGIC_FOCUS( "MAGIC_FOCUS" ); -static const std::string flag_MELTS( "MELTS" ); -static const std::string flag_MESSY( "MESSY" ); -static const std::string flag_MILLABLE( "MILLABLE" ); -static const std::string flag_MOUNTABLE( "MOUNTABLE" ); -static const std::string flag_MOUNTED_GUN( "MOUNTED_GUN" ); -static const std::string flag_MUSHY( "MUSHY" ); -static const std::string flag_MYCUS_OK( "MYCUS_OK" ); -static const std::string flag_NANOFAB_TEMPLATE( "NANOFAB_TEMPLATE" ); -static const std::string flag_NEED_ACTIVE_TO_MELEE( "NEED_ACTIVE_TO_MELEE" ); -static const std::string flag_NEEDS_NO_LUBE( "NEEDS_NO_LUBE" ); -static const std::string flag_NEEDS_UNFOLD( "NEEDS_UNFOLD" ); -static const std::string flag_NEGATIVE_MONOTONY_OK( "NEGATIVE_MONOTONY_OK" ); -static const std::string flag_NEVER_JAMS( "NEVER_JAMS" ); -static const std::string flag_NO_CVD( "NO_CVD" ); -static const std::string flag_NO_DISPLAY( "NO_DISPLAY" ); -static const std::string flag_NO_DROP( "NO_DROP" ); -static const std::string flag_NO_PACKED( "NO_PACKED" ); -static const std::string flag_NO_PARASITES( "NO_PARASITES" ); -static const std::string flag_NO_QUICKDRAW( "NO_QUICKDRAW" ); -static const std::string flag_NO_RELOAD( "NO_RELOAD" ); -static const std::string flag_NO_REPAIR( "NO_REPAIR" ); -static const std::string flag_NO_RESIZE( "NO_RESIZE" ); -static const std::string flag_NO_SALVAGE( "NO_SALVAGE" ); -static const std::string flag_NO_STERILE( "NO_STERILE" ); -static const std::string flag_NO_UNLOAD( "NO_UNLOAD" ); -static const std::string flag_NO_UNWIELD( "NO_UNWIELD" ); -static const std::string flag_NOCOLLIDE( "NOCOLLIDE" ); -static const std::string flag_NOITEM( "NOITEM" ); -static const std::string flag_NON_FOULING( "NON-FOULING" ); -static const std::string flag_NONCONDUCTIVE( "NONCONDUCTIVE" ); -static const std::string flag_NPC_SAFE( "NPC_SAFE" ); -static const std::string flag_NUTRIENT_OVERRIDE( "NUTRIENT_OVERRIDE" ); -static const std::string flag_ONLY_ONE( "ONLY_ONE" ); -static const std::string flag_OPENCLOSE_INSIDE( "OPENCLOSE_INSIDE" ); -static const std::string flag_ORGANIC( "ORGANIC" ); -static const std::string flag_OUTER( "OUTER" ); -static const std::string flag_OVERSIZE( "OVERSIZE" ); -static const std::string flag_PARTIAL_DEAF( "PARTIAL_DEAF" ); -static const std::string flag_PERPETUAL( "PERPETUAL" ); -static const std::string flag_PERSONAL( "PERSONAL" ); -static const std::string flag_PLANT( "PLANT" ); -static const std::string flag_PLANTABLE( "PLANTABLE" ); -static const std::string flag_PLOWABLE( "PLOWABLE" ); -static const std::string flag_POCKETS( "POCKETS" ); -static const std::string flag_POWERARMOR_COMPATIBLE( "POWERARMOR_COMPATIBLE" ); -static const std::string flag_POWERED( "POWERED" ); -static const std::string flag_PRIMITIVE_RANGED_WEAPON( "PRIMITIVE_RANGED_WEAPON" ); -static const std::string flag_PROCESSING( "PROCESSING" ); -static const std::string flag_PROCESSING_RESULT( "PROCESSING_RESULT" ); -static const std::string flag_PULPED( "PULPED" ); -static const std::string flag_PUMP_ACTION( "PUMP_ACTION" ); -static const std::string flag_PUMP_RAIL_COMPATIBLE( "PUMP_RAIL_COMPATIBLE" ); -static const std::string flag_QUARTERED( "QUARTERED" ); -static const std::string flag_RAD_RESIST( "RAD_RESIST" ); -static const std::string flag_RADIO_ACTIVATION( "RADIO_ACTIVATION" ); -static const std::string flag_RADIO_CONTAINER( "RADIO_CONTAINER" ); -static const std::string flag_RADIO_INVOKE_PROC( "RADIO_INVOKE_PROC" ); -static const std::string flag_RADIO_MOD( "RADIO_MOD" ); -static const std::string flag_RADIOACTIVE( "RADIOACTIVE" ); -static const std::string flag_RADIOSIGNAL_1( "RADIOSIGNAL_1" ); -static const std::string flag_RADIOSIGNAL_2( "RADIOSIGNAL_2" ); -static const std::string flag_RADIOSIGNAL_3( "RADIOSIGNAL_3" ); -static const std::string flag_RAIN_PROTECT( "RAIN_PROTECT" ); -static const std::string flag_RAMP_END( "RAMP_END" ); -static const std::string flag_RAW( "RAW" ); -static const std::string flag_REACH_ATTACK( "REACH_ATTACK" ); -static const std::string flag_REACH3( "REACH3" ); -static const std::string flag_RECHARGE( "RECHARGE" ); -static const std::string flag_REDUCED_BASHING( "REDUCED_BASHING" ); -static const std::string flag_REDUCED_WEIGHT( "REDUCED_WEIGHT" ); -static const std::string flag_RELOAD_AND_SHOOT( "RELOAD_AND_SHOOT" ); -static const std::string flag_RELOAD_EJECT( "RELOAD_EJECT" ); -static const std::string flag_RELOAD_ONE( "RELOAD_ONE" ); -static const std::string flag_REQUIRES_TINDER( "REQUIRES_TINDER" ); -static const std::string flag_RESTRICT_HANDS( "RESTRICT_HANDS" ); -static const std::string flag_REVIVE_SPECIAL( "REVIVE_SPECIAL" ); -static const std::string flag_ROLLER_INLINE( "ROLLER_INLINE" ); -static const std::string flag_ROLLER_ONE( "ROLLER_ONE" ); -static const std::string flag_ROLLER_QUAD( "ROLLER_QUAD" ); -static const std::string flag_ROUGH( "ROUGH" ); -static const std::string flag_SAFE_FUEL_OFF( "SAFE_FUEL_OFF" ); -static const std::string flag_SAFECRACK( "SAFECRACK" ); -static const std::string flag_SALT_WATER( "SALT_WATER" ); -static const std::string flag_SEALED( "SEALED" ); -static const std::string flag_SECRET( "SECRET" ); -static const std::string flag_SEMITANGIBLE( "SEMITANGIBLE" ); -static const std::string flag_SHARP( "SHARP" ); -static const std::string flag_SHRUB( "SHRUB" ); -static const std::string flag_SILENT( "SILENT" ); -static const std::string flag_SKINNED( "SKINNED" ); -static const std::string flag_SKINTIGHT( "SKINTIGHT" ); -static const std::string flag_SLOW_WIELD( "SLOW_WIELD" ); -static const std::string flag_SMOKABLE( "SMOKABLE" ); -static const std::string flag_SMOKED( "SMOKED" ); -static const std::string flag_SPEAR( "SPEAR" ); -static const std::string flag_SPEEDLOADER( "SPEEDLOADER" ); -static const std::string flag_SPLINT( "SPLINT" ); -static const std::string flag_SPR_START( "SPR_START" ); -static const std::string flag_STR_DRAW( "STR_DRAW" ); -static const std::string flag_STURDY( "STURDY" ); -static const std::string flag_SUM_ADV_START( "SUM_ADV_START" ); -static const std::string flag_SUM_START( "SUM_START" ); -static const std::string flag_SUN_GLASSES( "SUN_GLASSES" ); -static const std::string flag_SUPER_FANCY( "SUPER_FANCY" ); -static const std::string flag_SUPPORTS_ROOF( "SUPPORTS_ROOF" ); -static const std::string flag_SUR_START( "SUR_START" ); -static const std::string flag_SWIM_GOGGLES( "SWIM_GOGGLES" ); -static const std::string flag_SWIMMABLE( "SWIMMABLE" ); -static const std::string flag_THERMOMETER( "THERMOMETER" ); -static const std::string flag_THIN_OBSTACLE( "THIN_OBSTACLE" ); -static const std::string flag_TINDER( "TINDER" ); -static const std::string flag_TINY( "TINY" ); -static const std::string flag_TOBACCO( "TOBACCO" ); -static const std::string flag_TRANSPARENT( "TRANSPARENT" ); -static const std::string flag_TREE( "TREE" ); -static const std::string flag_UNARMED_BONUS( "UNARMED_BONUS" ); -static const std::string flag_UNARMED_WEAPON( "UNARMED_WEAPON" ); -static const std::string flag_UNBREAKABLE_MELEE( "UNBREAKABLE_MELEE" ); -static const std::string flag_UNCRAFT_LIQUIDS_CONTAINED( "UNCRAFT_LIQUIDS_CONTAINED" ); -static const std::string flag_UNCRAFT_SINGLE_CHARGE( "UNCRAFT_SINGLE_CHARGE " ); -static const std::string flag_UNDERSIZE( "UNDERSIZE" ); -static const std::string flag_UNDERWATER_GUN( "UNDERWATER_GUN" ); -static const std::string flag_UNSTABLE( "UNSTABLE" ); -static const std::string flag_URSINE_HONEY( "URSINE_HONEY" ); -static const std::string flag_USABLE_FIRE( "USABLE_FIRE" ); -static const std::string flag_USE_EAT_VERB( "USE_EAT_VERB" ); -static const std::string flag_USE_UPS( "USE_UPS" ); -static const std::string flag_USES_BIONIC_POWER( "USES_BIONIC_POWER" ); -static const std::string flag_VARSIZE( "VARSIZE" ); -static const std::string flag_VEHICLE( "VEHICLE" ); -static const std::string flag_WAIST( "WAIST" ); -static const std::string flag_WALL( "WALL" ); -static const std::string flag_WATER_EXTINGUISH( "WATER_EXTINGUISH" ); -static const std::string flag_WATER_FRIENDLY( "WATER_FRIENDLY" ); -static const std::string flag_WATERPROOF( "WATERPROOF" ); -static const std::string flag_WATERPROOF_GUN( "WATERPROOF_GUN" ); -static const std::string flag_WET( "WET" ); -static const std::string flag_WHIP( "WHIP" ); -static const std::string flag_WIN_START( "WIN_START" ); -static const std::string flag_WIND_EXTINGUISH( "WIND_EXTINGUISH" ); -static const std::string flag_WRITE_MESSAGE( "WRITE_MESSAGE" ); -static const std::string flag_YOUNG( "YOUNG" ); - -static const skill_id skill_archery( "archery" ); -static const skill_id skill_barter( "barter" ); -static const skill_id skill_bashing( "bashing" ); -static const skill_id skill_computer( "computer" ); -static const skill_id skill_cooking( "cooking" ); -static const skill_id skill_cutting( "cutting" ); -static const skill_id skill_dodge( "dodge" ); -static const skill_id skill_driving( "driving" ); -static const skill_id skill_electronics( "electronics" ); -static const skill_id skill_fabrication( "fabrication" ); -static const skill_id skill_firstaid( "firstaid" ); -static const skill_id skill_gun( "gun" ); -static const skill_id skill_launcher( "launcher" ); -static const skill_id skill_mechanics( "mechanics" ); -static const skill_id skill_melee( "melee" ); -static const skill_id skill_pistol( "pistol" ); -static const skill_id skill_rifle( "rifle" ); -static const skill_id skill_shotgun( "shotgun" ); -static const skill_id skill_smg( "smg" ); -static const skill_id skill_speech( "speech" ); -static const skill_id skill_stabbing( "stabbing" ); -static const skill_id skill_survival( "survival" ); -static const skill_id skill_swimming( "swimming" ); -static const skill_id skill_tailor( "tailor" ); -static const skill_id skill_throw( "throw" ); -static const skill_id skill_traps( "traps" ); -static const skill_id skill_unarmed( "unarmed" ); -static const skill_id weapon_skill( "weapon" ); - -static const quality_id qual_ANESTHESIA( "ANESTHESIA" ); -static const quality_id qual_AXE( "AXE" ); -static const quality_id qual_BUTCHER( "BUTCHER" ); -static const quality_id qual_CUT( "CUT" ); -static const quality_id qual_CUT_FINE( "CUT_FINE" ); -static const quality_id qual_DIG( "DIG" ); -static const quality_id qual_FISHING( "FISHING" ); -static const quality_id qual_JACK( "JACK" ); -static const quality_id qual_LIFT( "LIFT" ); -static const quality_id qual_SAW_M( "SAW_M" ); -static const quality_id qual_SAW_W( "SAW_W" ); -static const quality_id qual_SELF_JACK( "SELF_JACK" ); -static const quality_id qual_WELD( "WELD" ); - -static const zone_type_id zone_investigate_only( "NPC_INVESTIGATE_ONLY" ); -static const zone_type_id zone_no_investigate( "NPC_NO_INVESTIGATE" ); -static const zone_type_id zone_type_CHOP_TREES( "CHOP_TREES" ); -static const zone_type_id zone_type_CONSTRUCTION_BLUEPRINT( "CONSTRUCTION_BLUEPRINT" ); -static const zone_type_id zone_type_FARM_PLOT( "FARM_PLOT" ); -static const zone_type_id zone_type_FISHING_SPOT( "FISHING_SPOT" ); -static const zone_type_id zone_type_LOOT_CORPSE( "LOOT_CORPSE" ); -static const zone_type_id zone_type_LOOT_IGNORE( "LOOT_IGNORE" ); -static const zone_type_id zone_type_LOOT_UNSORTED( "LOOT_UNSORTED" ); -static const zone_type_id zone_type_LOOT_WOOD( "LOOT_WOOD" ); -static const zone_type_id zone_type_VEHICLE_DECONSTRUCT( "VEHICLE_DECONSTRUCT" ); -static const zone_type_id zone_type_VEHICLE_REPAIR( "VEHICLE_REPAIR" ); - -static const zone_type_id z_camp_food( "CAMP_FOOD" ); -static const zone_type_id z_camp_storage( "CAMP_STORAGE" ); -static const zone_type_id z_loot_unsorted( "LOOT_UNSORTED" ); -static const zone_type_id zone_source_firewood( "SOURCE_FIREWOOD" ); - -static const trap_str_id tr_firewood_source( "tr_firewood_source" ); -static const trap_str_id tr_practice_target( "tr_practice_target" ); -static const trap_str_id tr_unfinished_construction( "tr_unfinished_construction" ); - -static const itype_id fuel_type_animal( "animal" ); -static const itype_id fuel_type_battery( "battery" ); -static const itype_id fuel_type_muscle( "muscle" ); -static const itype_id fuel_type_none( "null" ); -static const itype_id fuel_type_plutonium_cell( "plut_cell" ); -static const itype_id fuel_type_sun_light( "sunlight" ); -static const itype_id fuel_type_wind( "wind" ); - -static const fault_id fault_belt( "fault_engine_belt_drive" ); -static const fault_id fault_bionic_salvaged( "fault_bionic_salvaged" ); -static const fault_id fault_diesel( "fault_engine_pump_diesel" ); -static const fault_id fault_filter_air( "fault_engine_filter_air" ); -static const fault_id fault_filter_fuel( "fault_engine_filter_fuel" ); -static const fault_id fault_glowplug( "fault_engine_glow_plug" ); -static const fault_id fault_gun_blackpowder( "fault_gun_blackpowder" ); -static const fault_id fault_gun_chamber_spent( "fault_gun_chamber_spent" ); -static const fault_id fault_gun_dirt( "fault_gun_dirt" ); -static const fault_id fault_gun_unlubricated( "fault_gun_unlubricated" ); -static const fault_id fault_immobiliser( "fault_engine_immobiliser" ); -static const fault_id fault_pump( "fault_engine_pump_fuel" ); -static const fault_id fault_starter( "fault_engine_starter" ); - -static const std::string comesttype_DRINK( "DRINK" ); -static const std::string comesttype_FOOD( "FOOD" ); - -static const matype_id style_aikido( "style_aikido" ); -static const matype_id style_biojutsu( "style_biojutsu" ); -static const matype_id style_boxing( "style_boxing" ); -static const matype_id style_capoeira( "style_capoeira" ); -static const matype_id style_crane( "style_crane" ); -static const matype_id style_dragon( "style_dragon" ); -static const matype_id style_judo( "style_judo" ); -static const matype_id style_karate( "style_karate" ); -static const matype_id style_kicks( "style_kicks" ); -static const matype_id style_krav_maga( "style_krav_maga" ); -static const matype_id style_leopard( "style_leopard" ); -static const matype_id style_muay_thai( "style_muay_thai" ); -static const matype_id style_ninjutsu( "style_ninjutsu" ); -static const matype_id style_none( "style_none" ); -static const matype_id style_pankration( "style_pankration" ); -static const matype_id style_snake( "style_snake" ); -static const matype_id style_taekwondo( "style_taekwondo" ); -static const matype_id style_tai_chi( "style_tai_chi" ); -static const matype_id style_tiger( "style_tiger" ); -static const matype_id style_wingchun( "style_wingchun" ); -static const matype_id style_zui_quan( "style_zui_quan" ); - -static const species_id ABERRATION( "ABERRATION" ); -static const species_id species_BLOB( "BLOB" ); -static const species_id FISH( "FISH" ); -static const species_id FUNGUS( "FUNGUS" ); -static const species_id HALLUCINATION( "HALLUCINATION" ); -static const species_id HUMAN( "HUMAN" ); -static const species_id INSECT( "INSECT" ); -static const species_id LEECH_PLANT( "LEECH_PLANT" ); -static const species_id MAMMAL( "MAMMAL" ); -static const species_id MOLLUSK( "MOLLUSK" ); -static const species_id PLANT( "PLANT" ); -static const species_id ROBOT( "ROBOT" ); -static const species_id SPIDER( "SPIDER" ); -static const species_id ZOMBIE( "ZOMBIE" ); - -static const matec_id tec_none( "tec_none" ); -static const matec_id WBLOCK_1( "WBLOCK_1" ); -static const matec_id WBLOCK_2( "WBLOCK_2" ); -static const matec_id WBLOCK_3( "WBLOCK_3" ); -static const matec_id WHIP_DISARM( "WHIP_DISARM" ); - -static const ter_str_id ter_dirt( "t_dirt" ); -static const ter_str_id ter_grass_dead( "t_grass_dead" ); -static const ter_str_id ter_stump( "t_stump" ); -static const ter_str_id ter_tree_dead( "t_tree_dead" ); -static const ter_str_id ter_tree_deadpine( "t_tree_deadpine" ); -static const ter_str_id ter_tree_birch_harvested( "t_tree_birch_harvested" ); -static const ter_str_id ter_tree_willow_harvested( "t_tree_willow_harvested" ); -static const ter_str_id ter_tree_hickory_dead( "t_tree_hickory_dead" ); -static const ter_str_id ter_trunk( "t_trunk" ); - -static const std::string part_location_structure( "structure" ); -static const std::string part_location_center( "center" ); -static const std::string part_location_onroof( "on_roof" ); - -static const std::string GUN_MODE_VAR_NAME( "item::mode" ); -static const std::string CLOTHING_MOD_VAR_PREFIX( "clothing_mod_" ); - -static const faction_id your_followers( "your_followers" ); -static const faction_id no_faction( "no_faction" ); - -static const std::string errstring( "ERROR" ); - -static const ammotype ammo_bolt( "bolt" ); -static const ammotype ammo_battery( "battery" ); -static const ammotype ammo_reactor_slurry( "reactor_slurry" ); -static const ammotype ammo_plutonium( "plutonium" ); - -const vitamin_id vitamin_iron( "iron" ); - -static const std::string null_item_id( "null" ); - -#endif // STRING_CONSTS_H