From 780a6e93d07d84667cc08fab921c97bdf840ad84 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:22:58 -0700 Subject: [PATCH 01/13] Rename fatigue to sleepiness I feel like this is going to break some stuff? --- data/core/game_balance.json | 4 +- data/json/artifact/altered_object_active.json | 2 +- .../json/artifact/legacy_artifact_active.json | 4 +- data/json/artifact/relic_procgen_data.json | 10 +- data/json/bionics.json | 4 +- data/json/effects.json | 98 +++++----- .../effects_on_condition/bionic_eocs.json | 2 +- .../misc_effect_on_condition.json | 4 +- .../mutation_activation_eocs.json | 2 +- .../portal_dependent_effect_on_condition.json | 2 +- .../vitrification_effect_on_condition.json | 4 +- data/json/field_type.json | 4 +- data/json/items/bionics.json | 2 +- data/json/items/chemicals_and_resources.json | 2 +- data/json/items/comestibles/cereal.json | 2 +- data/json/items/comestibles/drink.json | 34 ++-- data/json/items/comestibles/drink_other.json | 2 +- data/json/items/comestibles/junkfood.json | 2 +- data/json/items/comestibles/med.json | 4 +- data/json/items/comestibles/other.json | 2 +- data/json/items/comestibles/raw_veggy.json | 4 +- data/json/items/tool/science.json | 10 +- .../lab/lab_floorplans_finale1level.json | 2 +- data/json/mapgen/mi-go/mi-go_portal.json | 2 +- .../microlab/microlab_special_tiles.json | 2 +- .../nether_monster_palette.json | 2 +- .../monster_deaths.json | 2 +- data/json/monster_special_attacks/spells.json | 6 +- data/json/monstergroups/nether.json | 2 +- data/json/mutations/mutations.json | 30 +-- data/json/npcs/TALK_ALLY_TUTORIAL.json | 2 +- data/json/npcs/TALK_TEST.json | 4 +- .../npcs/common_chat/TALK_COMMON_ALLY.json | 10 +- .../npcs/common_chat/TALK_COMMON_OTHER.json | 6 +- .../your_followers/liam_main_dialogue.json | 4 +- .../npcs/your_followers/luo_follower.json | 4 +- data/json/ui/fatigue.json | 24 +-- data/json/ui/layout.json | 18 +- data/json/ui/sidebar-legacy-classic.json | 4 +- data/json/ui/sidebar-legacy-compact.json | 2 +- .../json/ui/sidebar-legacy-labels-narrow.json | 4 +- data/json/ui/sidebar-legacy-labels.json | 2 +- data/json/ui/sidebar-mobile.json | 2 +- data/json/ui/sidebar-thick-cleaner.json | 2 +- .../spacebar_body_and_health_block.json | 4 +- .../structured/structured_health_blocks.json | 4 +- data/json/ui/zenfs/complete_health_panel.json | 16 +- data/json/ui/zenfs/health.json | 40 ++-- data/json/ui/zenfs/pain.json | 8 +- data/mods/Aftershock/maps/furniture.json | 2 +- data/mods/Aftershock/mutations/obsolete.json | 6 +- data/mods/Aftershock/player/bionic_eocs.json | 4 +- .../effects_on_condition/backend_eocs.json | 2 +- data/mods/DinoMod/mapgen/DinoLabFinale.json | 4 +- .../mod_integration/vitakinesis_eoc.json | 2 +- data/mods/Magiclysm/Spells/classless.json | 2 +- data/mods/Magiclysm/Spells/druid.json | 6 +- data/mods/Magiclysm/effects/effects.json | 12 +- .../mods/Magiclysm/itemgroups/itemgroups.json | 2 +- .../mods/Magiclysm/itemgroups/spellbooks.json | 2 +- data/mods/Magiclysm/items/potion_fruits.json | 2 +- data/mods/Magiclysm/items/spell_scrolls.json | 6 +- data/mods/Magiclysm/items/spellbooks.json | 2 +- .../Magiclysm/mutations/fantasy_species.json | 4 +- data/mods/Magiclysm/mutations/mutations.json | 2 +- data/mods/Magiclysm/mutations/temporary.json | 2 +- data/mods/MindOverMatter/NewPowerGuide.md | 2 +- .../PowerDescriptionSpoilers.md | 6 +- .../eoc_nether_attunement_events.json | 16 +- .../effects/effects_penalty.json | 4 +- .../effects/effects_psionic.json | 12 +- .../mapgen/map_extras/glass_and_crystal.json | 2 +- .../MindOverMatter/mapgen/microlab_rooms.json | 4 +- .../psi_lab_surface_nested.json | 6 +- .../monstergroups/monstergroups_edited.json | 2 +- .../monsters/monster_eoc_spells.json | 8 +- .../MindOverMatter/mutations/temporary.json | 2 +- .../npcs/dialogue/follower_dialogue.json | 8 +- .../MindOverMatter/obsolete/obsolete.json | 12 +- .../overmap/nether_crystal_field.json | 8 +- .../powers/vitakinesis_eoc.json | 14 +- .../monstergroups/nether.json | 2 +- data/mods/No_Hope/monster_groups.json | 2 +- data/mods/TEST_DATA/effects.json | 4 +- data/mods/TEST_DATA/widgets.json | 12 +- data/mods/Xedra_Evolved/effects/effects.json | 24 +-- .../itemgroups/map_extra_itemgroups.json | 2 +- data/mods/Xedra_Evolved/items/alchemy.json | 2 +- .../items/comestibles/goblin_fruits.json | 2 +- .../paraclesians/arvore_mutations.json | 2 +- .../mutations/paraclesians/ierde_eocs.json | 12 +- .../paraclesians/ierde_mutations.json | 2 +- .../paraclesians/paraclesian_fae_bans.json | 4 +- .../paraclesians/salamander_eocs.json | 2 +- .../paraclesians/salamander_mutations.json | 12 +- .../Xedra_Evolved/spells/eater_spells.json | 2 +- data/mods/Xedra_Evolved/ui/sidebar.json | 2 +- src/activity_actor.cpp | 10 +- src/activity_handlers.cpp | 4 +- src/activity_tracker.cpp | 8 +- src/activity_tracker.h | 2 +- src/addiction.cpp | 2 +- src/avatar.cpp | 14 +- src/bionics.cpp | 2 +- src/character.cpp | 174 +++++++++--------- src/character.h | 68 +++---- src/character_body.cpp | 32 ++-- src/character_morale.cpp | 2 +- src/condition.cpp | 10 +- src/construction.cpp | 4 +- src/consumption.cpp | 16 +- src/debug_menu.cpp | 16 +- src/display.cpp | 30 +-- src/display.h | 2 +- src/do_turn.cpp | 4 +- src/effect.cpp | 26 +-- src/faction.cpp | 6 +- src/faction_camp.cpp | 2 +- src/field_type.cpp | 2 +- src/field_type.h | 2 +- src/game.cpp | 4 +- src/game_inventory.cpp | 2 +- src/iexamine.cpp | 4 +- src/item_factory.cpp | 2 +- src/itype.h | 4 +- src/iuse.cpp | 26 +-- src/magic_enchantment.cpp | 2 +- src/magic_enchantment.h | 2 +- src/magic_spell_effect.cpp | 16 +- src/map_extras.cpp | 12 +- src/map_field.cpp | 4 +- src/medical_ui.cpp | 8 +- src/morale.cpp | 6 +- src/morale.h | 2 +- src/mutation.cpp | 8 +- src/mutation.h | 10 +- src/mutation_data.cpp | 6 +- src/mutation_ui.cpp | 12 +- src/npc.cpp | 2 +- src/npcmove.cpp | 16 +- src/player_difficulty.cpp | 2 +- src/player_hardcoded_effects.cpp | 56 +++--- src/savegame_json.cpp | 6 +- src/sdlsound.cpp | 2 +- src/sdltiles.cpp | 2 +- src/sounds.cpp | 30 +-- src/sounds.h | 4 +- src/suffer.cpp | 16 +- src/talker.h | 4 +- src/talker_character.cpp | 8 +- src/talker_character.h | 4 +- src/talker_npc.cpp | 12 +- src/trap.cpp | 4 +- src/widget.cpp | 10 +- src/widget.h | 2 +- tests/addiction_test.cpp | 68 +++---- tests/iuse_test.cpp | 30 +-- tests/magic_spell_effect_test.cpp | 20 +- tests/magic_spell_test.cpp | 2 +- tests/npc_talk_test.cpp | 8 +- tests/npc_test.cpp | 44 ++--- tests/player_helpers.cpp | 2 +- tests/skill_test.cpp | 2 +- tests/stomach_contents_test.cpp | 8 +- tests/weary_test.cpp | 46 ++--- tests/widget_test.cpp | 22 +-- 166 files changed, 834 insertions(+), 834 deletions(-) diff --git a/data/core/game_balance.json b/data/core/game_balance.json index 628d09254f79c..f4fc0cb7b9eef 100644 --- a/data/core/game_balance.json +++ b/data/core/game_balance.json @@ -57,8 +57,8 @@ }, { "type": "EXTERNAL_OPTION", - "name": "PLAYER_FATIGUE_RATE", - "info": "Set base fatigue rate per 5 minutes. Default: 1.0", + "name": "PLAYER_SLEEPINESS_RATE", + "info": "Set base sleepiness rate per 5 minutes. Default: 1.0", "stype": "float", "value": 1.0 }, diff --git a/data/json/artifact/altered_object_active.json b/data/json/artifact/altered_object_active.json index 9d7c0129abb48..5c8e124c485cd 100644 --- a/data/json/artifact/altered_object_active.json +++ b/data/json/artifact/altered_object_active.json @@ -136,6 +136,6 @@ "flags": [ "IGNORE_WALLS", "NO_PROJECTILE", "NO_EXPLOSION_SFX" ], "shape": "blast", "effect": "remove_field", - "effect_str": "fd_fatigue" + "effect_str": "fd_sleepiness" } ] diff --git a/data/json/artifact/legacy_artifact_active.json b/data/json/artifact/legacy_artifact_active.json index ae3419504d86e..4340b85b4e32b 100644 --- a/data/json/artifact/legacy_artifact_active.json +++ b/data/json/artifact/legacy_artifact_active.json @@ -379,14 +379,14 @@ }, { "type": "SPELL", - "id": "AEA_FATIGUE", + "id": "AEA_SLEEPINESS", "name": { "str": "Artifact Dimensional Fatigue" }, "description": "Creates some dimensional fatigue at a random point within range.", "valid_targets": [ "ground", "self", "ally", "hostile" ], "effect": "attack", "message": "", "shape": "blast", - "field_id": "fd_fatigue", + "field_id": "fd_sleepiness", "field_chance": 1, "min_field_intensity": 2, "max_field_intensity": 2, diff --git a/data/json/artifact/relic_procgen_data.json b/data/json/artifact/relic_procgen_data.json index 0a1409ea090e8..2dc869a218501 100644 --- a/data/json/artifact/relic_procgen_data.json +++ b/data/json/artifact/relic_procgen_data.json @@ -31,7 +31,7 @@ { "weight": 100, "spell_id": "AEA_NOISE", "base_power": -25 }, { "weight": 100, "spell_id": "AEA_LIGHT", "base_power": -25 }, { "weight": 100, "spell_id": "AEA_DIM", "base_power": 0 }, - { "weight": 100, "spell_id": "AEA_FATIGUE", "base_power": -300 }, + { "weight": 100, "spell_id": "AEA_SLEEPINESS", "base_power": -300 }, { "weight": 100, "spell_id": "AEA_FLASH", "base_power": 150 }, { "weight": 100, "spell_id": "AEA_PARALYZE", "base_power": -250 }, { "weight": 100, "spell_id": "AEA_MAP", "base_power": 500 }, @@ -310,7 +310,7 @@ { "weight": 100, "spell_id": "AEA_NOISE", "base_power": -25 }, { "weight": 100, "spell_id": "AEA_LIGHT", "base_power": -25 }, { "weight": 100, "spell_id": "AEA_DIM", "base_power": -50 }, - { "weight": 100, "spell_id": "AEA_FATIGUE", "base_power": -300 }, + { "weight": 100, "spell_id": "AEA_SLEEPINESS", "base_power": -300 }, { "weight": 100, "spell_id": "AEA_FLASH", "base_power": 150 }, { "weight": 100, "spell_id": "AEA_PARALYZE", "base_power": -250 }, { "weight": 100, "spell_id": "AEA_MAP", "base_power": 500 }, @@ -593,7 +593,7 @@ { "weight": 100, "spell_id": "AEA_NOISE", "base_power": -25 }, { "weight": 100, "spell_id": "AEA_LIGHT", "base_power": -25 }, { "weight": 100, "spell_id": "AEA_DIM", "base_power": -50 }, - { "weight": 100, "spell_id": "AEA_FATIGUE", "base_power": -300 }, + { "weight": 100, "spell_id": "AEA_SLEEPINESS", "base_power": -300 }, { "weight": 100, "spell_id": "AEA_FLASH", "base_power": 150 }, { "weight": 100, "spell_id": "AEA_PARALYZE", "base_power": -250 }, { "weight": 100, "spell_id": "AEA_MAP", "base_power": 500 }, @@ -896,7 +896,7 @@ "weight": 100, "min_value": 0.3, "max_value": 0.8, - "type": "FATIGUE", + "type": "SLEEPINESS", "increment": 0.1, "power_per_increment": -100 } @@ -929,7 +929,7 @@ { "weight": 100, "spell_id": "AEA_ATTENTION", "base_power": -100 }, { "weight": 100, "spell_id": "AEA_FLASH", "base_power": 150 }, { "weight": 100, "spell_id": "AEA_HEAL", "base_power": 400 }, - { "weight": 100, "spell_id": "AEA_FATIGUE", "base_power": -500 }, + { "weight": 100, "spell_id": "AEA_SLEEPINESS", "base_power": -500 }, { "weight": 100, "spell_id": "AEA_PAIN", "base_power": -150 }, { "weight": 100, "spell_id": "AEA_SHADOWS", "base_power": -50 }, { "weight": 100, "spell_id": "AEA_LIGHT", "base_power": 100 }, diff --git a/data/json/bionics.json b/data/json/bionics.json index 715e739b3dc4c..d26b6a54ca564 100644 --- a/data/json/bionics.json +++ b/data/json/bionics.json @@ -1497,7 +1497,7 @@ "id": "bio_sleepy", "type": "bionic", "name": { "str": "Endocrine Enervator" }, - "description": "Through a combination of psychochemical manipulation and old fashioned electrical nerve stimulation, this malfunctioning bionic alters your brain chemistry in such a way as to cause fatigue. You will find yourself tiring a bit faster than before.", + "description": "Through a combination of psychochemical manipulation and old fashioned electrical nerve stimulation, this malfunctioning bionic alters your brain chemistry in such a way as to cause sleepiness. You will find yourself tiring a bit faster than before.", "occupied_bodyparts": [ [ "head", 2 ] ], "flags": [ "BIONIC_FAULTY" ] }, @@ -1820,7 +1820,7 @@ "id": "bio_soporific", "type": "bionic", "name": { "str": "Soporific Induction" }, - "description": "An electrode has been implanted into your brain's ventrolateral preoptic nucleus. It turns on whenever you're trying to fall asleep, creating an artificial but effective sensation of fatigue.", + "description": "An electrode has been implanted into your brain's ventrolateral preoptic nucleus. It turns on whenever you're trying to fall asleep, creating an artificial but effective sensation of sleepiness.", "occupied_bodyparts": [ [ "head", 1 ] ], "flags": [ "BIONIC_TOGGLED" ], "enchantments": [ { "condition": "ACTIVE", "values": [ { "value": "SLEEPY", "add": 30 } ] } ] diff --git a/data/json/effects.json b/data/json/effects.json index cf6c36fdae7ef..9f11623ae9aed 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -1811,8 +1811,8 @@ "resist_traits": [ "THRESH_URSINE" ], "base_mods": { "str_mod": [ 1 ], - "fatigue_min": [ 1 ], - "fatigue_chance": [ 1100 ], + "sleepiness_min": [ 1 ], + "sleepiness_chance": [ 1100 ], "hurt_min": [ 1 ], "hurt_max": [ 2 ], "hurt_chance": [ -22 ], @@ -1826,7 +1826,7 @@ "str_mod": [ 2.5 ], "per_mod": [ -1 ], "dex_mod": [ -1 ], - "fatigue_chance": [ -500 ], + "sleepiness_chance": [ -500 ], "hurt_chance": [ 21, 0 ], "pain_chance": [ -30 ] }, @@ -2291,10 +2291,10 @@ "stamina_min": [ -8, -4 ], "stamina_max": [ -50, -20 ], "stamina_chance": [ 3, 10 ], - "fatigue_min": [ 2, 0 ], - "fatigue_max": [ 10, 5 ], - "fatigue_chance": [ 110 ], - "fatigue_max_val": [ 700, 250 ], + "sleepiness_min": [ 2, 0 ], + "sleepiness_max": [ 10, 5 ], + "sleepiness_chance": [ 110 ], + "sleepiness_max_val": [ 700, 250 ], "healing_rate": [ 0.01, 1 ] }, "scaling_mods": { @@ -2306,8 +2306,8 @@ "stamina_min": [ -6, -4 ], "stamina_max": [ 15, 4 ], "stamina_chance": [ -1, -2.5 ], - "fatigue_chance": [ -50 ], - "fatigue_tick": [ 0.5 ] + "sleepiness_chance": [ -50 ], + "sleepiness_tick": [ 0.5 ] }, "//": "Stamina regen stops completely at int 3, but no stamina loss from then on", "blood_analysis_description": "Bacterial Infection" @@ -2334,10 +2334,10 @@ "speed_mod": [ -5, 0 ], "stamina_min": [ -8 ], "stamina_chance": [ 10, 20 ], - "fatigue_min": [ 1, 0 ], - "fatigue_max": [ 5, 3 ], - "fatigue_chance": [ 210 ], - "fatigue_max_val": [ 500, 125 ], + "sleepiness_min": [ 1, 0 ], + "sleepiness_max": [ 5, 3 ], + "sleepiness_chance": [ 210 ], + "sleepiness_max_val": [ 500, 125 ], "healing_rate": [ 0.5 ] }, "scaling_mods": { @@ -2348,7 +2348,7 @@ "speed_mod": [ -5, -4 ], "stamina_min": [ -6, -3 ], "stamina_chance": [ -1, -2.5 ], - "fatigue_chance": [ -60 ] + "sleepiness_chance": [ -60 ] } }, { @@ -2893,8 +2893,8 @@ "base_mods": { "thirst_tick": [ 3600 ], "thirst_min": [ 1 ], - "fatigue_tick": [ 600 ], - "fatigue_min": [ 1 ], + "sleepiness_tick": [ 600 ], + "sleepiness_min": [ 1 ], "str_mod": [ -1, 0 ], "cough_chance": [ 600, 0 ] } @@ -2914,8 +2914,8 @@ "base_mods": { "thirst_tick": [ 3600 ], "thirst_min": [ 1 ], - "fatigue_tick": [ 600 ], - "fatigue_min": [ 1 ], + "sleepiness_tick": [ 600 ], + "sleepiness_min": [ 1 ], "str_mod": [ -1, 0 ], "cough_chance": [ 600, 0 ] } @@ -2935,8 +2935,8 @@ "base_mods": { "thirst_tick": [ 1800 ], "thirst_min": [ 1 ], - "fatigue_tick": [ 300 ], - "fatigue_min": [ 1 ], + "sleepiness_tick": [ 300 ], + "sleepiness_min": [ 1 ], "str_mod": [ -3, -1 ], "dex_mod": [ -1, 0 ], "per_mod": [ -1, 0 ], @@ -2962,8 +2962,8 @@ "base_mods": { "thirst_tick": [ 1800 ], "thirst_min": [ 1 ], - "fatigue_tick": [ 300 ], - "fatigue_min": [ 1 ], + "sleepiness_tick": [ 300 ], + "sleepiness_min": [ 1 ], "str_mod": [ -4, -2 ], "dex_mod": [ -2, 0 ], "per_mod": [ -1, 0 ], @@ -3273,8 +3273,8 @@ "dex_mod": [ 1 ], "int_mod": [ 0.5 ], "per_mod": [ 1 ], - "fatigue_min": [ 1 ], - "fatigue_tick": [ 9 ], + "sleepiness_min": [ 1 ], + "sleepiness_tick": [ 9 ], "stamina_min": [ 8 ] }, "blood_analysis_description": "Methamphetamines" @@ -3519,7 +3519,7 @@ "name": [ "Unidentified Illness" ], "desc": [ "You aren't sure what's wrong with you but you don't feel well." ], "rating": "bad", - "base_mods": { "pain_chance": [ 256 ], "pain_min": [ 1 ], "pain_max": [ 4 ], "fatigue_chance": [ 256 ], "fatigue_min": [ 1 ] }, + "base_mods": { "pain_chance": [ 256 ], "pain_min": [ 1 ], "pain_max": [ 4 ], "sleepiness_chance": [ 256 ], "sleepiness_min": [ 1 ] }, "blood_analysis_description": "Intramuscular Parasites" }, { @@ -3547,9 +3547,9 @@ "stamina_max": [ -100 ], "stamina_chance": [ 300 ], "int_mod": [ -1, 0 ], - "fatigue_min": [ 5 ], - "fatigue_max": [ 10 ], - "fatigue_chance": [ 500 ] + "sleepiness_min": [ 5 ], + "sleepiness_max": [ 10 ], + "sleepiness_chance": [ 500 ] }, "blood_analysis_description": "Streptobacillus moniliformis Infection" }, @@ -3768,9 +3768,9 @@ "stamina_min": [ -100 ], "stamina_max": [ -200 ], "stamina_chance": [ 900 ], - "fatigue_min": [ 10 ], - "fatigue_max": [ 20 ], - "fatigue_chance": [ 900 ], + "sleepiness_min": [ 10 ], + "sleepiness_max": [ 20 ], + "sleepiness_chance": [ 900 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ 0 ], "h_mod_chance": [ 900 ] @@ -3778,9 +3778,9 @@ "scaling_mods": { "str_mod": [ -2 ], "stamina_max": [ -500 ], - "fatigue_max": [ 20 ], + "sleepiness_max": [ 20 ], "stamina_chance": [ -300 ], - "fatigue_chance": [ -300 ], + "sleepiness_chance": [ -300 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ -50 ], "h_mod_chance": [ -200 ] @@ -3802,9 +3802,9 @@ "stamina_min": [ -100 ], "stamina_max": [ -200 ], "stamina_chance": [ 900 ], - "fatigue_min": [ 10 ], - "fatigue_max": [ 20 ], - "fatigue_chance": [ 900 ], + "sleepiness_min": [ 10 ], + "sleepiness_max": [ 20 ], + "sleepiness_chance": [ 900 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ 0 ], "h_mod_chance": [ 900 ] @@ -3812,9 +3812,9 @@ "scaling_mods": { "str_mod": [ -2 ], "stamina_max": [ -500 ], - "fatigue_max": [ 20 ], + "sleepiness_max": [ 20 ], "stamina_chance": [ -300 ], - "fatigue_chance": [ -300 ], + "sleepiness_chance": [ -300 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ -50 ], "h_mod_chance": [ -200 ] @@ -3838,16 +3838,16 @@ "pain_chance": [ 9000 ], "pain_min": [ 1 ], "pain_max": [ 5 ], - "fatigue_chance": [ 900 ], - "fatigue_max_val": [ 500, 200 ], - "fatigue_min": [ 10 ], + "sleepiness_chance": [ 900 ], + "sleepiness_max_val": [ 500, 200 ], + "sleepiness_min": [ 10 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ 0 ], "h_mod_chance": [ 900 ] }, "scaling_mods": { "pain_chance": [ -150 ], - "fatigue_chance": [ -200 ], + "sleepiness_chance": [ -200 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ -100 ], "h_mod_chance": [ -300 ], @@ -3862,18 +3862,18 @@ "id": "betablock", "name": [ "Beta blocker" ], "desc": [ - "You are under the influence of a beta blocker. This controls your heart rate, decreasing the influence of stressful events such as pain on it. However, it also lowers blood pressure and induces fatigue." + "You are under the influence of a beta blocker. This controls your heart rate, decreasing the influence of stressful events such as pain on it. However, it also lowers blood pressure and induces sleepiness." ], "max_intensity": 3, "base_mods": { "blood_pressure_tick": [ 250 ], "blood_pressure_min": [ -2 ], "blood_pressure_min_val": [ -200 ], - "fatigue_min": [ 4 ], - "fatigue_chance": [ 500 ], - "fatigue_max_val": [ 200 ] + "sleepiness_min": [ 4 ], + "sleepiness_chance": [ 500 ], + "sleepiness_max_val": [ 200 ] }, - "scaling_mods": { "blood_pressure_min": [ -1 ], "blood_pressure_min_val": [ -100 ], "fatigue_max_val": [ 50 ], "fatigue_min": [ 2 ] }, + "scaling_mods": { "blood_pressure_min": [ -1 ], "blood_pressure_min_val": [ -100 ], "sleepiness_max_val": [ 50 ], "sleepiness_min": [ 2 ] }, "rating": "neutral", "blood_analysis_description": "Beta Blocker" }, @@ -4468,7 +4468,7 @@ "desc": [ "You feel quite full, and a bit sluggish." ], "apply_message": "You feel quite full, and a bit sluggish.", "rating": "bad", - "base_mods": { "speed_mod": [ -2 ], "fatigue_amount": [ 1 ] } + "base_mods": { "speed_mod": [ -2 ], "sleepiness_amount": [ 1 ] } }, { "type": "effect_type", @@ -4477,7 +4477,7 @@ "desc": [ "Your stomach is full to bursting. This was a mistake." ], "apply_message": "Your stomach is full to bursting. This was a mistake.", "rating": "bad", - "base_mods": { "speed_mod": [ -10 ], "fatigue_amount": [ 2 ], "vomit_chance": [ 500 ], "vomit_tick": [ 10 ], "pain_amount": [ 3 ] } + "base_mods": { "speed_mod": [ -10 ], "sleepiness_amount": [ 2 ], "vomit_chance": [ 500 ], "vomit_tick": [ 10 ], "pain_amount": [ 3 ] } }, { "type": "effect_type", diff --git a/data/json/effects_on_condition/bionic_eocs.json b/data/json/effects_on_condition/bionic_eocs.json index 2363e12e6c596..9063d010a4fe2 100644 --- a/data/json/effects_on_condition/bionic_eocs.json +++ b/data/json/effects_on_condition/bionic_eocs.json @@ -84,7 +84,7 @@ "recurrence": [ "25 minutes", "1 hours 15 minutes" ], "condition": { "and": [ { "u_has_bionics": "bio_sleepy" }, { "not": { "u_has_effect": "sleep" } } ] }, "deactivate_condition": { "not": { "u_has_bionics": "bio_sleepy" } }, - "effect": { "math": [ "u_val('fatigue')", "++" ] } + "effect": { "math": [ "u_val('sleepiness')", "++" ] } }, { "type": "effect_on_condition", diff --git a/data/json/effects_on_condition/misc_effect_on_condition.json b/data/json/effects_on_condition/misc_effect_on_condition.json index ec8ef7ce5ec78..e3bf71ff5a0fa 100644 --- a/data/json/effects_on_condition/misc_effect_on_condition.json +++ b/data/json/effects_on_condition/misc_effect_on_condition.json @@ -2,12 +2,12 @@ { "type": "effect_on_condition", "id": "EOC_SLEEP", - "effect": [ { "u_message": "You feel very sleepy…" }, { "math": [ "u_val('fatigue')", "+=", "40" ] } ] + "effect": [ { "u_message": "You feel very sleepy…" }, { "math": [ "u_val('sleepiness')", "+=", "40" ] } ] }, { "type": "effect_on_condition", "id": "EOC_MINOR_SLEEP", - "effect": [ { "u_message": "You feel sleepy…" }, { "math": [ "u_val('fatigue')", "+=", "20" ] } ] + "effect": [ { "u_message": "You feel sleepy…" }, { "math": [ "u_val('sleepiness')", "+=", "20" ] } ] }, { "type": "effect_on_condition", diff --git a/data/json/effects_on_condition/mutation_eocs/mutation_activation_eocs.json b/data/json/effects_on_condition/mutation_eocs/mutation_activation_eocs.json index 536010ad009bc..7858f763635ee 100644 --- a/data/json/effects_on_condition/mutation_eocs/mutation_activation_eocs.json +++ b/data/json/effects_on_condition/mutation_eocs/mutation_activation_eocs.json @@ -2,7 +2,7 @@ { "type": "effect_on_condition", "id": "EOC_GENERIC_SPELL_MUTATION", - "//energy_amount": "optional, how much stamina you spend on activation of the mutation - EoC works exclusively with stamina, to consume calories, fatigue or thirst use corresponding booleans in mutation; default zero if you don't need to consume stamina", + "//energy_amount": "optional, how much stamina you spend on activation of the mutation - EoC works exclusively with stamina, to consume calories, sleepiness or thirst use corresponding booleans in mutation; default zero if you don't need to consume stamina", "//prep_time": "time you spend to prepare the activation, in seconds. Use 0 to make activation instant. Decimals are allowed, 0.5 means 50 moves", "//spell_to_cast": "spell that would be casted if activation is successful", "//message_success": "message that would be printed if activation is successful", diff --git a/data/json/effects_on_condition/nether_eocs/portal_dependent_effect_on_condition.json b/data/json/effects_on_condition/nether_eocs/portal_dependent_effect_on_condition.json index ccc9bd4ce8cc8..4e8c368829d30 100644 --- a/data/json/effects_on_condition/nether_eocs/portal_dependent_effect_on_condition.json +++ b/data/json/effects_on_condition/nether_eocs/portal_dependent_effect_on_condition.json @@ -110,7 +110,7 @@ "u_message": "You suddenly feel wakeful and energized, as if something that was slowing you down is now gone.", "type": "good" }, - { "math": [ "u_val('fatigue')", "-=", "20" ] }, + { "math": [ "u_val('sleepiness')", "-=", "20" ] }, { "math": [ "u_val('stamina')", "+=", "20" ] } ] }, diff --git a/data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json b/data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json index ee2722ae31104..7a17305016a22 100644 --- a/data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json +++ b/data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json @@ -60,7 +60,7 @@ { "math": [ "u_glass_health_arm_r", "=", "u_hp('arm_r')" ] }, { "math": [ "u_glass_health_leg_l", "=", "u_hp('leg_l')" ] }, { "math": [ "u_glass_health_leg_r", "=", "u_hp('leg_r')" ] }, - { "math": [ "u_glass_fatigue", "=", "u_val('fatigue')" ] } + { "math": [ "u_glass_sleepiness", "=", "u_val('sleepiness')" ] } ] }, { @@ -383,7 +383,7 @@ { "math": [ "u_hp('arm_r')", "=", "u_glass_health_arm_r" ] }, { "math": [ "u_hp('leg_l')", "=", "u_glass_health_leg_l" ] }, { "math": [ "u_hp('leg_r')", "=", "u_glass_health_leg_r" ] }, - { "math": [ "u_val('fatigue')", "=", "u_glass_fatigue" ] }, + { "math": [ "u_val('sleepiness')", "=", "u_glass_sleepiness" ] }, { "u_lose_morale": "morale_vitri_placid" }, { "u_message": "You suck in a deep, ragged draught of air that burns in your chest. Have you been holding your breath? You must have been. All you can hear for a moment is your heart hammering in your ears. It takes a while to settle down.", diff --git a/data/json/field_type.json b/data/json/field_type.json index 8e2b04307a668..bbc89fc9c931e 100644 --- a/data/json/field_type.json +++ b/data/json/field_type.json @@ -945,7 +945,7 @@ "display_field": true }, { - "id": "fd_fatigue", + "id": "fd_sleepiness", "type": "field_type", "legacy_enum_id": 20, "intensity_levels": [ @@ -965,7 +965,7 @@ "monster_spawn_chance": 600, "monster_spawn_count": 1, "monster_spawn_radius": 1, - "monster_spawn_group": "GROUP_NETHER_FATIGUE_FIELD" + "monster_spawn_group": "GROUP_NETHER_SLEEPINESS_FIELD" } ], "description_affix": "under", diff --git a/data/json/items/bionics.json b/data/json/items/bionics.json index 66171a81bf6dc..eabdbd4b4a0e1 100644 --- a/data/json/items/bionics.json +++ b/data/json/items/bionics.json @@ -1244,7 +1244,7 @@ "copy-from": "bionic_general_faulty", "type": "BIONIC_ITEM", "name": { "str": "Endocrine Enervator CBM" }, - "description": "A malfunctioning bionic that causes fatigue by altering the unfortunate user's brain chemistry.", + "description": "A malfunctioning bionic that causes sleepiness by altering the unfortunate user's brain chemistry.", "weight": "100 g", "difficulty": 11 }, diff --git a/data/json/items/chemicals_and_resources.json b/data/json/items/chemicals_and_resources.json index 646f26af6af6d..7e3e3748ec9ba 100644 --- a/data/json/items/chemicals_and_resources.json +++ b/data/json/items/chemicals_and_resources.json @@ -1918,7 +1918,7 @@ "container": "bottle_glass", "weight": "54100 mg", "use_action": [ "POISON", "BLECH" ], - "fatigue_mod": -20, + "sleepiness_mod": -20, "volume": "50 ml", "charges": 1, "quench": -99, diff --git a/data/json/items/comestibles/cereal.json b/data/json/items/comestibles/cereal.json index af2c150067fe8..ea40cd3bdce03 100644 --- a/data/json/items/comestibles/cereal.json +++ b/data/json/items/comestibles/cereal.json @@ -36,7 +36,7 @@ "fun": 11, "addiction_potential": 5, "addiction_type": "caffeine", - "fatigue_mod": 25, + "sleepiness_mod": 25, "stim": 10, "copy-from": "cereal_tpl", "volume": "41 ml" diff --git a/data/json/items/comestibles/drink.json b/data/json/items/comestibles/drink.json index 32c029bc24503..e4adb7d9a98da 100644 --- a/data/json/items/comestibles/drink.json +++ b/data/json/items/comestibles/drink.json @@ -76,7 +76,7 @@ "id": "atomic_coffee", "name": { "str_sp": "atomic coffee" }, "copy-from": "coffee", - "fatigue_mod": 90, + "sleepiness_mod": 90, "stim": 30, "container": "bottle_plastic", "healthy": -1, @@ -96,7 +96,7 @@ "color": "red", "spoils_in": "10 days", "stim": 4, - "fatigue_mod": 5, + "sleepiness_mod": 5, "quench": 30, "description": "Some wild sarsaparilla root steeped in boiling water. Energizing.", "price": 100, @@ -153,7 +153,7 @@ "weight": "259 g", "color": "brown", "spoils_in": "12 hours", - "fatigue_mod": 9, + "sleepiness_mod": 9, "stim": 3, "container": "bottle_plastic", "sealed": false, @@ -223,7 +223,7 @@ "weight": "250 g", "color": "brown", "addiction_type": "caffeine", - "fatigue_mod": 36, + "sleepiness_mod": 36, "stim": 12, "container": "bottle_plastic", "comestible_type": "DRINK", @@ -334,7 +334,7 @@ "weight": "248 g", "color": "brown", "addiction_type": "caffeine", - "fatigue_mod": 18, + "sleepiness_mod": 18, "stim": 6, "container": "can_drink", "comestible_type": "DRINK", @@ -362,7 +362,7 @@ "weight": "250 g", "color": "light_green", "addiction_type": "caffeine", - "fatigue_mod": 24, + "sleepiness_mod": 24, "stim": 8, "container": "can_drink", "comestible_type": "DRINK", @@ -390,7 +390,7 @@ "weight": "247 g", "color": "light_gray", "addiction_type": "caffeine", - "fatigue_mod": 12, + "sleepiness_mod": 12, "stim": 4, "container": "can_drink", "comestible_type": "DRINK", @@ -532,7 +532,7 @@ "weight": "253 g", "color": "magenta", "addiction_type": "caffeine", - "fatigue_mod": 24, + "sleepiness_mod": 24, "stim": 8, "container": "can_drink", "comestible_type": "DRINK", @@ -560,7 +560,7 @@ "name": { "str_sp": "atomic energy drink" }, "copy-from": "energy_drink", "color": "light_green", - "fatigue_mod": 112, + "sleepiness_mod": 112, "stim": 34, "quench": 45, "addiction_potential": 9, @@ -810,7 +810,7 @@ "weight": "251 g", "color": "brown", "addiction_type": "caffeine", - "fatigue_mod": 18, + "sleepiness_mod": 18, "stim": 6, "container": "bottle_glass", "comestible_type": "DRINK", @@ -995,7 +995,7 @@ "color": "brown", "addiction_type": "caffeine", "spoils_in": "14 hours", - "fatigue_mod": 24, + "sleepiness_mod": 24, "stim": 8, "container": "jug_plastic", "sealed": false, @@ -1024,7 +1024,7 @@ "weight": "255 g", "color": "brown", "spoils_in": "12 hours", - "fatigue_mod": 9, + "sleepiness_mod": 9, "stim": 3, "container": "jug_plastic", "comestible_type": "DRINK", @@ -1386,7 +1386,7 @@ "name": { "str_sp": "black tea" }, "weight": "250 g", "color": "brown", - "fatigue_mod": 9, + "sleepiness_mod": 9, "stim": 3, "container": "bottle_plastic", "comestible_type": "DRINK", @@ -1410,7 +1410,7 @@ "name": { "str_sp": "willowbark tea" }, "comestible_type": "MED", "healthy": -1, - "fatigue_mod": 0, + "sleepiness_mod": 0, "stim": 0, "calories": 0, "description": "A bitter tea made by boiling willow bark in water, used since ancient times as a mild painkiller.", @@ -1521,7 +1521,7 @@ "name": { "str_sp": "green tea" }, "copy-from": "tea", "color": "green", - "fatigue_mod": 7, + "sleepiness_mod": 7, "stim": 2, "description": "Made from applying hot water to leaves of the tea plant \"Camellia sinensis\". Green tea has a lighter, fresher taste than black and is traditionally preferred in Asian cultures." }, @@ -1531,7 +1531,7 @@ "name": { "str_sp": "fruit tea" }, "copy-from": "tea", "color": "red", - "fatigue_mod": 0, + "sleepiness_mod": 0, "stim": 0, "description": "A tasty beverage made with herbs and dried fruit from plants other than the tea plant. While colloquially called 'tea', technically it's an infusion.", "fun": 8 @@ -1720,7 +1720,7 @@ "weight": "250 g", "color": "light_cyan", "addiction_type": "caffeine", - "fatigue_mod": 24, + "sleepiness_mod": 24, "stim": 8, "container": "can_drink", "comestible_type": "DRINK", diff --git a/data/json/items/comestibles/drink_other.json b/data/json/items/comestibles/drink_other.json index b5d6150528cfb..09a382fbe0f97 100644 --- a/data/json/items/comestibles/drink_other.json +++ b/data/json/items/comestibles/drink_other.json @@ -322,7 +322,7 @@ "weight": "110 g", "color": "brown", "addiction_type": "caffeine", - "fatigue_mod": 24, + "sleepiness_mod": 24, "stim": 8, "container": "bottle_plastic", "sealed": false, diff --git a/data/json/items/comestibles/junkfood.json b/data/json/items/comestibles/junkfood.json index 9ad06398fcf08..8cc655ef41066 100644 --- a/data/json/items/comestibles/junkfood.json +++ b/data/json/items/comestibles/junkfood.json @@ -562,7 +562,7 @@ "color": "brown", "spoils_in": "360 days", "addiction_type": "caffeine", - "fatigue_mod": 30, + "sleepiness_mod": 30, "stim": 10, "container": "bag_plastic", "comestible_type": "FOOD", diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json index 8990b97297225..7bf5041b22527 100644 --- a/data/json/items/comestibles/med.json +++ b/data/json/items/comestibles/med.json @@ -289,7 +289,7 @@ "addiction_potential": 3, "addiction_type": "caffeine", "use_action": { "type": "consume_drug", "activation_message": "You take a caffeine pill." }, - "fatigue_mod": 9 + "sleepiness_mod": 9 }, { "id": "chaw", @@ -448,7 +448,7 @@ "weight": "61 g", "color": "brown", "addiction_type": "amphetamine", - "fatigue_mod": 60, + "sleepiness_mod": 60, "stim": 20, "container": "bottle_glass", "comestible_type": "DRINK", diff --git a/data/json/items/comestibles/other.json b/data/json/items/comestibles/other.json index 52074e64d769e..211e57a309f3c 100644 --- a/data/json/items/comestibles/other.json +++ b/data/json/items/comestibles/other.json @@ -951,7 +951,7 @@ "color": "brown", "addiction_type": "caffeine", "addiction_potential": 1, - "fatigue_mod": 24, + "sleepiness_mod": 24, "stim": 8, "container": "bag_plastic", "comestible_type": "FOOD", diff --git a/data/json/items/comestibles/raw_veggy.json b/data/json/items/comestibles/raw_veggy.json index 977354b2e96a8..27bca1246b3b8 100644 --- a/data/json/items/comestibles/raw_veggy.json +++ b/data/json/items/comestibles/raw_veggy.json @@ -800,7 +800,7 @@ "name": { "str_sp": "black tea leaves" }, "weight": "3 g", "color": "green", - "fatigue_mod": 3, + "sleepiness_mod": 3, "stim": 1, "container": "bag_plastic", "comestible_type": "FOOD", @@ -822,7 +822,7 @@ "name": { "str": "pile of wintergreen leaves", "str_pl": "piles of wintergreen leaves" }, "weight": "5 g", "color": "green", - "fatigue_mod": 3, + "sleepiness_mod": 3, "stim": 1, "container": "bag_plastic", "comestible_type": "FOOD", diff --git a/data/json/items/tool/science.json b/data/json/items/tool/science.json index 410e1c3115182..7190ee68c63db 100644 --- a/data/json/items/tool/science.json +++ b/data/json/items/tool/science.json @@ -1334,7 +1334,7 @@ { "type": "VAR", "condition": "npctalk_var_mbt_f_function", - "value": "fatigue", + "value": "sleepiness", "name": { "str_sp": "%s (wake up)" } } ], @@ -1374,7 +1374,7 @@ "npc_add_var": "function", "type": "mbt", "context": "f", - "possible_values": [ "morale", "focus", "pain", "fatigue" ] + "possible_values": [ "morale", "focus", "pain", "sleepiness" ] } ] }, @@ -1406,9 +1406,9 @@ "effect": [ { "u_message": "You feel your aches and pains fade away!" }, { "math": [ "u_pain()", "-=", "30" ] } ] }, { - "id": "EOC_MIGO_BIO_TECH_FATIGUE", - "condition": { "npc_has_var": "function", "type": "mbt", "context": "f", "value": "fatigue" }, - "effect": [ { "u_message": "You instantly feel more awake!" }, { "math": [ "u_val('fatigue')", "-=", "30" ] } ] + "id": "EOC_MIGO_BIO_TECH_SLEEPINESS", + "condition": { "npc_has_var": "function", "type": "mbt", "context": "f", "value": "sleepiness" }, + "effect": [ { "u_message": "You instantly feel more awake!" }, { "math": [ "u_val('sleepiness')", "-=", "30" ] } ] } ] } diff --git a/data/json/mapgen/lab/lab_floorplans_finale1level.json b/data/json/mapgen/lab/lab_floorplans_finale1level.json index 02b4c0f53e515..36ac8fd6da145 100644 --- a/data/json/mapgen/lab/lab_floorplans_finale1level.json +++ b/data/json/mapgen/lab/lab_floorplans_finale1level.json @@ -168,7 +168,7 @@ ], "palettes": [ "lab_palette", "lab_loot_research" ], "furniture": { "C": "f_machinery_electronic", "R": "f_rack", "D": "f_desk" }, - "fields": { "Q": { "field": "fd_fatigue", "intensity": 3 } }, + "fields": { "Q": { "field": "fd_sleepiness", "intensity": 3 } }, "terrain": { "r": "t_metal_floor", "Y": "t_thconc_floor_olight", "p": "t_metal_floor" }, "mapping": { "R": { "item": [ { "item": "dimensional_anchor" }, { "item": "phase_immersion_suit" } ] }, diff --git a/data/json/mapgen/mi-go/mi-go_portal.json b/data/json/mapgen/mi-go/mi-go_portal.json index de2c84b6c6b38..3242f2c4c9c46 100644 --- a/data/json/mapgen/mi-go/mi-go_portal.json +++ b/data/json/mapgen/mi-go/mi-go_portal.json @@ -46,7 +46,7 @@ [ "f_null", 90 ] ] }, - "fields": { "P": { "field": "fd_fatigue", "intensity": 1, "age": 10 } }, + "fields": { "P": { "field": "fd_sleepiness", "intensity": 1, "age": 10 } }, "place_monsters": [ { "monster": "GROUP_MI-GO_BASE_COMMON", "density": 0.1, "x": 8, "y": 10 } ], "nested": { "1": { diff --git a/data/json/mapgen/microlab/microlab_special_tiles.json b/data/json/mapgen/microlab/microlab_special_tiles.json index ec6ff34d48e75..be1e37d5344f4 100644 --- a/data/json/mapgen/microlab/microlab_special_tiles.json +++ b/data/json/mapgen/microlab/microlab_special_tiles.json @@ -252,7 +252,7 @@ "palettes": [ "microlab" ], "terrain": { "G": "t_card_science", "9": "t_reinforced_glass_shutter" }, "furniture": { "t": "f_counter", "p": "f_counter", "M": "f_server", "A": "f_xedra_antenna", "D": "f_desk" }, - "fields": { "Q": { "field": "fd_fatigue", "intensity": 3 } }, + "fields": { "Q": { "field": "fd_sleepiness", "intensity": 3 } }, "item": { "D": [ { "item": "artifact_scp_doc", "chance": 30 }, { "item": "monitoring_equipment_doc", "chance": 30 } ], "m": { "item": "xedra_microphone", "chance": 90 }, diff --git a/data/json/mapgen_palettes/nether_monster_palette.json b/data/json/mapgen_palettes/nether_monster_palette.json index b980a5edd93db..33c635d4b14c9 100644 --- a/data/json/mapgen_palettes/nether_monster_palette.json +++ b/data/json/mapgen_palettes/nether_monster_palette.json @@ -22,6 +22,6 @@ "Z": "f_nm_nether_lichen" }, "traps": { "P": "tr_portal" }, - "fields": { "q": { "field": "fd_fatigue", "intensity": 1 }, "Q": { "field": "fd_fatigue", "intensity": 2 } } + "fields": { "q": { "field": "fd_sleepiness", "intensity": 1 }, "Q": { "field": "fd_sleepiness", "intensity": 2 } } } ] diff --git a/data/json/monster_special_attacks/monster_deaths.json b/data/json/monster_special_attacks/monster_deaths.json index 4edd9701cccd1..b79d3d0a52950 100644 --- a/data/json/monster_special_attacks/monster_deaths.json +++ b/data/json/monster_special_attacks/monster_deaths.json @@ -69,7 +69,7 @@ "shape": "blast", "effect": "attack", "max_level": 2, - "field_id": "fd_fatigue", + "field_id": "fd_sleepiness", "field_chance": 1, "min_field_intensity": 1, "field_intensity_increment": 1, diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index b5ebc16c23d01..1192187fde0c0 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -578,7 +578,7 @@ "id": "EOC_shifting_mass_attack", "condition": { "not": { "u_has_worn_with_flag": "PORTAL_PROOF" } }, "effect": [ - { "math": [ "u_val('fatigue')", "=", "min(u_val('fatigue') + ps_str + 20, 1200)" ] }, + { "math": [ "u_val('sleepiness')", "=", "min(u_val('sleepiness') + ps_str + 20, 1200)" ] }, { "math": [ "u_val('stamina')", "*=", "ps_str + 50" ] }, { "math": [ "u_sleep_deprivation", "+=", "time('1 minutes')" ] } ] @@ -797,7 +797,7 @@ "case": 0, "effect": [ { "u_message": "Your reflection feasts directly on your essence." }, - { "math": [ "u_val('fatigue')", "=", "min(u_val('fatigue') + portal_dungeon_reflect_strength, 1200)" ] }, + { "math": [ "u_val('sleepiness')", "=", "min(u_val('sleepiness') + portal_dungeon_reflect_strength, 1200)" ] }, { "math": [ "portal_dungeon_reflect_strength", "+=", "3" ] } ] }, @@ -805,7 +805,7 @@ "case": 2, "effect": [ { "u_message": "Your reflection uses your bond to feast on your essence." }, - { "math": [ "u_val('fatigue')", "=", "min(u_val('fatigue') + portal_dungeon_reflect_strength, 1200)" ] }, + { "math": [ "u_val('sleepiness')", "=", "min(u_val('sleepiness') + portal_dungeon_reflect_strength, 1200)" ] }, { "math": [ "portal_dungeon_reflect_strength", "++" ] } ] }, diff --git a/data/json/monstergroups/nether.json b/data/json/monstergroups/nether.json index df3dedc96c1a9..6042bc4c1884c 100644 --- a/data/json/monstergroups/nether.json +++ b/data/json/monstergroups/nether.json @@ -24,7 +24,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_FATIGUE_FIELD", + "name": "GROUP_NETHER_SLEEPINESS_FIELD", "default": "mon_blank", "monsters": [ { "monster": "mon_flying_polyp", "weight": 100, "cost_multiplier": 0 }, diff --git a/data/json/mutations/mutations.json b/data/json/mutations/mutations.json index d252de334cbcc..23913984c0463 100644 --- a/data/json/mutations/mutations.json +++ b/data/json/mutations/mutations.json @@ -1047,7 +1047,7 @@ "active": true, "cost": 90, "time": "10 s", - "fatigue": true, + "sleepiness": true, "kcal": true, "thirst": true, "dodge_modifier": 2, @@ -1063,7 +1063,7 @@ "types": [ "SLEEP" ], "starting_trait": true, "category": [ "ALPHA", "ELFA", "PLANT", "BATRACHIAN" ], - "fatigue_modifier": -0.15 + "sleepiness_modifier": -0.15 }, { "type": "mutation", @@ -1458,8 +1458,8 @@ "starting_trait": true, "types": [ "SLEEP" ], "category": [ "BEAST", "CHIMERA", "MOUSE", "RABBIT", "FELINE", "RAT" ], - "fatigue_modifier": 0.333, - "fatigue_regen_modifier": 0.333 + "sleepiness_modifier": 0.333, + "sleepiness_regen_modifier": 0.333 }, { "type": "mutation", @@ -2345,7 +2345,7 @@ "changes_to": [ "WAKEFUL3" ], "threshreq": [ "THRESH_ALPHA", "THRESH_ELFA", "THRESH_BATRACHIAN" ], "category": [ "ALPHA", "ELFA", "BATRACHIAN" ], - "fatigue_modifier": -0.25 + "sleepiness_modifier": -0.25 }, { "type": "mutation", @@ -2358,8 +2358,8 @@ "prereqs": [ "WAKEFUL2" ], "threshreq": [ "THRESH_ELFA" ], "category": [ "ELFA" ], - "fatigue_modifier": -0.5, - "fatigue_regen_modifier": 0.5 + "sleepiness_modifier": -0.5, + "sleepiness_regen_modifier": 0.5 }, { "type": "mutation", @@ -3673,7 +3673,7 @@ "cost": 90, "kcal": true, "thirst": true, - "fatigue": true + "sleepiness": true }, { "type": "mutation", @@ -3691,7 +3691,7 @@ "cost": 90, "kcal": true, "thirst": true, - "fatigue": true + "sleepiness": true }, { "type": "mutation", @@ -5715,7 +5715,7 @@ "category": [ "URSINE", "CATTLE", "CRUSTACEAN" ], "passive_mods": { "str_mod": 4 }, "hp_adjustment": -6, - "fatigue_modifier": 0.15, + "sleepiness_modifier": 0.15, "restricts_gear": [ "torso", "leg_l", "leg_r", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r" ], "destroys_gear": true, "stomach_size_multiplier": 2.0, @@ -6785,7 +6785,7 @@ "types": [ "METABOLISM" ], "changes_to": [ "PERSISTENCE_HUNTER2" ], "category": [ "LUPINE" ], - "fatigue_modifier": -0.1, + "sleepiness_modifier": -0.1, "stamina_regen_modifier": 0.1 }, { @@ -6798,7 +6798,7 @@ "prereqs": [ "PERSISTENCE_HUNTER" ], "threshreq": [ "THRESH_LUPINE" ], "category": [ "LUPINE" ], - "fatigue_modifier": -0.2, + "sleepiness_modifier": -0.2, "stamina_regen_modifier": 0.2 }, { @@ -6826,8 +6826,8 @@ "category": [ "RAT", "MOUSE", "RABBIT" ], "healing_awake": 0.133, "healing_multiplier": 1.5, - "fatigue_modifier": 0.5, - "fatigue_regen_modifier": 0.333, + "sleepiness_modifier": 0.5, + "sleepiness_regen_modifier": 0.333, "metabolism_modifier": 0.333 }, { @@ -6922,7 +6922,7 @@ "prereqs": [ "SLEEPY" ], "types": [ "SLEEP" ], "category": [ "FELINE" ], - "fatigue_modifier": 1.0 + "sleepiness_modifier": 1.0 }, { "type": "mutation", diff --git a/data/json/npcs/TALK_ALLY_TUTORIAL.json b/data/json/npcs/TALK_ALLY_TUTORIAL.json index 21cb7c62e1ed6..39a8812ddccb8 100644 --- a/data/json/npcs/TALK_ALLY_TUTORIAL.json +++ b/data/json/npcs/TALK_ALLY_TUTORIAL.json @@ -14,7 +14,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, { "npc_has_effect": "asked_to_hint" }, "u_driving", "npc_driving" diff --git a/data/json/npcs/TALK_TEST.json b/data/json/npcs/TALK_TEST.json index 01ace39e1b56f..cab58a8d623a1 100644 --- a/data/json/npcs/TALK_TEST.json +++ b/data/json/npcs/TALK_TEST.json @@ -238,9 +238,9 @@ "condition": { "npc_need": "hunger", "amount": 75 } }, { - "text": "This is a npc fatigue test response.", + "text": "This is a npc sleepiness test response.", "topic": "TALK_DONE", - "condition": { "npc_need": "fatigue", "level": "DEAD_TIRED" } + "condition": { "npc_need": "sleepiness", "level": "DEAD_TIRED" } } ] }, diff --git a/data/json/npcs/common_chat/TALK_COMMON_ALLY.json b/data/json/npcs/common_chat/TALK_COMMON_ALLY.json index f3e329c9ef7ce..c2f99bbef60d8 100644 --- a/data/json/npcs/common_chat/TALK_COMMON_ALLY.json +++ b/data/json/npcs/common_chat/TALK_COMMON_ALLY.json @@ -5,13 +5,13 @@ "dynamic_line": { "npc_has_effect": "sleep", "yes": { - "npc_need": "fatigue", + "npc_need": "sleepiness", "level": "EXHAUSTED", "no": { - "npc_need": "fatigue", + "npc_need": "sleepiness", "level": "DEAD_TIRED", "no": { - "npc_need": "fatigue", + "npc_need": "sleepiness", "level": "TIRED", "no": "Just few minutes more…", "yes": "Make it quick, I want to go back to sleep." @@ -134,7 +134,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, { "npc_has_effect": "asked_to_train" }, { "npc_has_trait": "HALLUCINATION" }, "u_driving", @@ -154,7 +154,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, { "npc_has_effect": "asked_to_train" }, "u_driving", "npc_driving" diff --git a/data/json/npcs/common_chat/TALK_COMMON_OTHER.json b/data/json/npcs/common_chat/TALK_COMMON_OTHER.json index 54d3f3b1e4e85..910c1c2b50224 100644 --- a/data/json/npcs/common_chat/TALK_COMMON_OTHER.json +++ b/data/json/npcs/common_chat/TALK_COMMON_OTHER.json @@ -56,7 +56,7 @@ "npc_need": "hunger", "amount": 160, "no": { - "npc_need": "fatigue", + "npc_need": "sleepiness", "level": "TIRED", "no": { "npc_has_effect": "asked_to_hint", @@ -306,7 +306,7 @@ "npc_need": "hunger", "amount": 160, "no": { - "npc_need": "fatigue", + "npc_need": "sleepiness", "level": "TIRED", "no": { "npc_has_effect": "asked_to_train", @@ -337,7 +337,7 @@ "npc_need": "hunger", "amount": 160, "no": { - "npc_need": "fatigue", + "npc_need": "sleepiness", "level": "TIRED", "no": { "npc_has_effect": "asked_to_train", diff --git a/data/json/npcs/your_followers/liam_main_dialogue.json b/data/json/npcs/your_followers/liam_main_dialogue.json index cb0cb6af22634..9268c88cdcfcf 100644 --- a/data/json/npcs/your_followers/liam_main_dialogue.json +++ b/data/json/npcs/your_followers/liam_main_dialogue.json @@ -87,7 +87,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, { "npc_has_effect": "asked_to_train" }, { "npc_has_trait": "HALLUCINATION" }, "u_driving", @@ -107,7 +107,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, { "npc_has_effect": "asked_to_train" }, "u_driving", "npc_driving" diff --git a/data/json/npcs/your_followers/luo_follower.json b/data/json/npcs/your_followers/luo_follower.json index 0e7b4ee3f246d..9d5edd512b931 100644 --- a/data/json/npcs/your_followers/luo_follower.json +++ b/data/json/npcs/your_followers/luo_follower.json @@ -83,7 +83,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, { "npc_has_effect": "asked_to_train" }, { "npc_has_trait": "HALLUCINATION" }, "u_driving", @@ -103,7 +103,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, { "npc_has_effect": "asked_to_train" }, "u_driving", "npc_driving" diff --git a/data/json/ui/fatigue.json b/data/json/ui/fatigue.json index c5457a0d32d83..a7e9ca5d694c4 100644 --- a/data/json/ui/fatigue.json +++ b/data/json/ui/fatigue.json @@ -1,6 +1,6 @@ [ { - "id": "fatigue_desc_template", + "id": "sleepiness_desc_template", "type": "widget", "style": "clause", "clauses": [ @@ -8,34 +8,34 @@ "id": "tired", "text": "Tired", "color": "yellow", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "191" ] }, { "math": [ "u_val('fatigue')", "<", "383" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "191" ] }, { "math": [ "u_val('sleepiness')", "<", "383" ] } ] } }, { "id": "dead_tired", "text": "Dead Tired", "color": "light_red", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "383" ] }, { "math": [ "u_val('fatigue')", "<", "575" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "383" ] }, { "math": [ "u_val('sleepiness')", "<", "575" ] } ] } }, { "id": "exhausted", "text": "Exhausted", "color": "red", - "condition": { "math": [ "u_val('fatigue')", ">=", "575" ] } + "condition": { "math": [ "u_val('sleepiness')", ">=", "575" ] } } ] }, { - "id": "fatigue_num", + "id": "sleepiness_num", "type": "widget", "label": "Fatigue", - "var": "fatigue", + "var": "sleepiness", "style": "number" }, { - "id": "fatigue_graph", + "id": "sleepiness_graph", "type": "widget", "label": "Fatig", - "var": "fatigue", + "var": "sleepiness", "style": "graph", "fill": "bucket", "width": 5, @@ -43,16 +43,16 @@ "colors": [ "c_green", "c_yellow", "c_red" ] }, { - "id": "fatigue_desc_label", + "id": "sleepiness_desc_label", "type": "widget", "label": "Rest", "style": "text", - "copy-from": "fatigue_desc_template" + "copy-from": "sleepiness_desc_template" }, { - "id": "fatigue_desc_no_label", + "id": "sleepiness_desc_no_label", "type": "widget", - "copy-from": "fatigue_desc_label", + "copy-from": "sleepiness_desc_label", "flags": [ "W_LABEL_NONE" ] } ] diff --git a/data/json/ui/layout.json b/data/json/ui/layout.json index d5d2a460df45c..c280dd8a1a6e6 100644 --- a/data/json/ui/layout.json +++ b/data/json/ui/layout.json @@ -1,11 +1,11 @@ [ { - "id": "stamina_fatigue_layout", + "id": "stamina_sleepiness_layout", "type": "widget", "style": "layout", "label": "Stamina/Fatigue", "arrange": "columns", - "widgets": [ "stamina_graph", "fatigue_graph" ] + "widgets": [ "stamina_graph", "sleepiness_graph" ] }, { "id": "stats_narrow_layout", @@ -41,7 +41,7 @@ "hunger_desc_label", "thirst_desc_label", "weight_desc_label", - "fatigue_desc_label", + "sleepiness_desc_label", "pain_desc_label", "body_temp_desc_label" ] @@ -56,7 +56,7 @@ "hunger_desc_label", "thirst_desc_label", "weight_desc_label", - "fatigue_desc_label", + "sleepiness_desc_label", "pain_num_label", "body_temp_desc_label" ], @@ -72,7 +72,7 @@ "hunger_desc_no_label", "thirst_desc_no_label", "weight_desc_no_label", - "fatigue_desc_no_label", + "sleepiness_desc_no_label", "pain_desc_no_label", "body_temp_desc_no_label" ] @@ -110,12 +110,12 @@ "widgets": [ "mood_desc_label", "focus_num" ] }, { - "id": "stamina_fatigue_focus_layout", + "id": "stamina_sleepiness_focus_layout", "type": "widget", "style": "layout", "label": "Stamina/Fatigue/Focus", "arrange": "columns", - "widgets": [ "stamina_graph_classic", "fatigue_graph", "focus_num" ] + "widgets": [ "stamina_graph_classic", "sleepiness_graph", "focus_num" ] }, { "id": "move_speed_layout", @@ -192,12 +192,12 @@ "flags": [ "W_DISABLED_BY_DEFAULT" ] }, { - "id": "sound_fatigue_focus_layout", + "id": "sound_sleepiness_focus_layout", "type": "widget", "style": "layout", "label": "Sound/Fatigue/Focus", "arrange": "columns", - "widgets": [ "sound_num", "fatigue_graph", "focus_num" ] + "widgets": [ "sound_num", "sleepiness_graph", "focus_num" ] }, { "id": "sound_focus_layout", diff --git a/data/json/ui/sidebar-legacy-classic.json b/data/json/ui/sidebar-legacy-classic.json index e3387c5ebd0d9..5f0a83c2b5761 100644 --- a/data/json/ui/sidebar-legacy-classic.json +++ b/data/json/ui/sidebar-legacy-classic.json @@ -42,7 +42,7 @@ "pain_desc_no_label", "hunger_desc_no_label", "thirst_desc_no_label", - "fatigue_desc_no_label", + "sleepiness_desc_no_label", "body_temp_desc_no_label" ] }, @@ -53,7 +53,7 @@ "arrange": "rows", "width": 12, "//": "TODO - It is not currently possible to conditionally swap out widgets on the fly. When this is added, vehicle speed should replace speed when driving.", - "widgets": [ "pain_num_label", "hunger_desc_no_label", "thirst_desc_no_label", "fatigue_desc_no_label", "body_temp_desc_no_label" ] + "widgets": [ "pain_num_label", "hunger_desc_no_label", "thirst_desc_no_label", "sleepiness_desc_no_label", "body_temp_desc_no_label" ] }, { "id": "lcla_mood_desc", diff --git a/data/json/ui/sidebar-legacy-compact.json b/data/json/ui/sidebar-legacy-compact.json index 38bcabb3b1d08..09748f164b2db 100644 --- a/data/json/ui/sidebar-legacy-compact.json +++ b/data/json/ui/sidebar-legacy-compact.json @@ -169,7 +169,7 @@ "type": "widget", "style": "layout", "arrange": "rows", - "widgets": [ "hunger_desc_no_label", "thirst_desc_no_label", "fatigue_desc_no_label" ] + "widgets": [ "hunger_desc_no_label", "thirst_desc_no_label", "sleepiness_desc_no_label" ] }, { "id": "lcom_needs_right_layout", diff --git a/data/json/ui/sidebar-legacy-labels-narrow.json b/data/json/ui/sidebar-legacy-labels-narrow.json index e0d7d422b8cf7..2244973f20700 100644 --- a/data/json/ui/sidebar-legacy-labels-narrow.json +++ b/data/json/ui/sidebar-legacy-labels-narrow.json @@ -146,7 +146,7 @@ "style": "layout", "label": "Needs", "arrange": "rows", - "widgets": [ "hunger_desc_label", "thirst_desc_label", "fatigue_desc_label", "pain_desc_label", "body_temp_desc_label" ] + "widgets": [ "hunger_desc_label", "thirst_desc_label", "sleepiness_desc_label", "pain_desc_label", "body_temp_desc_label" ] }, { "id": "ln_needs_sa_layout", @@ -154,7 +154,7 @@ "style": "layout", "label": "Needs (self-aware)", "arrange": "rows", - "widgets": [ "hunger_desc_label", "thirst_desc_label", "fatigue_desc_label", "pain_num_label", "body_temp_desc_label" ] + "widgets": [ "hunger_desc_label", "thirst_desc_label", "sleepiness_desc_label", "pain_num_label", "body_temp_desc_label" ] }, { "id": "legacy_labels_narrow_sidebar", diff --git a/data/json/ui/sidebar-legacy-labels.json b/data/json/ui/sidebar-legacy-labels.json index 6aa870d033b75..3ff4b4bbb256e 100644 --- a/data/json/ui/sidebar-legacy-labels.json +++ b/data/json/ui/sidebar-legacy-labels.json @@ -121,7 +121,7 @@ "type": "widget", "style": "layout", "arrange": "columns", - "widgets": [ "fatigue_desc_label", "hunger_desc_label" ] + "widgets": [ "sleepiness_desc_label", "hunger_desc_label" ] }, { "id": "ll_heat_weight_desc_layout", diff --git a/data/json/ui/sidebar-mobile.json b/data/json/ui/sidebar-mobile.json index e3d674a3be9cb..d3d0c0836e465 100644 --- a/data/json/ui/sidebar-mobile.json +++ b/data/json/ui/sidebar-mobile.json @@ -1903,7 +1903,7 @@ "id": "i_rest_graph", "width": 4, "copy-from": "t_horiz_graph", - "var": "fatigue", + "var": "sleepiness", "colors": [ "h_light_gray", "h_light_red" ], "type": "widget" }, diff --git a/data/json/ui/sidebar-thick-cleaner.json b/data/json/ui/sidebar-thick-cleaner.json index a0d600c89d497..6cf2b6816672b 100644 --- a/data/json/ui/sidebar-thick-cleaner.json +++ b/data/json/ui/sidebar-thick-cleaner.json @@ -111,7 +111,7 @@ "type": "widget", "style": "layout", "arrange": "columns", - "widgets": [ "weariness_desc", "fatigue_desc_label" ] + "widgets": [ "weariness_desc", "sleepiness_desc_label" ] }, { "id": "needs_layout_cleaner", diff --git a/data/json/ui/spacebar/spacebar_body_and_health_block.json b/data/json/ui/spacebar/spacebar_body_and_health_block.json index d85edfce35773..202ac497b5c31 100644 --- a/data/json/ui/spacebar/spacebar_body_and_health_block.json +++ b/data/json/ui/spacebar/spacebar_body_and_health_block.json @@ -493,7 +493,7 @@ "widgets": [ "hunger_desc_label", "thirst_desc_label", - "fatigue_desc_label", + "sleepiness_desc_label", "body_temp_desc_label", "power_short_desc", "pain_desc_label" @@ -508,7 +508,7 @@ "widgets": [ "hunger_desc_label", "thirst_desc_label", - "fatigue_desc_label", + "sleepiness_desc_label", "body_temp_desc_label", "power_short_desc", "pain_num_label" diff --git a/data/json/ui/structured/structured_health_blocks.json b/data/json/ui/structured/structured_health_blocks.json index b93efbbe0fdab..6d0c183f108de 100644 --- a/data/json/ui/structured/structured_health_blocks.json +++ b/data/json/ui/structured/structured_health_blocks.json @@ -210,7 +210,7 @@ "pain_desc_no_label", "hunger_desc_no_label", "thirst_desc_no_label", - "fatigue_desc_no_label", + "sleepiness_desc_no_label", "body_temp_desc_no_label", "structured_temp_radiation_layout", "structured_focus_mood_layout" @@ -238,7 +238,7 @@ "pain_num_label", "hunger_desc_no_label", "thirst_desc_no_label", - "fatigue_desc_no_label", + "sleepiness_desc_no_label", "body_temp_desc_no_label", "structured_temp_radiation_layout", "structured_focus_mood_layout" diff --git a/data/json/ui/zenfs/complete_health_panel.json b/data/json/ui/zenfs/complete_health_panel.json index 227f9dc3a6354..70a06f3db63ab 100644 --- a/data/json/ui/zenfs/complete_health_panel.json +++ b/data/json/ui/zenfs/complete_health_panel.json @@ -32,14 +32,14 @@ "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_stamina_carrywt_malus", "zenfs_fatigue_weariness_activity", "zenfs_pain_power_mana" ] + "widgets": [ "zenfs_stamina_carrywt_malus", "zenfs_sleepiness_weariness_activity", "zenfs_pain_power_mana" ] }, { "id": "zenfs_physical_num_block", "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_num_stamina_carrywt_malus", "zenfs_num_fatigue_weariness_activity", "zenfs_num_pain_power_mana" ], + "widgets": [ "zenfs_num_stamina_carrywt_malus", "zenfs_num_sleepiness_weariness_activity", "zenfs_num_pain_power_mana" ], "padding": 5 }, { @@ -168,7 +168,7 @@ "zenfs_pain_bar_15", "zenfs_carry_weight_bar_12", "zenfs_stamina_bar_12", - "zenfs_fatigue_bar", + "zenfs_sleepiness_bar", "zenfs_weariness_bar_10", "zenfs_activity_desc", "zenfs_weariness_trans_malus" @@ -183,7 +183,7 @@ "widgets": [ "zenfs_pain_num", "zenfs_stamina_num", - "zenfs_fatigue_num", + "zenfs_sleepiness_num", "zenfs_weariness_num", "zenfs_weariness_trans_malus_num", "zenfs_activity_desc_no_label_12", @@ -239,12 +239,12 @@ "widgets": [ "zenfs_stamina_bar_14", "zenfs_carry_weight_bar_14", "zenfs_weariness_trans_malus_alt" ] }, { - "id": "zenfs_fatigue_weariness_activity", + "id": "zenfs_sleepiness_weariness_activity", "type": "widget", "style": "layout", "arrange": "rows", "width": 20, - "widgets": [ "zenfs_fatigue_bar", "zenfs_weariness_bar_10", "zenfs_activity_desc" ] + "widgets": [ "zenfs_sleepiness_bar", "zenfs_weariness_bar_10", "zenfs_activity_desc" ] }, { "id": "zenfs_pain_power_mana", @@ -263,12 +263,12 @@ "widgets": [ "zenfs_stamina_num", "zenfs_carry_weight_num", "zenfs_weariness_trans_malus_num_alt" ] }, { - "id": "zenfs_num_fatigue_weariness_activity", + "id": "zenfs_num_sleepiness_weariness_activity", "type": "widget", "style": "layout", "arrange": "rows", "width": 12, - "widgets": [ "zenfs_fatigue_num", "zenfs_activity_desc_no_label_12", "zenfs_weariness_num" ] + "widgets": [ "zenfs_sleepiness_num", "zenfs_activity_desc_no_label_12", "zenfs_weariness_num" ] }, { "id": "zenfs_num_pain_power_mana", diff --git a/data/json/ui/zenfs/health.json b/data/json/ui/zenfs/health.json index 750c3acc5a38a..5daee4ab209e2 100644 --- a/data/json/ui/zenfs/health.json +++ b/data/json/ui/zenfs/health.json @@ -38,18 +38,18 @@ "padding": 0 }, { - "id": "zenfs_fatigue_bar", + "id": "zenfs_sleepiness_bar", "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_fatigue_bar_label", "zenfs_fatigue_bar_12" ] + "widgets": [ "zenfs_sleepiness_bar_label", "zenfs_sleepiness_bar_12" ] }, { - "id": "zenfs_fatigue_num", + "id": "zenfs_sleepiness_num", "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_fatigue_bar_label", "zenfs_fatigue_num_no_label" ], + "widgets": [ "zenfs_sleepiness_bar_label", "zenfs_sleepiness_num_no_label" ], "padding": 0 }, { @@ -129,18 +129,18 @@ "padding": 0 }, { - "id": "zenfs_fatigue_bar_template", + "id": "zenfs_sleepiness_bar_template", "type": "widget", - "var": "fatigue", + "var": "sleepiness", "style": "graph", "fill": "pool", "symbols": "·−=≡≣", "colors": [ "c_dark_gray", "c_green", "c_light_green", "c_yellow", "c_light_red", "c_red" ] }, { - "id": "zenfs_fatigue_num_no_label", + "id": "zenfs_sleepiness_num_no_label", "type": "widget", - "var": "fatigue", + "var": "sleepiness", "style": "number", "colors": [ "c_dark_gray", "c_green", "c_light_green", "c_yellow", "c_light_red", "c_red" ], "text_align": "right", @@ -148,9 +148,9 @@ "padding": 0 }, { - "id": "zenfs_fatigue_bar_12", + "id": "zenfs_sleepiness_bar_12", "type": "widget", - "copy-from": "zenfs_fatigue_bar_template", + "copy-from": "zenfs_sleepiness_bar_template", "width": 12 }, { @@ -220,7 +220,7 @@ ] }, { - "id": "zenfs_fatigue_bar_label", + "id": "zenfs_sleepiness_bar_label", "type": "widget", "style": "text", "width": 7, @@ -229,30 +229,30 @@ "id": "label_normal", "text": "Fatigue", "color": "c_brown", - "condition": { "math": [ "u_val('fatigue')", "<", "191" ] } + "condition": { "math": [ "u_val('sleepiness')", "<", "191" ] } }, { "id": "label_tired", "text": "Fatigue", "color": "c_yellow", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "191" ] }, { "math": [ "u_val('fatigue')", "<", "383" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "191" ] }, { "math": [ "u_val('sleepiness')", "<", "383" ] } ] } }, { "id": "label_very_tired", "text": "Fatigue", "color": "c_light_red", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "383" ] }, { "math": [ "u_val('fatigue')", "<", "575" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "383" ] }, { "math": [ "u_val('sleepiness')", "<", "575" ] } ] } }, { "id": "label_exhausted", "text": "Fatigue", "color": "c_yellow_red", - "condition": { "math": [ "u_val('fatigue')", ">=", "575" ] } + "condition": { "math": [ "u_val('sleepiness')", ">=", "575" ] } } ] }, { - "id": "zenfs_fatigue_num_label", + "id": "zenfs_sleepiness_num_label", "type": "widget", "style": "text", "width": 5, @@ -261,25 +261,25 @@ "id": "label_normal", "text": "Fatig", "color": "c_brown", - "condition": { "math": [ "u_val('fatigue')", "<", "191" ] } + "condition": { "math": [ "u_val('sleepiness')", "<", "191" ] } }, { "id": "label_tired", "text": "Fatig", "color": "c_yellow", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "191" ] }, { "math": [ "u_val('fatigue')", "<", "383" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "191" ] }, { "math": [ "u_val('sleepiness')", "<", "383" ] } ] } }, { "id": "label_very_tired", "text": "Fatig", "color": "c_light_red", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "383" ] }, { "math": [ "u_val('fatigue')", "<", "575" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "383" ] }, { "math": [ "u_val('sleepiness')", "<", "575" ] } ] } }, { "id": "label_exhausted", "text": "Fatig", "color": "c_yellow_red", - "condition": { "math": [ "u_val('fatigue')", ">=", "575" ] } + "condition": { "math": [ "u_val('sleepiness')", ">=", "575" ] } } ] }, diff --git a/data/json/ui/zenfs/pain.json b/data/json/ui/zenfs/pain.json index 6551bd7220c61..d01d8a9ee8ad1 100644 --- a/data/json/ui/zenfs/pain.json +++ b/data/json/ui/zenfs/pain.json @@ -65,25 +65,25 @@ "id": "label_normal", "text": "Pain ", "color": "c_magenta", - "condition": { "math": [ "u_val('fatigue')", "<", "1000000" ] } + "condition": { "math": [ "u_val('sleepiness')", "<", "1000000" ] } }, { "id": "label_tired", "text": "Pain ", "color": "c_pink", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "1000000" ] }, { "math": [ "u_val('fatigue')", "<", "1000000" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "1000000" ] }, { "math": [ "u_val('sleepiness')", "<", "1000000" ] } ] } }, { "id": "label_very_tired", "text": "Pain ", "color": "c_light_red", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "1000000" ] }, { "math": [ "u_val('fatigue')", "<", "1000000" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "1000000" ] }, { "math": [ "u_val('sleepiness')", "<", "1000000" ] } ] } }, { "id": "label_exhausted", "text": "Pain ", "color": "c_pink_red", - "condition": { "math": [ "u_val('fatigue')", ">=", "1000000" ] } + "condition": { "math": [ "u_val('sleepiness')", ">=", "1000000" ] } } ] }, diff --git a/data/mods/Aftershock/maps/furniture.json b/data/mods/Aftershock/maps/furniture.json index 03c4668ce94c2..ae3cc94512832 100644 --- a/data/mods/Aftershock/maps/furniture.json +++ b/data/mods/Aftershock/maps/furniture.json @@ -415,7 +415,7 @@ "type": "furniture", "id": "f_translocator_buoy", "name": "translocator buoy", - "looks_like": "fd_fatigue", + "looks_like": "fd_sleepiness", "move_cost_mod": 0, "description": "A near undetectable spatial distortion field centered around a free floating golden mote. Examining it from up close would let you encode it for use with a translocation device.", "symbol": ",", diff --git a/data/mods/Aftershock/mutations/obsolete.json b/data/mods/Aftershock/mutations/obsolete.json index 45fa72096aab1..82a1e45a6e63c 100644 --- a/data/mods/Aftershock/mutations/obsolete.json +++ b/data/mods/Aftershock/mutations/obsolete.json @@ -227,7 +227,7 @@ "changes_to": [ "GIGANTIC_OK" ], "passive_mods": { "str_mod": 4 }, "hp_adjustment": -6, - "fatigue_modifier": 0.15, + "sleepiness_modifier": 0.15, "restricts_gear": [ "torso", "leg_l", "leg_r", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r" ], "destroys_gear": true, "weight_capacity_modifier": 1.1 @@ -287,8 +287,8 @@ "cancels": [ "LIGHTEATER", "COLDBLOOD", "COLDBLOOD2", "COLDBLOOD3", "COLDBLOOD4", "WAKEFUL", "WAKEFUL2", "WAKEFUL3" ], "prereqs": [ "HUNGER" ], "healing_multiplier": 0.25, - "fatigue_modifier": 0.75, - "fatigue_regen_modifier": 0.5, + "sleepiness_modifier": 0.75, + "sleepiness_regen_modifier": 0.5, "metabolism_modifier": 0.4 }, { diff --git a/data/mods/Aftershock/player/bionic_eocs.json b/data/mods/Aftershock/player/bionic_eocs.json index 982e567ef46ba..0964b41d98f5c 100644 --- a/data/mods/Aftershock/player/bionic_eocs.json +++ b/data/mods/Aftershock/player/bionic_eocs.json @@ -84,7 +84,7 @@ "id": "afs_eoc_hangover_healing", "effect": [ { "u_add_effect": "post_healing_injection", "duration": "6 hours", "target_part": "torso" }, - { "math": [ "u_val('fatigue')", "+=", "80" ] }, + { "math": [ "u_val('sleepiness')", "+=", "80" ] }, { "u_add_morale": "morale_afs_drugs", "bonus": -20, @@ -104,7 +104,7 @@ "id": "afs_eoc_hangover_strength", "effect": [ { "u_add_effect": "post_strength_injection", "duration": "6 hours" }, - { "math": [ "u_val('fatigue')", "+=", "80" ] }, + { "math": [ "u_val('sleepiness')", "+=", "80" ] }, { "u_add_morale": "morale_afs_drugs", "bonus": -20, diff --git a/data/mods/Defense_Mode/effects_on_condition/backend_eocs.json b/data/mods/Defense_Mode/effects_on_condition/backend_eocs.json index 9af21de039092..b86d82bf84440 100644 --- a/data/mods/Defense_Mode/effects_on_condition/backend_eocs.json +++ b/data/mods/Defense_Mode/effects_on_condition/backend_eocs.json @@ -88,7 +88,7 @@ { "math": [ "u_val('pkill')", "=", "u_val('pkill')" ] }, { "math": [ "u_val('stim')", "=", "u_val('stim')" ] }, { "math": [ "u_pain()", "=", "0" ] }, - { "math": [ "u_val('fatigue')", "=", "0" ] }, + { "math": [ "u_val('sleepiness')", "=", "0" ] }, { "math": [ "u_val('stamina')", "=", "8500" ] }, { "math": [ "revivication_counter", "--" ] }, { "u_cast_spell": { "id": "remove_opponents" } }, diff --git a/data/mods/DinoMod/mapgen/DinoLabFinale.json b/data/mods/DinoMod/mapgen/DinoLabFinale.json index 11c57f2abe46c..54167ec94ba5e 100644 --- a/data/mods/DinoMod/mapgen/DinoLabFinale.json +++ b/data/mods/DinoMod/mapgen/DinoLabFinale.json @@ -115,7 +115,7 @@ ], "palettes": [ "lab_palette", "lab_loot_research" ], "furniture": { "C": "f_machinery_electronic", "R": "f_rack", "D": "f_desk" }, - "fields": { "Q": { "field": "fd_fatigue", "intensity": 3 } }, + "fields": { "Q": { "field": "fd_sleepiness", "intensity": 3 } }, "terrain": { "r": "t_metal_floor", "Y": "t_thconc_floor_olight", "p": "t_metal_floor", "z": "t_strconc_floor" }, "mapping": { "R": { "item": [ { "item": "dimensional_anchor" }, { "item": "phase_immersion_suit" } ] }, @@ -181,7 +181,7 @@ ], "palettes": [ "lab_palette", "lab_loot_research" ], "furniture": { "C": "f_machinery_electronic", "R": "f_rack", "D": "f_desk" }, - "fields": { "Q": { "field": "fd_fatigue", "intensity": 3 } }, + "fields": { "Q": { "field": "fd_sleepiness", "intensity": 3 } }, "terrain": { "r": "t_metal_floor", "Y": "t_thconc_floor_olight", "p": "t_metal_floor", "~": "t_water_sh", "z": "t_water_sh" }, "mapping": { "R": { "item": [ { "item": "dimensional_anchor" }, { "item": "phase_immersion_suit" } ] }, diff --git a/data/mods/Limb_WIP/mod_integration/vitakinesis_eoc.json b/data/mods/Limb_WIP/mod_integration/vitakinesis_eoc.json index a6a1ad34acae5..12695cb3befdf 100644 --- a/data/mods/Limb_WIP/mod_integration/vitakinesis_eoc.json +++ b/data/mods/Limb_WIP/mod_integration/vitakinesis_eoc.json @@ -180,7 +180,7 @@ { "math": [ "u_vitamin('iron')", "-=", "rng( 1875,7500 )" ] }, { "math": [ "u_vitamin('calcium')", "-=", "rng( 3750,7500 )" ] }, { "math": [ "u_vitamin('vitC')", "-=", "rng( 750,3000 )" ] }, - { "math": [ "u_val('fatigue')", "+=", "rng( 75,375 )" ] } + { "math": [ "u_val('sleepiness')", "+=", "rng( 75,375 )" ] } ] } ] diff --git a/data/mods/Magiclysm/Spells/classless.json b/data/mods/Magiclysm/Spells/classless.json index 9fdb0dc01d1cf..0f22a7da777ec 100644 --- a/data/mods/Magiclysm/Spells/classless.json +++ b/data/mods/Magiclysm/Spells/classless.json @@ -82,7 +82,7 @@ "max_level": 1, "min_duration": 6000, "max_duration": 6000, - "//": "actual fatigue gained is 1/100th duration, at 6000 you get 60 fatigue." + "//": "actual sleepiness gained is 1/100th duration, at 6000 you get 60 sleepiness." }, { "id": "dark_sight", diff --git a/data/mods/Magiclysm/Spells/druid.json b/data/mods/Magiclysm/Spells/druid.json index dd1d05a245fdd..0b07feb5393b2 100644 --- a/data/mods/Magiclysm/Spells/druid.json +++ b/data/mods/Magiclysm/Spells/druid.json @@ -206,16 +206,16 @@ "max_duration": { "math": [ "( (u_spell_level('druid_naturebow1_plus') * 72000) + 360000)" ] } }, { - "id": "recover_fatigue", + "id": "recover_sleepiness", "type": "SPELL", "name": "Nature's Trance", - "description": "Your connection to living things allows you to go into a magical trance. This allows you to recover fatigue quickly in exchange for mana.", + "description": "Your connection to living things allows you to go into a magical trance. This allows you to recover from fatigue quickly in exchange for mana.", "valid_targets": [ "self" ], "flags": [ "CONCENTRATE", "SILENT", "NO_HANDS" ], "spell_class": "DRUID", "energy_source": "MANA", "effect": "recover_energy", - "effect_str": "FATIGUE", + "effect_str": "SLEEPINESS", "shape": "blast", "base_casting_time": 10000, "min_damage": 50, diff --git a/data/mods/Magiclysm/effects/effects.json b/data/mods/Magiclysm/effects/effects.json index 7e34f6a6f33cb..48b07e6efc48b 100644 --- a/data/mods/Magiclysm/effects/effects.json +++ b/data/mods/Magiclysm/effects/effects.json @@ -7,7 +7,7 @@ "apply_message": "Channeling so much mana is making you tired", "remove_message": "The burden of mana fatigue has faded", "rating": "bad", - "base_mods": { "fatigue_amount": [ 1 ], "fatigue_min": [ 1 ] } + "base_mods": { "sleepiness_amount": [ 1 ], "sleepiness_min": [ 1 ] } }, { "type": "effect_type", @@ -341,8 +341,8 @@ "rating": "bad", "max_duration": "1 m", "base_mods": { - "fatigue_min": [ 1 ], - "fatigue_chance": [ 5 ], + "sleepiness_min": [ 1 ], + "sleepiness_chance": [ 5 ], "health_min": [ -3 ], "health_chance": [ 5 ], "pain_min": [ 1 ], @@ -467,9 +467,9 @@ "apply_message": "You feel yourself move faster than a bullet.", "remove_message": "You feel yourself returning to your normal speed.", "base_mods": { - "fatigue_amount": [ 1 ], - "fatigue_min": [ 1 ], - "fatigue_tick": [ 3 ], + "sleepiness_amount": [ 1 ], + "sleepiness_min": [ 1 ], + "sleepiness_tick": [ 3 ], "speed_mod": [ 300 ], "per_mod": [ -4 ], "dex_mod": [ 8 ] diff --git a/data/mods/Magiclysm/itemgroups/itemgroups.json b/data/mods/Magiclysm/itemgroups/itemgroups.json index a1ddbd188654e..0582515993f3e 100644 --- a/data/mods/Magiclysm/itemgroups/itemgroups.json +++ b/data/mods/Magiclysm/itemgroups/itemgroups.json @@ -1303,7 +1303,7 @@ "distribution": [ { "item": "recovery_spellbook", "prob": 10 }, { "item": "plant_spellbook", "prob": 10 }, - { "item": "spell_scroll_recover_fatigue", "prob": 100 }, + { "item": "spell_scroll_recover_sleepiness", "prob": 100 }, { "item": "spell_scroll_druid_thornskin", "prob": 100 }, { "item": "spell_scroll_druidic_regrowth", "prob": 100 }, { "item": "spell_scroll_druidic_healing", "prob": 100 }, diff --git a/data/mods/Magiclysm/itemgroups/spellbooks.json b/data/mods/Magiclysm/itemgroups/spellbooks.json index 50eac521c79bd..183aeaba518b9 100644 --- a/data/mods/Magiclysm/itemgroups/spellbooks.json +++ b/data/mods/Magiclysm/itemgroups/spellbooks.json @@ -133,7 +133,7 @@ [ "spell_scroll_devour", 25 ], [ "spell_scroll_recover_mana", 25 ], [ "spell_scroll_recover_pain", 25 ], - [ "spell_scroll_recover_fatigue", 25 ], + [ "spell_scroll_recover_sleepiness", 25 ], [ "spell_scroll_recover_stamina", 25 ], [ "spell_scroll_recover_bionic_power", 25 ], [ "spell_scroll_summon_undead_swarm", 35 ], diff --git a/data/mods/Magiclysm/items/potion_fruits.json b/data/mods/Magiclysm/items/potion_fruits.json index 54313ec7eca63..4fd24a41cab7f 100644 --- a/data/mods/Magiclysm/items/potion_fruits.json +++ b/data/mods/Magiclysm/items/potion_fruits.json @@ -144,7 +144,7 @@ { "type": "effect_on_condition", "id": "EOC_POTION_FRUIT_ELDERBERRY", - "effect": [ { "math": [ "u_val('fatigue')", "-=", "25" ] } ] + "effect": [ { "math": [ "u_val('sleepiness')", "-=", "25" ] } ] }, { "type": "COMESTIBLE", diff --git a/data/mods/Magiclysm/items/spell_scrolls.json b/data/mods/Magiclysm/items/spell_scrolls.json index 66e5e3c9ee3ec..c580cef69ff39 100644 --- a/data/mods/Magiclysm/items/spell_scrolls.json +++ b/data/mods/Magiclysm/items/spell_scrolls.json @@ -328,11 +328,11 @@ { "type": "BOOK", "copy-from": "spell_scroll", - "id": "spell_scroll_recover_fatigue", + "id": "spell_scroll_recover_sleepiness", "//": "Druid spell", "name": { "str": "Scroll of Nature's Trance", "str_pl": "Scrolls of Nature's Trance" }, - "description": "Your connection to living things allows you to go into a magical trance. This allows you to recover fatigue quickly in exchange for mana.", - "use_action": { "type": "learn_spell", "spells": [ "recover_fatigue" ] } + "description": "Your connection to living things allows you to go into a magical trance. This allows you to recover from fatigue quickly in exchange for mana.", + "use_action": { "type": "learn_spell", "spells": [ "recover_sleepiness" ] } }, { "type": "BOOK", diff --git a/data/mods/Magiclysm/items/spellbooks.json b/data/mods/Magiclysm/items/spellbooks.json index a5aa60be0f5e0..7c9231bd2d24d 100644 --- a/data/mods/Magiclysm/items/spellbooks.json +++ b/data/mods/Magiclysm/items/spellbooks.json @@ -393,7 +393,7 @@ "recover_mana", "recover_bionic_power", "recover_pain", - "recover_fatigue", + "recover_sleepiness", "recover_stamina", "druid_healing", "convert" diff --git a/data/mods/Magiclysm/mutations/fantasy_species.json b/data/mods/Magiclysm/mutations/fantasy_species.json index 62a12097d5b03..be42df857d2b6 100644 --- a/data/mods/Magiclysm/mutations/fantasy_species.json +++ b/data/mods/Magiclysm/mutations/fantasy_species.json @@ -346,8 +346,8 @@ "category": [ "SPECIES_ELF" ], "threshreq": [ "THRESH_SPECIES_ELF" ], "flags": [ "SEESLEEP" ], - "fatigue_modifier": -0.166667, - "fatigue_regen_modifier": 1 + "sleepiness_modifier": -0.166667, + "sleepiness_regen_modifier": 1 }, { "type": "mutation", diff --git a/data/mods/Magiclysm/mutations/mutations.json b/data/mods/Magiclysm/mutations/mutations.json index 7b264720d825c..8b230715d8026 100644 --- a/data/mods/Magiclysm/mutations/mutations.json +++ b/data/mods/Magiclysm/mutations/mutations.json @@ -283,7 +283,7 @@ "category": [ "DRAGON_BLACK" ], "passive_mods": { "str_mod": 4 }, "hp_adjustment": -6, - "fatigue_modifier": 0.15, + "sleepiness_modifier": 0.15, "restricts_gear": [ "torso", "leg_l", "leg_r", "arm_l", "arm_r", "hand_l", "hand_r", "head", "foot_l", "foot_r" ], "destroys_gear": true, "weight_capacity_modifier": 1.1, diff --git a/data/mods/Magiclysm/mutations/temporary.json b/data/mods/Magiclysm/mutations/temporary.json index ab02b514fe3c1..fd00fe4e4f284 100644 --- a/data/mods/Magiclysm/mutations/temporary.json +++ b/data/mods/Magiclysm/mutations/temporary.json @@ -43,7 +43,7 @@ "description": "You are resting in the depths of the earth. You should never actually see this.", "player_display": false, "points": 0, - "fatigue_regen_modifier": 0.5, + "sleepiness_regen_modifier": 0.5, "healing_awake": 0.8, "healing_multiplier": 2.5, "mending_modifier": 16, diff --git a/data/mods/MindOverMatter/NewPowerGuide.md b/data/mods/MindOverMatter/NewPowerGuide.md index 52d006147b6bc..9feb60c6ad726 100644 --- a/data/mods/MindOverMatter/NewPowerGuide.md +++ b/data/mods/MindOverMatter/NewPowerGuide.md @@ -30,7 +30,7 @@ Biokinesis Can't: Allow the psion to perform feats that are impossible for human Clairsentience Can: See a few seconds into the future. Receive warning of more distant future events in the form of premonitions or vague dreams. Enhance the psion's mundane senses to see, hear, smell, touch, or taste as well or better than as an animal. Perform feats impossible with mundane senses, such as seeing in complete darkness, or seeing through walls, or hearing radio transmissions, or smelling carbon monoxide. Allow the psion to remove any impediment to the clarity of their senses, such as intoxication, poison or disease, or psychosis. Clairsentience Can't: Make clear prophecies or other long-term future predictions. Affect the senses of others. Restore the psion's natural senses if they've been damaged (though the psion can use Clairsentience to overcome whatever natural damage they've suffered). Cure blob psychosis. -Electrokinesis Can: Generate electricity, either as a weapon or in order to recharge electronic devices. Protect the psion and their equipment from the effects of excess electricity, including EMPs. Manipulate the bioelectricity of the human nervous system, making it more efficient or causing errant discharges and inhibiting their enemies. Effect the circuitry and systems of electronics, including being able to reprogram a computer or shutdown a robot. Drain electrical energy and absorb it into their own body for various purposes (such as reducing fatigue). +Electrokinesis Can: Generate electricity, either as a weapon or in order to recharge electronic devices. Protect the psion and their equipment from the effects of excess electricity, including EMPs. Manipulate the bioelectricity of the human nervous system, making it more efficient or causing errant discharges and inhibiting their enemies. Effect the circuitry and systems of electronics, including being able to reprogram a computer or shutdown a robot. Drain electrical energy and absorb it into their own body for various purposes (such as reducing sleepiness). Electrokinesis Can't: Turn the psion into "living lightning." Solidify electricity so that they or anyone else can manipulate it. Shut off a target's nervous system and instantly kill them. Make electricity disappear (it must always go somewhere). Affect mechanical devices that do not use electricity. Photokinesis Can: Create light out of nothing. Control existing light or remove it from an area. Protect the psion from dangerous/disruptive amounts of light radiation. Manipulate other forms of electromagnetic radiation such as gamma rays or radio waves. Manipulate light to create lasers. Bend light to render people or objects invisible while still allowing the target to perceive their environment. Create illusions by changing the movement of light. diff --git a/data/mods/MindOverMatter/PowerDescriptionSpoilers.md b/data/mods/MindOverMatter/PowerDescriptionSpoilers.md index a12d2cf782400..f0d59363dadec 100644 --- a/data/mods/MindOverMatter/PowerDescriptionSpoilers.md +++ b/data/mods/MindOverMatter/PowerDescriptionSpoilers.md @@ -120,7 +120,7 @@ This is natural painkiller and so has natural effects (reduces speed slightly) *Stamina Cost*: 8000, minus 250 per level to a minimum of 4000
*Channeling Time*: 250 moves, minus 13 moves per level to a minimum of 50
-*Effects*: Greatly increases the psion’s metabolic efficiency. Hunger, thirst, fatigue grow 25% more slowly and the basal metabolic rate is reduced by 25%. All of these bonuses increase by 2% per level to a maximum of 70% increase.
+*Effects*: Greatly increases the psion’s metabolic efficiency. Hunger, thirst, sleepiness grow 25% more slowly and the basal metabolic rate is reduced by 25%. All of these bonuses increase by 2% per level to a maximum of 70% increase.
*Prerequisites*: Temperature Adaptability 8, Adrenaline Trigger 6 *or* Physical Enhancement 12
## Combat Dance @@ -1128,7 +1128,7 @@ Powers causing telepathic damage have a 5% chance to down the target, a 33% chan *Duration*: Indefinite
*Stamina Cost*: 1000
*Channeling Time*: Indefinite
-*Effects*: Meditate in lieu of sleep. Using the power will begin the meditating, slowly lowering the psion's fatigue and sleep deprivation ratings. The rate of reduction increases per power level and with the psion's metaphysics skill, with the formula: 1 in (55 - ( Wakeful Rest power level * 2) - Metaphysics skill) ), 15 ) chance per second for fatigue, and 1 per second for sleep deprivation. When fatigue hits zero, a prompt to cancel the meditation pops up.
+*Effects*: Meditate in lieu of sleep. Using the power will begin the meditating, slowly lowering the psion's sleepiness and sleep deprivation ratings. The rate of reduction increases per power level and with the psion's metaphysics skill, with the formula: 1 in (55 - ( Wakeful Rest power level * 2) - Metaphysics skill) ), 15 ) chance per second for sleepiness, and 1 per second for sleep deprivation. When sleepiness hits zero, a prompt to cancel the meditation pops up.
*Prerequisites*: Healthy Glow 8, Immunostimulus 4
## Damage Balancing @@ -1200,7 +1200,7 @@ Powers causing telepathic damage have a 5% chance to down the target, a 33% chan *Duration*: 2 minutes and 26 seconds to 6 minutes and 12 seconds, plus 29 seconds to 1 minute and 50 seconds per power level
*Stamina Cost*: 10000, minus 150 per level to a minimum of 6500
*Channeling Time*: 10 seconds
-*Effects*: Use up the psion's bodily reserves to speed healing to a preternatural rate. Every 30 seconds, the psion heals one hit point to every body part, but whenever a healing tick occurs, the psion loses between 50 and 250 kCal, 50 to 200 units of iron, 100 to 200 units of calcium, 20 to 80 units of vitamin C, and gains 2 to 10 points of fatigue.
+*Effects*: Use up the psion's bodily reserves to speed healing to a preternatural rate. Every 30 seconds, the psion heals one hit point to every body part, but whenever a healing tick occurs, the psion loses between 50 and 250 kCal, 50 to 200 units of iron, 100 to 200 units of calcium, 20 to 80 units of vitamin C, and gains 2 to 10 points of sleepiness.
*Prerequisites*: Healthy Glow 14 *or* Revitalizing Meditation 9, Damage Balancing 10 *or* Detoxification 7 *or* Blood Purge 5
## Accelerated Resuscitation diff --git a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json index 50fdfd407153d..41c1edbaab643 100644 --- a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json +++ b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json @@ -111,7 +111,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ] + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ] ] } }, @@ -126,7 +126,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ] ] } @@ -142,7 +142,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 3 ] @@ -160,7 +160,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 3 ], @@ -180,7 +180,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 3 ], @@ -201,7 +201,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], [ "EOC_DRAIN_EFFECT_CHECK_WEAKNESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_BREATHING", 3 ], @@ -380,7 +380,7 @@ }, { "type": "effect_on_condition", - "id": "EOC_DRAIN_EFFECT_CHECK_FATIGUE", + "id": "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", "//": "Base is 2% chance from 70 attunement to 125 attunement, then scaling up 0.15% per attunement up to 9.5% chance at 175 attunement, then scaling up 0.45% chance per attunement up to 32% chance at 225 attunement, then scaling up 0.3% to 39.5% chance at max, plus the Difficulty squared.", "condition": { "and": [ @@ -399,7 +399,7 @@ }, "effect": [ { "u_message": "As you unleash your powers, you feel tired.", "type": "bad" }, - { "math": [ "u_val('fatigue')", "+=", "rng(30,90)" ] } + { "math": [ "u_val('sleepiness')", "+=", "rng(30,90)" ] } ] }, { diff --git a/data/mods/MindOverMatter/effects/effects_penalty.json b/data/mods/MindOverMatter/effects/effects_penalty.json index 9278bf316eb93..59920de589205 100644 --- a/data/mods/MindOverMatter/effects/effects_penalty.json +++ b/data/mods/MindOverMatter/effects/effects_penalty.json @@ -382,8 +382,8 @@ "remove_message": "You don't feel as bad anymore!", "rating": "bad", "max_intensity": 10, - "base_mods": { "fatigue_tick": [ 300 ], "fatigue_min": [ 1 ], "health_min": [ -1 ], "health_tick": [ 400 ] }, - "scaling_mods": { "fatigue_min": [ 1 ], "health_min": [ -1 ] }, + "base_mods": { "sleepiness_tick": [ 300 ], "sleepiness_min": [ 1 ], "health_min": [ -1 ], "health_tick": [ 400 ] }, + "scaling_mods": { "sleepiness_min": [ 1 ], "health_min": [ -1 ] }, "limb_score_mods": [ { "limb_score": "breathing", "modifier": 0.8 }, { "limb_score": "manip", "modifier": 0.8 } ], "flags": [ "EFFECT_LIMB_SCORE_MOD" ] }, diff --git a/data/mods/MindOverMatter/effects/effects_psionic.json b/data/mods/MindOverMatter/effects/effects_psionic.json index 2a2a5884e76e3..fceb6d5bd28b7 100644 --- a/data/mods/MindOverMatter/effects/effects_psionic.json +++ b/data/mods/MindOverMatter/effects/effects_psionic.json @@ -399,7 +399,7 @@ } }, { - "value": "FATIGUE", + "value": "SLEEPINESS", "multiply": { "math": [ "max((( -0.25 + ( u_spell_level('biokin_metabolism_enhance') * -0.02 ) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), -0.7)" @@ -1932,9 +1932,9 @@ "health_min": [ 0 ], "health_chance": [ 1000 ], "health_tick": [ 60 ], - "fatigue_min": [ 0 ], - "fatigue_chance": [ 500 ], - "fatigue_tick": [ 60 ], + "sleepiness_min": [ 0 ], + "sleepiness_chance": [ 500 ], + "sleepiness_tick": [ 60 ], "vomit_chance": [ 1000 ], "vomit_tick": [ 60 ] }, @@ -1946,8 +1946,8 @@ "pain_chance": [ -1 ], "health_min": [ -1 ], "health_chance": [ -135 ], - "fatigue_min": [ 0.6 ], - "fatigue_chance": [ -65 ], + "sleepiness_min": [ 0.6 ], + "sleepiness_chance": [ -65 ], "vomit_chance": [ -150 ] } }, diff --git a/data/mods/MindOverMatter/mapgen/map_extras/glass_and_crystal.json b/data/mods/MindOverMatter/mapgen/map_extras/glass_and_crystal.json index 1b8ff8acd8e0a..5ddc53cc3237c 100644 --- a/data/mods/MindOverMatter/mapgen/map_extras/glass_and_crystal.json +++ b/data/mods/MindOverMatter/mapgen/map_extras/glass_and_crystal.json @@ -91,7 +91,7 @@ "rows": [ "X" ], "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ], "terrain": { "X": "t_nether_stone" }, - "place_fields": [ { "field": "fd_fatigue", "x": 0, "y": 0, "intensity": 3 } ] + "place_fields": [ { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": 3 } ] } } ] diff --git a/data/mods/MindOverMatter/mapgen/microlab_rooms.json b/data/mods/MindOverMatter/mapgen/microlab_rooms.json index 0627ebd22854a..458881f555022 100644 --- a/data/mods/MindOverMatter/mapgen/microlab_rooms.json +++ b/data/mods/MindOverMatter/mapgen/microlab_rooms.json @@ -63,11 +63,11 @@ "terrain": { "G": "t_card_science", "9": "t_reinforced_glass_shutter" }, "furniture": { "t": "f_counter", "M": "f_server", "A": "f_xedra_antenna", "D": "f_portal_stabilizer" }, "item": { "m": { "item": "xedra_microphone", "chance": 90 }, "s": { "item": "xedra_seismograph", "chance": 90 } }, - "fields": { "Q": { "field": "fd_fatigue", "intensity": 2 } }, + "fields": { "Q": { "field": "fd_sleepiness", "intensity": 2 } }, "place_monster": [ { "group": "GROUP_LAB", "x": [ 2, 21 ], "y": [ 2, 21 ], "chance": 60, "repeat": [ 1, 5 ] }, { "group": "GROUP_FERAL_TELEPORTER", "x": [ 3, 20 ], "y": [ 3, 20 ], "chance": 30, "repeat": [ 1, 2 ] }, - { "group": "GROUP_NETHER_FATIGUE_FIELD", "x": [ 10, 12 ], "y": [ 6, 7 ], "chance": 50, "repeat": [ 2, 3 ] } + { "group": "GROUP_NETHER_SLEEPINESS_FIELD", "x": [ 10, 12 ], "y": [ 6, 7 ], "chance": 50, "repeat": [ 2, 3 ] } ], "computers": { "7": { diff --git a/data/mods/MindOverMatter/mapgen/psi_surface_lab/psi_lab_surface_nested.json b/data/mods/MindOverMatter/mapgen/psi_surface_lab/psi_lab_surface_nested.json index d9255a262e98e..a0e3d7f0f9a84 100644 --- a/data/mods/MindOverMatter/mapgen/psi_surface_lab/psi_lab_surface_nested.json +++ b/data/mods/MindOverMatter/mapgen/psi_surface_lab/psi_lab_surface_nested.json @@ -2471,7 +2471,7 @@ "object": { "mapgensize": [ 1, 1 ], "place_terrain": [ { "ter": "t_nether_water_sh", "x": 0, "y": 0 } ], - "place_fields": [ { "field": "fd_fatigue", "x": 0, "y": 0, "intensity": 3 } ], + "place_fields": [ { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": 3 } ], "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] } }, @@ -2482,7 +2482,7 @@ "object": { "mapgensize": [ 1, 1 ], "place_terrain": [ { "ter": "t_strconc_floor", "x": 0, "y": 0 } ], - "place_fields": [ { "field": "fd_fatigue", "x": 0, "y": 0, "intensity": 3 } ], + "place_fields": [ { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": 3 } ], "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] } }, @@ -2493,7 +2493,7 @@ "object": { "mapgensize": [ 1, 1 ], "place_terrain": [ { "ter": "t_floor", "x": 0, "y": 0 } ], - "place_fields": [ { "field": "fd_fatigue", "x": 0, "y": 0, "intensity": 3 } ], + "place_fields": [ { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": 3 } ], "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] } } diff --git a/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json b/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json index 42fb8f0a8dd5c..4253a6939c796 100644 --- a/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json +++ b/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json @@ -163,7 +163,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_FATIGUE_FIELD", + "name": "GROUP_NETHER_SLEEPINESS_FIELD", "monsters": [ { "monster": "mon_nether_eater", "weight": 100, "cost_multiplier": 0 } ] }, { diff --git a/data/mods/MindOverMatter/monsters/monster_eoc_spells.json b/data/mods/MindOverMatter/monsters/monster_eoc_spells.json index 48cf10e214d43..ae0a67b25e305 100644 --- a/data/mods/MindOverMatter/monsters/monster_eoc_spells.json +++ b/data/mods/MindOverMatter/monsters/monster_eoc_spells.json @@ -59,21 +59,21 @@ "flags": [ "NO_PROJECTILE", "NO_EXPLOSION_SFX" ], "effect": "recover_energy", "effect_str": "STAMINA", - "extra_effects": [ { "id": "eater_drain_fatigue", "hit_self": false, "max_level": 3 } ], + "extra_effects": [ { "id": "eater_drain_sleepiness", "hit_self": false, "max_level": 3 } ], "shape": "blast", "max_level": 1, "min_damage": -200, "min_range": 30 }, { - "id": "eater_drain_fatigue", + "id": "eater_drain_sleepiness", "type": "SPELL", "name": "[Ψ]Eater Drain Fatigue", - "description": "Eater's spell to drain fatigue. It's a bug if you have it.", + "description": "Eater's spell to drain sleepiness. It's a bug if you have it.", "valid_targets": [ "self" ], "flags": [ "NO_PROJECTILE", "NO_EXPLOSION_SFX" ], "effect": "recover_energy", - "effect_str": "FATIGUE", + "effect_str": "SLEEPINESS", "shape": "blast", "max_level": 1, "min_damage": -2, diff --git a/data/mods/MindOverMatter/mutations/temporary.json b/data/mods/MindOverMatter/mutations/temporary.json index 18d01c4420650..ddfa198347348 100644 --- a/data/mods/MindOverMatter/mutations/temporary.json +++ b/data/mods/MindOverMatter/mutations/temporary.json @@ -256,7 +256,7 @@ "name": { "str": "Elixir PK Surge (active)" }, "copy-from": "TELELIXIRDOWN", "description": "You are lashing out with your elixir-forged telekinetic powers.", - "fatigue": true, + "sleepiness": true, "cost": 1, "time": "1 m", "activated_eocs": [ "EOC_TELELIXIR_CAST" ], diff --git a/data/mods/MindOverMatter/npcs/dialogue/follower_dialogue.json b/data/mods/MindOverMatter/npcs/dialogue/follower_dialogue.json index 8f9fa1ab239d1..001ce2e780a2a 100644 --- a/data/mods/MindOverMatter/npcs/dialogue/follower_dialogue.json +++ b/data/mods/MindOverMatter/npcs/dialogue/follower_dialogue.json @@ -94,7 +94,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, "u_driving", "npc_driving", { "npc_has_effect": "asked_to_vitakinetic_heal" } @@ -120,7 +120,7 @@ "npc_need": "hunger", "amount": 160, "no": { - "npc_need": "fatigue", + "npc_need": "sleepiness", "level": "TIRED", "no": { "npc_has_effect": "asked_to_vitakinetic_heal", @@ -156,7 +156,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, "u_driving", "npc_driving", { "npc_has_effect": "asked_to_vitakinetic_heal" } @@ -187,7 +187,7 @@ "or": [ { "npc_need": "thirst", "amount": 80 }, { "npc_need": "hunger", "amount": 160 }, - { "npc_need": "fatigue", "level": "TIRED" }, + { "npc_need": "sleepiness", "level": "TIRED" }, "u_driving", "npc_driving", { "npc_has_effect": "asked_to_vitakinetic_heal" } diff --git a/data/mods/MindOverMatter/obsolete/obsolete.json b/data/mods/MindOverMatter/obsolete/obsolete.json index 4cf23b3a61802..3182fb3fbf7f7 100644 --- a/data/mods/MindOverMatter/obsolete/obsolete.json +++ b/data/mods/MindOverMatter/obsolete/obsolete.json @@ -47,9 +47,9 @@ "hunger_min": [ 1 ], "hunger_chance": [ 100 ], "hunger_tick": [ 400 ], - "fatigue_min": [ 1 ], - "fatigue_chance": [ 200 ], - "fatigue_tick": [ 500 ] + "sleepiness_min": [ 1 ], + "sleepiness_chance": [ 200 ], + "sleepiness_tick": [ 500 ] }, "scaling_mods": { "str_mod": [ -0.12 ], @@ -61,9 +61,9 @@ "hunger_min": [ 0.08 ], "hunger_chance": [ -2.5 ], "hunger_tick": [ -3.5 ], - "fatigue_min": [ 0.05 ], - "fatigue_chance": [ -1.5 ], - "fatigue_tick": [ -1 ] + "sleepiness_min": [ 0.05 ], + "sleepiness_chance": [ -1.5 ], + "sleepiness_tick": [ -1 ] } }, { diff --git a/data/mods/MindOverMatter/overmap/nether_crystal_field.json b/data/mods/MindOverMatter/overmap/nether_crystal_field.json index 6a0f72faad39d..2c3f9bd5b7852 100644 --- a/data/mods/MindOverMatter/overmap/nether_crystal_field.json +++ b/data/mods/MindOverMatter/overmap/nether_crystal_field.json @@ -215,8 +215,8 @@ "furniture": { "N": [ [ "f_nether_crystal_structure", 1 ], [ "f_null", 1 ] ] }, "place_monsters": [ { "monster": "GROUP_CRYSTAL_FIELD_PSYCHOACTIVE", "x": [ 0, 1 ], "y": [ 0, 1 ], "chance": 50, "repeat": [ 1, 3 ] } ], "place_fields": [ - { "field": "fd_fatigue", "x": 0, "y": 1, "intensity": [ 2, 3 ] }, - { "field": "fd_fatigue", "x": 1, "y": 0, "intensity": [ 2, 3 ] } + { "field": "fd_sleepiness", "x": 0, "y": 1, "intensity": [ 2, 3 ] }, + { "field": "fd_sleepiness", "x": 1, "y": 0, "intensity": [ 2, 3 ] } ] } }, @@ -235,8 +235,8 @@ "furniture": { "N": [ [ "f_nether_crystal_structure", 1 ], [ "f_null", 1 ] ] }, "place_monsters": [ { "monster": "GROUP_CRYSTAL_FIELD_PSYCHOACTIVE", "x": [ 0, 1 ], "y": [ 0, 1 ], "chance": 50, "repeat": [ 1, 3 ] } ], "place_fields": [ - { "field": "fd_fatigue", "x": 0, "y": 0, "intensity": [ 2, 3 ] }, - { "field": "fd_fatigue", "x": 1, "y": 1, "intensity": [ 2, 3 ] } + { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": [ 2, 3 ] }, + { "field": "fd_sleepiness", "x": 1, "y": 1, "intensity": [ 2, 3 ] } ] } }, diff --git a/data/mods/MindOverMatter/powers/vitakinesis_eoc.json b/data/mods/MindOverMatter/powers/vitakinesis_eoc.json index 3b6280cc0c286..f2037492328dd 100644 --- a/data/mods/MindOverMatter/powers/vitakinesis_eoc.json +++ b/data/mods/MindOverMatter/powers/vitakinesis_eoc.json @@ -153,7 +153,7 @@ { "type": "effect_on_condition", "id": "EOC_VITAKIN_SLEEP", - "condition": { "or": [ { "math": [ "u_val('fatigue') + u_val('sleep_deprivation')", ">=", "0" ] } ] }, + "condition": { "or": [ { "math": [ "u_val('sleepiness') + u_val('sleep_deprivation')", ">=", "0" ] } ] }, "effect": [ { "u_assign_activity": "ACT_VITAKIN_WAKEFUL_REST_MEDITATE", "duration": "510 minutes" }, { "u_add_effect": "effect_vitakin_wakeful_resting", "duration": "510 minutes" } @@ -173,8 +173,8 @@ { "type": "effect_on_condition", "id": "EOC_VITAKIN_WAKEFUL_REST_MEDITATE", - "condition": { "math": [ "u_val('fatigue') + u_val('sleep_deprivation')", ">=", "0" ] }, - "effect": [ { "run_eocs": [ "EOC_VITAKIN_SLEEP_FATIGUE", "EOC_VITAKIN_SLEEP_DEPRIVATION" ] } ], + "condition": { "math": [ "u_val('sleepiness') + u_val('sleep_deprivation')", ">=", "0" ] }, + "effect": [ { "run_eocs": [ "EOC_VITAKIN_SLEEP_SLEEPINESS", "EOC_VITAKIN_SLEEP_DEPRIVATION" ] } ], "false_effect": [ { "u_message": "You are fully refreshed, and can end your meditations now.", @@ -187,10 +187,10 @@ }, { "type": "effect_on_condition", - "id": "EOC_VITAKIN_SLEEP_FATIGUE", + "id": "EOC_VITAKIN_SLEEP_SLEEPINESS", "condition": { "and": [ - { "math": [ "u_val('fatigue')", ">=", "0" ] }, + { "math": [ "u_val('sleepiness')", ">=", "0" ] }, { "x_in_y_chance": { "x": 1, @@ -199,7 +199,7 @@ } ] }, - "effect": [ { "math": [ "u_val('fatigue')", "-=", "1" ] } ] + "effect": [ { "math": [ "u_val('sleepiness')", "-=", "1" ] } ] }, { "type": "effect_on_condition", @@ -864,7 +864,7 @@ { "math": [ "u_vitamin('iron')", "-=", "rng( 50,200 )" ] }, { "math": [ "u_vitamin('calcium')", "-=", "rng( 100,200 )" ] }, { "math": [ "u_vitamin('vitC')", "-=", "rng( 20,80 )" ] }, - { "math": [ "u_val('fatigue')", "+=", "rng( 2,10 )" ] } + { "math": [ "u_val('sleepiness')", "+=", "rng( 2,10 )" ] } ] }, { diff --git a/data/mods/Mythos-Creatures/monstergroups/nether.json b/data/mods/Mythos-Creatures/monstergroups/nether.json index 5f85a06cb8394..5763f0e6b97d7 100644 --- a/data/mods/Mythos-Creatures/monstergroups/nether.json +++ b/data/mods/Mythos-Creatures/monstergroups/nether.json @@ -29,7 +29,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_FATIGUE_FIELD", + "name": "GROUP_NETHER_SLEEPINESS_FIELD", "default": "mon_blank", "monsters": [ { "monster": "mon_flying_polyp", "weight": 100, "cost_multiplier": 0 }, diff --git a/data/mods/No_Hope/monster_groups.json b/data/mods/No_Hope/monster_groups.json index 7b1ce72c010c5..2486ee1a5dc77 100644 --- a/data/mods/No_Hope/monster_groups.json +++ b/data/mods/No_Hope/monster_groups.json @@ -57,7 +57,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_FATIGUE_FIELD", + "name": "GROUP_NETHER_SLEEPINESS_FIELD", "monsters": [ { "monster": "mon_staring_eye", "weight": 100, "cost_multiplier": 0 } ] }, { diff --git a/data/mods/TEST_DATA/effects.json b/data/mods/TEST_DATA/effects.json index e0273842cbbf8..d5373d4efb3d9 100644 --- a/data/mods/TEST_DATA/effects.json +++ b/data/mods/TEST_DATA/effects.json @@ -43,7 +43,7 @@ "rad_min": [ 1 ], "hunger_min": [ 1 ], "thirst_min": [ 1 ], - "fatigue_min": [ 1 ], + "sleepiness_min": [ 1 ], "stamina_min": [ 1 ] } }, @@ -116,7 +116,7 @@ "rad_min": [ 1 ], "hunger_min": [ 1 ], "thirst_min": [ 1 ], - "fatigue_min": [ 1 ], + "sleepiness_min": [ 1 ], "stamina_min": [ 1 ] } } diff --git a/data/mods/TEST_DATA/widgets.json b/data/mods/TEST_DATA/widgets.json index 83291d65d2f55..124125c2bd78a 100644 --- a/data/mods/TEST_DATA/widgets.json +++ b/data/mods/TEST_DATA/widgets.json @@ -45,7 +45,7 @@ ] }, { - "id": "test_fatigue_clause_template", + "id": "test_sleepiness_clause_template", "type": "widget", "separator": ": ", "style": "clause", @@ -54,19 +54,19 @@ "id": "tired", "text": "Tired", "color": "yellow", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">", "191" ] }, { "math": [ "u_val('fatigue')", "<=", "383" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">", "191" ] }, { "math": [ "u_val('sleepiness')", "<=", "383" ] } ] } }, { "id": "dead_tired", "text": "Dead Tired", "color": "light_red", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">", "383" ] }, { "math": [ "u_val('fatigue')", "<=", "575" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">", "383" ] }, { "math": [ "u_val('sleepiness')", "<=", "575" ] } ] } }, { "id": "exhausted", "text": "Exhausted", "color": "red", - "condition": { "math": [ "u_val('fatigue')", ">", "575" ] } + "condition": { "math": [ "u_val('sleepiness')", ">", "575" ] } } ] }, @@ -912,12 +912,12 @@ "style": "number" }, { - "id": "test_fatigue_clause", + "id": "test_sleepiness_clause", "type": "widget", "separator": ": ", "label": "Rest", "style": "text", - "copy-from": "test_fatigue_clause_template" + "copy-from": "test_sleepiness_clause_template" }, { "id": "test_hp_head_graph", diff --git a/data/mods/Xedra_Evolved/effects/effects.json b/data/mods/Xedra_Evolved/effects/effects.json index 7e7eb10155453..d52471db298a3 100644 --- a/data/mods/Xedra_Evolved/effects/effects.json +++ b/data/mods/Xedra_Evolved/effects/effects.json @@ -79,8 +79,8 @@ "base_mods": { "thirst_tick": [ 580 ], "thirst_min": [ 1 ], - "fatigue_tick": [ 300 ], - "fatigue_min": [ 1 ], + "sleepiness_tick": [ 300 ], + "sleepiness_min": [ 1 ], "str_mod": [ -2, -1 ], "dex_mod": [ -1, 0 ], "per_mod": [ -1, 0 ], @@ -432,9 +432,9 @@ "stamina_min": [ -100 ], "stamina_max": [ -200 ], "stamina_chance": [ 9000 ], - "fatigue_min": [ 10 ], - "fatigue_max": [ 20 ], - "fatigue_chance": [ 9000 ], + "sleepiness_min": [ 10 ], + "sleepiness_max": [ 20 ], + "sleepiness_chance": [ 9000 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ 0 ], "h_mod_chance": [ 9000 ] @@ -442,9 +442,9 @@ "scaling_mods": { "str_mod": [ -2 ], "stamina_max": [ -500 ], - "fatigue_max": [ 20 ], + "sleepiness_max": [ 20 ], "stamina_chance": [ -300 ], - "fatigue_chance": [ -300 ], + "sleepiness_chance": [ -300 ], "h_mod_min": [ -1 ], "h_mod_min_val": [ -50 ], "h_mod_chance": [ -200 ] @@ -698,9 +698,9 @@ "per_mod": [ -2 ], "health_chance": [ 20 ], "health_tick": [ 30 ], - "fatigue_tick": [ 30 ], - "fatigue_chance": [ 20 ], - "fatigue_min": [ 1 ] + "sleepiness_tick": [ 30 ], + "sleepiness_chance": [ 20 ], + "sleepiness_min": [ 1 ] }, "scaling_mods": { "hit_mod": [ -0.5 ], @@ -710,8 +710,8 @@ "per_mod": [ -0.6 ], "health_chance": [ -3 ], "health_tick": [ -5 ], - "fatigue_chance": [ -3 ], - "fatigue_tick": [ -5 ] + "sleepiness_chance": [ -3 ], + "sleepiness_tick": [ -5 ] } }, { diff --git a/data/mods/Xedra_Evolved/itemgroups/map_extra_itemgroups.json b/data/mods/Xedra_Evolved/itemgroups/map_extra_itemgroups.json index 8261e370edf4e..ee01e69c19929 100644 --- a/data/mods/Xedra_Evolved/itemgroups/map_extra_itemgroups.json +++ b/data/mods/Xedra_Evolved/itemgroups/map_extra_itemgroups.json @@ -134,7 +134,7 @@ { "weight": 100, "spell_id": "AEA_NOISE", "base_power": 100 }, { "weight": 100, "spell_id": "AEA_LIGHT", "base_power": 100 }, { "weight": 100, "spell_id": "AEA_DIM", "base_power": 100 }, - { "weight": 100, "spell_id": "AEA_FATIGUE", "base_power": -100 }, + { "weight": 100, "spell_id": "AEA_SLEEPINESS", "base_power": -100 }, { "weight": 100, "spell_id": "AEA_FIREBALL", "base_power": 500 }, { "weight": 100, "spell_id": "AEA_FLASH", "base_power": 250 }, { "weight": 100, "spell_id": "AEA_PARALYZE", "base_power": -250 }, diff --git a/data/mods/Xedra_Evolved/items/alchemy.json b/data/mods/Xedra_Evolved/items/alchemy.json index cf3a66fadad2a..363769e1c76d8 100644 --- a/data/mods/Xedra_Evolved/items/alchemy.json +++ b/data/mods/Xedra_Evolved/items/alchemy.json @@ -7,7 +7,7 @@ "weight": "253 g", "color": "magenta", "addiction_type": "alcohol", - "fatigue_mod": 112, + "sleepiness_mod": 112, "stim": 34, "container": "jug_plastic", "comestible_type": "DRINK", diff --git a/data/mods/Xedra_Evolved/items/comestibles/goblin_fruits.json b/data/mods/Xedra_Evolved/items/comestibles/goblin_fruits.json index 4708c3f277a6c..2b067a37062e2 100644 --- a/data/mods/Xedra_Evolved/items/comestibles/goblin_fruits.json +++ b/data/mods/Xedra_Evolved/items/comestibles/goblin_fruits.json @@ -168,7 +168,7 @@ { "type": "effect_on_condition", "id": "EOC_GOBLIN_FRUIT_AWAKE", - "effect": [ { "math": [ "u_val('fatigue')", "-=", "25" ] } ] + "effect": [ { "math": [ "u_val('sleepiness')", "-=", "25" ] } ] }, { "type": "COMESTIBLE", diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json index 52b4e88e5878a..3d6776c9eb238 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json @@ -1377,7 +1377,7 @@ "category": [ "ARVORE" ], "threshreq": [ "THRESH_ARVORE" ], "metabolism_modifier": -0.5, - "fatigue_regen_modifier": 0.5, + "sleepiness_regen_modifier": 0.5, "healing_awake": 0.8, "healing_multiplier": 2.5, "mending_modifier": 16, diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_eocs.json b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_eocs.json index 206ca70d7db6f..58791217d11ea 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_eocs.json @@ -135,7 +135,7 @@ { "type": "effect_on_condition", "id": "EOC_IERDE_NO_SLEEP_MEDITATE", - "condition": { "or": [ { "math": [ "u_val('fatigue') + u_val('sleep_deprivation')", ">=", "0" ] } ] }, + "condition": { "or": [ { "math": [ "u_val('sleepiness') + u_val('sleep_deprivation')", ">=", "0" ] } ] }, "effect": [ { "u_assign_activity": "ACT_IERDE_NO_SLEEP_MEDITATE", "duration": "510 minutes" } ], "false_effect": [ { "u_message": "You're feeling refreshed and have no need to begin a vigil.", "type": "mixed" } ] }, @@ -152,8 +152,8 @@ { "type": "effect_on_condition", "id": "EOC_IERDE_NO_SLEEP_MEDITATE_TURN", - "condition": { "math": [ "u_val('fatigue') + u_val('sleep_deprivation')", ">=", "0" ] }, - "effect": [ { "run_eocs": [ "EOC_IERDE_SLEEP_FATIGUE", "EOC_IERDE_SLEEP_DEPRIVATION" ] } ], + "condition": { "math": [ "u_val('sleepiness') + u_val('sleep_deprivation')", ">=", "0" ] }, + "effect": [ { "run_eocs": [ "EOC_IERDE_SLEEP_SLEEPINESS", "EOC_IERDE_SLEEP_DEPRIVATION" ] } ], "false_effect": [ { "u_message": "You are fully refreshed, and can end your vigil now.", @@ -165,9 +165,9 @@ }, { "type": "effect_on_condition", - "id": "EOC_IERDE_SLEEP_FATIGUE", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "0" ] }, { "x_in_y_chance": { "x": 1, "y": 35 } } ] }, - "effect": [ { "math": [ "u_val('fatigue')", "-=", "1" ] } ] + "id": "EOC_IERDE_SLEEP_SLEEPINESS", + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "0" ] }, { "x_in_y_chance": { "x": 1, "y": 35 } } ] }, + "effect": [ { "math": [ "u_val('sleepiness')", "-=", "1" ] } ] }, { "type": "effect_on_condition", diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutations.json b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutations.json index 741762c688f0f..b6611e923eb84 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutations.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutations.json @@ -348,7 +348,7 @@ "description": "You are resting in the depths of the earth. You should never actually see this.", "player_display": false, "points": 0, - "fatigue_regen_modifier": 0.5, + "sleepiness_regen_modifier": 0.5, "healing_awake": 0.8, "healing_multiplier": 2.5, "mending_modifier": 16, diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_fae_bans.json b/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_fae_bans.json index 22a2895cb995e..9cca7562bb495 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_fae_bans.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/paraclesian_fae_bans.json @@ -67,7 +67,7 @@ "effect": [ { "run_eocs": "EOC_PARACLESIAN_BROKE_FAE_BAN" }, { "queue_eocs": "EOC_PARACLESIAN_BROKE_FAE_BAN_PAIN", "time_in_future": 1 }, - { "math": [ "u_val('fatigue')", "+=", "150" ] }, + { "math": [ "u_val('sleepiness')", "+=", "150" ] }, { "u_message": "You awaken with a groggy head, blinking bleary eyes. Sleeping near the remnants of civilization away from the bounty of nature, your sleep was not as restful as it should have been.", "type": "bad" @@ -110,7 +110,7 @@ "effect": [ { "run_eocs": [ "EOC_PARACLESIAN_BROKE_FAE_BAN" ] }, { "queue_eocs": "EOC_PARACLESIAN_BROKE_FAE_BAN_PAIN", "time_in_future": 1 }, - { "math": [ "u_val('fatigue')", "+=", "150" ] }, + { "math": [ "u_val('sleepiness')", "+=", "150" ] }, { "u_message": "You awaken in pain, your muscles stiff, your body groaning in protest. Away from the depths of the living earth, your sleep was not as restful as it should have been.", "type": "bad" diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_eocs.json b/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_eocs.json index 8afd1ccfe2ca4..68126c3f2ea56 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_eocs.json @@ -103,7 +103,7 @@ { "type": "effect_on_condition", "id": "EOC_SALAMANDER_NO_SLEEP", - "effect": [ { "math": [ "u_val('fatigue')", "=", "0" ] }, { "math": [ "u_val('sleep_deprivation')", "=", "0" ] } ] + "effect": [ { "math": [ "u_val('sleepiness')", "=", "0" ] }, { "math": [ "u_val('sleep_deprivation')", "=", "0" ] } ] }, { "type": "effect_on_condition", diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutations.json b/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutations.json index 7a4a2a7e4353a..01a0ca01e6579 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutations.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutations.json @@ -481,8 +481,8 @@ "changes_to": [ "SALAMANDER_SLEEP_LESS2" ], "types": [ "SLEEP" ], "category": [ "SALAMANDER" ], - "fatigue_modifier": -0.25, - "fatigue_regen_modifier": 0.25, + "sleepiness_modifier": -0.25, + "sleepiness_regen_modifier": 0.25, "metabolism_modifier": 0.33, "stamina_regen_modifier": 0.1 }, @@ -496,8 +496,8 @@ "changes_to": [ "SALAMANDER_SLEEP_LESS3" ], "types": [ "SLEEP" ], "category": [ "SALAMANDER" ], - "fatigue_modifier": -0.5, - "fatigue_regen_modifier": 0.5, + "sleepiness_modifier": -0.5, + "sleepiness_regen_modifier": 0.5, "metabolism_modifier": 0.66, "stamina_regen_modifier": 0.2 }, @@ -513,8 +513,8 @@ "activated_is_setup": true, "category": [ "SALAMANDER" ], "threshreq": [ "THRESH_SALAMANDER" ], - "fatigue_modifier": -0.5, - "fatigue_regen_modifier": 0.5, + "sleepiness_modifier": -0.5, + "sleepiness_regen_modifier": 0.5, "metabolism_modifier": 1, "stamina_regen_modifier": 0.3, "activated_eocs": [ "EOC_SALAMANDER_NO_SLEEP" ], diff --git a/data/mods/Xedra_Evolved/spells/eater_spells.json b/data/mods/Xedra_Evolved/spells/eater_spells.json index 9167db7f43f61..7200fc2afb7f8 100644 --- a/data/mods/Xedra_Evolved/spells/eater_spells.json +++ b/data/mods/Xedra_Evolved/spells/eater_spells.json @@ -179,7 +179,7 @@ "valid_targets": [ "self" ], "message": "You feel refreshed.", "effect": "recover_energy", - "effect_str": "FATIGUE", + "effect_str": "SLEEPINESS", "shape": "blast", "base_casting_time": { "math": [ "spell_time(time(' 2 m'))" ] }, "min_damage": 50, diff --git a/data/mods/Xedra_Evolved/ui/sidebar.json b/data/mods/Xedra_Evolved/ui/sidebar.json index 4f4c25e0deb06..86d6daddba560 100644 --- a/data/mods/Xedra_Evolved/ui/sidebar.json +++ b/data/mods/Xedra_Evolved/ui/sidebar.json @@ -135,7 +135,7 @@ "thirst_desc_label", "vampire_blood_levels", "weight_desc_label", - "fatigue_desc_label", + "sleepiness_desc_label", "pain_desc_label", "body_temp_desc_label" ] diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index 98420d4923ad8..70b3a3d1a5b1c 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -3786,7 +3786,7 @@ std::unique_ptr craft_activity_actor::deserialize( JsonValue &js void workout_activity_actor::start( player_activity &act, Character &who ) { - if( who.get_fatigue() > fatigue_levels::DEAD_TIRED ) { + if( who.get_sleepiness() > sleepiness_levels::DEAD_TIRED ) { who.add_msg_if_player( _( "You are too tired to exercise." ) ); act_id = activity_id::NULL_ID(); act.set_to_null(); @@ -3884,16 +3884,16 @@ void workout_activity_actor::start( player_activity &act, Character &who ) act.moves_total = to_moves( duration ); act.moves_left = act.moves_total; if( who.male ) { - sfx::play_activity_sound( "plmove", "fatigue_m_med", sfx::get_heard_volume( location ) ); + sfx::play_activity_sound( "plmove", "sleepiness_m_med", sfx::get_heard_volume( location ) ); } else { - sfx::play_activity_sound( "plmove", "fatigue_f_med", sfx::get_heard_volume( location ) ); + sfx::play_activity_sound( "plmove", "sleepiness_f_med", sfx::get_heard_volume( location ) ); } who.add_msg_if_player( _( "You start your workout session." ) ); } void workout_activity_actor::do_turn( player_activity &act, Character &who ) { - if( who.get_fatigue() > fatigue_levels::DEAD_TIRED ) { + if( who.get_sleepiness() > sleepiness_levels::DEAD_TIRED ) { who.add_msg_if_player( _( "You are exhausted so you finish your workout early." ) ); act.set_to_null(); return; @@ -3906,7 +3906,7 @@ void workout_activity_actor::do_turn( player_activity &act, Character &who ) if( !rest_mode && who.get_stamina() > who.get_stamina_max() / 3 ) { who.mod_stamina( -25 - intensity_modifier ); if( one_in( 180 / intensity_modifier ) ) { - who.mod_fatigue( 1 ); + who.mod_sleepiness( 1 ); who.mod_thirst( 1 ); } if( calendar::once_every( 16_minutes / intensity_modifier ) ) { diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index e8a8ace636003..214dc51027456 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -2144,7 +2144,7 @@ void activity_handlers::hand_crank_do_turn( player_activity *act, Character *you add_msg( m_info, _( "You've charged the battery completely." ) ); } } - if( you->get_fatigue() >= fatigue_levels::DEAD_TIRED ) { + if( you->get_sleepiness() >= sleepiness_levels::DEAD_TIRED ) { act->moves_left = 0; add_msg( m_info, _( "You're too exhausted to keep cranking." ) ); } @@ -2176,7 +2176,7 @@ void activity_handlers::vibe_do_turn( player_activity *act, Character *you ) } } // Dead Tired: different kind of relaxation needed - if( you->get_fatigue() >= fatigue_levels::DEAD_TIRED ) { + if( you->get_sleepiness() >= sleepiness_levels::DEAD_TIRED ) { act->moves_left = 0; add_msg( m_info, _( "You're too tired to continue." ) ); } diff --git a/src/activity_tracker.cpp b/src/activity_tracker.cpp index fd593a963ff88..472cdcf68ba94 100644 --- a/src/activity_tracker.cpp +++ b/src/activity_tracker.cpp @@ -16,16 +16,16 @@ int activity_tracker::weariness() const } // Called every 5 minutes, when activity level is logged -void activity_tracker::try_reduce_weariness( int bmr, float fatigue_mod, float fatigue_regen_mod ) +void activity_tracker::try_reduce_weariness( int bmr, float sleepiness_mod, float sleepiness_regen_mod ) { if( average_activity() < LIGHT_EXERCISE ) { - cata_assert( fatigue_mod > 0.0f ); + cata_assert( sleepiness_mod > 0.0f ); low_activity_ticks += std::min( 1.0f, ( ( LIGHT_EXERCISE - average_activity() ) / - ( LIGHT_EXERCISE - NO_EXERCISE ) ) ) / fatigue_mod; + ( LIGHT_EXERCISE - NO_EXERCISE ) ) ) / sleepiness_mod; // Recover (by default) twice as fast while sleeping if( average_activity() < NO_EXERCISE ) { low_activity_ticks += ( ( NO_EXERCISE - average_activity() ) / - ( NO_EXERCISE - SLEEP_EXERCISE ) ) * fatigue_regen_mod; + ( NO_EXERCISE - SLEEP_EXERCISE ) ) * sleepiness_regen_mod; } } diff --git a/src/activity_tracker.h b/src/activity_tracker.h index cef252f496938..6461f526e1a85 100644 --- a/src/activity_tracker.h +++ b/src/activity_tracker.h @@ -40,7 +40,7 @@ class activity_tracker float instantaneous_activity_level() const; int weariness() const; - void try_reduce_weariness( int bmr, float fatigue_mod, float fatigue_regen_mod ); + void try_reduce_weariness( int bmr, float sleepiness_mod, float sleepiness_regen_mod ); void calorie_adjust( int ncal ); void weary_clear(); void set_intake( int ncal ); diff --git a/src/addiction.cpp b/src/addiction.cpp index 0a35f6061b030..c75be8575543c 100644 --- a/src/addiction.cpp +++ b/src/addiction.cpp @@ -173,7 +173,7 @@ static bool nicotine_effect( Character &u, addiction &add ) SNIPPET.random_from_category( msg ).value_or( translation() ).translated() ); u.add_morale( MORALE_CRAVING_NICOTINE, -15, -3 * in ); if( one_in( 800 - 50 * in ) ) { - u.mod_fatigue( 1 ); + u.mod_sleepiness( 1 ); } if( current_stim > -5 * in && one_in( 400 - 20 * in ) ) { u.mod_stim( -1 ); diff --git a/src/avatar.cpp b/src/avatar.cpp index 357f9193bf34f..bf75f00a69427 100644 --- a/src/avatar.cpp +++ b/src/avatar.cpp @@ -931,20 +931,20 @@ void avatar::disp_morale() { int equilibrium = calc_focus_equilibrium(); - int fatigue_penalty = 0; - const int fatigue_cap = focus_equilibrium_fatigue_cap( equilibrium ); + int sleepiness_penalty = 0; + const int sleepiness_cap = focus_equilibrium_sleepiness_cap( equilibrium ); - if( fatigue_cap < equilibrium ) { - fatigue_penalty = equilibrium - fatigue_cap; - equilibrium = fatigue_cap; + if( sleepiness_cap < equilibrium ) { + sleepiness_penalty = equilibrium - sleepiness_cap; + equilibrium = sleepiness_cap; } int pain_penalty = 0; if( get_perceived_pain() && !has_trait( trait_CENOBITE ) ) { - pain_penalty = calc_focus_equilibrium( true ) - equilibrium - fatigue_penalty; + pain_penalty = calc_focus_equilibrium( true ) - equilibrium - sleepiness_penalty; } - morale->display( equilibrium, pain_penalty, fatigue_penalty ); + morale->display( equilibrium, pain_penalty, sleepiness_penalty ); } void avatar::reset_stats() diff --git a/src/bionics.cpp b/src/bionics.cpp index df20038497535..ee051bac1a2eb 100644 --- a/src/bionics.cpp +++ b/src/bionics.cpp @@ -992,7 +992,7 @@ bool Character::activate_bionic( bionic &bio, bool eff_only, bool *close_bionics for( const string_id &eff : removable ) { remove_effect( eff ); } - // Purging the substance won't remove the fatigue it caused + // Purging the substance won't remove the sleepiness it caused force_comedown( get_effect( effect_adrenaline ) ); force_comedown( get_effect( effect_meth ) ); set_painkiller( 0 ); diff --git a/src/character.cpp b/src/character.cpp index dfc7c165813d9..94de172ae4379 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -567,7 +567,7 @@ Character::Character() : health_tally = 0; hunger = 0; thirst = 0; - fatigue = 0; + sleepiness = 0; sleep_deprivation = 0; daily_sleep = 0_turns; continuous_sleep = 0_turns; @@ -792,8 +792,8 @@ void Character::mod_stat( const std::string &stat, float modifier ) { if( stat == "thirst" ) { mod_thirst( modifier ); - } else if( stat == "fatigue" ) { - mod_fatigue( modifier ); + } else if( stat == "sleepiness" ) { + mod_sleepiness( modifier ); } else if( stat == "oxygen" ) { oxygen += modifier; } else if( stat == "stamina" ) { @@ -3705,15 +3705,15 @@ void Character::do_skill_rust() } } -int Character::focus_equilibrium_fatigue_cap( int equilibrium ) const +int Character::focus_equilibrium_sleepiness_cap( int equilibrium ) const { - if( get_fatigue() >= fatigue_levels::MASSIVE_FATIGUE && equilibrium > 20 ) { + if( get_sleepiness() >= sleepiness_levels::MASSIVE_SLEEPINESS && equilibrium > 20 ) { return 20; - } else if( get_fatigue() >= fatigue_levels::EXHAUSTED && equilibrium > 40 ) { + } else if( get_sleepiness() >= sleepiness_levels::EXHAUSTED && equilibrium > 40 ) { return 40; - } else if( get_fatigue() >= fatigue_levels::DEAD_TIRED && equilibrium > 60 ) { + } else if( get_sleepiness() >= sleepiness_levels::DEAD_TIRED && equilibrium > 60 ) { return 60; - } else if( get_fatigue() >= fatigue_levels::TIRED && equilibrium > 80 ) { + } else if( get_sleepiness() >= sleepiness_levels::TIRED && equilibrium > 80 ) { return 80; } return equilibrium; @@ -3793,7 +3793,7 @@ int Character::calc_focus_equilibrium( bool ignore_pain ) const int Character::calc_focus_change() const { - return focus_equilibrium_fatigue_cap( calc_focus_equilibrium() ) - get_focus(); + return focus_equilibrium_sleepiness_cap( calc_focus_equilibrium() ) - get_focus(); } void Character::update_mental_focus() @@ -4454,7 +4454,7 @@ std::string Character::debug_weary_info() const return string_format( "Weariness: %s Max Full Exert: %s Mult: %g\n BMR: %d CARDIO FITNESS: %d\n %s Thresh: %d At: %d\n Kcal: %d/%d Fatigue: %d Morale: %d Wgt: %d (BMI %.1f)", amt, max_act, move_mult, bmr, cardio_mult, weary_internals, thresh, current, - get_stored_kcal(), get_healthy_kcal(), fatigue, morale, weight, bmi ); + get_stored_kcal(), get_healthy_kcal(), sleepiness, morale, weight, bmi ); } void Character::mod_stored_kcal( int nkcal, const bool ignore_weariness ) @@ -4575,9 +4575,9 @@ void Character::set_thirst( int nthirst ) } } -void Character::mod_fatigue( int nfatigue ) +void Character::mod_sleepiness( int nsleepiness ) { - set_fatigue( fatigue + nfatigue ); + set_sleepiness( sleepiness + nsleepiness ); } void Character::mod_sleep_deprivation( int nsleep_deprivation ) @@ -4585,18 +4585,18 @@ void Character::mod_sleep_deprivation( int nsleep_deprivation ) set_sleep_deprivation( sleep_deprivation + nsleep_deprivation ); } -void Character::set_fatigue( int nfatigue ) +void Character::set_sleepiness( int nsleepiness ) { - nfatigue = std::max( nfatigue, -1000 ); - if( fatigue != nfatigue ) { - fatigue = nfatigue; - on_stat_change( "fatigue", fatigue ); + nsleepiness = std::max( nsleepiness, -1000 ); + if( sleepiness != nsleepiness ) { + sleepiness = nsleepiness; + on_stat_change( "sleepiness", sleepiness ); } } -void Character::set_fatigue( fatigue_levels nfatigue ) +void Character::set_sleepiness( sleepiness_levels nsleepiness ) { - set_fatigue( static_cast( nfatigue ) ); + set_sleepiness( static_cast( nsleepiness ) ); } void Character::set_sleep_deprivation( int nsleep_deprivation ) @@ -4635,9 +4635,9 @@ void Character::reset_continuous_sleep() continuous_sleep = 0_turns; } -int Character::get_fatigue() const +int Character::get_sleepiness() const { - return fatigue; + return sleepiness; } int Character::get_sleep_deprivation() const @@ -4888,8 +4888,8 @@ int Character::weary_threshold() const { const int bmr = base_bmr(); int threshold = bmr * get_option( "WEARY_BMR_MULT" ); - // reduce by 1% per 14 points of fatigue after 150 points - threshold *= 1.0f - ( ( std::max( fatigue, -20 ) - 150 ) / 1400.0f ); + // reduce by 1% per 14 points of sleepiness after 150 points + threshold *= 1.0f - ( ( std::max( sleepiness, -20 ) - 150 ) / 1400.0f ); // Each 2 points of morale increase or decrease by 1% threshold *= 1.0f + ( get_morale_level() / 200.0f ); // TODO: Hunger effects this @@ -5008,51 +5008,51 @@ bool Character::needs_food() const void Character::update_needs( int rate_multiplier ) { const int current_stim = get_stim(); - // Hunger, thirst, & fatigue up every 5 minutes + // Hunger, thirst, & sleepiness up every 5 minutes effect &sleep = get_effect( effect_sleep ); - // No food/thirst/fatigue clock at all + // No food/thirst/sleepiness clock at all const bool debug_ls = has_trait( trait_DEBUG_LS ); - // No food/thirst, capped fatigue clock (only up to tired) + // No food/thirst, capped sleepiness clock (only up to tired) const bool asleep = !sleep.is_null(); const bool lying = asleep || has_effect( effect_lying_down ) || activity.id() == ACT_TRY_SLEEP; needs_rates rates = calc_needs_rates(); - const bool wasnt_fatigued = get_fatigue() <= fatigue_levels::DEAD_TIRED; - // Don't increase fatigue if sleeping or trying to sleep or if we're at the cap. - if( get_fatigue() < 1050 && !asleep && !debug_ls ) { - if( rates.fatigue > 0.0f ) { - int fatigue_roll = roll_remainder( rates.fatigue * rate_multiplier ); - mod_fatigue( fatigue_roll ); + const bool wasnt_sleepinessd = get_sleepiness() <= sleepiness_levels::DEAD_TIRED; + // Don't increase sleepiness if sleeping or trying to sleep or if we're at the cap. + if( get_sleepiness() < 1050 && !asleep && !debug_ls ) { + if( rates.sleepiness > 0.0f ) { + int sleepiness_roll = roll_remainder( rates.sleepiness * rate_multiplier ); + mod_sleepiness( sleepiness_roll ); // Synaptic regen bionic stops SD while awake and boosts it while sleeping if( !has_flag( json_flag_STOP_SLEEP_DEPRIVATION ) ) { - // fatigue_roll should be around 1 - so the counter increases by 1 every minute on average, + // sleepiness_roll should be around 1 - so the counter increases by 1 every minute on average, // but characters who need less sleep will also get less sleep deprived, and vice-versa. // Note: Since needs are updated in 5-minute increments, we have to multiply the roll again by - // 5. If rate_multiplier is > 1, fatigue_roll will be higher and this will work out. - mod_sleep_deprivation( fatigue_roll * 5 ); + // 5. If rate_multiplier is > 1, sleepiness_roll will be higher and this will work out. + mod_sleep_deprivation( sleepiness_roll * 5 ); } - if( !needs_food() && get_fatigue() > fatigue_levels::TIRED ) { - set_fatigue( fatigue_levels::TIRED ); + if( !needs_food() && get_sleepiness() > sleepiness_levels::TIRED ) { + set_sleepiness( sleepiness_levels::TIRED ); set_sleep_deprivation( 0 ); } } } else if( asleep ) { if( rates.recovery > 0.0f ) { int recovered = roll_remainder( rates.recovery * rate_multiplier ); - if( get_fatigue() - recovered < -20 ) { + if( get_sleepiness() - recovered < -20 ) { // Should be wake up, but that could prevent some retroactive regeneration sleep.set_duration( 1_turns ); - mod_fatigue( -25 ); + mod_sleepiness( -25 ); } else { if( has_effect( effect_disrupted_sleep ) || has_effect( effect_recently_coughed ) ) { recovered *= .5; } - mod_fatigue( -recovered ); + mod_sleepiness( -recovered ); // Sleeping on the ground, no bionic = 1x rest_modifier // Sleeping on a bed, no bionic = 2x rest_modifier @@ -5079,9 +5079,9 @@ void Character::update_needs( int rate_multiplier ) // If we're just tired, we'll get a decent boost to our sleep quality. // The opposite is true for very tired characters. - if( get_fatigue() < fatigue_levels::DEAD_TIRED ) { + if( get_sleepiness() < sleepiness_levels::DEAD_TIRED ) { rest_modifier += 2; - } else if( get_fatigue() >= fatigue_levels::EXHAUSTED ) { + } else if( get_sleepiness() >= sleepiness_levels::EXHAUSTED ) { rest_modifier = ( rest_modifier > 2 ) ? rest_modifier - 2 : 1; } @@ -5107,8 +5107,8 @@ void Character::update_needs( int rate_multiplier ) if( has_trait( trait_M_SKIN3 ) ) { // Spores happen! if( here.has_flag_ter_or_furn( ter_furn_flag::TFLAG_FUNGUS, pos() ) ) { - if( get_fatigue() >= 0 ) { - mod_fatigue( -5 ); // Local guides need less sleep on fungal soil + if( get_sleepiness() >= 0 ) { + mod_sleepiness( -5 ); // Local guides need less sleep on fungal soil } if( calendar::once_every( 1_hours ) ) { spores(); // spawn some P O O F Y B O I S @@ -5116,11 +5116,11 @@ void Character::update_needs( int rate_multiplier ) } } if( has_trait( trait_WATERSLEEP ) || has_trait( trait_UNDINE_SLEEP_WATER ) ) { - mod_fatigue( -3 ); // Fish sleep less in water + mod_sleepiness( -3 ); // Fish sleep less in water } } } - if( is_avatar() && wasnt_fatigued && get_fatigue() > fatigue_levels::DEAD_TIRED && !lying ) { + if( is_avatar() && wasnt_sleepinessd && get_sleepiness() > sleepiness_levels::DEAD_TIRED && !lying ) { if( !activity ) { add_msg_if_player( m_warning, _( "You're feeling tired. %s to lie down for sleep." ), press_x( ACTION_SLEEP ) ); @@ -5179,10 +5179,10 @@ needs_rates Character::calc_needs_rates() const rates.thirst *= 0.7f; } - static const std::string player_fatigue_rate( "PLAYER_FATIGUE_RATE" ); - rates.fatigue = get_option< float >( player_fatigue_rate ); - static const std::string fatigue_modifier( "fatigue_modifier" ); - rates.fatigue *= 1.0f + mutation_value( fatigue_modifier ); + static const std::string player_sleepiness_rate( "PLAYER_SLEEPINESS_RATE" ); + rates.sleepiness = get_option< float >( player_sleepiness_rate ); + static const std::string sleepiness_modifier( "sleepiness_modifier" ); + rates.sleepiness *= 1.0f + mutation_value( sleepiness_modifier ); if( asleep ) { calc_sleep_recovery_rate( rates ); @@ -5196,7 +5196,7 @@ needs_rates Character::calc_needs_rates() const if( has_trait( trait_ROOTS2 ) || has_trait( trait_ROOTS3 ) || has_trait( trait_CHLOROMORPH ) ) { rates.hunger *= 0.5f; rates.thirst *= 0.5f; - rates.fatigue *= 0.5f; + rates.sleepiness *= 0.5f; } } @@ -5212,7 +5212,7 @@ needs_rates Character::calc_needs_rates() const } rates.hunger = enchantment_cache->modify_value( enchant_vals::mod::HUNGER, rates.hunger ); - rates.fatigue = enchantment_cache->modify_value( enchant_vals::mod::FATIGUE, rates.fatigue ); + rates.sleepiness = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS, rates.sleepiness ); rates.thirst = enchantment_cache->modify_value( enchant_vals::mod::THIRST, rates.thirst ); return rates; @@ -5221,8 +5221,8 @@ needs_rates Character::calc_needs_rates() const void Character::calc_sleep_recovery_rate( needs_rates &rates ) const { const effect &sleep = get_effect( effect_sleep ); - static const std::string fatigue_regen_modifier( "fatigue_regen_modifier" ); - rates.recovery = 1.0f + mutation_value( fatigue_regen_modifier ); + static const std::string sleepiness_regen_modifier( "sleepiness_regen_modifier" ); + rates.recovery = 1.0f + mutation_value( sleepiness_regen_modifier ); // -5% sleep recovery rate for every main part below cold float temp_mod = 0.0f; @@ -5377,13 +5377,13 @@ void Character::check_needs_extremes() } // Check if we're falling asleep, unless we're sleeping - if( get_fatigue() >= fatigue_levels::EXHAUSTED + 25 && !in_sleep_state() ) { - if( get_fatigue() >= fatigue_levels::MASSIVE_FATIGUE ) { + if( get_sleepiness() >= sleepiness_levels::EXHAUSTED + 25 && !in_sleep_state() ) { + if( get_sleepiness() >= sleepiness_levels::MASSIVE_SLEEPINESS ) { add_msg_if_player( m_bad, _( "Survivor sleep now." ) ); get_event_bus().send( getID() ); - mod_fatigue( -10 ); + mod_sleepiness( -10 ); fall_asleep(); - } else if( get_fatigue() >= 800 && calendar::once_every( 30_minutes ) ) { + } else if( get_sleepiness() >= 800 && calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "Anywhere would be a good place to sleep…" ) ); } else if( calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "You feel like you haven't slept in days." ) ); @@ -5392,8 +5392,8 @@ void Character::check_needs_extremes() // Even if we're not Exhausted, we really should be feeling lack/sleep earlier // Penalties start at Dead Tired and go from there - if( get_fatigue() >= fatigue_levels::DEAD_TIRED && !in_sleep_state() ) { - if( get_fatigue() >= 700 ) { + if( get_sleepiness() >= sleepiness_levels::DEAD_TIRED && !in_sleep_state() ) { + if( get_sleepiness() >= 700 ) { if( calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "You're too physically tired to stop yawning." ) ); add_effect( effect_lack_sleep, 30_minutes + 1_turns ); @@ -5403,7 +5403,7 @@ void Character::check_needs_extremes() // Rivet's idea: look out for microsleeps! fall_asleep( 30_seconds ); } - } else if( get_fatigue() >= fatigue_levels::EXHAUSTED ) { + } else if( get_sleepiness() >= sleepiness_levels::EXHAUSTED ) { if( calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "How much longer until bedtime?" ) ); add_effect( effect_lack_sleep, 30_minutes + 1_turns ); @@ -5412,7 +5412,7 @@ void Character::check_needs_extremes() if( one_in( 100 + int_cur ) ) { fall_asleep( 30_seconds ); } - } else if( get_fatigue() >= fatigue_levels::DEAD_TIRED && calendar::once_every( 30_minutes ) ) { + } else if( get_sleepiness() >= sleepiness_levels::DEAD_TIRED && calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "*yawn* You should really get some sleep." ) ); add_effect( effect_lack_sleep, 30_minutes + 1_turns ); } @@ -5427,11 +5427,11 @@ void Character::check_needs_extremes() if( sleep_deprivation < SLEEP_DEPRIVATION_MINOR ) { add_msg_if_player( m_warning, _( "Your mind feels tired. It's been a while since you've slept well." ) ); - mod_fatigue( 1 ); + mod_sleepiness( 1 ); } else if( sleep_deprivation < SLEEP_DEPRIVATION_SERIOUS ) { add_msg_if_player( m_bad, _( "Your mind feels foggy from a lack of good sleep, and your eyes keep trying to close against your will." ) ); - mod_fatigue( 5 ); + mod_sleepiness( 5 ); if( one_in( 10 ) ) { mod_daily_health( -1, -10 ); @@ -5439,7 +5439,7 @@ void Character::check_needs_extremes() } else if( sleep_deprivation < SLEEP_DEPRIVATION_MAJOR ) { add_msg_if_player( m_bad, _( "Your mind feels weary, and you dread every wakeful minute that passes. You crave sleep, and feel like you're about to collapse." ) ); - mod_fatigue( 10 ); + mod_sleepiness( 10 ); if( one_in( 5 ) ) { mod_daily_health( -2, -10 ); @@ -5447,14 +5447,14 @@ void Character::check_needs_extremes() } else if( sleep_deprivation < SLEEP_DEPRIVATION_MASSIVE ) { add_msg_if_player( m_bad, _( "You haven't slept decently for so long that your whole body is screaming for mercy. It's a miracle that you're still awake, but it feels more like a curse now." ) ); - mod_fatigue( 40 ); + mod_sleepiness( 40 ); mod_daily_health( -5, -10 ); } // else you pass out for 20 hours, guaranteed // Microsleeps are slightly worse if you're sleep deprived, but not by much. (chance: 1 in (75 + int_cur) at lethal sleep deprivation) - // Note: these can coexist with fatigue-related microsleeps + // Note: these can coexist with sleepiness-related microsleeps /** @EFFECT_INT slightly decreases occurrence of short naps when sleep deprived */ if( one_in( static_cast( sleep_deprivation_pct * 75 ) + int_cur ) ) { fall_asleep( 30_seconds ); @@ -5469,10 +5469,10 @@ void Character::check_needs_extremes() if( one_in( static_cast( ( 1 - sleep_deprivation_pct ) * 100 ) + per_cur ) || sleep_deprivation >= SLEEP_DEPRIVATION_MASSIVE ) { add_msg_player_or_npc( m_bad, - _( "Your body collapses due to sleep deprivation, your neglected fatigue rushing back all at once, and you pass out on the spot." ) + _( "Your body collapses due to sleep deprivation, your neglected sleepiness rushing back all at once, and you pass out on the spot." ) , _( " collapses to the ground from exhaustion." ) ); - if( get_fatigue() < fatigue_levels::EXHAUSTED ) { - set_fatigue( fatigue_levels::EXHAUSTED ); + if( get_sleepiness() < sleepiness_levels::EXHAUSTED ) { + set_sleepiness( sleepiness_levels::EXHAUSTED ); } if( sleep_deprivation >= SLEEP_DEPRIVATION_MAJOR ) { @@ -5551,7 +5551,7 @@ bool Character::is_hibernating() const { // Hibernating only kicks in whilst Engorged; separate tracking for hunger/thirst here // as a safety catch. One test subject managed to get two Colds during hibernation; - // since those add fatigue and dry out the character, the subject went for the full 10 days plus + // since those add sleepiness and dry out the character, the subject went for the full 10 days plus // a little, and came out of it well into Parched. Hibernating shouldn't endanger your // life like that--but since there's much less fluid reserve than food reserve, // simply using the same numbers won't work. @@ -5594,7 +5594,7 @@ void Character::temp_equalizer( const bodypart_id &bp1, const bodypart_id &bp2 ) Character::comfort_response_t Character::base_comfort_value( const tripoint &p ) const { // Comfort of sleeping spots is "objective", while sleep_spot( p ) is "subjective" - // As in the latter also checks for fatigue and other variables while this function + // As in the latter also checks for sleepiness and other variables while this function // only looks at the base comfyness of something. It's still subjective, in a sense, // as arachnids who sleep in webs will find most places comfortable for instance. int comfort = 0; @@ -6373,8 +6373,8 @@ mutation_value_map = { { "temperature_speed_modifier", calc_mutation_value<&mutation_branch::temperature_speed_modifier> }, { "metabolism_modifier", calc_mutation_value<&mutation_branch::metabolism_modifier> }, { "thirst_modifier", calc_mutation_value<&mutation_branch::thirst_modifier> }, - { "fatigue_regen_modifier", calc_mutation_value<&mutation_branch::fatigue_regen_modifier> }, - { "fatigue_modifier", calc_mutation_value<&mutation_branch::fatigue_modifier> }, + { "sleepiness_regen_modifier", calc_mutation_value<&mutation_branch::sleepiness_regen_modifier> }, + { "sleepiness_modifier", calc_mutation_value<&mutation_branch::sleepiness_modifier> }, { "stamina_regen_modifier", calc_mutation_value<&mutation_branch::stamina_regen_modifier> }, { "stealth_modifier", calc_mutation_value<&mutation_branch::stealth_modifier> }, { "str_modifier", calc_mutation_value<&mutation_branch::str_modifier> }, @@ -7180,7 +7180,7 @@ void Character::update_stamina( int turns ) if( !has_bionic( bio_synlungs ) ) { stamina_recovery = enchantment_cache->modify_value( enchant_vals::mod::REGEN_STAMINA, stamina_recovery ); - // TODO: recovering stamina causes hunger/thirst/fatigue. + // TODO: recovering stamina causes hunger/thirst/sleepiness. // TODO: Tiredness slowing recovery // stim recovers stamina (or impairs recovery) @@ -9200,8 +9200,8 @@ void Character::fall_asleep() } // some days worth of round-the-clock Snooze. Cata seasons default to 91 days. fall_asleep( 10_days ); - // If you're not fatigued enough for 10 days, you won't sleep the whole thing. - // In practice, the fatigue from filling the tank from (no msg) to Time For Bed + // If you're not sleepinessd enough for 10 days, you won't sleep the whole thing. + // In practice, the sleepiness from filling the tank from (no msg) to Time For Bed // will last about 8 days. } else { fall_asleep( 10_hours ); // default max sleep time. @@ -10910,15 +10910,15 @@ void Character::process_one_effect( effect &it, bool is_new ) } } - // Handle fatigue - val = get_effect( "FATIGUE", reduced ); - // Prevent ongoing fatigue effects while asleep. + // Handle sleepiness + val = get_effect( "SLEEPINESS", reduced ); + // Prevent ongoing sleepiness effects while asleep. // These are meant to change how fast you get tired, not how long you sleep. if( val != 0 && !in_sleep_state() ) { mod = 1; - if( is_new || it.activated( calendar::turn, "FATIGUE", val, reduced, mod ) ) { - mod_fatigue( bound_mod_to_vals( get_fatigue(), val, it.get_max_val( "FATIGUE", reduced ), - it.get_min_val( "FATIGUE", reduced ) ) ); + if( is_new || it.activated( calendar::turn, "SLEEPINESS", val, reduced, mod ) ) { + mod_sleepiness( bound_mod_to_vals( get_sleepiness(), val, it.get_max_val( "SLEEPINESS", reduced ), + it.get_min_val( "SLEEPINESS", reduced ) ) ); } } @@ -11364,10 +11364,10 @@ int Character::sleep_spot( const tripoint &p ) const sleepy += 25; // It's time for a nice nap. } - if( get_fatigue() < fatigue_levels::TIRED + 1 ) { - sleepy -= static_cast( ( fatigue_levels::TIRED + 1 - get_fatigue() ) / 4 ); + if( get_sleepiness() < sleepiness_levels::TIRED + 1 ) { + sleepy -= static_cast( ( sleepiness_levels::TIRED + 1 - get_sleepiness() ) / 4 ); } else { - sleepy += static_cast( ( get_fatigue() - fatigue_levels::TIRED + 1 ) / 16 ); + sleepy += static_cast( ( get_sleepiness() - sleepiness_levels::TIRED + 1 ) / 16 ); } if( current_stim > 0 || !has_trait( trait_INSOMNIA ) ) { @@ -13222,7 +13222,7 @@ void Character::environmental_revert_effect() set_all_parts_hp_to_max(); set_hunger( 0 ); set_thirst( 0 ); - set_fatigue( 0 ); + set_sleepiness( 0 ); set_lifestyle( 0 ); set_daily_health( 0 ); set_stim( 0 ); diff --git a/src/character.h b/src/character.h index b31b211c0088f..d652bd940db32 100644 --- a/src/character.h +++ b/src/character.h @@ -144,82 +144,82 @@ enum vision_modes { NUM_VISION_MODES }; -enum class fatigue_levels : int { +enum class sleepiness_levels : int { TIRED = 191, DEAD_TIRED = 383, EXHAUSTED = 575, - MASSIVE_FATIGUE = 1000 + MASSIVE_SLEEPINESS = 1000 }; -const std::unordered_map fatigue_level_strs = { { - { "TIRED", fatigue_levels::TIRED }, - { "DEAD_TIRED", fatigue_levels::DEAD_TIRED }, - { "EXHAUSTED", fatigue_levels::EXHAUSTED }, - { "MASSIVE_FATIGUE", fatigue_levels::MASSIVE_FATIGUE } +const std::unordered_map sleepiness_level_strs = { { + { "TIRED", sleepiness_levels::TIRED }, + { "DEAD_TIRED", sleepiness_levels::DEAD_TIRED }, + { "EXHAUSTED", sleepiness_levels::EXHAUSTED }, + { "MASSIVE_SLEEPINESS", sleepiness_levels::MASSIVE_SLEEPINESS } } }; -constexpr inline bool operator>=( const fatigue_levels &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator>=( const sleepiness_levels &lhs, const sleepiness_levels &rhs ) { return static_cast( lhs ) >= static_cast( rhs ); } -constexpr inline bool operator<( const fatigue_levels &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator<( const sleepiness_levels &lhs, const sleepiness_levels &rhs ) { return static_cast( lhs ) < static_cast( rhs ); } template -constexpr inline bool operator>=( const T &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator>=( const T &lhs, const sleepiness_levels &rhs ) { return lhs >= static_cast( rhs ); } template -constexpr inline bool operator>( const T &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator>( const T &lhs, const sleepiness_levels &rhs ) { return lhs > static_cast( rhs ); } template -constexpr inline bool operator<=( const T &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator<=( const T &lhs, const sleepiness_levels &rhs ) { return lhs <= static_cast( rhs ); } template -constexpr inline bool operator<( const T &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator<( const T &lhs, const sleepiness_levels &rhs ) { return lhs < static_cast( rhs ); } template -constexpr inline int operator/( const fatigue_levels &lhs, const T &rhs ) +constexpr inline int operator/( const sleepiness_levels &lhs, const T &rhs ) { return static_cast( lhs ) / rhs; } template -constexpr inline int operator+( const fatigue_levels &lhs, const T &rhs ) +constexpr inline int operator+( const sleepiness_levels &lhs, const T &rhs ) { return static_cast( lhs ) + rhs; } template -constexpr inline int operator-( const fatigue_levels &lhs, const T &rhs ) +constexpr inline int operator-( const sleepiness_levels &lhs, const T &rhs ) { return static_cast( lhs ) - rhs; } template -constexpr inline int operator-( const T &lhs, const fatigue_levels &rhs ) +constexpr inline int operator-( const T &lhs, const sleepiness_levels &rhs ) { return lhs - static_cast( rhs ); } /** @brief five levels of consequences for days without sleep - @details Sleep deprivation, distinct from fatigue, is defined in minutes. Although most + @details Sleep deprivation, distinct from sleepiness, is defined in minutes. Although most calculations scale linearly, malus is bestowed only upon reaching the tiers defined below. - @note Sleep deprivation increases fatigue. Fatigue increase scales with the severity of sleep + @note Sleep deprivation increases sleepiness. Fatigue increase scales with the severity of sleep deprivation. @note Sleep deprivation kicks in if lack of sleep is avoided with stimulants or otherwise for long periods of time @@ -489,7 +489,7 @@ struct ret_val::default_failure : public struct needs_rates { float thirst = 0.0f; float hunger = 0.0f; - float fatigue = 0.0f; + float sleepiness = 0.0f; float recovery = 0.0f; float kcal = 0.0f; }; @@ -691,22 +691,22 @@ class Character : public Creature, public visitable void mod_continuous_sleep( time_duration mod ); void reset_continuous_sleep(); - int get_fatigue() const; + int get_sleepiness() const; int get_sleep_deprivation() const; /** Modifiers for need values exclusive to characters */ void mod_stored_kcal( int nkcal, bool ignore_weariness = false ); void mod_hunger( int nhunger ); void mod_thirst( int nthirst ); - void mod_fatigue( int nfatigue ); + void mod_sleepiness( int nsleepiness ); void mod_sleep_deprivation( int nsleep_deprivation ); /** Setters for need values exclusive to characters */ void set_stored_kcal( int kcal ); void set_hunger( int nhunger ); void set_thirst( int nthirst ); - void set_fatigue( int nfatigue ); - void set_fatigue( fatigue_levels nfatigue ); + void set_sleepiness( int nsleepiness ); + void set_sleepiness( sleepiness_levels nsleepiness ); void set_sleep_deprivation( int nsleep_deprivation ); protected: @@ -926,7 +926,7 @@ class Character : public Creature, public visitable void update_enchantment_mutations(); /** Returns true if character needs food, false if character is an NPC with NO_NPC_FOOD set */ bool needs_food() const; - /** Increases hunger, thirst, fatigue and stimulants wearing off. `rate_multiplier` is for retroactive updates. */ + /** Increases hunger, thirst, sleepiness and stimulants wearing off. `rate_multiplier` is for retroactive updates. */ void update_needs( int rate_multiplier ); needs_rates calc_needs_rates() const; void calc_sleep_recovery_rate( needs_rates &rates ) const; @@ -947,11 +947,11 @@ class Character : public Creature, public visitable comfort_level level = comfort_level::neutral; const item *aid = nullptr; }; - /** Rate point's ability to serve as a bed. Only takes certain mutations into account, and not fatigue nor stimulants. */ + /** Rate point's ability to serve as a bed. Only takes certain mutations into account, and not sleepiness nor stimulants. */ comfort_response_t base_comfort_value( const tripoint &p ) const; - /** Returns focus equilibrium cap due to fatigue **/ - int focus_equilibrium_fatigue_cap( int equilibrium ) const; + /** Returns focus equilibrium cap due to sleepiness **/ + int focus_equilibrium_sleepiness_cap( int equilibrium ) const; /** Uses morale and other factors to return the character's focus target goto value */ int calc_focus_equilibrium( bool ignore_pain = false ) const; /** Calculates actual focus gain/loss value from focus equilibrium*/ @@ -3325,9 +3325,9 @@ class Character : public Creature, public visitable /** Used to apply stimulation modifications from food and medication **/ void modify_stimulation( const islot_comestible &comest ); - /** Used to apply fatigue modifications from food and medication **/ + /** Used to apply sleepiness modifications from food and medication **/ /** Used to apply radiation from food and medication **/ - void modify_fatigue( const islot_comestible &comest ); + void modify_sleepiness( const islot_comestible &comest ); void modify_radiation( const islot_comestible &comest ); /** Used to apply addiction modifications from food and medication **/ void modify_addiction( const islot_comestible &comest ); @@ -3747,7 +3747,7 @@ class Character : public Creature, public visitable double vomit_mod(); /** Checked each turn during "lying_down", returns true if the player falls asleep */ bool can_sleep(); - /** Rate point's ability to serve as a bed. Takes all mutations, fatigue and stimulants into account. */ + /** Rate point's ability to serve as a bed. Takes all mutations, sleepiness and stimulants into account. */ int sleep_spot( const tripoint &p ) const; /** Processes human-specific effects of effects before calling Creature::process_effects(). */ void process_effects() override; @@ -3799,7 +3799,7 @@ class Character : public Creature, public visitable /** Key to select the mutation in the UI. */ char key = ' '; /** - * Time (in turns) until the mutation increase hunger/thirst/fatigue according + * Time (in turns) until the mutation increase hunger/thirst/sleepiness according * to its cost (@ref mutation_branch::cost). When those costs have been paid, this * is reset to @ref mutation_branch::cooldown. */ @@ -3979,7 +3979,7 @@ class Character : public Creature, public visitable // Additional vision sources, currently only used by avatars std::map moncams; - /// @brief Needs (hunger, starvation, thirst, fatigue, etc.) + /// @brief Needs (hunger, starvation, thirst, sleepiness, etc.) // Stored calories is a value in 'calories' - 1/1000s of kcals (or Calories) int stored_calories; int healthy_calories; @@ -4004,7 +4004,7 @@ class Character : public Creature, public visitable time_duration daily_sleep = 0_turns; time_duration continuous_sleep = 0_turns; - int fatigue; + int sleepiness; int sleep_deprivation; bool check_encumbrance = true; bool cache_inventory_is_valid = false; diff --git a/src/character_body.cpp b/src/character_body.cpp index 96a2dec161641..d863e1c8d74e1 100644 --- a/src/character_body.cpp +++ b/src/character_body.cpp @@ -220,11 +220,11 @@ void Character::update_body( const time_point &from, const time_point &to ) } const int five_mins = ticks_between( from, to, 5_minutes ); if( five_mins > 0 ) { - static const std::string fatigue_modifier( "fatigue_modifier" ); - static const std::string fatigue_regen_modifier( "fatigue_regen_modifier" ); + static const std::string sleepiness_modifier( "sleepiness_modifier" ); + static const std::string sleepiness_regen_modifier( "sleepiness_regen_modifier" ); activity_history.try_reduce_weariness( base_bmr(), - 1.0f + mutation_value( fatigue_modifier ), - 1.0f + mutation_value( fatigue_regen_modifier ) ); + 1.0f + mutation_value( sleepiness_modifier ), + 1.0f + mutation_value( sleepiness_regen_modifier ) ); check_needs_extremes(); update_needs( five_mins ); regen( five_mins ); @@ -237,8 +237,8 @@ void Character::update_body( const time_point &from, const time_point &to ) if( in_sleep_state() && was_sleeping ) { needs_rates tmp_rates; calc_sleep_recovery_rate( tmp_rates ); - const int fatigue_regen_rate = tmp_rates.recovery; - const time_duration effective_time_slept = ( to - from ) * fatigue_regen_rate; + const int sleepiness_regen_rate = tmp_rates.recovery; + const time_duration effective_time_slept = ( to - from ) * sleepiness_regen_rate; mod_daily_sleep( effective_time_slept ); mod_continuous_sleep( effective_time_slept ); } @@ -456,11 +456,11 @@ void Character::update_bodytemp() // Give SOME bonus to those living furnaces with extreme metabolism const units::temperature_delta metabolism_warmth = std::max( 0.0f, met_rate - 1.0f ) * 2_C_delta; // Fatigue - // -1.725C when exhausted, scaled up and capped at 900 fatigue. - const float scaled_fatigue = clamp( get_fatigue(), 0, - 900 ) / static_cast( fatigue_levels::EXHAUSTED ); - const units::temperature_delta fatigue_warmth = has_sleep ? 0_C_delta : -1.725_C_delta * - scaled_fatigue; + // -1.725C when exhausted, scaled up and capped at 900 sleepiness. + const float scaled_sleepiness = clamp( get_sleepiness(), 0, + 900 ) / static_cast( sleepiness_levels::EXHAUSTED ); + const units::temperature_delta sleepiness_warmth = has_sleep ? 0_C_delta : -1.725_C_delta * + scaled_sleepiness; // Sunlight const float scaled_sun_irradiance = incident_sun_irradiance( get_weather().weather_id, @@ -565,8 +565,8 @@ void Character::update_bodytemp() set_part_temp_conv( bp, temp ); // HUNGER / STARVATION mod_part_temp_conv( bp, hunger_warmth ); - // FATIGUE - mod_part_temp_conv( bp, fatigue_warmth ); + // SLEEPINESS + mod_part_temp_conv( bp, sleepiness_warmth ); // Mutations mod_part_temp_conv( bp, mutation_heat_low ); // BMI @@ -775,7 +775,7 @@ void Character::update_bodytemp() add_msg( m_warning, _( "You feel cold and shiver." ) ); } if( temp_after <= BODYTEMP_VERY_COLD && - get_fatigue() <= fatigue_levels::DEAD_TIRED && !has_bionic( bio_sleep_shutdown ) ) { + get_sleepiness() <= sleepiness_levels::DEAD_TIRED && !has_bionic( bio_sleep_shutdown ) ) { if( bp == body_part_torso ) { add_msg( m_warning, _( "Your shivering prevents you from sleeping." ) ); wake_up(); @@ -921,9 +921,9 @@ void Character::update_frostbite( const bodypart_id &bp, const int FBwindPower, void Character::update_stomach( const time_point &from, const time_point &to ) { const needs_rates rates = calc_needs_rates(); - // No food/thirst/fatigue clock at all + // No food/thirst/sleepiness clock at all const bool debug_ls = has_trait( trait_DEBUG_LS ); - // No food/thirst, capped fatigue clock (only up to tired) + // No food/thirst, capped sleepiness clock (only up to tired) const bool npc_no_food = !needs_food(); const bool foodless = debug_ls || npc_no_food; const bool no_thirst = has_flag( json_flag_NO_THIRST ); diff --git a/src/character_morale.cpp b/src/character_morale.cpp index b9e4bb42d6ef8..657541bcd9919 100644 --- a/src/character_morale.cpp +++ b/src/character_morale.cpp @@ -170,7 +170,7 @@ void Character::check_and_recover_morale() test_morale.on_stat_change( "hunger", get_hunger() ); test_morale.on_stat_change( "thirst", get_thirst() ); - test_morale.on_stat_change( "fatigue", get_fatigue() ); + test_morale.on_stat_change( "sleepiness", get_sleepiness() ); test_morale.on_stat_change( "pain", get_pain() ); test_morale.on_stat_change( "pkill", get_painkiller() ); test_morale.on_stat_change( "perceived_pain", get_perceived_pain() ); diff --git a/src/condition.cpp b/src/condition.cpp index 7453df288a0a4..5c29c9902ad18 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -849,15 +849,15 @@ conditional_t::func f_need( const JsonObject &jo, std::string_view member, bool dov = get_dbl_or_var( jo, "amount" ); } else if( jo.has_string( "level" ) ) { const std::string &level = jo.get_string( "level" ); - auto flevel = fatigue_level_strs.find( level ); - if( flevel != fatigue_level_strs.end() ) { + auto flevel = sleepiness_level_strs.find( level ); + if( flevel != sleepiness_level_strs.end() ) { dov.min.dbl_val = static_cast( flevel->second ); } } return [need, dov, is_npc]( dialogue & d ) { const talker *actor = d.actor( is_npc ); int amount = dov.evaluate( d ); - return ( actor->get_fatigue() > amount && need.evaluate( d ) == "fatigue" ) || + return ( actor->get_sleepiness() > amount && need.evaluate( d ) == "sleepiness" ) || ( actor->get_hunger() > amount && need.evaluate( d ) == "hunger" ) || ( actor->get_thirst() > amount && need.evaluate( d ) == "thirst" ); }; @@ -1878,7 +1878,7 @@ std::unordered_map const f_get_vals { "dexterity_bonus", &talker::get_dex_bonus }, { "dexterity", &talker::dex_cur }, { "exp", &talker::get_kill_xp }, - { "fatigue", &talker::get_fatigue }, + { "sleepiness", &talker::get_sleepiness }, { "fine_detail_vision_mod", &talker::get_fine_detail_vision_mod }, { "focus", &talker::focus_cur }, { "friendly", &talker::get_friendly }, @@ -2001,7 +2001,7 @@ std::unordered_map const f_set_vals { "dexterity_base", &talker::set_dex_max }, { "dexterity_bonus", &talker::set_dex_bonus }, { "exp", &talker::set_kill_xp }, - { "fatigue", &talker::set_fatigue }, + { "sleepiness", &talker::set_sleepiness }, { "friendly", &talker::set_friendly }, { "height", &talker::set_height }, { "intelligence_base", &talker::set_int_max }, diff --git a/src/construction.cpp b/src/construction.cpp index 4c92fad4a0d1d..f8847ac2c31d4 100644 --- a/src/construction.cpp +++ b/src/construction.cpp @@ -1573,7 +1573,7 @@ void construct::done_digormine_stair( const tripoint_bub_ms &p, bool dig, int mine_penalty = dig ? 0 : 10; player_character.mod_stored_kcal( -43 - 9 * mine_penalty - 9 * no_mut_penalty ); player_character.mod_thirst( 5 + mine_penalty + no_mut_penalty ); - player_character.mod_fatigue( 10 + mine_penalty + no_mut_penalty ); + player_character.mod_sleepiness( 10 + mine_penalty + no_mut_penalty ); if( tmpmap.ter( local_tmp ) == t_lava ) { if( !query_yn( _( "The rock feels much warmer than normal. Proceed?" ) ) ) { @@ -1680,7 +1680,7 @@ void construct::done_mine_upstair( const tripoint_bub_ms &p, Character &player_c int no_mut_penalty = dig_muts ? 15 : 0; player_character.mod_stored_kcal( -174 - 9 * no_mut_penalty ); player_character.mod_thirst( 20 + no_mut_penalty ); - player_character.mod_fatigue( 25 + no_mut_penalty ); + player_character.mod_sleepiness( 25 + no_mut_penalty ); add_msg( _( "You drill out a passage, heading for the surface." ) ); here.ter_set( p.xy(), t_stairs_up ); // There's the bottom half diff --git a/src/consumption.cpp b/src/consumption.cpp index 10a3ef7308494..9439aa718ff0f 100644 --- a/src/consumption.cpp +++ b/src/consumption.cpp @@ -1224,9 +1224,9 @@ void Character::modify_stimulation( const islot_comestible &comest ) } } -void Character::modify_fatigue( const islot_comestible &comest ) +void Character::modify_sleepiness( const islot_comestible &comest ) { - mod_fatigue( -comest.fatigue_mod ); + mod_sleepiness( -comest.sleepiness_mod ); } void Character::modify_addiction( const islot_comestible &comest ) @@ -1529,7 +1529,7 @@ bool Character::consume_effects( item &food ) modify_health( comest ); } modify_stimulation( comest ); - modify_fatigue( comest ); + modify_sleepiness( comest ); modify_addiction( comest ); modify_morale( food, nutr ); @@ -1540,7 +1540,7 @@ bool Character::consume_effects( item &food ) add_msg_if_player( _( "You gorge yourself, preparing to hibernate." ) ); if( one_in( 2 ) ) { // 50% chance of the food tiring you - mod_fatigue( nutr ); + mod_sleepiness( nutr ); } } if( ( nutr > 0 && get_hunger() < -200 ) || ( comest.quench > 0 && get_thirst() < -200 ) ) { @@ -1548,7 +1548,7 @@ bool Character::consume_effects( item &food ) add_msg_if_player( _( "You feel stocked for a day or two. Got your bed all ready and secured?" ) ); if( one_in( 2 ) ) { // And another 50%, intended cumulative - mod_fatigue( nutr ); + mod_sleepiness( nutr ); } } @@ -1557,13 +1557,13 @@ bool Character::consume_effects( item &food ) _( "Mmm. You can still fit some more in… but maybe you should get comfortable and sleep." ) ); if( !one_in( 3 ) ) { // Third check, this one at 66% - mod_fatigue( nutr ); + mod_sleepiness( nutr ); } } if( ( nutr > 0 && get_hunger() < -600 ) || ( comest.quench > 0 && get_thirst() < -600 ) ) { add_msg_if_player( _( "That filled a hole! Time for bed…" ) ); // At this point, you're done. Schlaf gut. - mod_fatigue( nutr ); + mod_sleepiness( nutr ); } } // Moved here and changed a bit - it was too complex @@ -1794,7 +1794,7 @@ static bool consume_med( item &target, Character &you ) // Assume that parenteral meds don't spoil, so don't apply rot you.modify_health( comest ); you.modify_stimulation( comest ); - you.modify_fatigue( comest ); + you.modify_sleepiness( comest ); you.modify_addiction( comest ); you.modify_morale( target ); activate_consume_eocs( you, target ); diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index ad4816741e1ab..d598f9c56f4c8 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -1472,7 +1472,7 @@ static void character_edit_needs_menu( Character &you ) { std::pair hunger_pair = display::hunger_text_color( you ); std::pair thirst_pair = display::thirst_text_color( you ); - std::pair fatigue_pair = display::fatigue_text_color( you ); + std::pair sleepiness_pair = display::sleepiness_text_color( you ); std::pair weariness_pair = display::weariness_text_color( you ); std::stringstream data; @@ -1480,8 +1480,8 @@ static void character_edit_needs_menu( Character &you ) hunger_pair.second ) ) << std::endl; data << string_format( _( "Thirst: %d %s" ), you.get_thirst(), colorize( thirst_pair.first, thirst_pair.second ) ) << std::endl; - data << string_format( _( "Fatigue: %d %s" ), you.get_fatigue(), colorize( fatigue_pair.first, - fatigue_pair.second ) ) << std::endl; + data << string_format( _( "Fatigue: %d %s" ), you.get_sleepiness(), colorize( sleepiness_pair.first, + sleepiness_pair.second ) ) << std::endl; data << string_format( _( "Weariness: %d %s" ), you.weariness(), colorize( weariness_pair.first, weariness_pair.second ) ) << std::endl; data << std::endl; @@ -1506,7 +1506,7 @@ static void character_edit_needs_menu( Character &you ) smenu.addentry( 2, true, 'S', "%s: %d", _( "Stomach kCal" ), you.stomach.get_calories() ); smenu.addentry( 3, true, 'G', "%s: %d", _( "Gut kCal" ), you.guts.get_calories() ); smenu.addentry( 4, true, 't', "%s: %d", _( "Thirst" ), you.get_thirst() ); - smenu.addentry( 5, true, 'f', "%s: %d", _( "Fatigue" ), you.get_fatigue() ); + smenu.addentry( 5, true, 'f', "%s: %d", _( "Fatigue" ), you.get_sleepiness() ); smenu.addentry( 6, true, 'd', "%s: %d", _( "Sleep Deprivation" ), you.get_sleep_deprivation() ); smenu.addentry( 7, true, 'w', "%s: %d", _( "Weariness" ), you.weariness() ); smenu.addentry( 8, true, 'a', _( "Reset all basic needs" ) ); @@ -1552,8 +1552,8 @@ static void character_edit_needs_menu( Character &you ) break; case 5: - if( query_int( value, _( "Set fatigue to? Currently: %d" ), you.get_fatigue() ) ) { - you.set_fatigue( value ); + if( query_int( value, _( "Set sleepiness to? Currently: %d" ), you.get_sleepiness() ) ) { + you.set_sleepiness( value ); } break; @@ -1574,7 +1574,7 @@ static void character_edit_needs_menu( Character &you ) you.initialize_stomach_contents(); you.set_hunger( 0 ); you.set_thirst( 0 ); - you.set_fatigue( 0 ); + you.set_sleepiness( 0 ); you.set_sleep_deprivation( 0 ); you.set_stored_kcal( you.get_healthy_kcal() ); you.activity_history.weary_clear(); @@ -2795,7 +2795,7 @@ static void normalize_body() u.clear_morale(); u.clear_vitamins(); u.set_all_parts_hp_to_max(); - u.set_fatigue( 0 ); + u.set_sleepiness( 0 ); u.set_focus( 100 ); u.set_hunger( 0 ); u.set_pain( 0 ); diff --git a/src/display.cpp b/src/display.cpp index 08ad44e8d55db..040c1bb5892f2 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -718,22 +718,22 @@ std::string display::health_string( const Character &u ) return colorize( health_pair.first, health_pair.second ); } -std::pair display::fatigue_text_color( const Character &u ) +std::pair display::sleepiness_text_color( const Character &u ) { - int fatigue = u.get_fatigue(); - std::string fatigue_string; - nc_color fatigue_color = c_white; - if( fatigue >= fatigue_levels::EXHAUSTED ) { - fatigue_color = c_red; - fatigue_string = translate_marker( "Exhausted" ); - } else if( fatigue >= fatigue_levels::DEAD_TIRED ) { - fatigue_color = c_light_red; - fatigue_string = translate_marker( "Dead Tired" ); - } else if( fatigue >= fatigue_levels::TIRED ) { - fatigue_color = c_yellow; - fatigue_string = translate_marker( "Tired" ); - } - return std::make_pair( _( fatigue_string ), fatigue_color ); + int sleepiness = u.get_sleepiness(); + std::string sleepiness_string; + nc_color sleepiness_color = c_white; + if( sleepiness >= sleepiness_levels::EXHAUSTED ) { + sleepiness_color = c_red; + sleepiness_string = translate_marker( "Exhausted" ); + } else if( sleepiness >= sleepiness_levels::DEAD_TIRED ) { + sleepiness_color = c_light_red; + sleepiness_string = translate_marker( "Dead Tired" ); + } else if( sleepiness >= sleepiness_levels::TIRED ) { + sleepiness_color = c_yellow; + sleepiness_string = translate_marker( "Tired" ); + } + return std::make_pair( _( sleepiness_string ), sleepiness_color ); } std::pair display::pain_text_color( const Creature &c ) diff --git a/src/display.h b/src/display.h index 4d6f6cf712ab2..d6fc43a3945ba 100644 --- a/src/display.h +++ b/src/display.h @@ -123,7 +123,7 @@ std::pair thirst_text_color( const Character &u ); std::pair hunger_text_color( const Character &u ); std::pair weight_text_color( const Character &u ); std::pair health_text_color( const Character &u ); -std::pair fatigue_text_color( const Character &u ); +std::pair sleepiness_text_color( const Character &u ); std::pair pain_text_color( const Creature &c ); std::pair pain_text_color( const Character &u ); // Character morale, as a color-coded ascii emoticon face diff --git a/src/do_turn.cpp b/src/do_turn.cpp index 73a085e12a8a3..94203e99ab59e 100644 --- a/src/do_turn.cpp +++ b/src/do_turn.cpp @@ -170,7 +170,7 @@ bool cleanup_at_end() sfx::fade_audio_group( sfx::group::weather, 300 ); sfx::fade_audio_group( sfx::group::time_of_day, 300 ); sfx::fade_audio_group( sfx::group::context_themes, 300 ); - sfx::fade_audio_group( sfx::group::fatigue, 300 ); + sfx::fade_audio_group( sfx::group::sleepiness, 300 ); zone_manager::get_manager().clear(); @@ -712,7 +712,7 @@ bool do_turn() sfx::do_danger_music(); sfx::do_vehicle_engine_sfx(); sfx::do_vehicle_exterior_engine_sfx(); - sfx::do_fatigue(); + sfx::do_sleepiness(); // reset player noise u.volume = 0; diff --git a/src/effect.cpp b/src/effect.cpp index f28f723fd0995..e8c9827b47d54 100644 --- a/src/effect.cpp +++ b/src/effect.cpp @@ -464,16 +464,16 @@ void effect_type::load_mod_data( const JsonObject &j ) {"perspiration_tick", mod_action::TICK}, } ); - // Then fatigue - extract_effect( to_extract, "FATIGUE", { - {"fatigue_amount", mod_action::AMOUNT}, - {"fatigue_min", mod_action::MIN}, - {"fatigue_max", mod_action::MAX}, - {"fatigue_min_val", mod_action::MIN_VAL}, - {"fatigue_max_val", mod_action::MAX_VAL}, - {"fatigue_chance", mod_action::CHANCE_TOP}, - {"fatigue_chance_bot", mod_action::CHANCE_BOT}, - {"fatigue_tick", mod_action::TICK}, + // Then sleepiness + extract_effect( to_extract, "SLEEPINESS", { + {"sleepiness_amount", mod_action::AMOUNT}, + {"sleepiness_min", mod_action::MIN}, + {"sleepiness_max", mod_action::MAX}, + {"sleepiness_min_val", mod_action::MIN_VAL}, + {"sleepiness_max_val", mod_action::MAX_VAL}, + {"sleepiness_chance", mod_action::CHANCE_TOP}, + {"sleepiness_chance_bot", mod_action::CHANCE_BOT}, + {"sleepiness_tick", mod_action::TICK}, } ); // Then stamina @@ -893,15 +893,15 @@ std::string effect::disp_desc( bool reduced ) const _( "damage" ) ); val = get_avg_mod( "STAMINA", reduced ); values.emplace_back( get_percentage( "STAMINA", val, reduced ), val, - _( "stamina recovery" ), _( "fatigue" ) ); + _( "stamina recovery" ), _( "sleepiness" ) ); val = get_avg_mod( "THIRST", reduced ); values.emplace_back( get_percentage( "THIRST", val, reduced ), val, _( "thirst" ), _( "quench" ) ); val = get_avg_mod( "HUNGER", reduced ); values.emplace_back( get_percentage( "HUNGER", val, reduced ), val, _( "hunger" ), _( "sate" ) ); - val = get_avg_mod( "FATIGUE", reduced ); - values.emplace_back( get_percentage( "FATIGUE", val, reduced ), val, _( "sleepiness" ), + val = get_avg_mod( "SLEEPINESS", reduced ); + values.emplace_back( get_percentage( "SLEEPINESS", val, reduced ), val, _( "sleepiness" ), _( "rest" ) ); val = get_avg_mod( "COUGH", reduced ); values.emplace_back( get_percentage( "COUGH", val, reduced ), val, _( "coughing" ), diff --git a/src/faction.cpp b/src/faction.cpp index 7e7edbccf616e..b5a147ca45162 100644 --- a/src/faction.cpp +++ b/src/faction.cpp @@ -715,14 +715,14 @@ int npc::faction_display( const catacurses::window &fac_w, const int width ) con mvwprintz( fac_w, point( width, ++y ), condition.second, _( "Condition: " ) + condition.first ); const std::pair hunger_pair = display::hunger_text_color( *this ); const std::pair thirst_pair = display::thirst_text_color( *this ); - const std::pair fatigue_pair = display::fatigue_text_color( *this ); + const std::pair sleepiness_pair = display::sleepiness_text_color( *this ); const std::string nominal = pgettext( "needs", "Nominal" ); mvwprintz( fac_w, point( width, ++y ), hunger_pair.second, _( "Hunger: " ) + ( hunger_pair.first.empty() ? nominal : hunger_pair.first ) ); mvwprintz( fac_w, point( width, ++y ), thirst_pair.second, _( "Thirst: " ) + ( thirst_pair.first.empty() ? nominal : thirst_pair.first ) ); - mvwprintz( fac_w, point( width, ++y ), fatigue_pair.second, - _( "Fatigue: " ) + ( fatigue_pair.first.empty() ? nominal : fatigue_pair.first ) ); + mvwprintz( fac_w, point( width, ++y ), sleepiness_pair.second, + _( "Fatigue: " ) + ( sleepiness_pair.first.empty() ? nominal : sleepiness_pair.first ) ); int lines = fold_and_print( fac_w, point( width, ++y ), getmaxx( fac_w ) - width - 2, c_white, _( "Wielding: " ) + weapname_simple() ); y += lines; diff --git a/src/faction_camp.cpp b/src/faction_camp.cpp index 86a2a96186d9d..bb4e05f0ea5a4 100644 --- a/src/faction_camp.cpp +++ b/src/faction_camp.cpp @@ -3757,7 +3757,7 @@ void basecamp::finish_return( npc &comp, const bool fixed_time, const std::strin if( has_water() ) { comp.set_thirst( 0 ); } - comp.set_fatigue( 0 ); + comp.set_sleepiness( 0 ); comp.set_sleep_deprivation( 0 ); } diff --git a/src/field_type.cpp b/src/field_type.cpp index 2230fc4d815e9..00f279d216271 100644 --- a/src/field_type.cpp +++ b/src/field_type.cpp @@ -25,7 +25,7 @@ const field_type_str_id fd_dazzling( "fd_dazzling" ); const field_type_str_id fd_electricity( "fd_electricity" ); const field_type_str_id fd_electricity_unlit( "fd_electricity_unlit" ); const field_type_str_id fd_extinguisher( "fd_extinguisher" ); -const field_type_str_id fd_fatigue( "fd_fatigue" ); +const field_type_str_id fd_sleepiness( "fd_sleepiness" ); const field_type_str_id fd_fire( "fd_fire" ); const field_type_str_id fd_fire_vent( "fd_fire_vent" ); const field_type_str_id fd_flame_burst( "fd_flame_burst" ); diff --git a/src/field_type.h b/src/field_type.h index 89bdffa92f21f..90c471681a606 100644 --- a/src/field_type.h +++ b/src/field_type.h @@ -143,7 +143,7 @@ extern const field_type_str_id fd_dazzling; extern const field_type_str_id fd_electricity; extern const field_type_str_id fd_electricity_unlit; extern const field_type_str_id fd_extinguisher; -extern const field_type_str_id fd_fatigue; +extern const field_type_str_id fd_sleepiness; extern const field_type_str_id fd_fire; extern const field_type_str_id fd_fire_vent; extern const field_type_str_id fd_flame_burst; diff --git a/src/game.cpp b/src/game.cpp index 2728096b1fb0d..e7101b98e58f7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2855,7 +2855,7 @@ void game::bury_screen() const sfx::fade_audio_group( sfx::group::weather, 2000 ); sfx::fade_audio_group( sfx::group::time_of_day, 2000 ); sfx::fade_audio_group( sfx::group::context_themes, 2000 ); - sfx::fade_audio_group( sfx::group::fatigue, 2000 ); + sfx::fade_audio_group( sfx::group::sleepiness, 2000 ); for( size_t iY = 0; iY < vRip.size(); ++iY ) { size_t iX = 0; @@ -10640,7 +10640,7 @@ bool game::walk_move( const tripoint &dest_loc, const bool via_ramp, const bool if( !m.has_flag( ter_furn_flag::TFLAG_SWIMMABLE, dest_loc ) && one_in( 80 + u.dex_cur + u.int_cur ) ) { add_msg( _( "Your tentacles stick to the ground, but you pull them free." ) ); - u.mod_fatigue( 1 ); + u.mod_sleepiness( 1 ); } } diff --git a/src/game_inventory.cpp b/src/game_inventory.cpp index c2418924fe0ed..b0b556d71001c 100644 --- a/src/game_inventory.cpp +++ b/src/game_inventory.cpp @@ -903,7 +903,7 @@ static std::string get_consume_needs_hint( Character &you ) desc = display::pain_text_color( you ); hint.append( string_format( "%s %s", _( "Pain:" ), colorize( desc.first, desc.second ) ) ); hint.append( string_format( " %s ", LINE_XOXO_S ) ); - desc = display::fatigue_text_color( you ); + desc = display::sleepiness_text_color( you ); hint.append( string_format( "%s %s", _( "Rest:" ), colorize( desc.first, desc.second ) ) ); hint.append( string_format( " %s ", LINE_XOXO_S ) ); hint.append( string_format( "%s %s", _( "Weight:" ), display::weight_string( you ) ) ); diff --git a/src/iexamine.cpp b/src/iexamine.cpp index f5aecb51a577c..91c69d5d2d669 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -2170,7 +2170,7 @@ void iexamine_helper::handle_harvest( Character &you, const std::string &itemid, /** * Prompt pick (or drink nectar if able) poppy bud. Not safe for player. * - * Drinking causes: -25 hunger, +20 fatigue, pkill2-70 effect and, 1 in 20 pkiller-1 addiction. + * Drinking causes: -25 hunger, +20 sleepiness, pkill2-70 effect and, 1 in 20 pkiller-1 addiction. * Picking w/ env_resist < 5 causes 1 in 3 sleep for 12 min and 4 dmg to each leg */ void iexamine::flower_poppy( Character &you, const tripoint &examp ) @@ -2189,7 +2189,7 @@ void iexamine::flower_poppy( Character &you, const tripoint &examp ) add_msg( _( "You slowly suck up the nectar." ) ); item poppy( "poppy_nectar", calendar::turn, 1 ); you.assign_activity( consume_activity_actor( poppy ) ); - you.mod_fatigue( 20 ); + you.mod_sleepiness( 20 ); you.add_effect( effect_pkill2, 7_minutes ); // Please drink poppy nectar responsibly. if( one_in( 20 ) ) { diff --git a/src/item_factory.cpp b/src/item_factory.cpp index 809457da0e36f..76dd61574d3aa 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -3228,7 +3228,7 @@ void Item_factory::load( islot_comestible &slot, const JsonObject &jo, const std assign( jo, "quench", slot.quench, strict ); assign( jo, "fun", slot.fun, strict ); assign( jo, "stim", slot.stim, strict ); - assign( jo, "fatigue_mod", slot.fatigue_mod, strict ); + assign( jo, "sleepiness_mod", slot.sleepiness_mod, strict ); assign( jo, "healthy", slot.healthy, strict ); assign( jo, "parasites", slot.parasites, strict, 0 ); assign( jo, "freezing_point", slot.freeze_point, strict ); diff --git a/src/itype.h b/src/itype.h index f2329ca2c046c..703187d397d29 100644 --- a/src/itype.h +++ b/src/itype.h @@ -146,8 +146,8 @@ struct islot_comestible { /** stimulant effect */ int stim = 0; - /**fatigue altering effect*/ - int fatigue_mod = 0; + /**sleepiness altering effect*/ + int sleepiness_mod = 0; /** Reference to other item that replaces this one as a component in recipe results */ itype_id cooks_like; diff --git a/src/iuse.cpp b/src/iuse.cpp index 6cc65fcc13cc4..14505e2974c15 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -872,7 +872,7 @@ std::optional iuse::meth( Character *p, item *, const tripoint & ) if( p->has_amount( itype_apparatus, 1 ) && p->use_charges_if_avail( itype_fire, 1 ) ) { p->add_msg_if_player( m_neutral, _( "You smoke your meth." ) ); p->add_msg_if_player( m_good, _( "The world seems to sharpen." ) ); - p->mod_fatigue( -375 ); + p->mod_sleepiness( -375 ); if( p->has_trait( trait_TOLERANCE ) ) { duration *= 1.2; } else { @@ -886,7 +886,7 @@ std::optional iuse::meth( Character *p, item *, const tripoint & ) } } else { p->add_msg_if_player( _( "You snort some crystal meth." ) ); - p->mod_fatigue( -300 ); + p->mod_sleepiness( -300 ); } if( !p->has_effect( effect_meth ) ) { duration += 1_hours; @@ -967,10 +967,10 @@ std::optional iuse::thorazine( Character *p, item *, const tripoint & ) { if( p->has_effect( effect_took_thorazine ) ) { p->remove_effect( effect_took_thorazine ); - p->mod_fatigue( 15 ); + p->mod_sleepiness( 15 ); } p->add_effect( effect_took_thorazine, 12_hours ); - p->mod_fatigue( 5 ); + p->mod_sleepiness( 5 ); p->remove_effect( effect_hallu ); p->remove_effect( effect_visuals ); p->remove_effect( effect_high ); @@ -979,7 +979,7 @@ std::optional iuse::thorazine( Character *p, item *, const tripoint & ) } if( one_in( 50 ) ) { // adverse reaction p->add_msg_if_player( m_bad, _( "You feel completely exhausted." ) ); - p->mod_fatigue( 15 ); + p->mod_sleepiness( 15 ); p->add_effect( effect_took_thorazine_bad, p->get_effect_dur( effect_took_thorazine ) ); } else { p->add_msg_if_player( m_warning, _( "You feel a bit wobbly." ) ); @@ -1027,7 +1027,7 @@ std::optional iuse::flumed( Character *p, item *it, const tripoint & ) std::optional iuse::flusleep( Character *p, item *it, const tripoint & ) { p->add_effect( effect_took_flumed, 12_hours ); - p->mod_fatigue( 30 ); + p->mod_sleepiness( 30 ); p->add_msg_if_player( _( "You take some %s." ), it->tname() ); p->add_msg_if_player( m_warning, _( "You feel very sleepy…" ) ); return 1; @@ -1038,7 +1038,7 @@ std::optional iuse::inhaler( Character *p, item *, const tripoint & ) p->add_msg_player_or_npc( m_neutral, _( "You take a puff from your inhaler." ), _( " takes a puff from their inhaler." ) ); if( !p->remove_effect( effect_asthma ) ) { - p->mod_fatigue( -3 ); // if we don't have asthma can be used as stimulant + p->mod_sleepiness( -3 ); // if we don't have asthma can be used as stimulant if( one_in( 20 ) ) { // with a small but significant risk of adverse reaction p->add_effect( effect_shakes, rng( 2_minutes, 5_minutes ) ); } @@ -1301,7 +1301,7 @@ static void marloss_common( Character &p, item &it, const trait_id ¤t_colo p.mod_pain( 2 * rng( 1, 5 ) ); p.mod_stored_kcal( -87 ); p.mod_thirst( 10 ); - p.mod_fatigue( 5 ); + p.mod_sleepiness( 5 ); } else if( effect <= 6 ) { // Radiation cleanse is below p.add_msg_if_player( m_good, _( "You feel better all over." ) ); p.mod_painkiller( 30 ); @@ -1519,7 +1519,7 @@ std::optional iuse::mycus( Character *p, item *, const tripoint & ) p->mutate_category( mutation_category_MYCUS, false, true ); p->mod_stored_kcal( -87 ); p->mod_thirst( 10 ); - p->mod_fatigue( 5 ); + p->mod_sleepiness( 5 ); p->add_morale( MORALE_MARLOSS, 25, 200 ); // still covers up mutation pain } } else if( p->has_trait( trait_THRESH_MYCUS ) ) { @@ -1533,7 +1533,7 @@ std::optional iuse::mycus( Character *p, item *, const tripoint & ) p->mod_pain( 2 * rng( 1, 5 ) ); p->mod_stored_kcal( -87 ); p->mod_thirst( 10 ); - p->mod_fatigue( 5 ); + p->mod_sleepiness( 5 ); p->vomit(); // no hunger/quench benefit for you p->mod_daily_health( -8, -50 ); } @@ -4284,7 +4284,7 @@ std::optional iuse::hand_crank( Character *p, item *it, const tripoint & ) p->add_msg_if_player( m_info, _( "It's not waterproof enough to work underwater." ) ); return std::nullopt; } - if( p->get_fatigue() >= fatigue_levels::DEAD_TIRED ) { + if( p->get_sleepiness() >= sleepiness_levels::DEAD_TIRED ) { p->add_msg_if_player( m_info, _( "You're too exhausted to keep cranking." ) ); return std::nullopt; } @@ -4330,7 +4330,7 @@ std::optional iuse::vibe( Character *p, item *it, const tripoint & ) p->add_msg_if_player( m_info, _( "The %s's batteries are dead." ), it->tname() ); return std::nullopt; } - if( p->get_fatigue() >= fatigue_levels::DEAD_TIRED ) { + if( p->get_sleepiness() >= sleepiness_levels::DEAD_TIRED ) { p->add_msg_if_player( m_info, _( "*Your* batteries are dead." ) ); return std::nullopt; } else { @@ -5149,7 +5149,7 @@ std::optional iuse::stimpack( Character *p, item *it, const tripoint & ) p->add_effect( effect_stimpack, 25_minutes, false, 2 ); p->mod_painkiller( 2 ); p->mod_stim( 20 ); - p->mod_fatigue( -100 ); + p->mod_sleepiness( -100 ); p->set_stamina( p->get_stamina_max() ); } return 1; diff --git a/src/magic_enchantment.cpp b/src/magic_enchantment.cpp index d0d2906a6739a..b80d30517360a 100644 --- a/src/magic_enchantment.cpp +++ b/src/magic_enchantment.cpp @@ -72,7 +72,7 @@ namespace io case enchant_vals::mod::REGEN_HP: return "REGEN_HP"; case enchant_vals::mod::HUNGER: return "HUNGER"; case enchant_vals::mod::THIRST: return "THIRST"; - case enchant_vals::mod::FATIGUE: return "FATIGUE"; + case enchant_vals::mod::SLEEPINESS: return "SLEEPINESS"; case enchant_vals::mod::PAIN: return "PAIN"; case enchant_vals::mod::PAIN_REMOVE: return "PAIN_REMOVE"; case enchant_vals::mod::MELEE_DAMAGE: return "MELEE_DAMAGE"; diff --git a/src/magic_enchantment.h b/src/magic_enchantment.h index 2e1df720e33a7..ec17470a2b2ba 100644 --- a/src/magic_enchantment.h +++ b/src/magic_enchantment.h @@ -48,7 +48,7 @@ enum class mod : int { REGEN_HP, HUNGER, // hunger rate THIRST, // thirst rate - FATIGUE, // fatigue rate + SLEEPINESS, // sleepiness rate PAIN, PAIN_REMOVE, BONUS_DODGE, diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index 7150f647fe824..5cb36cd563f07 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -857,13 +857,13 @@ static std::pair spell_remove_field( const spell &sp, return std::pair {field_removed, field_position}; } -static void handle_remove_fd_fatigue_field( const std::pair &fd_fatigue_field, +static void handle_remove_fd_sleepiness_field( const std::pair &fd_sleepiness_field, Creature &caster ) { - for( const std::pair &fd : std::get<0>( fd_fatigue_field ) ) { + for( const std::pair &fd : std::get<0>( fd_sleepiness_field ) ) { const int &intensity = fd.second.get_field_intensity(); const translation &intensity_name = fd.second.get_intensity_level().name; - const tripoint &field_position = std::get<1>( fd_fatigue_field ); + const tripoint &field_position = std::get<1>( fd_sleepiness_field ); const bool sees_field = caster.sees( field_position ); switch( intensity ) { @@ -915,8 +915,8 @@ void spell_effect::remove_field( const spell &sp, Creature &caster, const tripoi if( fd.first.is_valid() && !fd.first.id().is_null() ) { sp.make_sound( caster.pos(), caster ); - if( fd.first.id() == fd_fatigue ) { - handle_remove_fd_fatigue_field( field_removed, caster ); + if( fd.first.id() == fd_sleepiness ) { + handle_remove_fd_sleepiness_field( field_removed, caster ); } else { caster.add_msg_if_player( m_neutral, _( "The %s dissipates." ), fd.second.get_intensity_level().name ); @@ -1141,9 +1141,9 @@ void spell_effect::recover_energy( const spell &sp, Creature &caster, const trip you->magic->mod_mana( *you, healing ); } else if( energy_source == "STAMINA" ) { you->mod_stamina( healing ); - } else if( energy_source == "FATIGUE" ) { - // fatigue is backwards - you->mod_fatigue( -healing ); + } else if( energy_source == "SLEEPINESS" ) { + // sleepiness is backwards + you->mod_sleepiness( -healing ); } else if( energy_source == "BIONIC" ) { if( healing > 0 ) { you->mod_power_level( units::from_kilojoule( healing ) ); diff --git a/src/map_extras.cpp b/src/map_extras.cpp index 8b7c2b4fa22c8..419c8be5ad93e 100644 --- a/src/map_extras.cpp +++ b/src/map_extras.cpp @@ -988,7 +988,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) switch( rng( 1, 6 ) ) { //Mycus spreading through the portal case 1: { - m.add_field( portal_location, fd_fatigue, 3 ); + m.add_field( portal_location, fd_sleepiness, 3 ); fungal_effects fe; for( const tripoint &loc : m.points_in_radius( portal_location, 5 ) ) { if( one_in( 3 ) ) { @@ -1001,7 +1001,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } //Netherworld monsters spawning around the portal case 2: { - m.add_field( portal_location, fd_fatigue, 3 ); + m.add_field( portal_location, fd_sleepiness, 3 ); for( const tripoint &loc : m.points_in_radius( portal_location, 5 ) ) { m.place_spawns( GROUP_NETHER_PORTAL, 15, loc.xy(), loc.xy(), 1, true ); } @@ -1009,7 +1009,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } //Several cracks in the ground originating from the portal case 3: { - m.add_field( portal_location, fd_fatigue, 3 ); + m.add_field( portal_location, fd_sleepiness, 3 ); for( int i = 0; i < rng( 1, 10 ); i++ ) { tripoint end_location = { rng( 0, SEEX * 2 - 1 ), rng( 0, SEEY * 2 - 1 ), abs_sub.z }; std::vector failure = line_to( portal_location, end_location ); @@ -1021,7 +1021,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } //Radiation from the portal killed the vegetation case 4: { - m.add_field( portal_location, fd_fatigue, 3 ); + m.add_field( portal_location, fd_sleepiness, 3 ); const int rad = 5; for( int i = p.x - rad; i <= p.x + rad; i++ ) { for( int j = p.y - rad; j <= p.y + rad; j++ ) { @@ -1062,7 +1062,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } const tripoint portal_location = { p1 + tripoint( extra, abs_sub.z ) }; - m.add_field( portal_location, fd_fatigue, 3 ); + m.add_field( portal_location, fd_sleepiness, 3 ); std::set ignited; place_fumarole( m, p1, p2, ignited ); @@ -1082,7 +1082,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } //Anomaly caused by the portal and spawned an artifact case 6: { - m.add_field( portal_location, fd_fatigue, 3 ); + m.add_field( portal_location, fd_sleepiness, 3 ); artifact_natural_property prop = static_cast( rng( ARTPROP_NULL + 1, ARTPROP_MAX - 1 ) ); m.create_anomaly( portal_location, prop ); diff --git a/src/map_field.cpp b/src/map_field.cpp index a4c736b9ae68b..2c2b32697269e 100644 --- a/src/map_field.cpp +++ b/src/map_field.cpp @@ -1657,7 +1657,7 @@ void map::player_in_field( Character &you ) } } } - if( ft == fd_fatigue ) { + if( ft == fd_sleepiness ) { // Assume the rift is on the ground for now to prevent issues with the player being unable access vehicle controls on the same tile due to teleportation. if( !you.in_vehicle ) { // Teleports you... somewhere. @@ -1976,7 +1976,7 @@ void map::monster_in_field( monster &z ) cur.get_field_intensity() ) ); z.deal_damage( nullptr, bodypart_id( "torso" ), damage_instance( damage_electric, field_dmg ) ); } - if( cur_field_type == fd_fatigue ) { + if( cur_field_type == fd_sleepiness ) { if( rng( 0, 2 ) < cur.get_field_intensity() ) { dam += cur.get_field_intensity(); teleport::teleport( z ); diff --git a/src/medical_ui.cpp b/src/medical_ui.cpp index ada81c0d69bcd..c8c5af0556df9 100644 --- a/src/medical_ui.cpp +++ b/src/medical_ui.cpp @@ -266,7 +266,7 @@ static void draw_medical_titlebar( const catacurses::window &window, avatar *pla const std::pair hunger_pair = display::hunger_text_color( you ); const std::pair thirst_pair = display::thirst_text_color( you ); - const std::pair fatigue_pair = display::fatigue_text_color( you ); + const std::pair sleepiness_pair = display::sleepiness_text_color( you ); // Hunger if( !hunger_pair.first.empty() ) { @@ -297,8 +297,8 @@ static void draw_medical_titlebar( const catacurses::window &window, avatar *pla } // Fatigue - if( !fatigue_pair.first.empty() ) { - cur_str_pos = right_print( window, 1, right_indent, fatigue_pair.second, fatigue_pair.first ); + if( !sleepiness_pair.first.empty() ) { + cur_str_pos = right_print( window, 1, right_indent, sleepiness_pair.second, sleepiness_pair.first ); // Borders for( int i = 1; i < getmaxy( window ) - 1; i++ ) { @@ -307,7 +307,7 @@ static void draw_medical_titlebar( const catacurses::window &window, avatar *pla mvwputch( window, point( cur_str_pos - 2, 0 ), BORDER_COLOR, LINE_OXXX ); // ^|^ mvwputch( window, point( cur_str_pos - 2, 2 ), BORDER_COLOR, LINE_XXOX ); // _|_ - right_indent += utf8_width( fatigue_pair.first ) + 3; + right_indent += utf8_width( sleepiness_pair.first ) + 3; } // Hotkey Helper diff --git a/src/morale.cpp b/src/morale.cpp index c0dbf505893ed..8c25caeced3df 100644 --- a/src/morale.cpp +++ b/src/morale.cpp @@ -512,7 +512,7 @@ void player_morale::decay( const time_duration &ticks ) invalidate(); } -void player_morale::display( int focus_eq, int pain_penalty, int fatigue_penalty ) +void player_morale::display( int focus_eq, int pain_penalty, int sleepiness_penalty ) { /*calculates the percent contributions of the morale points, * must be done before anything else in this method @@ -702,9 +702,9 @@ void player_morale::display( int focus_eq, int pain_penalty, int fatigue_penalty morale_line::line_color::green_gray_red ); } - if( fatigue_penalty != 0 ) { + if( sleepiness_penalty != 0 ) { bottom_lines.emplace_back( - _( "Fatigue level:" ), -fatigue_penalty, + _( "Fatigue level:" ), -sleepiness_penalty, morale_line::number_format::signed_or_dash, morale_line::line_color::green_gray_red ); diff --git a/src/morale.h b/src/morale.h index 94008f8317717..c54edadbdf02e 100644 --- a/src/morale.h +++ b/src/morale.h @@ -45,7 +45,7 @@ class player_morale /** Ticks down morale counters and removes them */ void decay( const time_duration &ticks = 1_turns ); /** Displays morale screen */ - void display( int focus_eq, int pain_penalty, int fatigue_penalty ); + void display( int focus_eq, int pain_penalty, int sleepiness_penalty ); /** Returns false whether morale is inconsistent with the argument. * Only permanent morale is checked */ bool consistent_with( const player_morale &morale ) const; diff --git a/src/mutation.cpp b/src/mutation.cpp index 72459ee3c84f1..13cec5fa3fbf7 100644 --- a/src/mutation.cpp +++ b/src/mutation.cpp @@ -295,9 +295,9 @@ bool Character::can_power_mutation( const trait_id &mut ) const { bool hunger = mut->hunger && get_kcal_percent() < 0.5f; bool thirst = mut->thirst && get_thirst() >= 260; - bool fatigue = mut->fatigue && get_fatigue() >= fatigue_levels::EXHAUSTED; + bool sleepiness = mut->sleepiness && get_sleepiness() >= sleepiness_levels::EXHAUSTED; - return !hunger && !fatigue && !thirst; + return !hunger && !sleepiness && !thirst; } void Character::mutation_reflex_trigger( const trait_id &mut ) @@ -791,8 +791,8 @@ void Character::activate_mutation( const trait_id &mut ) if( mdata.thirst ) { mod_thirst( cost ); } - if( mdata.fatigue ) { - mod_fatigue( cost ); + if( mdata.sleepiness ) { + mod_sleepiness( cost ); } tdata.powered = true; recalc_sight_limits(); diff --git a/src/mutation.h b/src/mutation.h index 65e1223d0e066..09c5b53daed38 100644 --- a/src/mutation.h +++ b/src/mutation.h @@ -200,7 +200,7 @@ struct mutation_branch { // Allow soft (fabric) gear on restricted body parts bool allow_soft_gear = false; // IF any of the four are true, it drains that as the "cost" - bool fatigue = false; + bool sleepiness = false; bool hunger = false; bool thirst = false; // How many points it costs in character creation @@ -290,10 +290,10 @@ struct mutation_branch { std::optional metabolism_modifier = std::nullopt; // As above but for thirst. std::optional thirst_modifier = std::nullopt; - // As above but for fatigue. - std::optional fatigue_modifier = std::nullopt; - // Modifier for the rate at which fatigue and sleep deprivation drops when resting. - std::optional fatigue_regen_modifier = std::nullopt; + // As above but for sleepiness. + std::optional sleepiness_modifier = std::nullopt; + // Modifier for the rate at which sleepiness and sleep deprivation drops when resting. + std::optional sleepiness_regen_modifier = std::nullopt; // Modifier for the rate at which stamina regenerates. std::optional stamina_regen_modifier = std::nullopt; // the modifier for obtaining an item from a container as a handling penalty diff --git a/src/mutation_data.cpp b/src/mutation_data.cpp index b0f74cc4e422b..23dd9cf53c35e 100644 --- a/src/mutation_data.cpp +++ b/src/mutation_data.cpp @@ -346,7 +346,7 @@ void mutation_branch::load( const JsonObject &jo, const std::string &src ) optional( jo, was_loaded, "time", cooldown, 0_turns ); optional( jo, was_loaded, "kcal", hunger, false ); optional( jo, was_loaded, "thirst", thirst, false ); - optional( jo, was_loaded, "fatigue", fatigue, false ); + optional( jo, was_loaded, "sleepiness", sleepiness, false ); optional( jo, was_loaded, "valid", valid, true ); optional( jo, was_loaded, "purifiable", purifiable, true ); @@ -437,8 +437,8 @@ void mutation_branch::load( const JsonObject &jo, const std::string &src ) optional( jo, was_loaded, "temperature_speed_modifier", temperature_speed_modifier, std::nullopt ); optional( jo, was_loaded, "metabolism_modifier", metabolism_modifier, std::nullopt ); optional( jo, was_loaded, "thirst_modifier", thirst_modifier, std::nullopt ); - optional( jo, was_loaded, "fatigue_modifier", fatigue_modifier, std::nullopt ); - optional( jo, was_loaded, "fatigue_regen_modifier", fatigue_regen_modifier, std::nullopt ); + optional( jo, was_loaded, "sleepiness_modifier", sleepiness_modifier, std::nullopt ); + optional( jo, was_loaded, "sleepiness_regen_modifier", sleepiness_regen_modifier, std::nullopt ); optional( jo, was_loaded, "stamina_regen_modifier", stamina_regen_modifier, std::nullopt ); optional( jo, was_loaded, "obtain_cost_multiplier", obtain_cost_multiplier, std::nullopt ); optional( jo, was_loaded, "stomach_size_multiplier", stomach_size_multiplier, std::nullopt ); diff --git a/src/mutation_ui.cpp b/src/mutation_ui.cpp index f5427c41f728a..8d4065bb46ce2 100644 --- a/src/mutation_ui.cpp +++ b/src/mutation_ui.cpp @@ -308,18 +308,18 @@ void avatar::power_mutations() } if( md.thirst ) { if( number_of_resource > 0 ) { - //~ Resources consumed by a mutation: "kcal & thirst & fatigue" + //~ Resources consumed by a mutation: "kcal & thirst & sleepiness" resource_unit += _( " &" ); } resource_unit += _( " thirst" ); number_of_resource++; } - if( md.fatigue ) { + if( md.sleepiness ) { if( number_of_resource > 0 ) { - //~ Resources consumed by a mutation: "kcal & thirst & fatigue" + //~ Resources consumed by a mutation: "kcal & thirst & sleepiness" resource_unit += _( " &" ); } - resource_unit += _( " fatigue" ); + resource_unit += _( " sleepiness" ); } mut_desc += mutation_name( md.id ); if( md.cost > 0 && md.cooldown > 0_turns ) { @@ -429,7 +429,7 @@ void avatar::power_mutations() exit = true; } else if( ( !mut_data.hunger || get_kcal_percent() >= 0.8f ) && ( !mut_data.thirst || get_thirst() <= 400 ) && - ( !mut_data.fatigue || get_fatigue() <= 400 ) ) { + ( !mut_data.sleepiness || get_sleepiness() <= 400 ) ) { add_msg_if_player( m_neutral, _( "You activate your %s." ), mutation_name( mut_data.id ) ); // Reset menu in advance ui.reset(); @@ -602,7 +602,7 @@ void avatar::power_mutations() exit = true; } else if( ( !mut_data.hunger || get_kcal_percent() >= 0.8f ) && ( !mut_data.thirst || get_thirst() <= 400 ) && - ( !mut_data.fatigue || get_fatigue() <= 400 ) ) { + ( !mut_data.sleepiness || get_sleepiness() <= 400 ) ) { add_msg_if_player( m_neutral, _( "You activate your %s." ), mutation_name( mut_data.id ) ); // Reset menu in advance ui.reset(); diff --git a/src/npc.cpp b/src/npc.cpp index 213c6f0c19dc0..051fa1dd1eefa 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -3214,7 +3214,7 @@ void npc::on_load() }; const auto advance_focus = [this]( const int minutes ) { // scale to match focus_pool magnitude - const int equilibrium = 1000 * focus_equilibrium_fatigue_cap( calc_focus_equilibrium() ); + const int equilibrium = 1000 * focus_equilibrium_sleepiness_cap( calc_focus_equilibrium() ); const double focus_ratio = std::pow( 0.99, minutes ); // Approximate new focus pool, every minute focus_pool contributes 99%, the remainder comes from equilibrium // This is pretty accurate as long as the equilibrium doesn't change too much during the period diff --git a/src/npcmove.cpp b/src/npcmove.cpp index 09635de41946e..a85d24f92f3d3 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -2517,11 +2517,11 @@ npc_action npc::address_needs( float danger ) const auto could_sleep = [&]() { if( danger <= 0.01 ) { - if( get_fatigue() >= fatigue_levels::TIRED ) { + if( get_sleepiness() >= sleepiness_levels::TIRED ) { return true; } if( is_walking_with() && player_character.in_sleep_state() && - get_fatigue() > ( fatigue_levels::TIRED / 2 ) ) { + get_sleepiness() > ( sleepiness_levels::TIRED / 2 ) ) { return true; } } @@ -2531,12 +2531,12 @@ npc_action npc::address_needs( float danger ) if( one_in( 3 ) && could_sleep() ) { if( !is_player_ally() ) { // TODO: Make tired NPCs handle sleep offscreen - set_fatigue( 0 ); + set_sleepiness( 0 ); return npc_undecided; } if( rules.has_flag( ally_rule::allow_sleep ) || - get_fatigue() > fatigue_levels::MASSIVE_FATIGUE ) { + get_sleepiness() > sleepiness_levels::MASSIVE_SLEEPINESS ) { return npc_sleep; } if( player_character.in_sleep_state() ) { @@ -5097,7 +5097,7 @@ bool npc::complain_about( const std::string &issue, const time_duration &dur, bool npc::complain() { static const std::string infected_string = "infected"; - static const std::string fatigue_string = "fatigue"; + static const std::string sleepiness_string = "sleepiness"; static const std::string bite_string = "bite"; static const std::string bleed_string = "bleed"; static const std::string hypovolemia_string = "hypovolemia"; @@ -5138,9 +5138,9 @@ bool npc::complain() // When tired, complain every 30 minutes // If massively tired, ignore restrictions - if( get_fatigue() > fatigue_levels::TIRED && - complain_about( fatigue_string, 30_minutes, _( chatbin.snip_yawn ), - get_fatigue() > fatigue_levels::MASSIVE_FATIGUE - 100 ) ) { + if( get_sleepiness() > sleepiness_levels::TIRED && + complain_about( sleepiness_string, 30_minutes, _( chatbin.snip_yawn ), + get_sleepiness() > sleepiness_levels::MASSIVE_SLEEPINESS - 100 ) ) { return true; } diff --git a/src/player_difficulty.cpp b/src/player_difficulty.cpp index d9c46ec360370..2b0ea7dd1bb33 100644 --- a/src/player_difficulty.cpp +++ b/src/player_difficulty.cpp @@ -66,7 +66,7 @@ void player_difficulty::reset_npc( Character &dummy ) dummy.clear_vitamins(); // This sets HP to max, clears addictions and morale, - // and sets hunger, thirst, fatigue and such to zero + // and sets hunger, thirst, sleepiness and such to zero dummy.environmental_revert_effect(); // However, the above does not set stored kcal dummy.set_stored_kcal( dummy.get_healthy_kcal() ); diff --git a/src/player_hardcoded_effects.cpp b/src/player_hardcoded_effects.cpp index 56881a666d7eb..b4ad3edcf5df5 100644 --- a/src/player_hardcoded_effects.cpp +++ b/src/player_hardcoded_effects.cpp @@ -824,7 +824,7 @@ static void eff_fun_hypovolemia( Character &u, effect &it ) } // Hypovolemic shock - // stage 1 - early symptoms include headache, fatigue, weakness, thirst, and dizziness. + // stage 1 - early symptoms include headache, sleepiness, weakness, thirst, and dizziness. // stage 2 - person may begin sweating and feeling more anxious and restless. // stage 3 - heart rate will increase to over 120 bpm; rapid breathing // mental distress, including anxiety and agitation; skin is pale and cold + cyanosis, sweating @@ -856,7 +856,7 @@ static void eff_fun_hypovolemia( Character &u, effect &it ) break; case 2: warning = _( "You feel tired and you breathe heavily." ); - u.mod_fatigue( 3 * intense ); + u.mod_sleepiness( 3 * intense ); break; case 3: warning = _( "You are anxious and cannot collect your thoughts." ); @@ -902,9 +902,9 @@ static void eff_fun_redcells_anemia( Character &u, effect &it ) // Lack of iron impairs production of hemoglobin and therefore ability to carry // oxygen by red blood cells. Alternatively hemorrhage causes physical loss of red blood cells. // This triggers variety of symptoms, focusing on weakness, - // fatigue, cold limbs, later in dizziness, soreness, breathlessness, + // sleepiness, cold limbs, later in dizziness, soreness, breathlessness, // and severe malaise and lethargy. - // Base anemia symptoms: fatigue, loss of stamina, loss of strength, impact on health + // Base anemia symptoms: sleepiness, loss of stamina, loss of strength, impact on health // are placed in effect JSON int intense = it.get_intensity(); @@ -941,7 +941,7 @@ static void eff_fun_redcells_anemia( Character &u, effect &it ) break; case 6: u.add_msg_if_player( m_bad, _( "There is an overwhelming aura of tiredness inside of you." ) ); - u.mod_fatigue( intense * 3 ); + u.mod_sleepiness( intense * 3 ); break; case 7: // 7-9 empty for variability, as messages stack on higher intensity case 8: @@ -987,7 +987,7 @@ static void eff_fun_redcells_anemia( Character &u, effect &it ) break; case 2: u.add_msg_if_player( m_bad, _( "You feel like you could sleep on a rock." ) ); - u.mod_fatigue( intense * 3 ); + u.mod_sleepiness( intense * 3 ); break; case 3: u.add_msg_if_player( m_bad, _( "You gasp for air!" ) ); @@ -1034,16 +1034,16 @@ static void eff_fun_sleep( Character &u, effect &it ) it.mod_intensity( 1 ); } - if( u.has_effect( effect_narcosis ) && u.get_fatigue() <= 25 ) { - u.set_fatigue( 25 ); //Prevent us from waking up naturally while under anesthesia + if( u.has_effect( effect_narcosis ) && u.get_sleepiness() <= 25 ) { + u.set_sleepiness( 25 ); //Prevent us from waking up naturally while under anesthesia } - if( u.get_fatigue() < -25 && it.get_duration() > 3_minutes && !u.has_effect( effect_narcosis ) ) { + if( u.get_sleepiness() < -25 && it.get_duration() > 3_minutes && !u.has_effect( effect_narcosis ) ) { it.set_duration( 1_turns * dice( 3, 10 ) ); } - if( u.get_fatigue() <= 0 && u.get_fatigue() > -20 && !u.has_effect( effect_narcosis ) ) { - u.mod_fatigue( -25 ); + if( u.get_sleepiness() <= 0 && u.get_sleepiness() > -20 && !u.has_effect( effect_narcosis ) ) { + u.mod_sleepiness( -25 ); if( u.get_sleep_deprivation() < SLEEP_DEPRIVATION_HARMLESS ) { u.add_msg_if_player( m_good, _( "You feel well rested." ) ); } else { @@ -1090,22 +1090,22 @@ static void eff_fun_sleep( Character &u, effect &it ) u.mutate_category( mutation_category_MYCUS, false, true ); u.mod_stored_kcal( -87 ); u.mod_thirst( 10 ); - u.mod_fatigue( 5 ); + u.mod_sleepiness( 5 ); } } } } bool woke_up = false; - int tirednessVal = rng( 5, 200 ) + rng( 0, std::abs( u.get_fatigue() * 2 * 5 ) ); + int tirednessVal = rng( 5, 200 ) + rng( 0, std::abs( u.get_sleepiness() * 2 * 5 ) ); if( !u.is_blind() && !u.has_effect( effect_narcosis ) && !u.has_active_mutation( trait_CHLOROMORPH ) && !u.has_bionic( bio_sleep_shutdown ) ) { // People who can see while sleeping are acclimated to the light. if( !u.has_flag( json_flag_SEESLEEP ) ) { if( u.has_trait( trait_HEAVYSLEEPER2 ) && !u.has_trait( trait_HIBERNATE ) ) { // So you can too sleep through noon - if( ( tirednessVal * 1.25 ) < here.ambient_light_at( u.pos() ) && ( u.get_fatigue() < 10 || - one_in( u.get_fatigue() / 2 ) ) ) { + if( ( tirednessVal * 1.25 ) < here.ambient_light_at( u.pos() ) && ( u.get_sleepiness() < 10 || + one_in( u.get_sleepiness() / 2 ) ) ) { u.add_msg_if_player( _( "It's too bright to sleep." ) ); // Set ourselves up for removal it.set_duration( 0_turns ); @@ -1113,15 +1113,15 @@ static void eff_fun_sleep( Character &u, effect &it ) } // Ursine hibernators would likely do so indoors. Plants, though, might be in the sun. } else if( u.has_trait( trait_HIBERNATE ) ) { - if( ( tirednessVal * 5 ) < here.ambient_light_at( u.pos() ) && ( u.get_fatigue() < 10 || - one_in( u.get_fatigue() / 2 ) ) ) { + if( ( tirednessVal * 5 ) < here.ambient_light_at( u.pos() ) && ( u.get_sleepiness() < 10 || + one_in( u.get_sleepiness() / 2 ) ) ) { u.add_msg_if_player( _( "It's too bright to sleep." ) ); // Set ourselves up for removal it.set_duration( 0_turns ); woke_up = true; } - } else if( tirednessVal < here.ambient_light_at( u.pos() ) && ( u.get_fatigue() < 10 || - one_in( u.get_fatigue() / 2 ) ) ) { + } else if( tirednessVal < here.ambient_light_at( u.pos() ) && ( u.get_sleepiness() < 10 || + one_in( u.get_sleepiness() / 2 ) ) ) { u.add_msg_if_player( _( "It's too bright to sleep." ) ); // Set ourselves up for removal it.set_duration( 0_turns ); @@ -1141,16 +1141,16 @@ static void eff_fun_sleep( Character &u, effect &it ) // Have we already woken up? if( !woke_up && !u.has_effect( effect_narcosis ) ) { // Cold or heat may wake you up. - // Player will sleep through cold or heat if fatigued enough + // Player will sleep through cold or heat if sleepinessd enough for( const bodypart_id &bp : u.get_all_body_parts() ) { const units::temperature curr_temp = u.get_part_temp_cur( bp ); - const units::temperature_delta fatigue_modifier = units::from_celsius_delta( - u.get_fatigue() / 1000.0 ); - if( curr_temp < BODYTEMP_VERY_COLD - fatigue_modifier ) { + const units::temperature_delta sleepiness_modifier = units::from_celsius_delta( + u.get_sleepiness() / 1000.0 ); + if( curr_temp < BODYTEMP_VERY_COLD - sleepiness_modifier ) { if( one_in( 30000 ) ) { u.add_msg_if_player( _( "You toss and turn trying to keep warm." ) ); } - if( curr_temp < BODYTEMP_FREEZING - fatigue_modifier || + if( curr_temp < BODYTEMP_FREEZING - sleepiness_modifier || one_in( units::to_celsius( curr_temp ) * 3000 + 16500 ) ) { u.add_msg_if_player( m_bad, _( "It's too cold to sleep." ) ); // Set ourselves up for removal @@ -1158,11 +1158,11 @@ static void eff_fun_sleep( Character &u, effect &it ) woke_up = true; break; } - } else if( curr_temp > BODYTEMP_VERY_HOT + fatigue_modifier ) { + } else if( curr_temp > BODYTEMP_VERY_HOT + sleepiness_modifier ) { if( one_in( 30000 ) ) { u.add_msg_if_player( _( "You toss and turn in the heat." ) ); } - if( curr_temp > BODYTEMP_SCORCHING + fatigue_modifier || + if( curr_temp > BODYTEMP_SCORCHING + sleepiness_modifier || one_in( 76500 - units::to_celsius( curr_temp ) * 500 ) ) { u.add_msg_if_player( m_bad, _( "It's too hot to sleep." ) ); // Set ourselves up for removal @@ -1325,7 +1325,7 @@ void Character::hardcoded_effects( effect &it ) if( one_in( 900 ) ) { add_msg_if_player( m_bad, _( "You feel paranoid. They're watching you." ) ); mod_pain( 1 ); - mod_fatigue( dice( 1, 6 ) ); + mod_sleepiness( dice( 1, 6 ) ); } else if( one_in( 3000 ) ) { add_msg_if_player( m_bad, _( "You feel like you need less teeth. You pull one out, and it is rotten to the core." ) ); @@ -1339,7 +1339,7 @@ void Character::hardcoded_effects( effect &it ) add_msg_if_player( m_bad, _( "You feel so sick, like you've been poisoned, but you need more. So much more." ) ); vomit(); - mod_fatigue( dice( 1, 6 ) ); + mod_sleepiness( dice( 1, 6 ) ); } } } else if( id == effect_tindrift ) { diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp index 5bc2d92f9cce0..1bb460bf44c0e 100644 --- a/src/savegame_json.cpp +++ b/src/savegame_json.cpp @@ -667,7 +667,7 @@ void Character::load( const JsonObject &data ) // needs data.read( "thirst", thirst ); data.read( "hunger", hunger ); - data.read( "fatigue", fatigue ); + data.read( "sleepiness", sleepiness ); data.read( "cardio_acc", cardio_acc ); // Legacy read, remove after 0.F data.read( "weary", activity_history ); @@ -1026,7 +1026,7 @@ void Character::load( const JsonObject &data ) on_stat_change( "thirst", thirst ); on_stat_change( "hunger", hunger ); - on_stat_change( "fatigue", fatigue ); + on_stat_change( "sleepiness", sleepiness ); on_stat_change( "sleep_deprivation", sleep_deprivation ); on_stat_change( "pkill", pkill ); on_stat_change( "perceived_pain", get_perceived_pain() ); @@ -1328,7 +1328,7 @@ void Character::store( JsonOut &json ) const // needs json.member( "thirst", thirst ); json.member( "hunger", hunger ); - json.member( "fatigue", fatigue ); + json.member( "sleepiness", sleepiness ); json.member( "cardio_acc", cardio_acc ); json.member( "activity_history", activity_history ); json.member( "sleep_deprivation", sleep_deprivation ); diff --git a/src/sdlsound.cpp b/src/sdlsound.cpp index 2c0c00dc9ae95..7e9ab6cb5146d 100644 --- a/src/sdlsound.cpp +++ b/src/sdlsound.cpp @@ -329,7 +329,7 @@ bool init_sound() static_cast( sfx::group::context_themes ) ); Mix_GroupChannels( static_cast( sfx::channel::stamina_75 ), static_cast( sfx::channel::stamina_35 ), - static_cast( sfx::group::fatigue ) ); + static_cast( sfx::group::sleepiness ) ); sound_init_success = true; } else { diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index 301eb10b0a0af..54fca073ad96d 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -2935,7 +2935,7 @@ static void CheckMessages() } // Check if we're dead tired - if so, add sleep - if( player_character.get_fatigue() > fatigue_levels::DEAD_TIRED ) { + if( player_character.get_sleepiness() > sleepiness_levels::DEAD_TIRED ) { actions.insert( ACTION_SLEEP ); } diff --git a/src/sounds.cpp b/src/sounds.cpp index fe296333eaf63..f7737ac2f24f2 100644 --- a/src/sounds.cpp +++ b/src/sounds.cpp @@ -1588,7 +1588,7 @@ void sfx::do_danger_music() prev_hostiles = hostiles; } -void sfx::do_fatigue() +void sfx::do_sleepiness() { if( test_mode ) { return; @@ -1603,48 +1603,48 @@ void sfx::do_fatigue() 16: Stamina 50% 17: Stamina 25%*/ if( player_character.get_stamina() >= player_character.get_stamina_max() * .75 ) { - fade_audio_group( group::fatigue, 2000 ); + fade_audio_group( group::sleepiness, 2000 ); return; } else if( player_character.get_stamina() <= player_character.get_stamina_max() * .74 && player_character.get_stamina() >= player_character.get_stamina_max() * .5 && player_character.male && !is_channel_playing( channel::stamina_75 ) ) { - fade_audio_group( group::fatigue, 1000 ); - play_ambient_variant_sound( "plmove", "fatigue_m_low", seas_str, indoors, + fade_audio_group( group::sleepiness, 1000 ); + play_ambient_variant_sound( "plmove", "sleepiness_m_low", seas_str, indoors, night, 100, channel::stamina_75, 1000 ); return; } else if( player_character.get_stamina() <= player_character.get_stamina_max() * .49 && player_character.get_stamina() >= player_character.get_stamina_max() * .25 && player_character.male && !is_channel_playing( channel::stamina_50 ) ) { - fade_audio_group( group::fatigue, 1000 ); - play_ambient_variant_sound( "plmove", "fatigue_m_med", seas_str, indoors, + fade_audio_group( group::sleepiness, 1000 ); + play_ambient_variant_sound( "plmove", "sleepiness_m_med", seas_str, indoors, night, 100, channel::stamina_50, 1000 ); return; } else if( player_character.get_stamina() <= player_character.get_stamina_max() * .24 && player_character.get_stamina() >= 0 && player_character.male && !is_channel_playing( channel::stamina_35 ) ) { - fade_audio_group( group::fatigue, 1000 ); - play_ambient_variant_sound( "plmove", "fatigue_m_high", seas_str, indoors, + fade_audio_group( group::sleepiness, 1000 ); + play_ambient_variant_sound( "plmove", "sleepiness_m_high", seas_str, indoors, night, 100, channel::stamina_35, 1000 ); return; } else if( player_character.get_stamina() <= player_character.get_stamina_max() * .74 && player_character.get_stamina() >= player_character.get_stamina_max() * .5 && !player_character.male && !is_channel_playing( channel::stamina_75 ) ) { - fade_audio_group( group::fatigue, 1000 ); - play_ambient_variant_sound( "plmove", "fatigue_f_low", seas_str, indoors, + fade_audio_group( group::sleepiness, 1000 ); + play_ambient_variant_sound( "plmove", "sleepiness_f_low", seas_str, indoors, night, 100, channel::stamina_75, 1000 ); return; } else if( player_character.get_stamina() <= player_character.get_stamina_max() * .49 && player_character.get_stamina() >= player_character.get_stamina_max() * .25 && !player_character.male && !is_channel_playing( channel::stamina_50 ) ) { - fade_audio_group( group::fatigue, 1000 ); - play_ambient_variant_sound( "plmove", "fatigue_f_med", seas_str, indoors, + fade_audio_group( group::sleepiness, 1000 ); + play_ambient_variant_sound( "plmove", "sleepiness_f_med", seas_str, indoors, night, 100, channel::stamina_50, 1000 ); return; } else if( player_character.get_stamina() <= player_character.get_stamina_max() * .24 && player_character.get_stamina() >= 0 && !player_character.male && !is_channel_playing( channel::stamina_35 ) ) { - fade_audio_group( group::fatigue, 1000 ); - play_ambient_variant_sound( "plmove", "fatigue_f_high", seas_str, indoors, + fade_audio_group( group::sleepiness, 1000 ); + play_ambient_variant_sound( "plmove", "sleepiness_f_high", seas_str, indoors, night, 100, channel::stamina_35, 1000 ); return; } @@ -1992,7 +1992,7 @@ bool sfx::has_variant_sound( const std::string &, const std::string & ) void sfx::stop_sound_effect_fade( channel, int ) { } void sfx::stop_sound_effect_timed( channel, int ) { } void sfx::do_player_death_hurt( const Character &, bool ) { } -void sfx::do_fatigue() { } +void sfx::do_sleepiness() { } void sfx::do_obstacle( const std::string & ) { } void sfx::play_variant_sound( const std::string &, const std::string &, const std::string &, const std::optional &, const std::optional &, int ) { } diff --git a/src/sounds.h b/src/sounds.h index cf4d164ae76a0..79999e21955cf 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -132,7 +132,7 @@ enum class group : int { weather = 1, //SFX related to weather time_of_day, //SFX related to time of day context_themes, //SFX related to context themes - fatigue //SFX related to fatigue + sleepiness //SFX related to sleepiness }; void load_sound_effects( const JsonObject &jsobj ); @@ -182,7 +182,7 @@ void stop_sound_effect_fade( channel channel, int duration ); void stop_sound_effect_timed( channel channel, int time ); int set_channel_volume( channel channel, int volume ); void do_player_death_hurt( const Character &target, bool death ); -void do_fatigue(); +void do_sleepiness(); // @param obst should be string id of obstacle terrain or vehicle part void do_obstacle( const std::string &obst = "" ); } // namespace sfx diff --git a/src/suffer.cpp b/src/suffer.cpp index 9129dbe8e2287..b2b73453f6512 100644 --- a/src/suffer.cpp +++ b/src/suffer.cpp @@ -268,15 +268,15 @@ void suffer::mutation_power( Character &you, const trait_id &mut_id ) you.mod_thirst( mut_id->cost ); } } - if( mut_id->fatigue ) { + if( mut_id->sleepiness ) { // Exhausted - if( you.get_fatigue() >= fatigue_levels::EXHAUSTED ) { + if( you.get_sleepiness() >= sleepiness_levels::EXHAUSTED ) { you.add_msg_if_player( m_warning, _( "You're too exhausted to keep your %s going." ), you.mutation_name( mut_id ) ); you.deactivate_mutation( mut_id ); } else { - you.mod_fatigue( mut_id->cost ); + you.mod_sleepiness( mut_id->cost ); } } @@ -514,8 +514,8 @@ void suffer::from_chemimbalance( Character &you ) you.mod_thirst( 5 * rng( 1, 3 ) ); } if( one_turn_in( 6_hours ) ) { - you.add_msg_if_player( m_good, _( "You feel fatigued all of a sudden." ) ); - you.mod_fatigue( 10 * rng( 2, 4 ) ); + you.add_msg_if_player( m_good, _( "You feel sleepinessd all of a sudden." ) ); + you.mod_sleepiness( 10 * rng( 2, 4 ) ); } if( one_turn_in( 8_hours ) ) { if( one_in( 3 ) ) { @@ -1447,7 +1447,7 @@ void suffer::from_stimulants( Character &you, const int current_stim ) if( current_stim < -60 || you.get_painkiller() > 130 ) { if( calendar::once_every( 10_minutes ) ) { you.add_msg_if_player( m_warning, _( "You feel tired…" ) ); - you.mod_fatigue( rng( 1, 2 ) ); + you.mod_sleepiness( rng( 1, 2 ) ); } } } @@ -1692,7 +1692,7 @@ void suffer::from_artifact_resonance( Character &you, int amt ) you.add_msg_player_or_npc( m_bad, _( "Reality gives way under your feet like rotten scaffolding." ), _( "Reality gives way under 's feet like rotten scaffolding." ) ); map &here = get_map(); - here.add_field( you.pos(), fd_fatigue, 1 ); + here.add_field( you.pos(), fd_sleepiness, 1 ); } else if( rng_outcome == 3 ) { you.add_msg_player_or_npc( m_bad, _( "You suddenly lose all substance and corporeality." ), _( " suddenly loses all substance and corporeality." ) ); @@ -1934,7 +1934,7 @@ void Character::mend( int rate_multiplier ) // Bed rest speeds up mending if( has_effect( effect_sleep ) ) { healing_factor *= 4.0; - } else if( get_fatigue() > fatigue_levels::DEAD_TIRED ) { + } else if( get_sleepiness() > sleepiness_levels::DEAD_TIRED ) { // but being dead tired does not... healing_factor *= 0.75; } else { diff --git a/src/talker.h b/src/talker.h index 0207012736ef9..b22f43d53c0d9 100644 --- a/src/talker.h +++ b/src/talker.h @@ -231,7 +231,7 @@ class talker virtual void unset_mutation( const trait_id & ) {} virtual void activate_mutation( const trait_id & ) {} virtual void deactivate_mutation( const trait_id & ) {} - virtual void set_fatigue( int ) {}; + virtual void set_sleepiness( int ) {}; virtual bool has_flag( const json_character_flag & ) const { return false; } @@ -500,7 +500,7 @@ class talker virtual int get_activity_level() const { return 0; } - virtual int get_fatigue() const { + virtual int get_sleepiness() const { return 0; } virtual int get_hunger() const { diff --git a/src/talker_character.cpp b/src/talker_character.cpp index 488f47be12522..1a9c6c9214d53 100644 --- a/src/talker_character.cpp +++ b/src/talker_character.cpp @@ -621,9 +621,9 @@ int talker_character_const::get_activity_level() const return me_chr_const->activity_level_index(); } -int talker_character_const::get_fatigue() const +int talker_character_const::get_sleepiness() const { - return me_chr_const->get_fatigue(); + return me_chr_const->get_sleepiness(); } int talker_character_const::get_hunger() const @@ -775,9 +775,9 @@ bool talker_character_const::can_see_location( const tripoint &pos ) const return me_chr_const->sees( pos ); } -void talker_character::set_fatigue( int amount ) +void talker_character::set_sleepiness( int amount ) { - me_chr->set_fatigue( amount ); + me_chr->set_sleepiness( amount ); } void talker_character::mod_daily_health( int amount, int cap ) diff --git a/src/talker_character.h b/src/talker_character.h index 07977ea00cf83..5b650a884dfad 100644 --- a/src/talker_character.h +++ b/src/talker_character.h @@ -154,7 +154,7 @@ class talker_character_const: public talker_cloner bool has_activity() const override; bool is_mounted() const override; int get_activity_level() const override; - int get_fatigue() const override; + int get_sleepiness() const override; int get_hunger() const override; int get_thirst() const override; int get_instant_thirst() const override; @@ -270,7 +270,7 @@ class talker_character: public talker_clonercalc_needs_rates(); - if( ability >= 100 - ( get_fatigue() / 10 ) ) { + if( ability >= 100 - ( get_sleepiness() / 10 ) ) { std::string how_tired; - if( get_fatigue() > fatigue_levels::EXHAUSTED ) { + if( get_sleepiness() > sleepiness_levels::EXHAUSTED ) { how_tired = _( "Exhausted" ); - } else if( get_fatigue() > fatigue_levels::DEAD_TIRED ) { + } else if( get_sleepiness() > sleepiness_levels::DEAD_TIRED ) { how_tired = _( "Dead tired" ); - } else if( get_fatigue() > fatigue_levels::TIRED ) { + } else if( get_sleepiness() > sleepiness_levels::TIRED ) { how_tired = _( "Tired" ); } else { how_tired = _( "Not tired" ); if( ability >= 100 ) { - time_duration sleep_at = 5_minutes * ( fatigue_levels::TIRED - - get_fatigue() ) / rates.fatigue; + time_duration sleep_at = 5_minutes * ( sleepiness_levels::TIRED - + get_sleepiness() ) / rates.sleepiness; how_tired += _( ". Will need sleep in " ) + to_string_approx( sleep_at ); } } diff --git a/src/trap.cpp b/src/trap.cpp index 5b2dee98a3c1b..eeb4c86ce31c4 100644 --- a/src/trap.cpp +++ b/src/trap.cpp @@ -291,10 +291,10 @@ bool trap::detect_trap( const tripoint &pos, const Character &p ) const // For every 1000 points of sleep deprivation, reduce your roll by 1. // As of this writing, sleep deprivation passively increases at the rate of 1 point per minute. - const float fatigue_penalty = p.get_sleep_deprivation() / 1000.0f; + const float sleepiness_penalty = p.get_sleep_deprivation() / 1000.0f; const float mean_roll = weighted_stat_average + ( traps_skill_level / 3.0f ) + - proficiency_effect - distance_penalty - fatigue_penalty - encumbrance_penalty; + proficiency_effect - distance_penalty - sleepiness_penalty - encumbrance_penalty; const int roll = std::round( normal_roll( mean_roll, 3 ) ); diff --git a/src/widget.cpp b/src/widget.cpp index 248c8843dbae6..39cfd80bc6b82 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -82,8 +82,8 @@ std::string enum_to_string( widget_var data ) return "speed"; case widget_var::stamina: return "stamina"; - case widget_var::fatigue: - return "fatigue"; + case widget_var::sleepiness: + return "sleepiness"; case widget_var::health: return "health"; case widget_var::weariness_level: @@ -590,7 +590,7 @@ void widget::set_default_var_range( const avatar &ava ) _var_min = 0; _var_max = 120; break; - case widget_var::fatigue: + case widget_var::sleepiness: _var_min = 0; _var_max = 1000; break; @@ -813,8 +813,8 @@ int widget::get_var_value( const avatar &ava ) const case widget_var::pain: value = ava.get_perceived_pain(); break; - case widget_var::fatigue: - value = ava.get_fatigue(); + case widget_var::sleepiness: + value = ava.get_sleepiness(); break; case widget_var::health: value = ava.get_lifestyle(); diff --git a/src/widget.h b/src/widget.h index ef7771566b805..ed1b072366e1f 100644 --- a/src/widget.h +++ b/src/widget.h @@ -24,7 +24,7 @@ enum class widget_var : int { sound, // Current sound level, integer speed, // Current speed, integer stamina, // Current stamina 0-10000, greater being fuller stamina reserves - fatigue, // Current fatigue, integer + sleepiness, // Current sleepiness, integer health, // Current hidden health value, -200 to +200 mana, // Current available mana, integer max_mana, // Current maximum mana, integer diff --git a/tests/addiction_test.cpp b/tests/addiction_test.cpp index 62bafd5f4b200..331c298e8f6b4 100644 --- a/tests/addiction_test.cpp +++ b/tests/addiction_test.cpp @@ -27,7 +27,7 @@ static const trait_id trait_MUT_JUNKIE( "MUT_JUNKIE" ); static constexpr int max_iters = 100000; struct addict_effect_totals { - int fatigue = 0; + int sleepiness = 0; int morale = 0; int stim = 0; int str_bonus = 0; @@ -42,7 +42,7 @@ struct addict_effect_totals { int focus = 0; void after_update( Character &u ) { - fatigue += u.get_fatigue(); + sleepiness += u.get_sleepiness(); morale += u.get_morale_level(); stim += u.get_stim(); str_bonus += u.str_cur; @@ -73,13 +73,13 @@ static void clear_addictions( Character &u ) u.set_int_bonus( 0 ); u.set_per_bonus( 0 ); u.clear_morale(); - u.set_fatigue( 0 ); + u.set_sleepiness( 0 ); u.set_stim( 0 ); u.set_painkiller( 0 ); u.set_pain( 0 ); u.set_focus( 100 ); - REQUIRE( u.get_fatigue() == 0 ); + REQUIRE( u.get_sleepiness() == 0 ); REQUIRE( u.get_morale_level() == 0 ); REQUIRE( u.get_stim() == 0 ); REQUIRE( !u.has_effect( effect_hallu ) ); @@ -123,7 +123,7 @@ TEST_CASE( "hardcoded_and_json_addictions", "[addiction]" ) SECTION( "caffeine json test, intensity 5" ) { int res = suffer_addiction( addiction_test_caffeine, 5, u, max_iters, totals ); CHECK( res == Approx( 50 ).margin( 40 ) ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); // Morale & stim very rarely get decremented in the effect // Just check that they aren't positive CHECK( totals.morale <= 0 ); @@ -134,7 +134,7 @@ TEST_CASE( "hardcoded_and_json_addictions", "[addiction]" ) SECTION( "caffeine json test, intensity 20" ) { int res = suffer_addiction( addiction_test_caffeine, 20, u, max_iters, totals ); CHECK( res == Approx( 50 ).margin( 40 ) ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale <= 0 ); CHECK( totals.stim <= 0 ); } @@ -142,7 +142,7 @@ TEST_CASE( "hardcoded_and_json_addictions", "[addiction]" ) SECTION( "nicotine hardcoded test, intensity 5" ) { int res = suffer_addiction( addiction_test_nicotine, 5, u, max_iters, totals ); CHECK( res == Approx( 60 ).margin( 40 ) ); - CHECK( totals.fatigue >= 0 ); + CHECK( totals.sleepiness >= 0 ); CHECK( totals.morale <= 0 ); CHECK( totals.stim <= 0 ); } @@ -150,7 +150,7 @@ TEST_CASE( "hardcoded_and_json_addictions", "[addiction]" ) SECTION( "nicotine hardcoded test, intensity 20" ) { int res = suffer_addiction( addiction_test_nicotine, 20, u, max_iters, totals ); CHECK( res == Approx( 70 ).margin( 40 ) ); - CHECK( totals.fatigue == Approx( 70 ).margin( 35 ) ); + CHECK( totals.sleepiness == Approx( 70 ).margin( 35 ) ); CHECK( totals.morale <= 0 ); CHECK( totals.stim <= 0 ); } @@ -168,7 +168,7 @@ TEST_CASE( "check_caffeine_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_caffeine, 5, u, max_iters, totals ); CHECK( res == Approx( 50 ).margin( 40 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale <= 0 ); CHECK( totals.stim <= 0 ); CHECK( totals.pkiller == 0 ); @@ -186,7 +186,7 @@ TEST_CASE( "check_caffeine_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_caffeine, 20, u, max_iters, totals ); CHECK( res == Approx( 50 ).margin( 40 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale <= 0 ); CHECK( totals.stim <= 0 ); CHECK( totals.pkiller == 0 ); @@ -213,7 +213,7 @@ TEST_CASE( "check_nicotine_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_nicotine, 5, u, max_iters, totals ); CHECK( res == Approx( 60 ).margin( 40 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue >= 0 ); + CHECK( totals.sleepiness >= 0 ); CHECK( totals.morale <= 0 ); CHECK( totals.stim <= 0 ); CHECK( totals.pkiller == 0 ); @@ -231,7 +231,7 @@ TEST_CASE( "check_nicotine_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_nicotine, 20, u, max_iters, totals ); CHECK( res == Approx( 70 ).margin( 40 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == Approx( 70 ).margin( 35 ) ); + CHECK( totals.sleepiness == Approx( 70 ).margin( 35 ) ); CHECK( totals.morale <= 0 ); CHECK( totals.stim <= 0 ); CHECK( totals.pkiller == 0 ); @@ -258,7 +258,7 @@ TEST_CASE( "check_alcohol_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_alcohol, 5, u, max_iters, totals ); CHECK( res == Approx( 1300 ).margin( 500 ) ); CHECK( totals.health_mod < 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale == Approx( -40000 ).margin( 20000 ) ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -276,7 +276,7 @@ TEST_CASE( "check_alcohol_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_alcohol, 20, u, max_iters, totals ); CHECK( res == Approx( 9000 ).margin( 2000 ) ); CHECK( totals.health_mod < 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale == Approx( -300000 ).margin( 100000 ) ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -303,7 +303,7 @@ TEST_CASE( "check_diazepam_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_diazepam, 5, u, max_iters, totals ); CHECK( res == Approx( 1300 ).margin( 500 ) ); CHECK( totals.health_mod < 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale == Approx( -40000 ).margin( 20000 ) ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -321,7 +321,7 @@ TEST_CASE( "check_diazepam_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_diazepam, 20, u, max_iters, totals ); CHECK( res == Approx( 9000 ).margin( 2000 ) ); CHECK( totals.health_mod < 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale == Approx( -300000 ).margin( 100000 ) ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -348,7 +348,7 @@ TEST_CASE( "check_opiate_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_opiate, 5, u, max_iters, totals ); CHECK( res == max_iters ); CHECK( totals.health_mod < 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -366,7 +366,7 @@ TEST_CASE( "check_opiate_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_opiate, 20, u, max_iters, totals ); CHECK( res == max_iters ); CHECK( totals.health_mod < 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -393,7 +393,7 @@ TEST_CASE( "check_amphetamine_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_amphetamine, 5, u, max_iters, totals ); CHECK( res == Approx( 30000 ).margin( 10000 ) ); CHECK( totals.health_mod < 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim < 0 ); CHECK( totals.pkiller == 0 ); @@ -411,7 +411,7 @@ TEST_CASE( "check_amphetamine_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_amphetamine, 20, u, max_iters, totals ); CHECK( res == max_iters ); CHECK( totals.health_mod < 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == -max_iters ); CHECK( totals.pkiller == 0 ); @@ -438,7 +438,7 @@ TEST_CASE( "check_cocaine_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_cocaine, 5, u, max_iters, totals ); CHECK( res == Approx( 300 ).margin( 100 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim < 0 ); CHECK( totals.pkiller == 0 ); @@ -456,7 +456,7 @@ TEST_CASE( "check_cocaine_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_cocaine, 20, u, max_iters, totals ); CHECK( res == Approx( 3000 ).margin( 1000 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim < 0 ); CHECK( totals.pkiller == 0 ); @@ -483,7 +483,7 @@ TEST_CASE( "check_crack_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_crack, 5, u, max_iters, totals ); CHECK( res == Approx( 300 ).margin( 100 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim < 0 ); CHECK( totals.pkiller == 0 ); @@ -501,7 +501,7 @@ TEST_CASE( "check_crack_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_crack, 20, u, max_iters, totals ); CHECK( res == Approx( 3000 ).margin( 1000 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim < 0 ); CHECK( totals.pkiller == 0 ); @@ -528,7 +528,7 @@ TEST_CASE( "check_mutagen_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_mutagen, 5, u, max_iters, totals ); CHECK( res == 0 ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -546,7 +546,7 @@ TEST_CASE( "check_mutagen_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_mutagen, 20, u, max_iters, totals ); CHECK( res == 0 ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -566,7 +566,7 @@ TEST_CASE( "check_mutagen_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_mutagen, 5, u, max_iters, totals ); CHECK( res == max_iters ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -586,7 +586,7 @@ TEST_CASE( "check_mutagen_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_mutagen, 20, u, max_iters, totals ); CHECK( res == max_iters ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -613,7 +613,7 @@ TEST_CASE( "check_marloss_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_marloss_r, 5, u, max_iters, totals ); CHECK( res == Approx( 120 ).margin( 100 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -631,7 +631,7 @@ TEST_CASE( "check_marloss_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_marloss_r, 20, u, max_iters, totals ); CHECK( res == Approx( 250 ).margin( 150 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -649,7 +649,7 @@ TEST_CASE( "check_marloss_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_marloss_b, 5, u, max_iters, totals ); CHECK( res == Approx( 120 ).margin( 100 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -667,7 +667,7 @@ TEST_CASE( "check_marloss_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_marloss_b, 20, u, max_iters, totals ); CHECK( res == Approx( 250 ).margin( 150 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -685,7 +685,7 @@ TEST_CASE( "check_marloss_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_marloss_y, 5, u, max_iters, totals ); CHECK( res == Approx( 120 ).margin( 100 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); @@ -703,7 +703,7 @@ TEST_CASE( "check_marloss_addiction_effects", "[addiction]" ) int res = suffer_addiction( addiction_marloss_y, 20, u, max_iters, totals ); CHECK( res == Approx( 250 ).margin( 150 ) ); CHECK( totals.health_mod == 0 ); - CHECK( totals.fatigue == 0 ); + CHECK( totals.sleepiness == 0 ); CHECK( totals.morale < 0 ); CHECK( totals.stim == 0 ); CHECK( totals.pkiller == 0 ); diff --git a/tests/iuse_test.cpp b/tests/iuse_test.cpp index 606278a35a2ec..7eee3cd066856 100644 --- a/tests/iuse_test.cpp +++ b/tests/iuse_test.cpp @@ -360,9 +360,9 @@ TEST_CASE( "caffeine_and_atomic_caffeine", "[iuse][caff][atomic_caff]" ) avatar dummy; dummy.normalize(); - // Baseline fatigue level before caffeinating - int fatigue_before = 200; - dummy.set_fatigue( fatigue_before ); + // Baseline sleepiness level before caffeinating + int sleepiness_before = 200; + dummy.set_sleepiness( sleepiness_before ); // No stimulants or radiation dummy.set_stim( 0 ); @@ -370,17 +370,17 @@ TEST_CASE( "caffeine_and_atomic_caffeine", "[iuse][caff][atomic_caff]" ) REQUIRE( dummy.get_stim() == 0 ); REQUIRE( dummy.get_rad() == 0 ); - SECTION( "coffee reduces fatigue, but does not give stimulant effect" ) { + SECTION( "coffee reduces sleepiness, but does not give stimulant effect" ) { item coffee( "coffee", calendar::turn_zero, item::default_charges_tag{} ); dummy.consume( coffee ); - CHECK( dummy.get_fatigue() == fatigue_before - coffee.get_comestible()->fatigue_mod ); + CHECK( dummy.get_sleepiness() == sleepiness_before - coffee.get_comestible()->sleepiness_mod ); CHECK( dummy.get_stim() == coffee.get_comestible()->stim ); } - SECTION( "atomic caffeine greatly reduces fatigue, and increases stimulant effect" ) { + SECTION( "atomic caffeine greatly reduces sleepiness, and increases stimulant effect" ) { item atomic_coffee( "atomic_coffee", calendar::turn_zero, item::default_charges_tag{} ); dummy.consume( atomic_coffee ); - CHECK( dummy.get_fatigue() == fatigue_before - atomic_coffee.get_comestible()->fatigue_mod ); + CHECK( dummy.get_sleepiness() == sleepiness_before - atomic_coffee.get_comestible()->sleepiness_mod ); CHECK( dummy.get_stim() == atomic_coffee.get_comestible()->stim ); } } @@ -515,7 +515,7 @@ TEST_CASE( "thorazine", "[iuse][thorazine]" ) REQUIRE( dummy.has_item_with( []( const item & it ) { return it.typeId() == itype_thorazine; } ) ); - dummy.set_fatigue( 0 ); + dummy.set_sleepiness( 0 ); GIVEN( "avatar has hallucination, visuals, and high effects" ) { dummy.add_effect( effect_hallu, 1_hours ); @@ -536,8 +536,8 @@ TEST_CASE( "thorazine", "[iuse][thorazine]" ) REQUIRE_FALSE( dummy.has_effect( effect_visuals ) ); REQUIRE_FALSE( dummy.has_effect( effect_high ) ); - AND_THEN( "it causes some fatigue" ) { - CHECK( dummy.get_fatigue() >= 5 ); + AND_THEN( "it causes some sleepiness" ) { + CHECK( dummy.get_sleepiness() >= 5 ); } } } @@ -556,11 +556,11 @@ TEST_CASE( "thorazine", "[iuse][thorazine]" ) WHEN( "they take more thorazine" ) { dummy.consume( thorazine ); - THEN( "it only causes more fatigue" ) { + THEN( "it only causes more sleepiness" ) { CHECK_FALSE( dummy.has_item_with( []( const item & it ) { return it.typeId() == itype_thorazine; } ) ); - CHECK( dummy.get_fatigue() >= 20 ); + CHECK( dummy.get_sleepiness() >= 20 ); } } } @@ -626,10 +626,10 @@ TEST_CASE( "inhaler", "[iuse][inhaler]" ) GIVEN( "avatar is not suffering from asthma" ) { REQUIRE_FALSE( dummy.has_effect( effect_asthma ) ); - THEN( "inhaler reduces fatigue" ) { - dummy.set_fatigue( 10 ); + THEN( "inhaler reduces sleepiness" ) { + dummy.set_sleepiness( 10 ); dummy.use( inhaler_loc ); - CHECK( dummy.get_fatigue() < 10 ); + CHECK( dummy.get_sleepiness() < 10 ); } } } diff --git a/tests/magic_spell_effect_test.cpp b/tests/magic_spell_effect_test.cpp index 8a252037647d0..0aeca47681240 100644 --- a/tests/magic_spell_effect_test.cpp +++ b/tests/magic_spell_effect_test.cpp @@ -75,7 +75,7 @@ TEST_CASE( "line_attack", "[magic]" ) } } -TEST_CASE( "remove_field_fd_fatigue", "[magic]" ) +TEST_CASE( "remove_field_fd_sleepiness", "[magic]" ) { // Test relies on lighting conditions, so ensure we control the level of // daylight. @@ -93,15 +93,15 @@ TEST_CASE( "remove_field_fd_fatigue", "[magic]" ) CAPTURE( with_light ); CHECK( dummy.get_location() == player_initial_pos ); - // create fd_fatigue of each intensity near player + // create fd_sleepiness of each intensity near player tripoint_abs_ms p1 = player_initial_pos + tripoint_east * 10; tripoint_abs_ms p2 = player_initial_pos + tripoint_east * 11; tripoint_abs_ms p3 = player_initial_pos + tripoint_east * 12; tripoint_abs_ms p4 = player_initial_pos + tripoint_east * 13; - m.add_field( m.getlocal( p1 ), fd_fatigue, 1, 1_hours ); - m.add_field( m.getlocal( p2 ), fd_fatigue, 2, 1_hours ); - m.add_field( m.getlocal( p3 ), fd_fatigue, 3, 1_hours ); - m.add_field( m.getlocal( p4 ), fd_fatigue, 3, 1_hours ); + m.add_field( m.getlocal( p1 ), fd_sleepiness, 1, 1_hours ); + m.add_field( m.getlocal( p2 ), fd_sleepiness, 2, 1_hours ); + m.add_field( m.getlocal( p3 ), fd_sleepiness, 3, 1_hours ); + m.add_field( m.getlocal( p4 ), fd_sleepiness, 3, 1_hours ); if( with_light ) { player_add_headlamp(); @@ -114,7 +114,7 @@ TEST_CASE( "remove_field_fd_fatigue", "[magic]" ) dummy.recalc_sight_limits(); CHECK( m.getglobal( dummy.pos() ) == player_initial_pos ); - CHECK( count_fields_near( p1, fd_fatigue ) == std::set { p1, p2, p3, p4 } ); + CHECK( count_fields_near( p1, fd_sleepiness ) == std::set { p1, p2, p3, p4 } ); spell_effect::remove_field( sp, dummy, m.getlocal( player_initial_pos ) ); calendar::turn += 1_turns; @@ -123,7 +123,7 @@ TEST_CASE( "remove_field_fd_fatigue", "[magic]" ) m.process_fields(); CHECK( m.getglobal( dummy.pos() ) == player_initial_pos ); - CHECK( count_fields_near( p1, fd_fatigue ) == std::set { p2, p3, p4 } ); + CHECK( count_fields_near( p1, fd_sleepiness ) == std::set { p2, p3, p4 } ); spell_effect::remove_field( sp, dummy, m.getlocal( player_initial_pos ) ); calendar::turn += 1_turns; @@ -132,7 +132,7 @@ TEST_CASE( "remove_field_fd_fatigue", "[magic]" ) m.process_fields(); CHECK( m.getglobal( dummy.pos() ) == player_initial_pos ); - CHECK( count_fields_near( p1, fd_fatigue ) == std::set { p3, p4 } ); + CHECK( count_fields_near( p1, fd_sleepiness ) == std::set { p3, p4 } ); spell_effect::remove_field( sp, dummy, m.getlocal( player_initial_pos ) ); calendar::turn += 1_turns; @@ -140,7 +140,7 @@ TEST_CASE( "remove_field_fd_fatigue", "[magic]" ) calendar::turn += 1_turns; m.process_fields(); - CHECK( count_fields_near( p1, fd_fatigue ) == std::set { p4 } ); + CHECK( count_fields_near( p1, fd_sleepiness ) == std::set { p4 } ); }; setup_and_remove_fields( true ); diff --git a/tests/magic_spell_test.cpp b/tests/magic_spell_test.cpp index c0fec2a7a65c4..02af43d9142f9 100644 --- a/tests/magic_spell_test.cpp +++ b/tests/magic_spell_test.cpp @@ -621,7 +621,7 @@ TEST_CASE( "spell_effect_-_recover_energy", "[magic][spell][effect][recover_ener // BIONIC: p.mod_power_level (positive) OR p.mod_stamina (negative) // // For these effects, negative "damage" is good (reducing the amount of a bad thing) - // FATIGUE: p.mod_fatigue + // FATIGUE: p.mod_sleepiness // PAIN: p.mod_pain_resist or p_mod_pain // NOTE: This spell effect cannot be used for healing HP. diff --git a/tests/npc_talk_test.cpp b/tests/npc_talk_test.cpp index 20c7a2cbe983e..983a011b92ab5 100644 --- a/tests/npc_talk_test.cpp +++ b/tests/npc_talk_test.cpp @@ -87,9 +87,9 @@ static npc &create_test_talker( bool shopkeep = false ) model_npc->name = "Beta NPC"; model_npc->set_hunger( 0 ); model_npc->set_thirst( 0 ); - model_npc->set_fatigue( 0 ); + model_npc->set_sleepiness( 0 ); model_npc->remove_effect( effect_sleep ); - // An ugly hack to prevent NPC falling asleep during testing due to massive fatigue + // An ugly hack to prevent NPC falling asleep during testing due to massive sleepiness model_npc->set_mutation( trait_WEB_WEAVER ); return *model_npc; @@ -436,12 +436,12 @@ TEST_CASE( "npc_talk_needs", "[npc_talk]" ) CHECK( d.responses[0].text == "This is a basic test response." ); talker_npc.set_thirst( 90 ); talker_npc.set_hunger( 90 ); - talker_npc.set_fatigue( fatigue_levels::EXHAUSTED ); + talker_npc.set_sleepiness( sleepiness_levels::EXHAUSTED ); gen_response_lines( d, 4 ); CHECK( d.responses[0].text == "This is a basic test response." ); CHECK( d.responses[1].text == "This is a npc thirst test response." ); CHECK( d.responses[2].text == "This is a npc hunger test response." ); - CHECK( d.responses[3].text == "This is a npc fatigue test response." ); + CHECK( d.responses[3].text == "This is a npc sleepiness test response." ); } TEST_CASE( "npc_talk_mission_goal", "[npc_talk]" ) diff --git a/tests/npc_test.cpp b/tests/npc_test.cpp index 21174c1b1d89c..b7b39e760c67f 100644 --- a/tests/npc_test.cpp +++ b/tests/npc_test.cpp @@ -58,14 +58,14 @@ static void on_load_test( npc &who, const time_duration &from, const time_durati static void test_needs( const npc &who, const numeric_interval &hunger, const numeric_interval &thirst, - const numeric_interval &fatigue ) + const numeric_interval &sleepiness ) { CHECK( who.get_hunger() <= hunger.max ); CHECK( who.get_hunger() >= hunger.min ); CHECK( who.get_thirst() <= thirst.max ); CHECK( who.get_thirst() >= thirst.min ); - CHECK( who.get_fatigue() <= fatigue.max ); - CHECK( who.get_fatigue() >= fatigue.min ); + CHECK( who.get_sleepiness() <= sleepiness.max ); + CHECK( who.get_sleepiness() >= sleepiness.min ); } static npc create_model() @@ -78,9 +78,9 @@ static npc create_model() } model_npc.set_hunger( 0 ); model_npc.set_thirst( 0 ); - model_npc.set_fatigue( 0 ); + model_npc.set_sleepiness( 0 ); model_npc.remove_effect( effect_sleep ); - // An ugly hack to prevent NPC falling asleep during testing due to massive fatigue + // An ugly hack to prevent NPC falling asleep during testing due to massive sleepiness model_npc.set_mutation( trait_WEB_WEAVER ); return model_npc; @@ -109,7 +109,7 @@ static std::string get_list_of_monsters( const std::string &title ) TEST_CASE( "on_load-sane-values", "[.]" ) { - SECTION( "Awake for 10 minutes, gaining hunger/thirst/fatigue" ) { + SECTION( "Awake for 10 minutes, gaining hunger/thirst/sleepiness" ) { npc test_npc = create_model(); const int five_min_ticks = 2; on_load_test( test_npc, 0_turns, 5_minutes * five_min_ticks ); @@ -117,12 +117,12 @@ TEST_CASE( "on_load-sane-values", "[.]" ) const numeric_interval hunger( five_min_ticks / 4, margin, margin ); const numeric_interval thirst( five_min_ticks / 4, margin, margin ); - const numeric_interval fatigue( five_min_ticks, margin, margin ); + const numeric_interval sleepiness( five_min_ticks, margin, margin ); - test_needs( test_npc, hunger, thirst, fatigue ); + test_needs( test_npc, hunger, thirst, sleepiness ); } - SECTION( "Awake for 2 days, gaining hunger/thirst/fatigue" ) { + SECTION( "Awake for 2 days, gaining hunger/thirst/sleepiness" ) { npc test_npc = create_model(); const double five_min_ticks = 2_days / 5_minutes; on_load_test( test_npc, 0_turns, 5_minutes * five_min_ticks ); @@ -130,19 +130,19 @@ TEST_CASE( "on_load-sane-values", "[.]" ) const int margin = 20; const numeric_interval hunger( five_min_ticks / 4, margin, margin ); const numeric_interval thirst( five_min_ticks / 4, margin, margin ); - const numeric_interval fatigue( five_min_ticks, margin, margin ); + const numeric_interval sleepiness( five_min_ticks, margin, margin ); - test_needs( test_npc, hunger, thirst, fatigue ); + test_needs( test_npc, hunger, thirst, sleepiness ); } - SECTION( "Sleeping for 6 hours, gaining hunger/thirst (not testing fatigue due to lack of effects processing)" ) { + SECTION( "Sleeping for 6 hours, gaining hunger/thirst (not testing sleepiness due to lack of effects processing)" ) { npc test_npc = create_model(); test_npc.add_effect( effect_sleep, 6_hours ); - test_npc.set_fatigue( 1000 ); + test_npc.set_sleepiness( 1000 ); const double five_min_ticks = 6_hours / 5_minutes; /* // Fatigue regeneration starts at 1 per 5min, but linearly increases to 2 per 5min at 2 hours or more - const int expected_fatigue_change = + const int expected_sleepiness_change = ((1.0f + 2.0f) / 2.0f * 2_hours / 5_minutes ) + (2.0f * (6_hours - 2_hours) / 5_minutes); */ @@ -151,15 +151,15 @@ TEST_CASE( "on_load-sane-values", "[.]" ) const int margin = 10; const numeric_interval hunger( five_min_ticks / 8, margin, margin ); const numeric_interval thirst( five_min_ticks / 8, margin, margin ); - const numeric_interval fatigue( test_npc.get_fatigue(), 0, 0 ); + const numeric_interval sleepiness( test_npc.get_sleepiness(), 0, 0 ); - test_needs( test_npc, hunger, thirst, fatigue ); + test_needs( test_npc, hunger, thirst, sleepiness ); } } TEST_CASE( "on_load-similar-to-per-turn", "[.]" ) { - SECTION( "Awake for 10 minutes, gaining hunger/thirst/fatigue" ) { + SECTION( "Awake for 10 minutes, gaining hunger/thirst/sleepiness" ) { npc on_load_npc = create_model(); npc iterated_npc = create_model(); const int five_min_ticks = 2; @@ -172,12 +172,12 @@ TEST_CASE( "on_load-similar-to-per-turn", "[.]" ) const int margin = 2; const numeric_interval hunger( iterated_npc.get_hunger(), margin, margin ); const numeric_interval thirst( iterated_npc.get_thirst(), margin, margin ); - const numeric_interval fatigue( iterated_npc.get_fatigue(), margin, margin ); + const numeric_interval sleepiness( iterated_npc.get_sleepiness(), margin, margin ); - test_needs( on_load_npc, hunger, thirst, fatigue ); + test_needs( on_load_npc, hunger, thirst, sleepiness ); } - SECTION( "Awake for 6 hours, gaining hunger/thirst/fatigue" ) { + SECTION( "Awake for 6 hours, gaining hunger/thirst/sleepiness" ) { npc on_load_npc = create_model(); npc iterated_npc = create_model(); const double five_min_ticks = 6_hours / 5_minutes; @@ -190,9 +190,9 @@ TEST_CASE( "on_load-similar-to-per-turn", "[.]" ) const int margin = 10; const numeric_interval hunger( iterated_npc.get_hunger(), margin, margin ); const numeric_interval thirst( iterated_npc.get_thirst(), margin, margin ); - const numeric_interval fatigue( iterated_npc.get_fatigue(), margin, margin ); + const numeric_interval sleepiness( iterated_npc.get_sleepiness(), margin, margin ); - test_needs( on_load_npc, hunger, thirst, fatigue ); + test_needs( on_load_npc, hunger, thirst, sleepiness ); } } diff --git a/tests/player_helpers.cpp b/tests/player_helpers.cpp index ee06776363f78..d30bee0553827 100644 --- a/tests/player_helpers.cpp +++ b/tests/player_helpers.cpp @@ -94,7 +94,7 @@ void clear_character( Character &dummy, bool skip_nutrition ) } // This sets HP to max, clears addictions and morale, - // and sets hunger, thirst, fatigue and such to zero + // and sets hunger, thirst, sleepiness and such to zero dummy.environmental_revert_effect(); // However, the above does not set stored kcal dummy.set_stored_kcal( dummy.get_healthy_kcal() ); diff --git a/tests/skill_test.cpp b/tests/skill_test.cpp index 8f81f179b88b3..9c4abc38b07b7 100644 --- a/tests/skill_test.cpp +++ b/tests/skill_test.cpp @@ -25,7 +25,7 @@ TEST_CASE( "skill_rust_occurs", "[character][skill]" ) if( calendar::once_every( 4_hours ) ) { // Don't starve guy.set_stored_kcal( guy.get_healthy_kcal() ); - // Clear thirst and fatigue + // Clear thirst and sleepiness guy.environmental_revert_effect(); // And sleep deprivation guy.set_sleep_deprivation( 0 ); diff --git a/tests/stomach_contents_test.cpp b/tests/stomach_contents_test.cpp index 63267c9ac294a..6122477159f1e 100644 --- a/tests/stomach_contents_test.cpp +++ b/tests/stomach_contents_test.cpp @@ -74,7 +74,7 @@ static time_duration time_until_hungry( Character &p ) unsigned int thirty_minutes = 0; do { p.set_sleep_deprivation( 0 ); - p.set_fatigue( 0 ); + p.set_sleepiness( 0 ); pass_time( p, 30_minutes ); thirty_minutes++; } while( p.get_hunger() < 40 ); // hungry @@ -142,7 +142,7 @@ TEST_CASE( "starve_test", "[starve][slow]" ) results.push_back( string_format( "\nday %d: %d", day, dummy.get_stored_kcal() ) ); pass_time( dummy, 1_days ); dummy.set_thirst( 0 ); - dummy.set_fatigue( 0 ); + dummy.set_sleepiness( 0 ); set_all_vitamins( 0, dummy ); day++; } while( dummy.get_stored_kcal() > 0 && day < expected_day * 2 ); @@ -317,7 +317,7 @@ TEST_CASE( "starve_test_hunger3", "[starve][slow]" ) results.push_back( string_format( "\nday %d: %d", day, dummy.get_stored_kcal() ) ); pass_time( dummy, 1_days ); dummy.set_thirst( 0 ); - dummy.set_fatigue( 0 ); + dummy.set_sleepiness( 0 ); set_all_vitamins( 0, dummy ); day++; } while( dummy.get_stored_kcal() > 0 ); @@ -350,7 +350,7 @@ TEST_CASE( "all_nutrition_starve_test", "[starve][slow]" ) } pass_time( dummy, 1_days ); dummy.set_thirst( 0 ); - dummy.set_fatigue( 0 ); + dummy.set_sleepiness( 0 ); eat_all_nutrients( dummy ); print_stomach_contents( dummy, print_tests ); } diff --git a/tests/weary_test.cpp b/tests/weary_test.cpp index 29d674352b6d4..928073998f316 100644 --- a/tests/weary_test.cpp +++ b/tests/weary_test.cpp @@ -106,22 +106,22 @@ TEST_CASE( "weary_assorted_tasks", "[weary][activities]" ) } } -static void check_weary_mutation_nosleep( const std::string &trait_name, float fatigue_mod ) +static void check_weary_mutation_nosleep( const std::string &trait_name, float sleepiness_mod ) { tasklist soldier_8h; avatar &guy = get_avatar(); - float multiplier = 1.0f + fatigue_mod; + float multiplier = 1.0f + sleepiness_mod; std::stringstream section_name; section_name << "Non-sleep effects of " << trait_name; - section_name << " (fatigue_mod: " << fatigue_mod << ")"; + section_name << " (sleepiness_mod: " << sleepiness_mod << ")"; SECTION( section_name.str() ) { clear_avatar(); set_single_trait( guy, trait_name ); guy.set_stored_kcal( guy.get_healthy_kcal() ); - // How do we make sure they don't sleep? Set fatigue to -1000? + // How do we make sure they don't sleep? Set sleepiness to -1000? // Doesn't seem to be a problem, fortunately. soldier_8h.enschedule( task_dig, 8_hours ); @@ -188,19 +188,19 @@ static void check_weary_mutation_nosleep( const std::string &trait_name, float f } } -static void check_weary_mutation_sleep( const std::string &trait_name, float fatigue_mod, - float fatigue_regen_mod ) +static void check_weary_mutation_sleep( const std::string &trait_name, float sleepiness_mod, + float sleepiness_regen_mod ) { tasklist soldier_8h; avatar &guy = get_avatar(); - float multiplier = 1.0f + fatigue_mod; - float multiplier2 = multiplier / ( 2.0f + fatigue_regen_mod ); + float multiplier = 1.0f + sleepiness_mod; + float multiplier2 = multiplier / ( 2.0f + sleepiness_regen_mod ); std::stringstream section_name; section_name << "Sleep effects of " << trait_name; - section_name << " (fatigue_mod: " << fatigue_mod; - section_name << "; fatigue_regen_mod: " << fatigue_regen_mod << ")"; + section_name << " (sleepiness_mod: " << sleepiness_mod; + section_name << "; sleepiness_regen_mod: " << sleepiness_regen_mod << ")"; SECTION( section_name.str() ) { clear_avatar(); @@ -254,24 +254,24 @@ static void check_weary_mutation_sleep( const std::string &trait_name, float fat } } -static void check_weary_mutation( const std::string &trait_name, float fatigue_mod, - float fatigue_regen_mod ) +static void check_weary_mutation( const std::string &trait_name, float sleepiness_mod, + float sleepiness_regen_mod ) { - check_weary_mutation_nosleep( trait_name, fatigue_mod ); - check_weary_mutation_sleep( trait_name, fatigue_mod, fatigue_regen_mod ); + check_weary_mutation_nosleep( trait_name, sleepiness_mod ); + check_weary_mutation_sleep( trait_name, sleepiness_mod, sleepiness_regen_mod ); } TEST_CASE( "weary_recovery_mutations", "[weary][activities][mutations]" ) { - // WAKEFUL: fatigue_mod -0.15 - // SLEEPY: fatigue_mod 0.33, fatigue_regen_mod 0.33 - // WAKEFUL2: fatigue_mod -0.25 - // WAKEFUL3: fatigue_mod -0.5, fatigue_regen_mod 0.5 - // HUGE: fatigue_mod 0.15 (HUGE_OK - does it remove this? Should it?) - // PERSISTENCE_HUNTER: fatigue_mod -0.1 - // PERSISTENCE_HUNGER2: fatigue_mod -0.2 - // MET_RAT: fatigue_mod 0.5, fatigue_regen_mod 0.33 - // SLEEPY2: fatigue_mod 1.0 (does this include SLEEPY's fatigue_regen_mod? looks like it?) + // WAKEFUL: sleepiness_mod -0.15 + // SLEEPY: sleepiness_mod 0.33, sleepiness_regen_mod 0.33 + // WAKEFUL2: sleepiness_mod -0.25 + // WAKEFUL3: sleepiness_mod -0.5, sleepiness_regen_mod 0.5 + // HUGE: sleepiness_mod 0.15 (HUGE_OK - does it remove this? Should it?) + // PERSISTENCE_HUNTER: sleepiness_mod -0.1 + // PERSISTENCE_HUNGER2: sleepiness_mod -0.2 + // MET_RAT: sleepiness_mod 0.5, sleepiness_regen_mod 0.33 + // SLEEPY2: sleepiness_mod 1.0 (does this include SLEEPY's sleepiness_regen_mod? looks like it?) check_weary_mutation( "WAKEFUL", -0.15f, 0.0f ); check_weary_mutation( "SLEEPY", 0.33f, 0.33f ); diff --git a/tests/widget_test.cpp b/tests/widget_test.cpp index 4cdd533e2e02a..460dcf877656e 100644 --- a/tests/widget_test.cpp +++ b/tests/widget_test.cpp @@ -84,7 +84,7 @@ static const widget_id widget_test_compass_legend_3( "test_compass_legend_3" ); static const widget_id widget_test_compass_legend_5( "test_compass_legend_5" ); static const widget_id widget_test_dex_color_num( "test_dex_color_num" ); static const widget_id widget_test_disabled_when_empty( "test_disabled_when_empty" ); -static const widget_id widget_test_fatigue_clause( "test_fatigue_clause" ); +static const widget_id widget_test_sleepiness_clause( "test_sleepiness_clause" ); static const widget_id widget_test_focus_num( "test_focus_num" ); static const widget_id widget_test_health_clause( "test_health_clause" ); static const widget_id widget_test_health_color_num( "test_health_color_num" ); @@ -447,21 +447,21 @@ TEST_CASE( "widgets_showing_avatar_stats_with_color_for_normal_value", "[widget] } } -TEST_CASE( "widget_showing_character_fatigue_status", "[widget]" ) +TEST_CASE( "widget_showing_character_sleepiness_status", "[widget]" ) { - widget fatigue_w = widget_test_fatigue_clause.obj(); + widget sleepiness_w = widget_test_sleepiness_clause.obj(); avatar &ava = get_avatar(); clear_avatar(); - ava.set_fatigue( 0 ); - CHECK( fatigue_w.layout( ava ) == "Rest: " ); - ava.set_fatigue( 192 ); - CHECK( fatigue_w.layout( ava ) == "Rest: Tired" ); - ava.set_fatigue( 384 ); - CHECK( fatigue_w.layout( ava ) == "Rest: Dead Tired" ); - ava.set_fatigue( 576 ); - CHECK( fatigue_w.layout( ava ) == "Rest: Exhausted" ); + ava.set_sleepiness( 0 ); + CHECK( sleepiness_w.layout( ava ) == "Rest: " ); + ava.set_sleepiness( 192 ); + CHECK( sleepiness_w.layout( ava ) == "Rest: Tired" ); + ava.set_sleepiness( 384 ); + CHECK( sleepiness_w.layout( ava ) == "Rest: Dead Tired" ); + ava.set_sleepiness( 576 ); + CHECK( sleepiness_w.layout( ava ) == "Rest: Exhausted" ); } TEST_CASE( "widgets_showing_avatar_health_with_color_for_normal_value", "[widget][health][color]" ) From c7a11918fd982d8850dc5d75eaf350c3c0e688b6 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:43:45 -0700 Subject: [PATCH 02/13] seems my upstream was not up to date. fun. --- .../LIXA_furniture_and_terrain.json | 2 +- data/json/mutations/mutations.json | 8 +- data/json/ui/zenfs/complete_health_panel.json | 16 +- data/json/ui/zenfs/health.json | 54 +++--- data/mods/BombasticPerks/perks.json | 8 +- .../eoc_nether_attunement_events.json | 4 +- src/character.cpp | 158 +++++++++--------- src/character.h | 68 ++++---- src/character_body.cpp | 28 ++-- src/magic_enchantment.cpp | 4 +- src/magic_enchantment.h | 4 +- src/mutation.h | 2 +- src/mutation_data.cpp | 2 +- src/npcmove.cpp | 16 +- src/player_hardcoded_effects.cpp | 10 +- tests/magic_spell_test.cpp | 2 +- tests/npc_test.cpp | 2 +- tests/weary_test.cpp | 2 +- 18 files changed, 195 insertions(+), 195 deletions(-) diff --git a/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json b/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json index 890fa40f341ca..b2575bd4e4719 100644 --- a/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json +++ b/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json @@ -309,7 +309,7 @@ "type": "furniture", "id": "f_LIXA_unfold_barrier", "name": "wall of flat space", - "looks_like": "fd_fatigue", + "looks_like": "fd_sleepiness", "description": "From a distance, this looks like where the chamber ends; a flat wall, with a very detailed painting of a tunnel behind it. But as you get closer, you can see how it ripples, like lazy water, and notice angles of the space beyond that a flat image could never give.", "symbol": "@", "color": "light_gray", diff --git a/data/json/mutations/mutations.json b/data/json/mutations/mutations.json index 96bccdd8dca94..97b30bc54d8df 100644 --- a/data/json/mutations/mutations.json +++ b/data/json/mutations/mutations.json @@ -1127,7 +1127,7 @@ "active": true, "cost": 90, "time": "10 s", - "fatigue": true, + "sleepiness": true, "kcal": true, "thirst": true, "enchantments": [ { "values": [ { "value": "MOVE_COST", "multiply": -0.1 }, { "value": "BONUS_DODGE", "add": 2 } ] } ] @@ -3558,7 +3558,7 @@ "cost": 90, "kcal": true, "thirst": true, - "fatigue": true + "sleepiness": true }, { "type": "mutation", @@ -3576,7 +3576,7 @@ "cost": 90, "kcal": true, "thirst": true, - "fatigue": true + "sleepiness": true }, { "type": "mutation", @@ -8929,7 +8929,7 @@ "name": { "str": "Debug Life Support" }, "points": 99, "valid": false, - "description": "Holds hunger, thirst, and fatigue stable. You can debug all year long with this one!", + "description": "Holds hunger, thirst, and sleepiness stable. You can debug all year long with this one!", "debug": true }, { diff --git a/data/json/ui/zenfs/complete_health_panel.json b/data/json/ui/zenfs/complete_health_panel.json index e6b79c2e7d753..b9b8d8a4bf581 100644 --- a/data/json/ui/zenfs/complete_health_panel.json +++ b/data/json/ui/zenfs/complete_health_panel.json @@ -32,14 +32,14 @@ "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_malus_weariness_power", "zenfs_stamina_pain_mana", "zenfs_activity_fatigue_blood" ] + "widgets": [ "zenfs_malus_weariness_power", "zenfs_stamina_pain_mana", "zenfs_activity_sleepiness_blood" ] }, { "id": "zenfs_physical_num_block", "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_num_malus_weariness_power", "zenfs_num_stamina_pain_mana", "zenfs_num_activity_fatigue_blood" ], + "widgets": [ "zenfs_num_malus_weariness_power", "zenfs_num_stamina_pain_mana", "zenfs_num_activity_sleepiness_blood" ], "padding": 3 }, { @@ -178,7 +178,7 @@ "zenfs_weariness_bar_10", "zenfs_weariness_trans_malus", "zenfs_activity_desc", - "zenfs_fatigue_desc" + "zenfs_sleepiness_desc" ] }, { @@ -193,7 +193,7 @@ "zenfs_weariness_num", "zenfs_weariness_trans_malus_num", "zenfs_activity_desc_A", - "zenfs_fatigue_desc_F" + "zenfs_sleepiness_desc_F" ] }, { @@ -254,12 +254,12 @@ "widgets": [ "zenfs_stamina_bar_12", "zenfs_pain_bar_15", "zenfs_mana_bar_15" ] }, { - "id": "zenfs_activity_fatigue_blood", + "id": "zenfs_activity_sleepiness_blood", "type": "widget", "style": "layout", "arrange": "rows", "width": 21, - "widgets": [ "zenfs_activity_desc", "zenfs_fatigue_desc", "zenfs_blood" ] + "widgets": [ "zenfs_activity_desc", "zenfs_sleepiness_desc", "zenfs_blood" ] }, { "id": "zenfs_num_malus_weariness_power", @@ -278,12 +278,12 @@ "widgets": [ "zenfs_stamina_num", "zenfs_pain_num", "zenfs_mana_num_with_max" ] }, { - "id": "zenfs_num_activity_fatigue_blood", + "id": "zenfs_num_activity_sleepiness_blood", "type": "widget", "style": "layout", "arrange": "rows", "width": 19, - "widgets": [ "zenfs_activity_desc", "zenfs_fatigue_desc", "zenfs_blood" ], + "widgets": [ "zenfs_activity_desc", "zenfs_sleepiness_desc", "zenfs_blood" ], "padding": 0 }, { diff --git a/data/json/ui/zenfs/health.json b/data/json/ui/zenfs/health.json index ec5297801ba32..16d6b5a9cd973 100644 --- a/data/json/ui/zenfs/health.json +++ b/data/json/ui/zenfs/health.json @@ -38,41 +38,41 @@ "padding": 0 }, { - "id": "zenfs_fatigue_bar", + "id": "zenfs_sleepiness_bar", "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_fatigue_bar_label", "zenfs_fatigue_bar_12" ] + "widgets": [ "zenfs_sleepiness_bar_label", "zenfs_sleepiness_bar_12" ] }, { - "id": "zenfs_fatigue_bar_slim", + "id": "zenfs_sleepiness_bar_slim", "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_fatigue_bar_label", "zenfs_fatigue_bar_14" ] + "widgets": [ "zenfs_sleepiness_bar_label", "zenfs_sleepiness_bar_14" ] }, { - "id": "zenfs_fatigue_desc", + "id": "zenfs_sleepiness_desc", "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_fatigue_bar_label", "zenfs_fatigue_desc_no_label" ], + "widgets": [ "zenfs_sleepiness_bar_label", "zenfs_sleepiness_desc_no_label" ], "padding": 0 }, { - "id": "zenfs_fatigue_desc_F", + "id": "zenfs_sleepiness_desc_F", "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_fatigue_label_F", "zenfs_fatigue_desc_no_label" ], + "widgets": [ "zenfs_sleepiness_label_F", "zenfs_sleepiness_desc_no_label" ], "padding": 0 }, { - "id": "zenfs_fatigue_num", + "id": "zenfs_sleepiness_num", "type": "widget", "style": "layout", "arrange": "minimum_columns", - "widgets": [ "zenfs_fatigue_bar_label", "zenfs_fatigue_num_no_label" ], + "widgets": [ "zenfs_sleepiness_bar_label", "zenfs_sleepiness_num_no_label" ], "padding": 0 }, { @@ -157,17 +157,17 @@ "padding": 0 }, { - "id": "zenfs_fatigue_bar_template", + "id": "zenfs_sleepiness_bar_template", "type": "widget", - "var": "fatigue", + "var": "sleepiness", "style": "graph", "symbols": "·−=≡≣", "colors": [ "c_dark_gray", "c_green", "c_light_green", "c_yellow", "c_light_red", "c_red" ] }, { - "id": "zenfs_fatigue_num_no_label", + "id": "zenfs_sleepiness_num_no_label", "type": "widget", - "var": "fatigue", + "var": "sleepiness", "style": "number", "colors": [ "c_dark_gray", "c_green", "c_light_green", "c_yellow", "c_light_red", "c_red" ], "text_align": "right", @@ -175,19 +175,19 @@ "padding": 0 }, { - "id": "zenfs_fatigue_bar_12", + "id": "zenfs_sleepiness_bar_12", "type": "widget", - "copy-from": "zenfs_fatigue_bar_template", + "copy-from": "zenfs_sleepiness_bar_template", "width": 12 }, { - "id": "zenfs_fatigue_bar_14", + "id": "zenfs_sleepiness_bar_14", "type": "widget", - "copy-from": "zenfs_fatigue_bar_template", + "copy-from": "zenfs_sleepiness_bar_template", "width": 14 }, { - "id": "zenfs_fatigue_desc_no_label", + "id": "zenfs_sleepiness_desc_no_label", "type": "widget", "style": "text", "text_align": "right", @@ -197,31 +197,31 @@ "id": "well_rested", "text": "Well Rested", "color": "blue", - "condition": { "math": [ "u_val('fatigue')", "<", "95" ] } + "condition": { "math": [ "u_val('sleepiness')", "<", "95" ] } }, { "id": "rested", "text": "Rested", "color": "green", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "95" ] }, { "math": [ "u_val('fatigue')", "<", "191" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "95" ] }, { "math": [ "u_val('sleepiness')", "<", "191" ] } ] } }, { "id": "tired", "text": "Tired", "color": "yellow", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "191" ] }, { "math": [ "u_val('fatigue')", "<", "383" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "191" ] }, { "math": [ "u_val('sleepiness')", "<", "383" ] } ] } }, { "id": "dead_tired", "text": "Dead Tired", "color": "light_red", - "condition": { "and": [ { "math": [ "u_val('fatigue')", ">=", "383" ] }, { "math": [ "u_val('fatigue')", "<", "575" ] } ] } + "condition": { "and": [ { "math": [ "u_val('sleepiness')", ">=", "383" ] }, { "math": [ "u_val('sleepiness')", "<", "575" ] } ] } }, { "id": "exhausted", "text": "Exhausted", "color": "red", - "condition": { "math": [ "u_val('fatigue')", ">=", "575" ] } + "condition": { "math": [ "u_val('sleepiness')", ">=", "575" ] } } ], "padding": 0 @@ -241,7 +241,7 @@ "width": 4 }, { - "id": "zenfs_fatigue_label_F", + "id": "zenfs_sleepiness_label_F", "type": "widget", "style": "text", "string": "F", @@ -250,14 +250,14 @@ "flags": [ "W_NO_PADDING" ] }, { - "id": "zenfs_fatigue_bar_label", + "id": "zenfs_sleepiness_bar_label", "type": "widget", "style": "text", "string": "Fatigue", "width": 7 }, { - "id": "zenfs_fatigue_num_label", + "id": "zenfs_sleepiness_num_label", "type": "widget", "style": "text", "string": "Fatig", diff --git a/data/mods/BombasticPerks/perks.json b/data/mods/BombasticPerks/perks.json index 1f83793cb9e09..dd78481cdb7bb 100644 --- a/data/mods/BombasticPerks/perks.json +++ b/data/mods/BombasticPerks/perks.json @@ -586,10 +586,10 @@ { "condition": "ALWAYS", "values": [ - { "value": "STRENGTH", "add": { "math": [ "(u_val('thirst')/120) + (u_val('fatigue')/150)" ] } }, - { "value": "DEXTERITY", "add": { "math": [ "(u_val('thirst')/120) + (u_val('fatigue')/150)" ] } }, - { "value": "INTELLIGENCE", "add": { "math": [ "(u_val('thirst')/120) + (u_val('fatigue')/150)" ] } }, - { "value": "PERCEPTION", "add": { "math": [ "(u_val('thirst')/120) + (u_val('fatigue')/150)" ] } }, + { "value": "STRENGTH", "add": { "math": [ "(u_val('thirst')/120) + (u_val('sleepiness')/150)" ] } }, + { "value": "DEXTERITY", "add": { "math": [ "(u_val('thirst')/120) + (u_val('sleepiness')/150)" ] } }, + { "value": "INTELLIGENCE", "add": { "math": [ "(u_val('thirst')/120) + (u_val('sleepiness')/150)" ] } }, + { "value": "PERCEPTION", "add": { "math": [ "(u_val('thirst')/120) + (u_val('sleepiness')/150)" ] } }, { "value": "SPEED", "add": { "math": [ "clamp(( (u_val('thirst') - 80 ) / 10 ) , 0, 50)" ] } } ] }, diff --git a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json index 01606d323b1de..d3d16af709aca 100644 --- a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json +++ b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json @@ -652,7 +652,7 @@ }, "effect": [ { "u_message": "As you unleash your powers, you feel tired.", "type": "bad" }, - { "math": [ "u_val('fatigue')", "+=", "rng(30,90)" ] } + { "math": [ "u_val('sleepiness')", "+=", "rng(30,90)" ] } ] }, { @@ -1056,7 +1056,7 @@ ] }, "effect": [ - { "u_set_field": "fd_fatigue", "radius": 0, "intensity": 3, "hit_player": false }, + { "u_set_field": "fd_sleepiness", "radius": 0, "intensity": 3, "hit_player": false }, { "u_message": "As you unleash your powers, the air around you twists and warps in on itself.", "type": "bad" } ] }, diff --git a/src/character.cpp b/src/character.cpp index 1aae3d3c9e8c8..686c0f6ea5114 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -548,7 +548,7 @@ Character::Character() : health_tally = 0; hunger = 0; thirst = 0; - fatigue = 0; + sleepiness = 0; sleep_deprivation = 0; daily_sleep = 0_turns; continuous_sleep = 0_turns; @@ -773,8 +773,8 @@ void Character::mod_stat( const std::string &stat, float modifier ) { if( stat == "thirst" ) { mod_thirst( modifier ); - } else if( stat == "fatigue" ) { - mod_fatigue( modifier ); + } else if( stat == "sleepiness" ) { + mod_sleepiness( modifier ); } else if( stat == "oxygen" ) { oxygen += modifier; } else if( stat == "stamina" ) { @@ -3660,15 +3660,15 @@ void Character::do_skill_rust() } } -int Character::focus_equilibrium_fatigue_cap( int equilibrium ) const +int Character::focus_equilibrium_sleepiness_cap( int equilibrium ) const { - if( get_fatigue() >= fatigue_levels::MASSIVE_FATIGUE && equilibrium > 20 ) { + if( get_sleepiness() >= sleepiness_levels::MASSIVE_SLEEPINESS && equilibrium > 20 ) { return 20; - } else if( get_fatigue() >= fatigue_levels::EXHAUSTED && equilibrium > 40 ) { + } else if( get_sleepiness() >= sleepiness_levels::EXHAUSTED && equilibrium > 40 ) { return 40; - } else if( get_fatigue() >= fatigue_levels::DEAD_TIRED && equilibrium > 60 ) { + } else if( get_sleepiness() >= sleepiness_levels::DEAD_TIRED && equilibrium > 60 ) { return 60; - } else if( get_fatigue() >= fatigue_levels::TIRED && equilibrium > 80 ) { + } else if( get_sleepiness() >= sleepiness_levels::TIRED && equilibrium > 80 ) { return 80; } return equilibrium; @@ -3748,7 +3748,7 @@ int Character::calc_focus_equilibrium( bool ignore_pain ) const int Character::calc_focus_change() const { - return focus_equilibrium_fatigue_cap( calc_focus_equilibrium() ) - get_focus(); + return focus_equilibrium_sleepiness_cap( calc_focus_equilibrium() ) - get_focus(); } void Character::update_mental_focus() @@ -4391,7 +4391,7 @@ std::string Character::debug_weary_info() const return string_format( "Weariness: %s Max Full Exert: %s Mult: %g\n BMR: %d CARDIO FITNESS: %d\n %s Thresh: %d At: %d\n Kcal: %d/%d Fatigue: %d Morale: %d Wgt: %d (BMI %.1f)", amt, max_act, move_mult, bmr, cardio_mult, weary_internals, thresh, current, - get_stored_kcal(), get_healthy_kcal(), fatigue, morale, weight, bmi ); + get_stored_kcal(), get_healthy_kcal(), sleepiness, morale, weight, bmi ); } void Character::mod_stored_kcal( int nkcal, const bool ignore_weariness ) @@ -4512,9 +4512,9 @@ void Character::set_thirst( int nthirst ) } } -void Character::mod_fatigue( int nfatigue ) +void Character::mod_sleepiness( int nsleepiness ) { - set_fatigue( fatigue + nfatigue ); + set_sleepiness( sleepiness + nsleepiness ); } void Character::mod_sleep_deprivation( int nsleep_deprivation ) @@ -4522,18 +4522,18 @@ void Character::mod_sleep_deprivation( int nsleep_deprivation ) set_sleep_deprivation( sleep_deprivation + nsleep_deprivation ); } -void Character::set_fatigue( int nfatigue ) +void Character::set_sleepiness( int nsleepiness ) { - nfatigue = std::max( nfatigue, -1000 ); - if( fatigue != nfatigue ) { - fatigue = nfatigue; - on_stat_change( "fatigue", fatigue ); + nsleepiness = std::max( nsleepiness, -1000 ); + if( sleepiness != nsleepiness ) { + sleepiness = nsleepiness; + on_stat_change( "sleepiness", sleepiness ); } } -void Character::set_fatigue( fatigue_levels nfatigue ) +void Character::set_sleepiness( sleepiness_levels nsleepiness ) { - set_fatigue( static_cast( nfatigue ) ); + set_sleepiness( static_cast( nsleepiness ) ); } void Character::set_sleep_deprivation( int nsleep_deprivation ) @@ -4572,9 +4572,9 @@ void Character::reset_continuous_sleep() continuous_sleep = 0_turns; } -int Character::get_fatigue() const +int Character::get_sleepiness() const { - return fatigue; + return sleepiness; } int Character::get_sleep_deprivation() const @@ -4825,8 +4825,8 @@ int Character::weary_threshold() const { const int bmr = base_bmr(); int threshold = bmr * get_option( "WEARY_BMR_MULT" ); - // reduce by 1% per 14 points of fatigue after 150 points - threshold *= 1.0f - ( ( std::max( fatigue, -20 ) - 150 ) / 1400.0f ); + // reduce by 1% per 14 points of sleepiness after 150 points + threshold *= 1.0f - ( ( std::max( sleepiness, -20 ) - 150 ) / 1400.0f ); // Each 2 points of morale increase or decrease by 1% threshold *= 1.0f + ( get_morale_level() / 200.0f ); // TODO: Hunger effects this @@ -4963,51 +4963,51 @@ bool Character::needs_food() const void Character::update_needs( int rate_multiplier ) { const int current_stim = get_stim(); - // Hunger, thirst, & fatigue up every 5 minutes + // Hunger, thirst, & sleepiness up every 5 minutes effect &sleep = get_effect( effect_sleep ); - // No food/thirst/fatigue clock at all + // No food/thirst/sleepiness clock at all const bool debug_ls = has_trait( trait_DEBUG_LS ); - // No food/thirst, capped fatigue clock (only up to tired) + // No food/thirst, capped sleepiness clock (only up to tired) const bool asleep = !sleep.is_null(); const bool lying = asleep || has_effect( effect_lying_down ) || activity.id() == ACT_TRY_SLEEP; needs_rates rates = calc_needs_rates(); - const bool wasnt_fatigued = get_fatigue() <= fatigue_levels::DEAD_TIRED; - // Don't increase fatigue if sleeping or trying to sleep or if we're at the cap. - if( get_fatigue() < 1050 && !asleep && !debug_ls ) { - if( rates.fatigue > 0.0f ) { - int fatigue_roll = roll_remainder( rates.fatigue * rate_multiplier ); - mod_fatigue( fatigue_roll ); + const bool wasnt_sleepinessd = get_sleepiness() <= sleepiness_levels::DEAD_TIRED; + // Don't increase sleepiness if sleeping or trying to sleep or if we're at the cap. + if( get_sleepiness() < 1050 && !asleep && !debug_ls ) { + if( rates.sleepiness > 0.0f ) { + int sleepiness_roll = roll_remainder( rates.sleepiness * rate_multiplier ); + mod_sleepiness( sleepiness_roll ); // Synaptic regen bionic stops SD while awake and boosts it while sleeping if( !has_flag( json_flag_STOP_SLEEP_DEPRIVATION ) ) { - // fatigue_roll should be around 1 - so the counter increases by 1 every minute on average, + // sleepiness_roll should be around 1 - so the counter increases by 1 every minute on average, // but characters who need less sleep will also get less sleep deprived, and vice-versa. // Note: Since needs are updated in 5-minute increments, we have to multiply the roll again by - // 5. If rate_multiplier is > 1, fatigue_roll will be higher and this will work out. - mod_sleep_deprivation( fatigue_roll * 5 ); + // 5. If rate_multiplier is > 1, sleepiness_roll will be higher and this will work out. + mod_sleep_deprivation( sleepiness_roll * 5 ); } - if( !needs_food() && get_fatigue() > fatigue_levels::TIRED ) { - set_fatigue( fatigue_levels::TIRED ); + if( !needs_food() && get_sleepiness() > sleepiness_levels::TIRED ) { + set_sleepiness( sleepiness_levels::TIRED ); set_sleep_deprivation( 0 ); } } } else if( asleep ) { if( rates.recovery > 0.0f ) { int recovered = roll_remainder( rates.recovery * rate_multiplier ); - if( get_fatigue() - recovered < -20 ) { + if( get_sleepiness() - recovered < -20 ) { // Should be wake up, but that could prevent some retroactive regeneration sleep.set_duration( 1_turns ); - mod_fatigue( -25 ); + mod_sleepiness( -25 ); } else { if( has_effect( effect_disrupted_sleep ) || has_effect( effect_recently_coughed ) ) { recovered *= .5; } - mod_fatigue( -recovered ); + mod_sleepiness( -recovered ); // Sleeping on the ground, no bionic = 1x rest_modifier // Sleeping on a bed, no bionic = 2x rest_modifier @@ -5034,9 +5034,9 @@ void Character::update_needs( int rate_multiplier ) // If we're just tired, we'll get a decent boost to our sleep quality. // The opposite is true for very tired characters. - if( get_fatigue() < fatigue_levels::DEAD_TIRED ) { + if( get_sleepiness() < sleepiness_levels::DEAD_TIRED ) { rest_modifier += 2; - } else if( get_fatigue() >= fatigue_levels::EXHAUSTED ) { + } else if( get_sleepiness() >= sleepiness_levels::EXHAUSTED ) { rest_modifier = ( rest_modifier > 2 ) ? rest_modifier - 2 : 1; } @@ -5047,10 +5047,10 @@ void Character::update_needs( int rate_multiplier ) } if( calendar::once_every( 10_minutes ) && ( has_trait( trait_WATERSLEEP ) || has_trait( trait_UNDINE_SLEEP_WATER ) ) ) { - mod_fatigue( -3 ); // Fish sleep less in water + mod_sleepiness( -3 ); // Fish sleep less in water } } - if( is_avatar() && wasnt_fatigued && get_fatigue() > fatigue_levels::DEAD_TIRED && !lying ) { + if( is_avatar() && wasnt_sleepinessd && get_sleepiness() > sleepiness_levels::DEAD_TIRED && !lying ) { if( !activity ) { add_msg_if_player( m_warning, _( "You're feeling tired. %s to lie down for sleep." ), press_x( ACTION_SLEEP ) ); @@ -5104,8 +5104,8 @@ needs_rates Character::calc_needs_rates() const static const std::string player_thirst_rate( "PLAYER_THIRST_RATE" ); rates.thirst = get_option< float >( player_thirst_rate ); - static const std::string player_fatigue_rate( "PLAYER_FATIGUE_RATE" ); - rates.fatigue = get_option< float >( player_fatigue_rate ); + static const std::string player_sleepiness_rate( "PLAYER_SLEEPINESS_RATE" ); + rates.sleepiness = get_option< float >( player_sleepiness_rate ); if( asleep ) { calc_sleep_recovery_rate( rates ); @@ -5119,7 +5119,7 @@ needs_rates Character::calc_needs_rates() const if( has_trait( trait_ROOTS2 ) || has_trait( trait_ROOTS3 ) || has_trait( trait_CHLOROMORPH ) ) { rates.hunger *= 0.5f; rates.thirst *= 0.5f; - rates.fatigue *= 0.5f; + rates.sleepiness *= 0.5f; } } @@ -5135,7 +5135,7 @@ needs_rates Character::calc_needs_rates() const } rates.hunger = enchantment_cache->modify_value( enchant_vals::mod::HUNGER, rates.hunger ); - rates.fatigue = enchantment_cache->modify_value( enchant_vals::mod::FATIGUE, rates.fatigue ); + rates.sleepiness = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS, rates.sleepiness ); rates.thirst = enchantment_cache->modify_value( enchant_vals::mod::THIRST, rates.thirst ); return rates; @@ -5144,7 +5144,7 @@ needs_rates Character::calc_needs_rates() const void Character::calc_sleep_recovery_rate( needs_rates &rates ) const { const effect &sleep = get_effect( effect_sleep ); - rates.recovery = enchantment_cache->modify_value( enchant_vals::mod::FATIGUE_REGEN, 1 ); + rates.recovery = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS_REGEN, 1 ); // -5% sleep recovery rate for every main part below cold float temp_mod = 0.0f; @@ -5299,13 +5299,13 @@ void Character::check_needs_extremes() } // Check if we're falling asleep, unless we're sleeping - if( get_fatigue() >= fatigue_levels::EXHAUSTED + 25 && !in_sleep_state() ) { - if( get_fatigue() >= fatigue_levels::MASSIVE_FATIGUE ) { + if( get_sleepiness() >= sleepiness_levels::EXHAUSTED + 25 && !in_sleep_state() ) { + if( get_sleepiness() >= sleepiness_levels::MASSIVE_SLEEPINESS ) { add_msg_if_player( m_bad, _( "Survivor sleep now." ) ); get_event_bus().send( getID() ); - mod_fatigue( -10 ); + mod_sleepiness( -10 ); fall_asleep(); - } else if( get_fatigue() >= 800 && calendar::once_every( 30_minutes ) ) { + } else if( get_sleepiness() >= 800 && calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "Anywhere would be a good place to sleep…" ) ); } else if( calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "You feel like you haven't slept in days." ) ); @@ -5314,8 +5314,8 @@ void Character::check_needs_extremes() // Even if we're not Exhausted, we really should be feeling lack/sleep earlier // Penalties start at Dead Tired and go from there - if( get_fatigue() >= fatigue_levels::DEAD_TIRED && !in_sleep_state() ) { - if( get_fatigue() >= 700 ) { + if( get_sleepiness() >= sleepiness_levels::DEAD_TIRED && !in_sleep_state() ) { + if( get_sleepiness() >= 700 ) { if( calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "You're too physically tired to stop yawning." ) ); add_effect( effect_lack_sleep, 30_minutes + 1_turns ); @@ -5325,7 +5325,7 @@ void Character::check_needs_extremes() // Rivet's idea: look out for microsleeps! fall_asleep( 30_seconds ); } - } else if( get_fatigue() >= fatigue_levels::EXHAUSTED ) { + } else if( get_sleepiness() >= sleepiness_levels::EXHAUSTED ) { if( calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "How much longer until bedtime?" ) ); add_effect( effect_lack_sleep, 30_minutes + 1_turns ); @@ -5334,7 +5334,7 @@ void Character::check_needs_extremes() if( one_in( 100 + int_cur ) ) { fall_asleep( 30_seconds ); } - } else if( get_fatigue() >= fatigue_levels::DEAD_TIRED && calendar::once_every( 30_minutes ) ) { + } else if( get_sleepiness() >= sleepiness_levels::DEAD_TIRED && calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "*yawn* You should really get some sleep." ) ); add_effect( effect_lack_sleep, 30_minutes + 1_turns ); } @@ -5349,11 +5349,11 @@ void Character::check_needs_extremes() if( sleep_deprivation < SLEEP_DEPRIVATION_MINOR ) { add_msg_if_player( m_warning, _( "Your mind feels tired. It's been a while since you've slept well." ) ); - mod_fatigue( 1 ); + mod_sleepiness( 1 ); } else if( sleep_deprivation < SLEEP_DEPRIVATION_SERIOUS ) { add_msg_if_player( m_bad, _( "Your mind feels foggy from a lack of good sleep, and your eyes keep trying to close against your will." ) ); - mod_fatigue( 5 ); + mod_sleepiness( 5 ); if( one_in( 10 ) ) { mod_daily_health( -1, -10 ); @@ -5361,7 +5361,7 @@ void Character::check_needs_extremes() } else if( sleep_deprivation < SLEEP_DEPRIVATION_MAJOR ) { add_msg_if_player( m_bad, _( "Your mind feels weary, and you dread every wakeful minute that passes. You crave sleep, and feel like you're about to collapse." ) ); - mod_fatigue( 10 ); + mod_sleepiness( 10 ); if( one_in( 5 ) ) { mod_daily_health( -2, -10 ); @@ -5369,14 +5369,14 @@ void Character::check_needs_extremes() } else if( sleep_deprivation < SLEEP_DEPRIVATION_MASSIVE ) { add_msg_if_player( m_bad, _( "You haven't slept decently for so long that your whole body is screaming for mercy. It's a miracle that you're still awake, but it feels more like a curse now." ) ); - mod_fatigue( 40 ); + mod_sleepiness( 40 ); mod_daily_health( -5, -10 ); } // else you pass out for 20 hours, guaranteed // Microsleeps are slightly worse if you're sleep deprived, but not by much. (chance: 1 in (75 + int_cur) at lethal sleep deprivation) - // Note: these can coexist with fatigue-related microsleeps + // Note: these can coexist with sleepiness-related microsleeps /** @EFFECT_INT slightly decreases occurrence of short naps when sleep deprived */ if( one_in( static_cast( sleep_deprivation_pct * 75 ) + int_cur ) ) { fall_asleep( 30_seconds ); @@ -5393,8 +5393,8 @@ void Character::check_needs_extremes() add_msg_player_or_npc( m_bad, _( "Your body collapses due to sleep deprivation, your neglected fatigue rushing back all at once, and you pass out on the spot." ) , _( " collapses to the ground from exhaustion." ) ); - if( get_fatigue() < fatigue_levels::EXHAUSTED ) { - set_fatigue( fatigue_levels::EXHAUSTED ); + if( get_sleepiness() < sleepiness_levels::EXHAUSTED ) { + set_sleepiness( sleepiness_levels::EXHAUSTED ); } if( sleep_deprivation >= SLEEP_DEPRIVATION_MAJOR ) { @@ -5473,7 +5473,7 @@ bool Character::is_hibernating() const { // Hibernating only kicks in whilst Engorged; separate tracking for hunger/thirst here // as a safety catch. One test subject managed to get two Colds during hibernation; - // since those add fatigue and dry out the character, the subject went for the full 10 days plus + // since those add sleepiness and dry out the character, the subject went for the full 10 days plus // a little, and came out of it well into Parched. Hibernating shouldn't endanger your // life like that--but since there's much less fluid reserve than food reserve, // simply using the same numbers won't work. @@ -5516,7 +5516,7 @@ void Character::temp_equalizer( const bodypart_id &bp1, const bodypart_id &bp2 ) Character::comfort_response_t Character::base_comfort_value( const tripoint_bub_ms &p ) const { // Comfort of sleeping spots is "objective", while sleep_spot( p ) is "subjective" - // As in the latter also checks for fatigue and other variables while this function + // As in the latter also checks for sleepiness and other variables while this function // only looks at the base comfyness of something. It's still subjective, in a sense, // as arachnids who sleep in webs will find most places comfortable for instance. int comfort = 0; @@ -7016,7 +7016,7 @@ void Character::update_stamina( int turns ) if( !has_bionic( bio_synlungs ) ) { stamina_recovery = enchantment_cache->modify_value( enchant_vals::mod::REGEN_STAMINA, stamina_recovery ); - // TODO: recovering stamina causes hunger/thirst/fatigue. + // TODO: recovering stamina causes hunger/thirst/sleepiness. // TODO: Tiredness slowing recovery // stim recovers stamina (or impairs recovery) @@ -9024,8 +9024,8 @@ void Character::fall_asleep() } // some days worth of round-the-clock Snooze. Cata seasons default to 91 days. fall_asleep( 10_days ); - // If you're not fatigued enough for 10 days, you won't sleep the whole thing. - // In practice, the fatigue from filling the tank from (no msg) to Time For Bed + // If you're not sleepinessd enough for 10 days, you won't sleep the whole thing. + // In practice, the sleepiness from filling the tank from (no msg) to Time For Bed // will last about 8 days. } else { fall_asleep( 10_hours ); // default max sleep time. @@ -10853,15 +10853,15 @@ void Character::process_one_effect( effect &it, bool is_new ) } } - // Handle fatigue - val = get_effect( "FATIGUE", reduced ); - // Prevent ongoing fatigue effects while asleep. + // Handle sleepiness + val = get_effect( "SLEEPINESS", reduced ); + // Prevent ongoing sleepiness effects while asleep. // These are meant to change how fast you get tired, not how long you sleep. if( val != 0 && !in_sleep_state() ) { mod = 1; - if( is_new || it.activated( calendar::turn, "FATIGUE", val, reduced, mod ) ) { - mod_fatigue( bound_mod_to_vals( get_fatigue(), val, it.get_max_val( "FATIGUE", reduced ), - it.get_min_val( "FATIGUE", reduced ) ) ); + if( is_new || it.activated( calendar::turn, "SLEEPINESS", val, reduced, mod ) ) { + mod_sleepiness( bound_mod_to_vals( get_sleepiness(), val, it.get_max_val( "SLEEPINESS", reduced ), + it.get_min_val( "SLEEPINESS", reduced ) ) ); } } @@ -11237,10 +11237,10 @@ int Character::sleep_spot( const tripoint_bub_ms &p ) const sleepy += 10; //comfy water! } - if( get_fatigue() < fatigue_levels::TIRED + 1 ) { - sleepy -= static_cast( ( fatigue_levels::TIRED + 1 - get_fatigue() ) / 4 ); + if( get_sleepiness() < sleepiness_levels::TIRED + 1 ) { + sleepy -= static_cast( ( sleepiness_levels::TIRED + 1 - get_sleepiness() ) / 4 ); } else { - sleepy += static_cast( ( get_fatigue() - fatigue_levels::TIRED + 1 ) / 16 ); + sleepy += static_cast( ( get_sleepiness() - sleepiness_levels::TIRED + 1 ) / 16 ); } if( current_stim > 0 || !has_trait( trait_INSOMNIA ) ) { @@ -13106,7 +13106,7 @@ void Character::environmental_revert_effect() set_all_parts_hp_to_max(); set_hunger( 0 ); set_thirst( 0 ); - set_fatigue( 0 ); + set_sleepiness( 0 ); set_lifestyle( 0 ); set_daily_health( 0 ); set_stim( 0 ); diff --git a/src/character.h b/src/character.h index 751374d2f7c4a..6a38d87adb11a 100644 --- a/src/character.h +++ b/src/character.h @@ -144,82 +144,82 @@ enum vision_modes { NUM_VISION_MODES }; -enum class fatigue_levels : int { +enum class sleepiness_levels : int { TIRED = 191, DEAD_TIRED = 383, EXHAUSTED = 575, - MASSIVE_FATIGUE = 1000 + MASSIVE_SLEEPINESS = 1000 }; -const std::unordered_map fatigue_level_strs = { { - { "TIRED", fatigue_levels::TIRED }, - { "DEAD_TIRED", fatigue_levels::DEAD_TIRED }, - { "EXHAUSTED", fatigue_levels::EXHAUSTED }, - { "MASSIVE_FATIGUE", fatigue_levels::MASSIVE_FATIGUE } +const std::unordered_map sleepiness_level_strs = { { + { "TIRED", sleepiness_levels::TIRED }, + { "DEAD_TIRED", sleepiness_levels::DEAD_TIRED }, + { "EXHAUSTED", sleepiness_levels::EXHAUSTED }, + { "MASSIVE_SLEEPINESS", sleepiness_levels::MASSIVE_SLEEPINESS } } }; -constexpr inline bool operator>=( const fatigue_levels &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator>=( const sleepiness_levels &lhs, const sleepiness_levels &rhs ) { return static_cast( lhs ) >= static_cast( rhs ); } -constexpr inline bool operator<( const fatigue_levels &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator<( const sleepiness_levels &lhs, const sleepiness_levels &rhs ) { return static_cast( lhs ) < static_cast( rhs ); } template -constexpr inline bool operator>=( const T &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator>=( const T &lhs, const sleepiness_levels &rhs ) { return lhs >= static_cast( rhs ); } template -constexpr inline bool operator>( const T &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator>( const T &lhs, const sleepiness_levels &rhs ) { return lhs > static_cast( rhs ); } template -constexpr inline bool operator<=( const T &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator<=( const T &lhs, const sleepiness_levels &rhs ) { return lhs <= static_cast( rhs ); } template -constexpr inline bool operator<( const T &lhs, const fatigue_levels &rhs ) +constexpr inline bool operator<( const T &lhs, const sleepiness_levels &rhs ) { return lhs < static_cast( rhs ); } template -constexpr inline int operator/( const fatigue_levels &lhs, const T &rhs ) +constexpr inline int operator/( const sleepiness_levels &lhs, const T &rhs ) { return static_cast( lhs ) / rhs; } template -constexpr inline int operator+( const fatigue_levels &lhs, const T &rhs ) +constexpr inline int operator+( const sleepiness_levels &lhs, const T &rhs ) { return static_cast( lhs ) + rhs; } template -constexpr inline int operator-( const fatigue_levels &lhs, const T &rhs ) +constexpr inline int operator-( const sleepiness_levels &lhs, const T &rhs ) { return static_cast( lhs ) - rhs; } template -constexpr inline int operator-( const T &lhs, const fatigue_levels &rhs ) +constexpr inline int operator-( const T &lhs, const sleepiness_levels &rhs ) { return lhs - static_cast( rhs ); } /** @brief five levels of consequences for days without sleep - @details Sleep deprivation, distinct from fatigue, is defined in minutes. Although most + @details Sleep deprivation, distinct from sleepiness, is defined in minutes. Although most calculations scale linearly, malus is bestowed only upon reaching the tiers defined below. - @note Sleep deprivation increases fatigue. Fatigue increase scales with the severity of sleep + @note Sleep deprivation increases sleepiness. Fatigue increase scales with the severity of sleep deprivation. @note Sleep deprivation kicks in if lack of sleep is avoided with stimulants or otherwise for long periods of time @@ -489,7 +489,7 @@ struct ret_val::default_failure : public struct needs_rates { float thirst = 0.0f; float hunger = 0.0f; - float fatigue = 0.0f; + float sleepiness = 0.0f; float recovery = 0.0f; float kcal = 0.0f; }; @@ -691,22 +691,22 @@ class Character : public Creature, public visitable void mod_continuous_sleep( time_duration mod ); void reset_continuous_sleep(); - int get_fatigue() const; + int get_sleepiness() const; int get_sleep_deprivation() const; /** Modifiers for need values exclusive to characters */ void mod_stored_kcal( int nkcal, bool ignore_weariness = false ); void mod_hunger( int nhunger ); void mod_thirst( int nthirst ); - void mod_fatigue( int nfatigue ); + void mod_sleepiness( int nsleepiness ); void mod_sleep_deprivation( int nsleep_deprivation ); /** Setters for need values exclusive to characters */ void set_stored_kcal( int kcal ); void set_hunger( int nhunger ); void set_thirst( int nthirst ); - void set_fatigue( int nfatigue ); - void set_fatigue( fatigue_levels nfatigue ); + void set_sleepiness( int nsleepiness ); + void set_sleepiness( sleepiness_levels nsleepiness ); void set_sleep_deprivation( int nsleep_deprivation ); protected: @@ -926,7 +926,7 @@ class Character : public Creature, public visitable void update_enchantment_mutations(); /** Returns true if character needs food, false if character is an NPC with NO_NPC_FOOD set */ bool needs_food() const; - /** Increases hunger, thirst, fatigue and stimulants wearing off. `rate_multiplier` is for retroactive updates. */ + /** Increases hunger, thirst, sleepiness and stimulants wearing off. `rate_multiplier` is for retroactive updates. */ void update_needs( int rate_multiplier ); needs_rates calc_needs_rates() const; void calc_sleep_recovery_rate( needs_rates &rates ) const; @@ -947,11 +947,11 @@ class Character : public Creature, public visitable comfort_level level = comfort_level::neutral; const item *aid = nullptr; }; - /** Rate point's ability to serve as a bed. Only takes certain mutations into account, and not fatigue nor stimulants. */ + /** Rate point's ability to serve as a bed. Only takes certain mutations into account, and not sleepiness nor stimulants. */ comfort_response_t base_comfort_value( const tripoint_bub_ms &p ) const; - /** Returns focus equilibrium cap due to fatigue **/ - int focus_equilibrium_fatigue_cap( int equilibrium ) const; + /** Returns focus equilibrium cap due to sleepiness **/ + int focus_equilibrium_sleepiness_cap( int equilibrium ) const; /** Uses morale and other factors to return the character's focus target goto value */ int calc_focus_equilibrium( bool ignore_pain = false ) const; /** Calculates actual focus gain/loss value from focus equilibrium*/ @@ -3322,9 +3322,9 @@ class Character : public Creature, public visitable /** Used to apply stimulation modifications from food and medication **/ void modify_stimulation( const islot_comestible &comest ); - /** Used to apply fatigue modifications from food and medication **/ + /** Used to apply sleepiness modifications from food and medication **/ /** Used to apply radiation from food and medication **/ - void modify_fatigue( const islot_comestible &comest ); + void modify_sleepiness( const islot_comestible &comest ); void modify_radiation( const islot_comestible &comest ); /** Used to apply addiction modifications from food and medication **/ void modify_addiction( const islot_comestible &comest ); @@ -3745,7 +3745,7 @@ class Character : public Creature, public visitable double vomit_mod(); /** Checked each turn during "lying_down", returns true if the player falls asleep */ bool can_sleep(); - /** Rate point's ability to serve as a bed. Takes all mutations, fatigue and stimulants into account. */ + /** Rate point's ability to serve as a bed. Takes all mutations, sleepiness and stimulants into account. */ int sleep_spot( const tripoint_bub_ms &p ) const; /** Processes human-specific effects of effects before calling Creature::process_effects(). */ void process_effects() override; @@ -3797,7 +3797,7 @@ class Character : public Creature, public visitable /** Key to select the mutation in the UI. */ char key = ' '; /** - * Time (in turns) until the mutation increase hunger/thirst/fatigue according + * Time (in turns) until the mutation increase hunger/thirst/sleepiness according * to its cost (@ref mutation_branch::cost). When those costs have been paid, this * is reset to @ref mutation_branch::cooldown. */ @@ -3977,7 +3977,7 @@ class Character : public Creature, public visitable // Additional vision sources, currently only used by avatars std::map moncams; - /// @brief Needs (hunger, starvation, thirst, fatigue, etc.) + /// @brief Needs (hunger, starvation, thirst, sleepiness, etc.) // Stored calories is a value in 'calories' - 1/1000s of kcals (or Calories) int stored_calories; int healthy_calories; @@ -4002,7 +4002,7 @@ class Character : public Creature, public visitable time_duration daily_sleep = 0_turns; time_duration continuous_sleep = 0_turns; - int fatigue; + int sleepiness; int sleep_deprivation; bool check_encumbrance = true; bool cache_inventory_is_valid = false; diff --git a/src/character_body.cpp b/src/character_body.cpp index 079cfd6a5d4b7..ecb03e2f21bf9 100644 --- a/src/character_body.cpp +++ b/src/character_body.cpp @@ -216,9 +216,9 @@ void Character::update_body( const time_point &from, const time_point &to ) } const int five_mins = ticks_between( from, to, 5_minutes ); if( five_mins > 0 ) { - float fatigue_mod = enchantment_cache->modify_value( enchant_vals::mod::FATIGUE, 1 ); - float fatigue_regen_mod = enchantment_cache->modify_value( enchant_vals::mod::FATIGUE_REGEN, 1 ); - activity_history.try_reduce_weariness( base_bmr(), fatigue_mod, fatigue_regen_mod ); + float sleepiness_mod = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS, 1 ); + float sleepiness_regen_mod = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS_REGEN, 1 ); + activity_history.try_reduce_weariness( base_bmr(), sleepiness_mod, sleepiness_regen_mod ); check_needs_extremes(); update_needs( five_mins ); @@ -232,8 +232,8 @@ void Character::update_body( const time_point &from, const time_point &to ) if( in_sleep_state() && was_sleeping ) { needs_rates tmp_rates; calc_sleep_recovery_rate( tmp_rates ); - const int fatigue_regen_rate = tmp_rates.recovery; - const time_duration effective_time_slept = ( to - from ) * fatigue_regen_rate; + const int sleepiness_regen_rate = tmp_rates.recovery; + const time_duration effective_time_slept = ( to - from ) * sleepiness_regen_rate; mod_daily_sleep( effective_time_slept ); mod_continuous_sleep( effective_time_slept ); } @@ -451,11 +451,11 @@ void Character::update_bodytemp() // Give SOME bonus to those living furnaces with extreme metabolism const units::temperature_delta metabolism_warmth = std::max( 0.0f, met_rate - 1.0f ) * 2_C_delta; // Fatigue - // -1.725C when exhausted, scaled up and capped at 900 fatigue. - const float scaled_fatigue = clamp( get_fatigue(), 0, - 900 ) / static_cast( fatigue_levels::EXHAUSTED ); - const units::temperature_delta fatigue_warmth = has_sleep ? 0_C_delta : -1.725_C_delta * - scaled_fatigue; + // -1.725C when exhausted, scaled up and capped at 900 sleepiness. + const float scaled_sleepiness = clamp( get_sleepiness(), 0, + 900 ) / static_cast( sleepiness_levels::EXHAUSTED ); + const units::temperature_delta sleepiness_warmth = has_sleep ? 0_C_delta : -1.725_C_delta * + scaled_sleepiness; // Sunlight const float scaled_sun_irradiance = incident_sun_irradiance( get_weather().weather_id, @@ -560,8 +560,8 @@ void Character::update_bodytemp() set_part_temp_conv( bp, temp ); // HUNGER / STARVATION mod_part_temp_conv( bp, hunger_warmth ); - // FATIGUE - mod_part_temp_conv( bp, fatigue_warmth ); + // SLEEPINESS + mod_part_temp_conv( bp, sleepiness_warmth ); // Mutations mod_part_temp_conv( bp, mutation_heat_low ); // BMI @@ -770,7 +770,7 @@ void Character::update_bodytemp() add_msg( m_warning, _( "You feel cold and shiver." ) ); } if( temp_after <= BODYTEMP_VERY_COLD && - get_fatigue() <= fatigue_levels::DEAD_TIRED && !has_bionic( bio_sleep_shutdown ) ) { + get_sleepiness() <= sleepiness_levels::DEAD_TIRED && !has_bionic( bio_sleep_shutdown ) ) { if( bp == body_part_torso ) { add_msg( m_warning, _( "Your shivering prevents you from sleeping." ) ); wake_up(); @@ -916,7 +916,7 @@ void Character::update_frostbite( const bodypart_id &bp, const int FBwindPower, void Character::update_stomach( const time_point &from, const time_point &to ) { const needs_rates rates = calc_needs_rates(); - // No food/thirst/fatigue clock at all + // No food/thirst/sleepiness clock at all const bool debug_ls = has_trait( trait_DEBUG_LS ); const bool foodless = debug_ls || !needs_food(); const bool no_thirst = has_flag( json_flag_NO_THIRST ); diff --git a/src/magic_enchantment.cpp b/src/magic_enchantment.cpp index b919ee5f4583c..24005ad1a702f 100644 --- a/src/magic_enchantment.cpp +++ b/src/magic_enchantment.cpp @@ -76,8 +76,8 @@ namespace io case enchant_vals::mod::REGEN_HP_AWAKE: return "REGEN_HP_AWAKE"; case enchant_vals::mod::HUNGER: return "HUNGER"; case enchant_vals::mod::THIRST: return "THIRST"; - case enchant_vals::mod::FATIGUE: return "FATIGUE"; - case enchant_vals::mod::FATIGUE_REGEN: return "FATIGUE_REGEN"; + case enchant_vals::mod::SLEEPINESS: return "SLEEPINESS"; + case enchant_vals::mod::SLEEPINESS_REGEN: return "SLEEPINESS_REGEN"; case enchant_vals::mod::PAIN: return "PAIN"; case enchant_vals::mod::PAIN_REMOVE: return "PAIN_REMOVE"; case enchant_vals::mod::PAIN_PENALTY_MOD_STR: return "PAIN_PENALTY_MOD_STR"; diff --git a/src/magic_enchantment.h b/src/magic_enchantment.h index f138a47a16362..8d2e46e52b2d6 100644 --- a/src/magic_enchantment.h +++ b/src/magic_enchantment.h @@ -53,8 +53,8 @@ enum class mod : int { REGEN_HP_AWAKE, HUNGER, // hunger rate THIRST, // thirst rate - FATIGUE, // fatigue rate - FATIGUE_REGEN, + SLEEPINESS, // sleepiness rate + SLEEPINESS_REGEN, PAIN, PAIN_REMOVE, PAIN_PENALTY_MOD_STR, diff --git a/src/mutation.h b/src/mutation.h index a0cc6d728330d..99bbd460d88e1 100644 --- a/src/mutation.h +++ b/src/mutation.h @@ -200,7 +200,7 @@ struct mutation_branch { // Allow soft (fabric) gear on restricted body parts bool allow_soft_gear = false; // IF any of the four are true, it drains that as the "cost" - bool fatigue = false; + bool sleepiness = false; bool hunger = false; bool thirst = false; // How many points it costs in character creation diff --git a/src/mutation_data.cpp b/src/mutation_data.cpp index 31a07e64d8c4d..6fd87d3eb2309 100644 --- a/src/mutation_data.cpp +++ b/src/mutation_data.cpp @@ -318,7 +318,7 @@ void mutation_branch::load( const JsonObject &jo, const std::string &src ) optional( jo, was_loaded, "time", cooldown, 0_turns ); optional( jo, was_loaded, "kcal", hunger, false ); optional( jo, was_loaded, "thirst", thirst, false ); - optional( jo, was_loaded, "fatigue", fatigue, false ); + optional( jo, was_loaded, "sleepiness", sleepiness, false ); optional( jo, was_loaded, "valid", valid, true ); optional( jo, was_loaded, "purifiable", purifiable, true ); diff --git a/src/npcmove.cpp b/src/npcmove.cpp index 05da13b88e956..aa69e6da49d2c 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -2533,11 +2533,11 @@ npc_action npc::address_needs( float danger ) const auto could_sleep = [&]() { if( danger <= 0.01 ) { - if( get_fatigue() >= fatigue_levels::TIRED ) { + if( get_sleepiness() >= sleepiness_levels::TIRED ) { return true; } if( is_walking_with() && player_character.in_sleep_state() && - get_fatigue() > ( fatigue_levels::TIRED / 2 ) ) { + get_sleepiness() > ( sleepiness_levels::TIRED / 2 ) ) { return true; } } @@ -2547,12 +2547,12 @@ npc_action npc::address_needs( float danger ) if( could_sleep() ) { if( !is_player_ally() ) { // TODO: Make tired NPCs handle sleep offscreen - set_fatigue( 0 ); + set_sleepiness( 0 ); return npc_undecided; } if( rules.has_flag( ally_rule::allow_sleep ) || - get_fatigue() > fatigue_levels::MASSIVE_FATIGUE ) { + get_sleepiness() > sleepiness_levels::MASSIVE_SLEEPINESS ) { return npc_sleep; } if( player_character.in_sleep_state() ) { @@ -5217,7 +5217,7 @@ bool npc::complain_about( const std::string &issue, const time_duration &dur, bool npc::complain() { static const std::string infected_string = "infected"; - static const std::string fatigue_string = "fatigue"; + static const std::string sleepiness_string = "sleepiness"; static const std::string bite_string = "bite"; static const std::string bleed_string = "bleed"; static const std::string hypovolemia_string = "hypovolemia"; @@ -5258,9 +5258,9 @@ bool npc::complain() // When tired, complain every 30 minutes // If massively tired, ignore restrictions - if( get_fatigue() > fatigue_levels::TIRED && - complain_about( fatigue_string, 30_minutes, chat_snippets().snip_yawn.translated(), - get_fatigue() > fatigue_levels::MASSIVE_FATIGUE - 100 ) ) { + if( get_sleepiness() > sleepiness_levels::TIRED && + complain_about( sleepiness_string, 30_minutes, chat_snippets().snip_yawn.translated(), + get_sleepiness() > sleepiness_levels::MASSIVE_SLEEPINESS - 100 ) ) { return true; } diff --git a/src/player_hardcoded_effects.cpp b/src/player_hardcoded_effects.cpp index e6ac9f70599f3..74ce80812b0e4 100644 --- a/src/player_hardcoded_effects.cpp +++ b/src/player_hardcoded_effects.cpp @@ -1064,8 +1064,8 @@ static void eff_fun_sleep( Character &u, effect &it ) if( u.has_trait( trait_CHLOROMORPH ) ) { // Hunger and thirst fall before your Chloromorphic physiology! if( incident_sun_irradiance( get_weather().weather_id, calendar::turn ) > irradiance::low ) { - if( u.has_active_mutation( trait_CHLOROMORPH ) && ( u.get_fatigue() <= 25 ) ) { - u.set_fatigue( 25 ); + if( u.has_active_mutation( trait_CHLOROMORPH ) && ( u.get_sleepiness() <= 25 ) ) { + u.set_sleepiness( 25 ); } if( u.get_hunger() >= -30 ) { u.mod_hunger( -5 ); @@ -1083,8 +1083,8 @@ static void eff_fun_sleep( Character &u, effect &it ) if( u.has_trait( trait_M_SKIN3 ) ) { // Spores happen! if( here.has_flag_ter_or_furn( ter_furn_flag::TFLAG_FUNGUS, u.pos() ) ) { - if( u.get_fatigue() >= 0 ) { - u.mod_fatigue( -5 ); // Local guides need less sleep on fungal soil + if( u.get_sleepiness() >= 0 ) { + u.mod_sleepiness( -5 ); // Local guides need less sleep on fungal soil } if( calendar::once_every( 1_hours ) ) { u.spores(); // spawn some P O O F Y B O I S @@ -1092,7 +1092,7 @@ static void eff_fun_sleep( Character &u, effect &it ) } } if( u.has_trait( trait_WATERSLEEP ) ) { - u.mod_fatigue( -3 ); // Fish sleep less in water + u.mod_sleepiness( -3 ); // Fish sleep less in water } } diff --git a/tests/magic_spell_test.cpp b/tests/magic_spell_test.cpp index 0b2d849f0e833..47ea1bb150dd5 100644 --- a/tests/magic_spell_test.cpp +++ b/tests/magic_spell_test.cpp @@ -646,7 +646,7 @@ TEST_CASE( "spell_effect_-_recover_energy", "[magic][spell][effect][recover_ener // BIONIC: p.mod_power_level (positive) OR p.mod_stamina (negative) // // For these effects, negative "damage" is good (reducing the amount of a bad thing) - // FATIGUE: p.mod_sleepiness + // sleepiness: p.mod_sleepiness // PAIN: p.mod_pain_resist or p_mod_pain // NOTE: This spell effect cannot be used for healing HP. diff --git a/tests/npc_test.cpp b/tests/npc_test.cpp index 5424a8511cb9f..f0119a80fba96 100644 --- a/tests/npc_test.cpp +++ b/tests/npc_test.cpp @@ -144,7 +144,7 @@ TEST_CASE( "on_load-sane-values", "[.]" ) test_npc.set_sleepiness( 1000 ); const double five_min_ticks = 6_hours / 5_minutes; /* - // Fatigue regeneration starts at 1 per 5min, but linearly increases to 2 per 5min at 2 hours or more + // sleepiness regeneration starts at 1 per 5min, but linearly increases to 2 per 5min at 2 hours or more const int expected_sleepiness_change = ((1.0f + 2.0f) / 2.0f * 2_hours / 5_minutes ) + (2.0f * (6_hours - 2_hours) / 5_minutes); diff --git a/tests/weary_test.cpp b/tests/weary_test.cpp index 928073998f316..6bd4abba3acb3 100644 --- a/tests/weary_test.cpp +++ b/tests/weary_test.cpp @@ -134,7 +134,7 @@ static void check_weary_mutation_nosleep( const std::string &trait_name, float s INFO( info.summarize() ); INFO( guy.debug_weary_info() ); REQUIRE( !info.empty() ); - if( multiplier >= 1.0f ) { // Fatigue alterations from mutations themselves affect thresholds... + if( multiplier >= 1.0f ) { // sleepiness alterations from mutations themselves affect thresholds... CHECK( info.transition_minutes( 0, 1, 165_minutes ) <= 170 ); CHECK( info.transition_minutes( 0, 1, 165_minutes ) >= ( 160.0f / multiplier ) ); CHECK( info.transition_minutes( 1, 2, 295_minutes ) <= 300 ); From 424cd12ab5edfa9ccf88e194ffcfb6c58a398e17 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:48:04 -0700 Subject: [PATCH 03/13] A few more I missed --- data/json/mutations/mutations.json | 20 +++++++++---------- data/json/ui/fatigue.json | 2 +- data/json/ui/layout.json | 6 +++--- data/json/ui/zenfs/health.json | 4 ++-- .../Magiclysm/mutations/fantasy_species.json | 2 +- data/mods/Magiclysm/mutations/mutations.json | 2 +- data/mods/Magiclysm/mutations/temporary.json | 2 +- .../eoc_nether_attunement_events.json | 18 ++++++++--------- .../monsters/monster_eoc_spells.json | 2 +- .../paraclesians/arvore_mutations.json | 2 +- .../paraclesians/ierde_mutations.json | 2 +- .../paraclesians/salamander_mutations.json | 12 +++++------ src/character.cpp | 2 +- src/character.h | 2 +- src/character_body.cpp | 2 +- src/debug_menu.cpp | 4 ++-- src/faction.cpp | 2 +- src/medical_ui.cpp | 2 +- src/morale.cpp | 2 +- src/mutation.cpp | 2 +- 20 files changed, 46 insertions(+), 46 deletions(-) diff --git a/data/json/mutations/mutations.json b/data/json/mutations/mutations.json index 97b30bc54d8df..31630100dacb9 100644 --- a/data/json/mutations/mutations.json +++ b/data/json/mutations/mutations.json @@ -1142,7 +1142,7 @@ "types": [ "SLEEP" ], "starting_trait": true, "category": [ "ALPHA", "ELFA", "PLANT", "BATRACHIAN" ], - "enchantments": [ { "values": [ { "value": "FATIGUE", "multiply": -0.15 } ] } ] + "enchantments": [ { "values": [ { "value": "SLEEPINESS", "multiply": -0.15 } ] } ] }, { "type": "mutation", @@ -1518,7 +1518,7 @@ "starting_trait": true, "types": [ "SLEEP" ], "category": [ "BEAST", "CHIMERA", "MOUSE", "RABBIT", "FELINE", "RAT" ], - "enchantments": [ { "values": [ { "value": "FATIGUE_REGEN", "multiply": 0.333 }, { "value": "FATIGUE", "multiply": 0.333 } ] } ] + "enchantments": [ { "values": [ { "value": "SLEEPINESS_REGEN", "multiply": 0.333 }, { "value": "SLEEPINESS", "multiply": 0.333 } ] } ] }, { "type": "mutation", @@ -2436,7 +2436,7 @@ "changes_to": [ "WAKEFUL3" ], "threshreq": [ "THRESH_ALPHA", "THRESH_ELFA", "THRESH_BATRACHIAN" ], "category": [ "ALPHA", "ELFA", "BATRACHIAN" ], - "enchantments": [ { "values": [ { "value": "FATIGUE", "multiply": -0.25 } ] } ] + "enchantments": [ { "values": [ { "value": "SLEEPINESS", "multiply": -0.25 } ] } ] }, { "type": "mutation", @@ -2449,7 +2449,7 @@ "prereqs": [ "WAKEFUL2" ], "threshreq": [ "THRESH_ELFA" ], "category": [ "ELFA" ], - "enchantments": [ { "values": [ { "value": "FATIGUE_REGEN", "multiply": 0.5 }, { "value": "FATIGUE", "multiply": -0.5 } ] } ] + "enchantments": [ { "values": [ { "value": "SLEEPINESS_REGEN", "multiply": 0.5 }, { "value": "SLEEPINESS", "multiply": -0.5 } ] } ] }, { "type": "mutation", @@ -5659,7 +5659,7 @@ "values": [ { "value": "MAX_HP", "add": -6 }, { "value": "STRENGTH", "add": 4 }, - { "value": "FATIGUE", "multiply": 0.15 }, + { "value": "SLEEPINESS", "multiply": 0.15 }, { "value": "STOMACH_SIZE_MULTIPLIER", "multiply": 1 }, { "value": "CARRY_WEIGHT", "multiply": 0.1 } ] @@ -6810,7 +6810,7 @@ "types": [ "METABOLISM" ], "changes_to": [ "PERSISTENCE_HUNTER2" ], "category": [ "LUPINE" ], - "enchantments": [ { "values": [ { "value": "STAMINA_REGEN_MOD", "add": 0.1 }, { "value": "FATIGUE", "multiply": -0.1 } ] } ] + "enchantments": [ { "values": [ { "value": "STAMINA_REGEN_MOD", "add": 0.1 }, { "value": "SLEEPINESS", "multiply": -0.1 } ] } ] }, { "type": "mutation", @@ -6822,7 +6822,7 @@ "prereqs": [ "PERSISTENCE_HUNTER" ], "threshreq": [ "THRESH_LUPINE" ], "category": [ "LUPINE" ], - "enchantments": [ { "values": [ { "value": "STAMINA_REGEN_MOD", "add": 0.2 }, { "value": "FATIGUE", "multiply": -0.2 } ] } ] + "enchantments": [ { "values": [ { "value": "STAMINA_REGEN_MOD", "add": 0.2 }, { "value": "SLEEPINESS", "multiply": -0.2 } ] } ] }, { "type": "mutation", @@ -6849,8 +6849,8 @@ "enchantments": [ { "values": [ - { "value": "FATIGUE_REGEN", "multiply": 0.333 }, - { "value": "FATIGUE", "multiply": 0.5 }, + { "value": "SLEEPINESS_REGEN", "multiply": 0.333 }, + { "value": "SLEEPINESS", "multiply": 0.5 }, { "value": "METABOLISM", "multiply": 0.333 }, { "value": "REGEN_HP", "multiply": 0.5 }, { "value": "REGEN_HP_AWAKE", "multiply": 0.133 } @@ -6948,7 +6948,7 @@ "prereqs": [ "SLEEPY" ], "types": [ "SLEEP" ], "category": [ "FELINE" ], - "enchantments": [ { "values": [ { "value": "FATIGUE", "multiply": 1 } ] } ] + "enchantments": [ { "values": [ { "value": "SLEEPINESS", "multiply": 1 } ] } ] }, { "type": "mutation", diff --git a/data/json/ui/fatigue.json b/data/json/ui/fatigue.json index a7e9ca5d694c4..408372e98644f 100644 --- a/data/json/ui/fatigue.json +++ b/data/json/ui/fatigue.json @@ -27,7 +27,7 @@ { "id": "sleepiness_num", "type": "widget", - "label": "Fatigue", + "label": "Sleepiness", "var": "sleepiness", "style": "number" }, diff --git a/data/json/ui/layout.json b/data/json/ui/layout.json index c280dd8a1a6e6..9f16bab23c5e4 100644 --- a/data/json/ui/layout.json +++ b/data/json/ui/layout.json @@ -3,7 +3,7 @@ "id": "stamina_sleepiness_layout", "type": "widget", "style": "layout", - "label": "Stamina/Fatigue", + "label": "Stamina/Sleepiness", "arrange": "columns", "widgets": [ "stamina_graph", "sleepiness_graph" ] }, @@ -113,7 +113,7 @@ "id": "stamina_sleepiness_focus_layout", "type": "widget", "style": "layout", - "label": "Stamina/Fatigue/Focus", + "label": "Stamina/Sleepiness/Focus", "arrange": "columns", "widgets": [ "stamina_graph_classic", "sleepiness_graph", "focus_num" ] }, @@ -195,7 +195,7 @@ "id": "sound_sleepiness_focus_layout", "type": "widget", "style": "layout", - "label": "Sound/Fatigue/Focus", + "label": "Sound/Sleepiness/Focus", "arrange": "columns", "widgets": [ "sound_num", "sleepiness_graph", "focus_num" ] }, diff --git a/data/json/ui/zenfs/health.json b/data/json/ui/zenfs/health.json index 16d6b5a9cd973..538374e252508 100644 --- a/data/json/ui/zenfs/health.json +++ b/data/json/ui/zenfs/health.json @@ -253,8 +253,8 @@ "id": "zenfs_sleepiness_bar_label", "type": "widget", "style": "text", - "string": "Fatigue", - "width": 7 + "string": "Sleepiness", + "width": 10 }, { "id": "zenfs_sleepiness_num_label", diff --git a/data/mods/Magiclysm/mutations/fantasy_species.json b/data/mods/Magiclysm/mutations/fantasy_species.json index ef85423d9928a..213ffba792489 100644 --- a/data/mods/Magiclysm/mutations/fantasy_species.json +++ b/data/mods/Magiclysm/mutations/fantasy_species.json @@ -353,7 +353,7 @@ "category": [ "SPECIES_ELF" ], "threshreq": [ "THRESH_SPECIES_ELF" ], "flags": [ "SEESLEEP" ], - "enchantments": [ { "values": [ { "value": "FATIGUE_REGEN", "multiply": 1 }, { "value": "FATIGUE", "multiply": -0.166667 } ] } ] + "enchantments": [ { "values": [ { "value": "SLEEPINESS_REGEN", "multiply": 1 }, { "value": "SLEEPINESS", "multiply": -0.166667 } ] } ] }, { "type": "mutation", diff --git a/data/mods/Magiclysm/mutations/mutations.json b/data/mods/Magiclysm/mutations/mutations.json index 9d8a65413fd08..d5f0c4f864aee 100644 --- a/data/mods/Magiclysm/mutations/mutations.json +++ b/data/mods/Magiclysm/mutations/mutations.json @@ -296,7 +296,7 @@ "values": [ { "value": "MAX_HP", "add": -6 }, { "value": "STRENGTH", "add": 4 }, - { "value": "FATIGUE", "multiply": 0.15 }, + { "value": "SLEEPINESS", "multiply": 0.15 }, { "value": "STOMACH_SIZE_MULTIPLIER", "multiply": 1 }, { "value": "CARRY_WEIGHT", "multiply": 0.1 } ] diff --git a/data/mods/Magiclysm/mutations/temporary.json b/data/mods/Magiclysm/mutations/temporary.json index 700e5b3618c51..65996c53ab41a 100644 --- a/data/mods/Magiclysm/mutations/temporary.json +++ b/data/mods/Magiclysm/mutations/temporary.json @@ -55,7 +55,7 @@ { "value": "HUNGER", "multiply": -1.0 }, { "value": "THIRST", "multiply": -1.0 }, { "value": "METABOLISM", "multiply": -1.0 }, - { "value": "FATIGUE_REGEN", "multiply": 0.5 }, + { "value": "SLEEPINESS_REGEN", "multiply": 0.5 }, { "value": "MENDING_MODIFIER", "multiply": 15 }, { "value": "REGEN_HP", "multiply": 1.5 }, { "value": "REGEN_HP_AWAKE", "multiply": 0.8 } diff --git a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json index d3d16af709aca..44e25444862f1 100644 --- a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json +++ b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json @@ -297,7 +297,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_HEALTH_CHANGE", 4 ], [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ] ] } @@ -313,7 +313,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ] ] @@ -330,7 +330,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], @@ -350,7 +350,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], @@ -373,7 +373,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], @@ -397,7 +397,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], @@ -422,7 +422,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 3 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 3 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 3 ], [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 7 ], [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 5 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 3 ], @@ -447,7 +447,7 @@ [ "EOC_DRAIN_EFFECT_CHECK_NOSEBLEED", 12 ], [ "EOC_DRAIN_EFFECT_CHECK_STAMINA_LOSS", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_POWER_SURGE", 5 ], - [ "EOC_DRAIN_EFFECT_CHECK_FATIGUE", 5 ], + [ "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", 5 ], [ "EOC_NETHER_EFFECT_CHECK_ATTUNEMENT_RAISING_EFFECT", 11 ], [ "EOC_NETHER_EFFECT_CHECK_FEEDBACK", 8 ], [ "EOC_DRAIN_EFFECT_CHECK_TELEPORT_LOCK", 5 ], @@ -633,7 +633,7 @@ }, { "type": "effect_on_condition", - "id": "EOC_DRAIN_EFFECT_CHECK_FATIGUE", + "id": "EOC_DRAIN_EFFECT_CHECK_SLEEPINESS", "//": "Base is 2% chance from 70 attunement to 125 attunement, then scaling up 0.15% per attunement up to 9.5% chance at 175 attunement, then scaling up 0.45% chance per attunement up to 32% chance at 225 attunement, then scaling up 0.3% to 39.5% chance at max, plus 1/10th the Difficulty squared.", "condition": { "and": [ diff --git a/data/mods/MindOverMatter/monsters/monster_eoc_spells.json b/data/mods/MindOverMatter/monsters/monster_eoc_spells.json index ae0a67b25e305..7d525bc32d8d9 100644 --- a/data/mods/MindOverMatter/monsters/monster_eoc_spells.json +++ b/data/mods/MindOverMatter/monsters/monster_eoc_spells.json @@ -68,7 +68,7 @@ { "id": "eater_drain_sleepiness", "type": "SPELL", - "name": "[Ψ]Eater Drain Fatigue", + "name": "[Ψ]Eater Drain Sleepiness", "description": "Eater's spell to drain sleepiness. It's a bug if you have it.", "valid_targets": [ "self" ], "flags": [ "NO_PROJECTILE", "NO_EXPLOSION_SFX" ], diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json index 46dd008dd46c5..6a9275f5b9d88 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutations.json @@ -949,7 +949,7 @@ "values": [ { "value": "ATTACK_SPEED", "multiply": 900 }, { "value": "METABOLISM", "multiply": -0.5 }, - { "value": "FATIGUE_REGEN", "multiply": 0.5 }, + { "value": "SLEEPINESS_REGEN", "multiply": 0.5 }, { "value": "MENDING_MODIFIER", "multiply": 15 }, { "value": "REGEN_HP", "multiply": 1.5 }, { "value": "REGEN_HP_AWAKE", "multiply": 0.8 } diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutations.json b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutations.json index 6f7e0c13e4a7a..1eedee0f75219 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutations.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_mutations.json @@ -401,7 +401,7 @@ { "value": "HUNGER", "multiply": -1.0 }, { "value": "THIRST", "multiply": -1.0 }, { "value": "METABOLISM", "multiply": -1.0 }, - { "value": "FATIGUE_REGEN", "multiply": 0.5 }, + { "value": "SLEEPINESS_REGEN", "multiply": 0.5 }, { "value": "MENDING_MODIFIER", "multiply": 15 }, { "value": "REGEN_HP", "multiply": 1.5 }, { "value": "REGEN_HP_AWAKE", "multiply": 0.8 } diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutations.json b/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutations.json index 32ab9d3fa26f6..00a046c3c069e 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutations.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/salamander_mutations.json @@ -380,8 +380,8 @@ { "values": [ { "value": "STAMINA_REGEN_MOD", "add": 0.1 }, - { "value": "FATIGUE_REGEN", "multiply": 0.25 }, - { "value": "FATIGUE", "multiply": -0.25 }, + { "value": "SLEEPINESS_REGEN", "multiply": 0.25 }, + { "value": "SLEEPINESS", "multiply": -0.25 }, { "value": "METABOLISM", "multiply": 0.33 } ] } @@ -401,8 +401,8 @@ { "values": [ { "value": "STAMINA_REGEN_MOD", "add": 0.2 }, - { "value": "FATIGUE_REGEN", "multiply": 0.5 }, - { "value": "FATIGUE", "multiply": -0.5 }, + { "value": "SLEEPINESS_REGEN", "multiply": 0.5 }, + { "value": "SLEEPINESS", "multiply": -0.5 }, { "value": "METABOLISM", "multiply": 0.66 } ] } @@ -424,8 +424,8 @@ { "values": [ { "value": "STAMINA_REGEN_MOD", "add": 0.3 }, - { "value": "FATIGUE_REGEN", "multiply": 0.5 }, - { "value": "FATIGUE", "multiply": -0.5 }, + { "value": "SLEEPINESS_REGEN", "multiply": 0.5 }, + { "value": "SLEEPINESS", "multiply": -0.5 }, { "value": "METABOLISM", "multiply": 1 } ] } diff --git a/src/character.cpp b/src/character.cpp index 686c0f6ea5114..e50c8d8d5850d 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -4389,7 +4389,7 @@ std::string Character::debug_weary_info() const int weight = units::to_gram( bodyweight() ); float bmi = get_bmi(); - return string_format( "Weariness: %s Max Full Exert: %s Mult: %g\n BMR: %d CARDIO FITNESS: %d\n %s Thresh: %d At: %d\n Kcal: %d/%d Fatigue: %d Morale: %d Wgt: %d (BMI %.1f)", + return string_format( "Weariness: %s Max Full Exert: %s Mult: %g\n BMR: %d CARDIO FITNESS: %d\n %s Thresh: %d At: %d\n Kcal: %d/%d Sleepiness: %d Morale: %d Wgt: %d (BMI %.1f)", amt, max_act, move_mult, bmr, cardio_mult, weary_internals, thresh, current, get_stored_kcal(), get_healthy_kcal(), sleepiness, morale, weight, bmi ); } diff --git a/src/character.h b/src/character.h index 6a38d87adb11a..e9a5ad99519a6 100644 --- a/src/character.h +++ b/src/character.h @@ -219,7 +219,7 @@ constexpr inline int operator-( const T &lhs, const sleepiness_levels &rhs ) /** @brief five levels of consequences for days without sleep @details Sleep deprivation, distinct from sleepiness, is defined in minutes. Although most calculations scale linearly, malus is bestowed only upon reaching the tiers defined below. - @note Sleep deprivation increases sleepiness. Fatigue increase scales with the severity of sleep + @note Sleep deprivation increases sleepiness. Sleepiness increase scales with the severity of sleep deprivation. @note Sleep deprivation kicks in if lack of sleep is avoided with stimulants or otherwise for long periods of time diff --git a/src/character_body.cpp b/src/character_body.cpp index ecb03e2f21bf9..64f5099c2637b 100644 --- a/src/character_body.cpp +++ b/src/character_body.cpp @@ -450,7 +450,7 @@ void Character::update_bodytemp() const units::temperature_delta hunger_warmth = 4_C_delta * std::min( met_rate, 1.0f ) - 4_C_delta; // Give SOME bonus to those living furnaces with extreme metabolism const units::temperature_delta metabolism_warmth = std::max( 0.0f, met_rate - 1.0f ) * 2_C_delta; - // Fatigue + // Sleepiness // -1.725C when exhausted, scaled up and capped at 900 sleepiness. const float scaled_sleepiness = clamp( get_sleepiness(), 0, 900 ) / static_cast( sleepiness_levels::EXHAUSTED ); diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index 6ba3505bda6e3..1c9b68ef31cbc 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -1480,7 +1480,7 @@ static void character_edit_needs_menu( Character &you ) hunger_pair.second ) ) << std::endl; data << string_format( _( "Thirst: %d %s" ), you.get_thirst(), colorize( thirst_pair.first, thirst_pair.second ) ) << std::endl; - data << string_format( _( "Fatigue: %d %s" ), you.get_sleepiness(), colorize( sleepiness_pair.first, + data << string_format( _( "Sleepiness: %d %s" ), you.get_sleepiness(), colorize( sleepiness_pair.first, sleepiness_pair.second ) ) << std::endl; data << string_format( _( "Weariness: %d %s" ), you.weariness(), colorize( weariness_pair.first, weariness_pair.second ) ) << std::endl; @@ -1506,7 +1506,7 @@ static void character_edit_needs_menu( Character &you ) smenu.addentry( 2, true, 'S', "%s: %d", _( "Stomach kCal" ), you.stomach.get_calories() ); smenu.addentry( 3, true, 'G', "%s: %d", _( "Gut kCal" ), you.guts.get_calories() ); smenu.addentry( 4, true, 't', "%s: %d", _( "Thirst" ), you.get_thirst() ); - smenu.addentry( 5, true, 'f', "%s: %d", _( "Fatigue" ), you.get_sleepiness() ); + smenu.addentry( 5, true, 'f', "%s: %d", _( "Sleepiness" ), you.get_sleepiness() ); smenu.addentry( 6, true, 'd', "%s: %d", _( "Sleep Deprivation" ), you.get_sleep_deprivation() ); smenu.addentry( 7, true, 'w', "%s: %d", _( "Weariness" ), you.weariness() ); smenu.addentry( 8, true, 'a', _( "Reset all basic needs" ) ); diff --git a/src/faction.cpp b/src/faction.cpp index 351e50ec5daaf..f3ee30c8c9d1f 100644 --- a/src/faction.cpp +++ b/src/faction.cpp @@ -776,7 +776,7 @@ int npc::faction_display( const catacurses::window &fac_w, const int width ) con mvwprintz( fac_w, point( width, ++y ), thirst_pair.second, _( "Thirst: " ) + ( thirst_pair.first.empty() ? nominal : thirst_pair.first ) ); mvwprintz( fac_w, point( width, ++y ), sleepiness_pair.second, - _( "Fatigue: " ) + ( sleepiness_pair.first.empty() ? nominal : sleepiness_pair.first ) ); + _( "Sleepiness: " ) + ( sleepiness_pair.first.empty() ? nominal : sleepiness_pair.first ) ); int lines = fold_and_print( fac_w, point( width, ++y ), getmaxx( fac_w ) - width - 2, c_white, _( "Wielding: " ) + weapname_simple() ); y += lines; diff --git a/src/medical_ui.cpp b/src/medical_ui.cpp index 06315859c0e69..b65a86cd547cf 100644 --- a/src/medical_ui.cpp +++ b/src/medical_ui.cpp @@ -295,7 +295,7 @@ static void draw_medical_titlebar( const catacurses::window &window, avatar *pla right_indent += utf8_width( thirst_pair.first ) + 3; } - // Fatigue + // Sleepiness if( !sleepiness_pair.first.empty() ) { cur_str_pos = right_print( window, 1, right_indent, sleepiness_pair.second, sleepiness_pair.first ); diff --git a/src/morale.cpp b/src/morale.cpp index 8c25caeced3df..c0e7ce5bac00a 100644 --- a/src/morale.cpp +++ b/src/morale.cpp @@ -704,7 +704,7 @@ void player_morale::display( int focus_eq, int pain_penalty, int sleepiness_pena } if( sleepiness_penalty != 0 ) { bottom_lines.emplace_back( - _( "Fatigue level:" ), -sleepiness_penalty, + _( "Sleepiness level:" ), -sleepiness_penalty, morale_line::number_format::signed_or_dash, morale_line::line_color::green_gray_red ); diff --git a/src/mutation.cpp b/src/mutation.cpp index ac232a86e027e..981d99b18aa56 100644 --- a/src/mutation.cpp +++ b/src/mutation.cpp @@ -697,7 +697,7 @@ void Character::activate_mutation( const trait_id &mut ) trait_data &tdata = my_mutations[mut]; int cost = mdata.cost; // You can take yourself halfway to Near Death levels of hunger/thirst. - // Fatigue can go to Exhausted. + // Sleepiness can go to Exhausted. if( !can_power_mutation( mut ) ) { // Insufficient Foo to *maintain* operation is handled in player::suffer add_msg_if_player( m_warning, _( "You feel like using your %s would kill you!" ), From c64d04fd9c19899471f39ac12f76a0ea8959307b Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Fri, 29 Mar 2024 22:56:31 -0700 Subject: [PATCH 04/13] astyle, json style gangnam style? Is that still a thing? --- data/json/effects.json | 15 +++++++++++++-- data/json/monster_special_attacks/spells.json | 8 ++++++-- data/json/ui/sidebar-legacy-classic.json | 8 +++++++- src/activity_tracker.cpp | 3 ++- src/character.cpp | 11 +++++++---- src/character_body.cpp | 5 +++-- src/debug_menu.cpp | 5 +++-- src/magic_spell_effect.cpp | 3 ++- src/player_hardcoded_effects.cpp | 3 ++- tests/iuse_test.cpp | 3 ++- 10 files changed, 47 insertions(+), 17 deletions(-) diff --git a/data/json/effects.json b/data/json/effects.json index 6b50b373a9d81..799fac647ca44 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -3833,7 +3833,12 @@ "sleepiness_chance": [ 500 ], "sleepiness_max_val": [ 200 ] }, - "scaling_mods": { "blood_pressure_min": [ -1 ], "blood_pressure_min_val": [ -100 ], "sleepiness_max_val": [ 50 ], "sleepiness_min": [ 2 ] }, + "scaling_mods": { + "blood_pressure_min": [ -1 ], + "blood_pressure_min_val": [ -100 ], + "sleepiness_max_val": [ 50 ], + "sleepiness_min": [ 2 ] + }, "rating": "neutral", "blood_analysis_description": "Beta Blocker" }, @@ -4437,7 +4442,13 @@ "desc": [ "Your stomach is full to bursting. This was a mistake." ], "apply_message": "Your stomach is full to bursting. This was a mistake.", "rating": "bad", - "base_mods": { "speed_mod": [ -10 ], "sleepiness_amount": [ 2 ], "vomit_chance": [ 500 ], "vomit_tick": [ 10 ], "pain_amount": [ 3 ] } + "base_mods": { + "speed_mod": [ -10 ], + "sleepiness_amount": [ 2 ], + "vomit_chance": [ 500 ], + "vomit_tick": [ 10 ], + "pain_amount": [ 3 ] + } }, { "type": "effect_type", diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index f453f641006fb..a57ecd5201c0e 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -797,7 +797,9 @@ "case": 0, "effect": [ { "u_message": "Your reflection feasts directly on your essence." }, - { "math": [ "u_val('sleepiness')", "=", "min(u_val('sleepiness') + portal_dungeon_reflect_strength, 1200)" ] }, + { + "math": [ "u_val('sleepiness')", "=", "min(u_val('sleepiness') + portal_dungeon_reflect_strength, 1200)" ] + }, { "math": [ "portal_dungeon_reflect_strength", "+=", "3" ] } ] }, @@ -805,7 +807,9 @@ "case": 2, "effect": [ { "u_message": "Your reflection uses your bond to feast on your essence." }, - { "math": [ "u_val('sleepiness')", "=", "min(u_val('sleepiness') + portal_dungeon_reflect_strength, 1200)" ] }, + { + "math": [ "u_val('sleepiness')", "=", "min(u_val('sleepiness') + portal_dungeon_reflect_strength, 1200)" ] + }, { "math": [ "portal_dungeon_reflect_strength", "++" ] } ] }, diff --git a/data/json/ui/sidebar-legacy-classic.json b/data/json/ui/sidebar-legacy-classic.json index 5f0a83c2b5761..7ea23684a766f 100644 --- a/data/json/ui/sidebar-legacy-classic.json +++ b/data/json/ui/sidebar-legacy-classic.json @@ -53,7 +53,13 @@ "arrange": "rows", "width": 12, "//": "TODO - It is not currently possible to conditionally swap out widgets on the fly. When this is added, vehicle speed should replace speed when driving.", - "widgets": [ "pain_num_label", "hunger_desc_no_label", "thirst_desc_no_label", "sleepiness_desc_no_label", "body_temp_desc_no_label" ] + "widgets": [ + "pain_num_label", + "hunger_desc_no_label", + "thirst_desc_no_label", + "sleepiness_desc_no_label", + "body_temp_desc_no_label" + ] }, { "id": "lcla_mood_desc", diff --git a/src/activity_tracker.cpp b/src/activity_tracker.cpp index 472cdcf68ba94..7d88548c903e5 100644 --- a/src/activity_tracker.cpp +++ b/src/activity_tracker.cpp @@ -16,7 +16,8 @@ int activity_tracker::weariness() const } // Called every 5 minutes, when activity level is logged -void activity_tracker::try_reduce_weariness( int bmr, float sleepiness_mod, float sleepiness_regen_mod ) +void activity_tracker::try_reduce_weariness( int bmr, float sleepiness_mod, + float sleepiness_regen_mod ) { if( average_activity() < LIGHT_EXERCISE ) { cata_assert( sleepiness_mod > 0.0f ); diff --git a/src/character.cpp b/src/character.cpp index e50c8d8d5850d..4673f600c73c9 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -5050,7 +5050,8 @@ void Character::update_needs( int rate_multiplier ) mod_sleepiness( -3 ); // Fish sleep less in water } } - if( is_avatar() && wasnt_sleepinessd && get_sleepiness() > sleepiness_levels::DEAD_TIRED && !lying ) { + if( is_avatar() && wasnt_sleepinessd && get_sleepiness() > sleepiness_levels::DEAD_TIRED && + !lying ) { if( !activity ) { add_msg_if_player( m_warning, _( "You're feeling tired. %s to lie down for sleep." ), press_x( ACTION_SLEEP ) ); @@ -5135,7 +5136,8 @@ needs_rates Character::calc_needs_rates() const } rates.hunger = enchantment_cache->modify_value( enchant_vals::mod::HUNGER, rates.hunger ); - rates.sleepiness = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS, rates.sleepiness ); + rates.sleepiness = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS, + rates.sleepiness ); rates.thirst = enchantment_cache->modify_value( enchant_vals::mod::THIRST, rates.thirst ); return rates; @@ -5334,7 +5336,8 @@ void Character::check_needs_extremes() if( one_in( 100 + int_cur ) ) { fall_asleep( 30_seconds ); } - } else if( get_sleepiness() >= sleepiness_levels::DEAD_TIRED && calendar::once_every( 30_minutes ) ) { + } else if( get_sleepiness() >= sleepiness_levels::DEAD_TIRED && + calendar::once_every( 30_minutes ) ) { add_msg_if_player( m_warning, _( "*yawn* You should really get some sleep." ) ); add_effect( effect_lack_sleep, 30_minutes + 1_turns ); } @@ -10861,7 +10864,7 @@ void Character::process_one_effect( effect &it, bool is_new ) mod = 1; if( is_new || it.activated( calendar::turn, "SLEEPINESS", val, reduced, mod ) ) { mod_sleepiness( bound_mod_to_vals( get_sleepiness(), val, it.get_max_val( "SLEEPINESS", reduced ), - it.get_min_val( "SLEEPINESS", reduced ) ) ); + it.get_min_val( "SLEEPINESS", reduced ) ) ); } } diff --git a/src/character_body.cpp b/src/character_body.cpp index 64f5099c2637b..c36a191820c43 100644 --- a/src/character_body.cpp +++ b/src/character_body.cpp @@ -217,7 +217,8 @@ void Character::update_body( const time_point &from, const time_point &to ) const int five_mins = ticks_between( from, to, 5_minutes ); if( five_mins > 0 ) { float sleepiness_mod = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS, 1 ); - float sleepiness_regen_mod = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS_REGEN, 1 ); + float sleepiness_regen_mod = enchantment_cache->modify_value( enchant_vals::mod::SLEEPINESS_REGEN, + 1 ); activity_history.try_reduce_weariness( base_bmr(), sleepiness_mod, sleepiness_regen_mod ); check_needs_extremes(); @@ -453,7 +454,7 @@ void Character::update_bodytemp() // Sleepiness // -1.725C when exhausted, scaled up and capped at 900 sleepiness. const float scaled_sleepiness = clamp( get_sleepiness(), 0, - 900 ) / static_cast( sleepiness_levels::EXHAUSTED ); + 900 ) / static_cast( sleepiness_levels::EXHAUSTED ); const units::temperature_delta sleepiness_warmth = has_sleep ? 0_C_delta : -1.725_C_delta * scaled_sleepiness; diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index 1c9b68ef31cbc..e4f03e89bb3f4 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -1480,8 +1480,9 @@ static void character_edit_needs_menu( Character &you ) hunger_pair.second ) ) << std::endl; data << string_format( _( "Thirst: %d %s" ), you.get_thirst(), colorize( thirst_pair.first, thirst_pair.second ) ) << std::endl; - data << string_format( _( "Sleepiness: %d %s" ), you.get_sleepiness(), colorize( sleepiness_pair.first, - sleepiness_pair.second ) ) << std::endl; + data << string_format( _( "Sleepiness: %d %s" ), you.get_sleepiness(), + colorize( sleepiness_pair.first, + sleepiness_pair.second ) ) << std::endl; data << string_format( _( "Weariness: %d %s" ), you.weariness(), colorize( weariness_pair.first, weariness_pair.second ) ) << std::endl; data << std::endl; diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index 2b89816effaa3..7786fab8a8190 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -852,7 +852,8 @@ static std::pair spell_remove_field( const spell &sp, return std::pair {field_removed, field_position}; } -static void handle_remove_fd_sleepiness_field( const std::pair &fd_sleepiness_field, +static void handle_remove_fd_sleepiness_field( const std::pair + &fd_sleepiness_field, Creature &caster ) { for( const std::pair &fd : std::get<0>( fd_sleepiness_field ) ) { diff --git a/src/player_hardcoded_effects.cpp b/src/player_hardcoded_effects.cpp index 74ce80812b0e4..8c8cda6deb537 100644 --- a/src/player_hardcoded_effects.cpp +++ b/src/player_hardcoded_effects.cpp @@ -1042,7 +1042,8 @@ static void eff_fun_sleep( Character &u, effect &it ) u.set_sleepiness( 25 ); //Prevent us from waking up naturally while under anesthesia } - if( u.get_sleepiness() < -25 && it.get_duration() > 3_minutes && !u.has_effect( effect_narcosis ) ) { + if( u.get_sleepiness() < -25 && it.get_duration() > 3_minutes && + !u.has_effect( effect_narcosis ) ) { it.set_duration( 1_turns * dice( 3, 10 ) ); } diff --git a/tests/iuse_test.cpp b/tests/iuse_test.cpp index 7eee3cd066856..a261bc0d8a5c2 100644 --- a/tests/iuse_test.cpp +++ b/tests/iuse_test.cpp @@ -380,7 +380,8 @@ TEST_CASE( "caffeine_and_atomic_caffeine", "[iuse][caff][atomic_caff]" ) SECTION( "atomic caffeine greatly reduces sleepiness, and increases stimulant effect" ) { item atomic_coffee( "atomic_coffee", calendar::turn_zero, item::default_charges_tag{} ); dummy.consume( atomic_coffee ); - CHECK( dummy.get_sleepiness() == sleepiness_before - atomic_coffee.get_comestible()->sleepiness_mod ); + CHECK( dummy.get_sleepiness() == sleepiness_before - + atomic_coffee.get_comestible()->sleepiness_mod ); CHECK( dummy.get_stim() == atomic_coffee.get_comestible()->stim ); } } From 4223838c5d60359a486a7c9547f5a231a35e7244 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Sat, 30 Mar 2024 13:16:41 -0700 Subject: [PATCH 05/13] docs --- doc/EFFECTS_JSON.md | 16 ++++++++-------- doc/EFFECT_ON_CONDITION.md | 6 +++--- doc/JSON_FLAGS.md | 8 ++++---- doc/JSON_INFO.md | 4 ++-- doc/Lore/design-balance.md | 2 +- doc/MAGIC.md | 8 ++++---- doc/MUTATIONS.md | 6 +++--- doc/NPCs.md | 4 ++-- doc/SOUNDPACKS.md | 2 +- doc/WIDGETS.md | 6 +++--- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/doc/EFFECTS_JSON.md b/doc/EFFECTS_JSON.md index 41e83ed5b94ba..e3768990cb65e 100644 --- a/doc/EFFECTS_JSON.md +++ b/doc/EFFECTS_JSON.md @@ -544,14 +544,14 @@ Valid arguments: "perspiration_chance_bot" "perspiration_tick" - Defaults to every tick -"fatigue_amount" - Amount of fatigue it can give/take. After certain amount character will need to sleep. -"fatigue_min" - Minimal amount of fatigue, certain effect will give/take -"fatigue_max" - if 0 or missing value will be exactly "fatigue_min" -"fatigue_min_val" - Defaults to 0, which means uncapped -"fatigue_max_val" - Defaults to 0, which means uncapped -"fatigue_chance" - Chance to get more tired -"fatigue_chance_bot" -"fatigue_tick" - Defaults to every tick +"sleepiness_amount" - Amount of sleepiness it can give/take. After certain amount character will need to sleep. +"sleepiness_min" - Minimal amount of sleepiness, certain effect will give/take +"sleepiness_max" - if 0 or missing value will be exactly "sleepiness_min" +"sleepiness_min_val" - Defaults to 0, which means uncapped +"sleepiness_max_val" - Defaults to 0, which means uncapped +"sleepiness_chance" - Chance to get more tired +"sleepiness_chance_bot" +"sleepiness_tick" - Defaults to every tick "stamina_amount" - Amount of stamina it can give/take. "stamina_min" - Minimal amount of stamina, certain effect will give/take diff --git a/doc/EFFECT_ON_CONDITION.md b/doc/EFFECT_ON_CONDITION.md index 8d19d3d181e65..0b4a8f7bd8711 100644 --- a/doc/EFFECT_ON_CONDITION.md +++ b/doc/EFFECT_ON_CONDITION.md @@ -1194,7 +1194,7 @@ Every event EOC passes context vars with each of their key value pairs that the | character_triggers_trap | | { "character", `character_id` },
{ "trap", `trap_str_id` }, | character / NONE | | character_wakes_up | triggers in the moment player lost it's sleep effect and wakes up | { "character", `character_id` }, | character / NONE | | character_attempt_to_fall_asleep | triggers in the moment character tries to fall asleep, after confirming and setting an alarm, but before "you lie down" | { "character", `character_id` }, | character / NONE | -| character_falls_asleep | triggers in the moment character actually falls asleep; trigger includes cases where character sleep for a short time because of fatigue or drugn; duration of the sleep can be changed mid sleep because of hurt/noise/light/pain thresholds and another factors | { "character", `character_id` }, { "duration", `int_` (in seconds) } | character / NONE | +| character_falls_asleep | triggers in the moment character actually falls asleep; trigger includes cases where character sleep for a short time because of sleepiness or drugs; duration of the sleep can be changed mid sleep because of hurt/noise/light/pain thresholds and another factors | { "character", `character_id` }, { "duration", `int_` (in seconds) } | character / NONE | | character_wields_item | | { "character", `character_id` },
{ "itype", `itype_id` }, | character / item to wield | | character_wears_item | | { "character", `character_id` },
{ "itype", `itype_id` }, | character / item to wear | | consumes_marloss_item | | { "character", `character_id` },
{ "itype", `itype_id` }, | character / NONE | @@ -2617,13 +2617,13 @@ Saves personal variable `time_of_last_succession` with value of current time: { "u_add_var": "time_of_last_succession", "type": "timer", "time": true } ``` -NPC (in this case it's actually item, see Beta Talkers) saves a personal variable `function` with one of four values: `morale`, `focus`, `pain`, or `fatigue` (used in mi-go bio tech to create four different versions of the same item, with different effects, that would be revealed upon activation) +NPC (in this case it's actually item, see Beta Talkers) saves a personal variable `function` with one of four values: `morale`, `focus`, `pain`, or `sleepiness` (used in mi-go bio tech to create four different versions of the same item, with different effects, that would be revealed upon activation) ```json { "npc_add_var": "function", "type": "mbt", "context": "f", - "possible_values": [ "morale", "focus", "pain", "fatigue" ] + "possible_values": [ "morale", "focus", "pain", "sleepiness" ] } ``` diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md index 37ffca70a23ad..e54d50c33d373 100644 --- a/doc/JSON_FLAGS.md +++ b/doc/JSON_FLAGS.md @@ -535,14 +535,14 @@ These flags apply to the `use_action` field, instead of the `flags` field. - ```DOGFOOD``` Makes a dog friendly. - ```FIRSTAID``` Heals. - ```FLUMED``` Adds disease `took_flumed`. -- ```FLUSLEEP``` Adds disease `took_flumed` and increases fatigue. +- ```FLUSLEEP``` Adds disease `took_flumed` and increases sleepiness. - ```FUNGICIDE``` Kills fungus and spores. Removes diseases `fungus` and `spores`. - ```HALLU``` Adds disease `hallu`. - ```HONEYCOMB``` Spawns wax. - ```INHALER``` Removes disease `asthma`. - ```IODINE``` Adds disease `iodine`. - ```MARLOSS``` "As you eat the berry, you have a near-religious experience, feeling at one with your surroundings..." -- ```MYCUS``` if has trait `THRESH_MARLOSS`, neutral effect removes radiation, add 30 painkiller & heals all bodyparts by 4. if good effect, add 1000 morale, sleep for 5 hours, add `THRESH_MYCUS`, also removes marloss addictions `addiction_marloss_r`,`addiction_marloss_b`, `addiction_marloss_y` . With mycus threshold, adds 5 painkiller and stimulant. With trait `M_DEPENDENT`, removes 87 kcal, add 10 thirst, adds 5 fatigue, and add morale to negate mutation pains. not having previously mentioned traits causes you to vomit, mutate, randomly gain 2 pain, reduce daily health by 8-50, removes 87 kcal, add 10 thirst, and add 5 fatigue. Only applies to mycus fruit by default. +- ```MYCUS``` if has trait `THRESH_MARLOSS`, neutral effect removes radiation, add 30 painkiller & heals all bodyparts by 4. if good effect, add 1000 morale, sleep for 5 hours, add `THRESH_MYCUS`, also removes marloss addictions `addiction_marloss_r`,`addiction_marloss_b`, `addiction_marloss_y` . With mycus threshold, adds 5 painkiller and stimulant. With trait `M_DEPENDENT`, removes 87 kcal, add 10 thirst, adds 5 sleepiness, and add morale to negate mutation pains. not having previously mentioned traits causes you to vomit, mutate, randomly gain 2 pain, reduce daily health by 8-50, removes 87 kcal, add 10 thirst, and add 5 sleepiness. Only applies to mycus fruit by default. - ```METH``` Adds disease `meth`. - ```NONE``` "You can't do anything of interest with your [x]." - ```PKILL``` Reduces pain. Adds disease `pkill[n]` where `[n]` is the level of flag `PKILL_[n]` used on this comestible. @@ -551,8 +551,8 @@ These flags apply to the `use_action` field, instead of the `flags` field. - ```PROZAC``` Adds disease `took_prozac` if not currently present, otherwise acts as a minor stimulant. Rarely has the `took_prozac_bad` adverse effect. - ```PURIFIER``` Removes random number of negative mutations. - ```SEWAGE``` Causes vomiting. -- ```SLEEP``` Greatly increases fatigue. -- ```THORAZINE``` Removes diseases `hallu`, `visuals`, `high`. Additionally removes disease `formication` if disease `dermatik` isn't also present. Has a chance of a negative reaction which increases fatigue. +- ```SLEEP``` Greatly increases sleepiness. +- ```THORAZINE``` Removes diseases `hallu`, `visuals`, `high`. Additionally removes disease `formication` if disease `dermatik` isn't also present. Has a chance of a negative reaction which increases sleepiness. - ```VITAMINS``` Increases healthiness (not to be confused with HP). - ```WEED``` Makes you roll with Cheech & Chong. Adds disease `weed_high`. - ```XANAX``` Alleviates anxiety. Adds disease `took_xanax`. diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index ac0ca36402e73..2fe5f85c09fbd 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -3926,7 +3926,7 @@ CBMs can be defined like this: "spoils_in" : 0, // A time duration: how long a comestible is good for. 0 = no spoilage. "use_action" : [ "CRACK" ], // What effects a comestible has when used, see special definitions below "stim" : 40, // Stimulant effect -"fatigue_mod": 3, // How much fatigue this comestible removes. (Negative values add fatigue) +"sleepiness_mod": 3, // How much sleepiness this comestible removes. (Negative values add sleepiness) "comestible_type" : "MED", // Comestible type, used for inventory sorting. One of 'FOOD', 'DRINK', 'MED', or 'INVALID' (consider using a different "type" than COMESTIBLE instead of using INVALID) "consumption_effect_on_conditions" : [ "EOC_1" ], // Effect on conditions to run after consuming. Inline or string id supported "quench" : 0, // Thirst quenched @@ -4326,7 +4326,7 @@ Possible values (see src/artifact.h for an up-to-date list): - `AEA_ADRENALINE` Adrenaline rush - `AEA_MAP` Maps the area around you - `AEA_BLOOD` Shoots blood all over -- `AEA_FATIGUE` Creates interdimensional fatigue +- `AEA_SLEEPINESS` Creates interdimensional sleepiness - `AEA_ACIDBALL` Targeted acid - `AEA_PULSE` Destroys adjacent terrain - `AEA_HEAL` Heals minor damage diff --git a/doc/Lore/design-balance.md b/doc/Lore/design-balance.md index 0503474db2a8e..75f31066131f7 100644 --- a/doc/Lore/design-balance.md +++ b/doc/Lore/design-balance.md @@ -23,7 +23,7 @@ Some examples: Combat in CDDA should always feel deadly. In particular, the player should never feel safe being surrounded by multiple zombies, no matter how far in the game they are. At first this means "regular" zombies; later, as the player approaches transhumanism, it may take multiple transhuman enemies to threaten the player, but at no time should a player be able to shrug off a horde. - Zombies should have a "rend" mechanic, allowing groups of them to tear at armour and damage it more effectively than a single zombie might. This would be enhanced if they can overwhelm and knock down a foe. -- Almost all players should be limited heavily by fatigue and stamina as they attempt to fight off hordes. +- Almost all players should be limited heavily by sleepiness and stamina as they attempt to fight off hordes. - Even with 'enhanced healing', wounds in CDDA should be severe and limiting. We are not trying to model a power fantasy. - Cities should represent the primary 'dungeons' of CDDA in a roguelike sense (we are not at all near this at the time of this writing). It should not be possible to clear a city: putting down hundreds of thousands of zombies is not a feasible task. Even if it were, that high a concentration of pulped zombie-meat should do something: pulping it prevents regeneration, but doesn't make it inert. diff --git a/doc/MAGIC.md b/doc/MAGIC.md index 7eeafa601d691..98687b34722f8 100644 --- a/doc/MAGIC.md +++ b/doc/MAGIC.md @@ -186,9 +186,9 @@ Effect | Description `pain_split` | Evens out all of your limbs' damage. `pull_target` | Attempts to pull the target towards the caster in a straight line. If the path is blocked by impassable furniture or terrain, the effect fails. `recharge_vehicle` | Increases or decreases the battery charge of a vehicle or battery-connected power grid. Damage is equal to the charge (negative decreases). -`recover_energy` | Recovers an energy source equal to damage of the spell. The energy source is defined in `effect_str` and may be one of `BIONIC`, `FATIGUE`, `PAIN`, `MANA` or `STAMINA`. +`recover_energy` | Recovers an energy source equal to damage of the spell. The energy source is defined in `effect_str` and may be one of `BIONIC`, `SLEEPINESS`, `PAIN`, `MANA` or `STAMINA`. `remove_effect` | Removes `effect_str` effects from all creatures in the aoe. -`remove_field` | Removes a `effect_str` field in the aoe. Causes teleglow of varying intensity and potentially teleportation depending on field density, if the field removed is `fd_fatigue`. (see `ter_transform` for more versatility) +`remove_field` | Removes a `effect_str` field in the aoe. Causes teleglow of varying intensity and potentially teleportation depending on field density, if the field removed is `fd_sleepiness`. (see `ter_transform` for more versatility) `revive` | Revives a monster like a zombie necromancer. The monster must have the `REVIVES` flag. `revive_dormant` | Revives a dormant monster. The monster must have the `REVIVES` AND the `DORMANT` flag. `short_range_teleport` | Teleports the player randomly range spaces with aoe variation. See also the `TARGET_TELEPORT` and `UNSAFE_TELEPORT` flags. @@ -831,8 +831,8 @@ Character status value | Description `EXTRA_ELEC_PAIN` | Multiplier on electric damage received, the result is applied as extra pain. `EVASION` | Flat chance for your character to dodge incoming attacks regardless of other modifiers. From 0.0 (no evasion chance) to 1.0 (100% evasion chance). `FALL_DAMAGE` | Affects the amount of fall damage you take. -`FATIGUE` | Affects how fast your fatigue grows over time - bigger value makes you tired faster. Since it's a percent, using `multiply` is recommended. -`FATIGUE_REGEN` | Affects how much of your fatigue and sleep deprivation drops when resting. Since it's a percent, using `multiply` is recommended. +`SLEEPINESS` | Affects how fast your sleepiness grows over time - bigger value makes you tired faster. Since it's a percent, using `multiply` is recommended. +`SLEEPINESS_REGEN` | Affects how much of your sleepiness and sleep deprivation drops when resting. Since it's a percent, using `multiply` is recommended. `FAT_TO_MAX_HP` | Changes the amount of HP, that is given to you by your fat. Formula is `((your_calories/7716.17)/((your_height_in_cm/100)^2))*hitsize_of_all_non_bionic_bodyparts`. Using `add` works just as adding HP, so use `multiply` instead `FOOTSTEP_NOISE` | `FORCEFIELD` | Chance your character reduces incoming damage to 0. From 0.0 (no chance), to 1.0 (100% chance to avoid attacks). diff --git a/doc/MUTATIONS.md b/doc/MUTATIONS.md index ec4a89787a2ca..ad61f3680ee98 100644 --- a/doc/MUTATIONS.md +++ b/doc/MUTATIONS.md @@ -176,11 +176,11 @@ Note that **all new traits that can be obtained through mutation must be purifia ], "active": true, // When set the mutation is an active mutation that the player needs to activate (default: false). "starts_active": true, // When true, this 'active' mutation starts active (default: false, requires 'active'). - "cost": 8, // Cost to activate this mutation. Needs one of the hunger, thirst, or fatigue values set to true (default: 0). + "cost": 8, // Cost to activate this mutation. Needs one of the hunger, thirst, or sleepiness values set to true (default: 0). "time": 100, // Sets the amount of (turns * current player speed ) time units that need to pass before the cost is to be paid again. Needs to be higher than one to have any effect (default: 0). "kcal": true, // If true, activated mutation consumes `cost` kcal. (default: false). "thirst": true, // If true, activated mutation increases thirst by cost (default: false). - "fatigue": true, // If true, activated mutation increases fatigue by cost (default: false). + "sleepiness": true, // If true, activated mutation increases sleepiness by cost (default: false). "active_flags": [ "BLIND" ], // activation of the mutation apply this flag on your character "allowed_items": [ "ALLOWS_TAIL" ], // you can wear items with this flag with this mutation, bypassing restricts_gear restriction "integrated_armor": [ "integrated_fur" ], // this item is worn on your character forever, until you get rid of this mutation @@ -284,7 +284,7 @@ These fields are optional, but are very frequently used in mutations and their c | `cost` | 0 | For active mutations, this value is the cost to activate them. At least one of the following three values will need to be `true` for this to function. | | `kcal` | false | If true, this active mutation will consume `cost` kcal during activation or upkeep. | | `thirst` | false | If true, this active mutation will consume `cost` thirst during activation or upkeep. | -| `fatigue` | false | If true, this active mutation will consume `cost` fatigue during activation or upkeep. | +| `sleepiness` | false | If true, this active mutation will consume `cost` sleepiness during activation or upkeep. | | `enchantments` | Nothing | A list of enchantments granted by this mutation. Can either be string IDs of a defined enchantment, or an inline definition. | ### Optional Fields diff --git a/doc/NPCs.md b/doc/NPCs.md index a79fe920e414a..78648d101b69f 100644 --- a/doc/NPCs.md +++ b/doc/NPCs.md @@ -537,7 +537,7 @@ The dynamic line will be chosen based on whether a single dialogue condition is ```json { - "npc_need": "fatigue", + "npc_need": "sleepiness", "level": "TIRED", "no": "Just few minutes more...", "yes": "Make it quick, I want to go back to sleep." @@ -1392,7 +1392,7 @@ These can be read or written to with `val()`. | `cash` | ❌ | Amount of money | | `dodge` | ❌ | Current effective dodge | | `exp` | ✅ | Total experience earned. | -| `fatigue` | ✅ | Current fatigue level. | +| `sleepiness` | ✅ | Current sleepiness level. | | `fine_detail_vision_mod` | ❌ | Returned values range from 1.0 (unimpeded vision) to 11.0 (totally blind). | | `focus` | ✅ | Current focus level. | | `friendly` | ✅ | Current friendly level. Only works for monsters. | diff --git a/doc/SOUNDPACKS.md b/doc/SOUNDPACKS.md index cc61d457a7cf4..7556c4a6b6dc7 100644 --- a/doc/SOUNDPACKS.md +++ b/doc/SOUNDPACKS.md @@ -225,7 +225,7 @@ Example: if `plmove|t_grass_long` is defined it will be played before default `p ### Fatigue -* `plmove fatigue_m_low|fatigue_m_med|fatigue_m_high|fatigue_f_low|fatigue_f_med|fatigue_f_high` +* `plmove sleepiness_m_low|sleepiness_m_med|sleepiness_m_high|sleepiness_f_low|sleepiness_f_med|sleepiness_f_high` ### Player hurt diff --git a/doc/WIDGETS.md b/doc/WIDGETS.md index 45d35224899bb..3048ef6e6f7b0 100644 --- a/doc/WIDGETS.md +++ b/doc/WIDGETS.md @@ -1019,7 +1019,7 @@ Many vars are numeric in nature. These may use style "number" or style "graph". |-- |-- | `cardio_acc` | Cardio accumulator, integer | `cardio_fit` | Cardio fitness, integer near BMR -| `fatigue` | tiredness, 0-600+ +| `sleepiness` | tiredness, 0-600+ | `focus` | focus level, 0-100+ | `health` | Current hidden health value, -200 to +200 | `mana` | available mana, 0-MAX_MANA @@ -1140,7 +1140,7 @@ Text widget ids typically have a `_desc` suffix. | `activity_desc` | `Activity: Moderate` | `date_desc` | `Date: Summer day 25` | `env_temp_desc` | `Temperature: 65F` -| `fatigue_desc` | `Rest: Tired` +| `sleepiness_desc` | `Rest: Tired` | `health_desc` | `Health: Good` | `hunger_desc` | `Hunger: Satisfied` | `lighting_desc` | `Lighting: Bright` @@ -1177,7 +1177,7 @@ This table gives some examples of single-line "columns" layouts: | `hitpoints_legs_layout` | `L LEG: \|\|\|\|\| R LEG: \|\|\|\|\|` | `mood_focus_layout` | `Mood: :-) Focus: 100` | `safe_sound_layout` | `Safe: Off Sound: 15` -| `sound_fatigue_focus_layout` | `Sound: 15 Fatigue: Fresh Focus: 100` +| `sound_sleepiness_focus_layout` | `Sound: 15 Fatigue: Fresh Focus: 100` | `sound_focus_layout` | `Sound: 15 Focus: 100` | `stats_layout` | `Str: 9 Dex: 8 Int: 10 Per: 7` From 670002b984f95b7ae5c4174f1fb812900607423b Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Sat, 30 Mar 2024 14:45:59 -0700 Subject: [PATCH 06/13] rename fatigue.json also catches a few bad f+r I missed --- data/json/ui/{fatigue.json => sleepiness.json} | 0 src/player_hardcoded_effects.cpp | 2 +- src/suffer.cpp | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename data/json/ui/{fatigue.json => sleepiness.json} (100%) diff --git a/data/json/ui/fatigue.json b/data/json/ui/sleepiness.json similarity index 100% rename from data/json/ui/fatigue.json rename to data/json/ui/sleepiness.json diff --git a/src/player_hardcoded_effects.cpp b/src/player_hardcoded_effects.cpp index 8c8cda6deb537..7f5187f3d50bd 100644 --- a/src/player_hardcoded_effects.cpp +++ b/src/player_hardcoded_effects.cpp @@ -1185,7 +1185,7 @@ static void eff_fun_sleep( Character &u, effect &it ) // Have we already woken up? if( !woke_up && !u.has_effect( effect_narcosis ) ) { // Cold or heat may wake you up. - // Player will sleep through cold or heat if sleepinessd enough + // Player will sleep through cold or heat if sleepy enough for( const bodypart_id &bp : u.get_all_body_parts() ) { const units::temperature curr_temp = u.get_part_temp_cur( bp ); const units::temperature_delta sleepiness_modifier = units::from_celsius_delta( diff --git a/src/suffer.cpp b/src/suffer.cpp index 25837bd8dafb8..fac0d9301fde2 100644 --- a/src/suffer.cpp +++ b/src/suffer.cpp @@ -505,7 +505,7 @@ void suffer::from_chemimbalance( Character &you ) you.mod_thirst( 5 * rng( 1, 3 ) ); } if( one_turn_in( 6_hours ) ) { - you.add_msg_if_player( m_good, _( "You feel sleepinessd all of a sudden." ) ); + you.add_msg_if_player( m_good, _( "You feel sleepy all of a sudden." ) ); you.mod_sleepiness( 10 * rng( 2, 4 ) ); } if( one_turn_in( 8_hours ) ) { From 1e90ea8904486462bb9cbf390b2e92082721c307 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Sat, 30 Mar 2024 14:47:54 -0700 Subject: [PATCH 07/13] Update itemgroups.json --- data/mods/Magiclysm/itemgroups/itemgroups.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/mods/Magiclysm/itemgroups/itemgroups.json b/data/mods/Magiclysm/itemgroups/itemgroups.json index f0ac0e2669bd8..ca381c111646e 100644 --- a/data/mods/Magiclysm/itemgroups/itemgroups.json +++ b/data/mods/Magiclysm/itemgroups/itemgroups.json @@ -1509,7 +1509,7 @@ { "item": "recovery_spellbook", "prob": 10 }, { "item": "plant_spellbook", "prob": 10 }, { "group": "items_of_elvenkind", "prob": 5 }, - { "item": "spell_scroll_recover_fatigue", "prob": 100 }, + { "item": "spell_scroll_recover_sleepiness", "prob": 100 }, { "item": "spell_scroll_druid_thornskin", "prob": 100 }, { "item": "spell_scroll_druidic_regrowth", "prob": 100 }, { "item": "spell_scroll_druidic_healing", "prob": 100 }, From 35e6cfbc935ec198a2ba87606c6f2a0892443ca1 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Sun, 31 Mar 2024 09:19:50 -0700 Subject: [PATCH 08/13] fd_fatigue --> fd_reality_tear --- data/json/artifact/altered_object_active.json | 2 +- data/json/artifact/legacy_artifact_active.json | 2 +- data/json/field_type.json | 4 ++-- .../LIXA_furniture_and_terrain.json | 2 +- .../json/mapgen/lab/lab_floorplans_finale1level.json | 2 +- data/json/mapgen/mi-go/mi-go_portal.json | 2 +- .../json/mapgen/microlab/microlab_special_tiles.json | 2 +- .../json/mapgen_palettes/nether_monster_palette.json | 2 +- .../json/monster_special_attacks/monster_deaths.json | 2 +- data/json/monstergroups/nether.json | 2 +- data/mods/Aftershock/maps/furniture.json | 2 +- data/mods/DinoMod/mapgen/DinoLabFinale.json | 4 ++-- .../eoc_nether_attunement_events.json | 2 +- .../mapgen/map_extras/glass_and_crystal.json | 2 +- data/mods/MindOverMatter/mapgen/microlab_rooms.json | 4 ++-- .../psi_surface_lab/psi_lab_surface_nested.json | 6 +++--- .../monstergroups/monstergroups_edited.json | 2 +- .../MindOverMatter/overmap/nether_crystal_field.json | 8 ++++---- data/mods/Mythos-Creatures/monstergroups/nether.json | 2 +- data/mods/No_Hope/monster_groups.json | 2 +- src/field_type.cpp | 2 +- src/field_type.h | 2 +- src/map_extras.cpp | 12 ++++++------ src/map_field.cpp | 4 ++-- 24 files changed, 38 insertions(+), 38 deletions(-) diff --git a/data/json/artifact/altered_object_active.json b/data/json/artifact/altered_object_active.json index 5c8e124c485cd..a6d557bd626a9 100644 --- a/data/json/artifact/altered_object_active.json +++ b/data/json/artifact/altered_object_active.json @@ -136,6 +136,6 @@ "flags": [ "IGNORE_WALLS", "NO_PROJECTILE", "NO_EXPLOSION_SFX" ], "shape": "blast", "effect": "remove_field", - "effect_str": "fd_sleepiness" + "effect_str": "fd_reality_tear" } ] diff --git a/data/json/artifact/legacy_artifact_active.json b/data/json/artifact/legacy_artifact_active.json index 4340b85b4e32b..27c11269d51e8 100644 --- a/data/json/artifact/legacy_artifact_active.json +++ b/data/json/artifact/legacy_artifact_active.json @@ -386,7 +386,7 @@ "effect": "attack", "message": "", "shape": "blast", - "field_id": "fd_sleepiness", + "field_id": "fd_reality_tear", "field_chance": 1, "min_field_intensity": 2, "max_field_intensity": 2, diff --git a/data/json/field_type.json b/data/json/field_type.json index 709cc1a5bb3df..77727cc910e27 100644 --- a/data/json/field_type.json +++ b/data/json/field_type.json @@ -872,7 +872,7 @@ "display_field": true }, { - "id": "fd_sleepiness", + "id": "fd_reality_tear", "type": "field_type", "legacy_enum_id": 20, "intensity_levels": [ @@ -892,7 +892,7 @@ "monster_spawn_chance": 600, "monster_spawn_count": 1, "monster_spawn_radius": 1, - "monster_spawn_group": "GROUP_NETHER_SLEEPINESS_FIELD" + "monster_spawn_group": "GROUP_NETHER_REALITY_TEAR_FIELD" } ], "description_affix": "under", diff --git a/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json b/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json index b2575bd4e4719..438a08d8196ed 100644 --- a/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json +++ b/data/json/furniture_and_terrain/LIXA_furniture_and_terrain.json @@ -309,7 +309,7 @@ "type": "furniture", "id": "f_LIXA_unfold_barrier", "name": "wall of flat space", - "looks_like": "fd_sleepiness", + "looks_like": "fd_reality_tear", "description": "From a distance, this looks like where the chamber ends; a flat wall, with a very detailed painting of a tunnel behind it. But as you get closer, you can see how it ripples, like lazy water, and notice angles of the space beyond that a flat image could never give.", "symbol": "@", "color": "light_gray", diff --git a/data/json/mapgen/lab/lab_floorplans_finale1level.json b/data/json/mapgen/lab/lab_floorplans_finale1level.json index 36ac8fd6da145..48aa8c01e6d84 100644 --- a/data/json/mapgen/lab/lab_floorplans_finale1level.json +++ b/data/json/mapgen/lab/lab_floorplans_finale1level.json @@ -168,7 +168,7 @@ ], "palettes": [ "lab_palette", "lab_loot_research" ], "furniture": { "C": "f_machinery_electronic", "R": "f_rack", "D": "f_desk" }, - "fields": { "Q": { "field": "fd_sleepiness", "intensity": 3 } }, + "fields": { "Q": { "field": "fd_reality_tear", "intensity": 3 } }, "terrain": { "r": "t_metal_floor", "Y": "t_thconc_floor_olight", "p": "t_metal_floor" }, "mapping": { "R": { "item": [ { "item": "dimensional_anchor" }, { "item": "phase_immersion_suit" } ] }, diff --git a/data/json/mapgen/mi-go/mi-go_portal.json b/data/json/mapgen/mi-go/mi-go_portal.json index 3242f2c4c9c46..7c56f6761745e 100644 --- a/data/json/mapgen/mi-go/mi-go_portal.json +++ b/data/json/mapgen/mi-go/mi-go_portal.json @@ -46,7 +46,7 @@ [ "f_null", 90 ] ] }, - "fields": { "P": { "field": "fd_sleepiness", "intensity": 1, "age": 10 } }, + "fields": { "P": { "field": "fd_reality_tear", "intensity": 1, "age": 10 } }, "place_monsters": [ { "monster": "GROUP_MI-GO_BASE_COMMON", "density": 0.1, "x": 8, "y": 10 } ], "nested": { "1": { diff --git a/data/json/mapgen/microlab/microlab_special_tiles.json b/data/json/mapgen/microlab/microlab_special_tiles.json index be1e37d5344f4..35fcb1cfbc85e 100644 --- a/data/json/mapgen/microlab/microlab_special_tiles.json +++ b/data/json/mapgen/microlab/microlab_special_tiles.json @@ -252,7 +252,7 @@ "palettes": [ "microlab" ], "terrain": { "G": "t_card_science", "9": "t_reinforced_glass_shutter" }, "furniture": { "t": "f_counter", "p": "f_counter", "M": "f_server", "A": "f_xedra_antenna", "D": "f_desk" }, - "fields": { "Q": { "field": "fd_sleepiness", "intensity": 3 } }, + "fields": { "Q": { "field": "fd_reality_tear", "intensity": 3 } }, "item": { "D": [ { "item": "artifact_scp_doc", "chance": 30 }, { "item": "monitoring_equipment_doc", "chance": 30 } ], "m": { "item": "xedra_microphone", "chance": 90 }, diff --git a/data/json/mapgen_palettes/nether_monster_palette.json b/data/json/mapgen_palettes/nether_monster_palette.json index 33c635d4b14c9..e86a1b852ecd0 100644 --- a/data/json/mapgen_palettes/nether_monster_palette.json +++ b/data/json/mapgen_palettes/nether_monster_palette.json @@ -22,6 +22,6 @@ "Z": "f_nm_nether_lichen" }, "traps": { "P": "tr_portal" }, - "fields": { "q": { "field": "fd_sleepiness", "intensity": 1 }, "Q": { "field": "fd_sleepiness", "intensity": 2 } } + "fields": { "q": { "field": "fd_reality_tear", "intensity": 1 }, "Q": { "field": "fd_reality_tear", "intensity": 2 } } } ] diff --git a/data/json/monster_special_attacks/monster_deaths.json b/data/json/monster_special_attacks/monster_deaths.json index 8f7fcd382ab2b..124e0ccc9c79f 100644 --- a/data/json/monster_special_attacks/monster_deaths.json +++ b/data/json/monster_special_attacks/monster_deaths.json @@ -69,7 +69,7 @@ "shape": "blast", "effect": "attack", "max_level": 2, - "field_id": "fd_sleepiness", + "field_id": "fd_reality_tear", "field_chance": 1, "min_field_intensity": 1, "field_intensity_increment": 1, diff --git a/data/json/monstergroups/nether.json b/data/json/monstergroups/nether.json index 6042bc4c1884c..7970a40903b07 100644 --- a/data/json/monstergroups/nether.json +++ b/data/json/monstergroups/nether.json @@ -24,7 +24,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_SLEEPINESS_FIELD", + "name": "GROUP_NETHER_REALITY_TEAR_FIELD", "default": "mon_blank", "monsters": [ { "monster": "mon_flying_polyp", "weight": 100, "cost_multiplier": 0 }, diff --git a/data/mods/Aftershock/maps/furniture.json b/data/mods/Aftershock/maps/furniture.json index ae3cc94512832..3d669ce2474c5 100644 --- a/data/mods/Aftershock/maps/furniture.json +++ b/data/mods/Aftershock/maps/furniture.json @@ -415,7 +415,7 @@ "type": "furniture", "id": "f_translocator_buoy", "name": "translocator buoy", - "looks_like": "fd_sleepiness", + "looks_like": "fd_reality_tear", "move_cost_mod": 0, "description": "A near undetectable spatial distortion field centered around a free floating golden mote. Examining it from up close would let you encode it for use with a translocation device.", "symbol": ",", diff --git a/data/mods/DinoMod/mapgen/DinoLabFinale.json b/data/mods/DinoMod/mapgen/DinoLabFinale.json index 54167ec94ba5e..288060b485fe3 100644 --- a/data/mods/DinoMod/mapgen/DinoLabFinale.json +++ b/data/mods/DinoMod/mapgen/DinoLabFinale.json @@ -115,7 +115,7 @@ ], "palettes": [ "lab_palette", "lab_loot_research" ], "furniture": { "C": "f_machinery_electronic", "R": "f_rack", "D": "f_desk" }, - "fields": { "Q": { "field": "fd_sleepiness", "intensity": 3 } }, + "fields": { "Q": { "field": "fd_reality_tear", "intensity": 3 } }, "terrain": { "r": "t_metal_floor", "Y": "t_thconc_floor_olight", "p": "t_metal_floor", "z": "t_strconc_floor" }, "mapping": { "R": { "item": [ { "item": "dimensional_anchor" }, { "item": "phase_immersion_suit" } ] }, @@ -181,7 +181,7 @@ ], "palettes": [ "lab_palette", "lab_loot_research" ], "furniture": { "C": "f_machinery_electronic", "R": "f_rack", "D": "f_desk" }, - "fields": { "Q": { "field": "fd_sleepiness", "intensity": 3 } }, + "fields": { "Q": { "field": "fd_reality_tear", "intensity": 3 } }, "terrain": { "r": "t_metal_floor", "Y": "t_thconc_floor_olight", "p": "t_metal_floor", "~": "t_water_sh", "z": "t_water_sh" }, "mapping": { "R": { "item": [ { "item": "dimensional_anchor" }, { "item": "phase_immersion_suit" } ] }, diff --git a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json index 44e25444862f1..341bc743751a5 100644 --- a/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json +++ b/data/mods/MindOverMatter/effectoncondition/eoc_nether_attunement_events.json @@ -1056,7 +1056,7 @@ ] }, "effect": [ - { "u_set_field": "fd_sleepiness", "radius": 0, "intensity": 3, "hit_player": false }, + { "u_set_field": "fd_reality_tear", "radius": 0, "intensity": 3, "hit_player": false }, { "u_message": "As you unleash your powers, the air around you twists and warps in on itself.", "type": "bad" } ] }, diff --git a/data/mods/MindOverMatter/mapgen/map_extras/glass_and_crystal.json b/data/mods/MindOverMatter/mapgen/map_extras/glass_and_crystal.json index 5ddc53cc3237c..3d2a0e245c0a7 100644 --- a/data/mods/MindOverMatter/mapgen/map_extras/glass_and_crystal.json +++ b/data/mods/MindOverMatter/mapgen/map_extras/glass_and_crystal.json @@ -91,7 +91,7 @@ "rows": [ "X" ], "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ], "terrain": { "X": "t_nether_stone" }, - "place_fields": [ { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": 3 } ] + "place_fields": [ { "field": "fd_reality_tear", "x": 0, "y": 0, "intensity": 3 } ] } } ] diff --git a/data/mods/MindOverMatter/mapgen/microlab_rooms.json b/data/mods/MindOverMatter/mapgen/microlab_rooms.json index 458881f555022..d6c5f7ba90c28 100644 --- a/data/mods/MindOverMatter/mapgen/microlab_rooms.json +++ b/data/mods/MindOverMatter/mapgen/microlab_rooms.json @@ -63,11 +63,11 @@ "terrain": { "G": "t_card_science", "9": "t_reinforced_glass_shutter" }, "furniture": { "t": "f_counter", "M": "f_server", "A": "f_xedra_antenna", "D": "f_portal_stabilizer" }, "item": { "m": { "item": "xedra_microphone", "chance": 90 }, "s": { "item": "xedra_seismograph", "chance": 90 } }, - "fields": { "Q": { "field": "fd_sleepiness", "intensity": 2 } }, + "fields": { "Q": { "field": "fd_reality_tear", "intensity": 2 } }, "place_monster": [ { "group": "GROUP_LAB", "x": [ 2, 21 ], "y": [ 2, 21 ], "chance": 60, "repeat": [ 1, 5 ] }, { "group": "GROUP_FERAL_TELEPORTER", "x": [ 3, 20 ], "y": [ 3, 20 ], "chance": 30, "repeat": [ 1, 2 ] }, - { "group": "GROUP_NETHER_SLEEPINESS_FIELD", "x": [ 10, 12 ], "y": [ 6, 7 ], "chance": 50, "repeat": [ 2, 3 ] } + { "group": "GROUP_NETHER_REALITY_TEAR_FIELD", "x": [ 10, 12 ], "y": [ 6, 7 ], "chance": 50, "repeat": [ 2, 3 ] } ], "computers": { "7": { diff --git a/data/mods/MindOverMatter/mapgen/psi_surface_lab/psi_lab_surface_nested.json b/data/mods/MindOverMatter/mapgen/psi_surface_lab/psi_lab_surface_nested.json index a0e3d7f0f9a84..565e1823bb33c 100644 --- a/data/mods/MindOverMatter/mapgen/psi_surface_lab/psi_lab_surface_nested.json +++ b/data/mods/MindOverMatter/mapgen/psi_surface_lab/psi_lab_surface_nested.json @@ -2471,7 +2471,7 @@ "object": { "mapgensize": [ 1, 1 ], "place_terrain": [ { "ter": "t_nether_water_sh", "x": 0, "y": 0 } ], - "place_fields": [ { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": 3 } ], + "place_fields": [ { "field": "fd_reality_tear", "x": 0, "y": 0, "intensity": 3 } ], "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] } }, @@ -2482,7 +2482,7 @@ "object": { "mapgensize": [ 1, 1 ], "place_terrain": [ { "ter": "t_strconc_floor", "x": 0, "y": 0 } ], - "place_fields": [ { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": 3 } ], + "place_fields": [ { "field": "fd_reality_tear", "x": 0, "y": 0, "intensity": 3 } ], "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] } }, @@ -2493,7 +2493,7 @@ "object": { "mapgensize": [ 1, 1 ], "place_terrain": [ { "ter": "t_floor", "x": 0, "y": 0 } ], - "place_fields": [ { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": 3 } ], + "place_fields": [ { "field": "fd_reality_tear", "x": 0, "y": 0, "intensity": 3 } ], "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] } } diff --git a/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json b/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json index 4253a6939c796..5d95916cb4599 100644 --- a/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json +++ b/data/mods/MindOverMatter/monstergroups/monstergroups_edited.json @@ -163,7 +163,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_SLEEPINESS_FIELD", + "name": "GROUP_NETHER_REALITY_TEAR_FIELD", "monsters": [ { "monster": "mon_nether_eater", "weight": 100, "cost_multiplier": 0 } ] }, { diff --git a/data/mods/MindOverMatter/overmap/nether_crystal_field.json b/data/mods/MindOverMatter/overmap/nether_crystal_field.json index 2c3f9bd5b7852..23f3853b9698b 100644 --- a/data/mods/MindOverMatter/overmap/nether_crystal_field.json +++ b/data/mods/MindOverMatter/overmap/nether_crystal_field.json @@ -215,8 +215,8 @@ "furniture": { "N": [ [ "f_nether_crystal_structure", 1 ], [ "f_null", 1 ] ] }, "place_monsters": [ { "monster": "GROUP_CRYSTAL_FIELD_PSYCHOACTIVE", "x": [ 0, 1 ], "y": [ 0, 1 ], "chance": 50, "repeat": [ 1, 3 ] } ], "place_fields": [ - { "field": "fd_sleepiness", "x": 0, "y": 1, "intensity": [ 2, 3 ] }, - { "field": "fd_sleepiness", "x": 1, "y": 0, "intensity": [ 2, 3 ] } + { "field": "fd_reality_tear", "x": 0, "y": 1, "intensity": [ 2, 3 ] }, + { "field": "fd_reality_tear", "x": 1, "y": 0, "intensity": [ 2, 3 ] } ] } }, @@ -235,8 +235,8 @@ "furniture": { "N": [ [ "f_nether_crystal_structure", 1 ], [ "f_null", 1 ] ] }, "place_monsters": [ { "monster": "GROUP_CRYSTAL_FIELD_PSYCHOACTIVE", "x": [ 0, 1 ], "y": [ 0, 1 ], "chance": 50, "repeat": [ 1, 3 ] } ], "place_fields": [ - { "field": "fd_sleepiness", "x": 0, "y": 0, "intensity": [ 2, 3 ] }, - { "field": "fd_sleepiness", "x": 1, "y": 1, "intensity": [ 2, 3 ] } + { "field": "fd_reality_tear", "x": 0, "y": 0, "intensity": [ 2, 3 ] }, + { "field": "fd_reality_tear", "x": 1, "y": 1, "intensity": [ 2, 3 ] } ] } }, diff --git a/data/mods/Mythos-Creatures/monstergroups/nether.json b/data/mods/Mythos-Creatures/monstergroups/nether.json index 5763f0e6b97d7..38e9aa4f854e5 100644 --- a/data/mods/Mythos-Creatures/monstergroups/nether.json +++ b/data/mods/Mythos-Creatures/monstergroups/nether.json @@ -29,7 +29,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_SLEEPINESS_FIELD", + "name": "GROUP_NETHER_REALITY_TEAR_FIELD", "default": "mon_blank", "monsters": [ { "monster": "mon_flying_polyp", "weight": 100, "cost_multiplier": 0 }, diff --git a/data/mods/No_Hope/monster_groups.json b/data/mods/No_Hope/monster_groups.json index 2486ee1a5dc77..aba8a5d34e773 100644 --- a/data/mods/No_Hope/monster_groups.json +++ b/data/mods/No_Hope/monster_groups.json @@ -57,7 +57,7 @@ }, { "type": "monstergroup", - "name": "GROUP_NETHER_SLEEPINESS_FIELD", + "name": "GROUP_NETHER_REALITY_TEAR_FIELD", "monsters": [ { "monster": "mon_staring_eye", "weight": 100, "cost_multiplier": 0 } ] }, { diff --git a/src/field_type.cpp b/src/field_type.cpp index dd7a489e62b8e..50e73ee8b9e0f 100644 --- a/src/field_type.cpp +++ b/src/field_type.cpp @@ -25,7 +25,7 @@ const field_type_str_id fd_dazzling( "fd_dazzling" ); const field_type_str_id fd_electricity( "fd_electricity" ); const field_type_str_id fd_electricity_unlit( "fd_electricity_unlit" ); const field_type_str_id fd_extinguisher( "fd_extinguisher" ); -const field_type_str_id fd_sleepiness( "fd_sleepiness" ); +const field_type_str_id fd_reality_tear( "fd_reality_tear" ); const field_type_str_id fd_fire( "fd_fire" ); const field_type_str_id fd_fire_vent( "fd_fire_vent" ); const field_type_str_id fd_flame_burst( "fd_flame_burst" ); diff --git a/src/field_type.h b/src/field_type.h index 40296eb70faff..a8a70b68b64a3 100644 --- a/src/field_type.h +++ b/src/field_type.h @@ -143,7 +143,7 @@ extern const field_type_str_id fd_dazzling; extern const field_type_str_id fd_electricity; extern const field_type_str_id fd_electricity_unlit; extern const field_type_str_id fd_extinguisher; -extern const field_type_str_id fd_sleepiness; +extern const field_type_str_id fd_reality_tear; extern const field_type_str_id fd_fire; extern const field_type_str_id fd_fire_vent; extern const field_type_str_id fd_flame_burst; diff --git a/src/map_extras.cpp b/src/map_extras.cpp index 99677ff1a8167..c9c0a292efbcb 100644 --- a/src/map_extras.cpp +++ b/src/map_extras.cpp @@ -988,7 +988,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) switch( rng( 1, 6 ) ) { //Mycus spreading through the portal case 1: { - m.add_field( portal_location, fd_sleepiness, 3 ); + m.add_field( portal_location, fd_reality_tear, 3 ); fungal_effects fe; for( const tripoint &loc : m.points_in_radius( portal_location, 5 ) ) { if( one_in( 3 ) ) { @@ -1001,7 +1001,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } //Netherworld monsters spawning around the portal case 2: { - m.add_field( portal_location, fd_sleepiness, 3 ); + m.add_field( portal_location, fd_reality_tear, 3 ); for( const tripoint &loc : m.points_in_radius( portal_location, 5 ) ) { m.place_spawns( GROUP_NETHER_PORTAL, 15, loc.xy(), loc.xy(), 1, true ); } @@ -1009,7 +1009,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } //Several cracks in the ground originating from the portal case 3: { - m.add_field( portal_location, fd_sleepiness, 3 ); + m.add_field( portal_location, fd_reality_tear, 3 ); for( int i = 0; i < rng( 1, 10 ); i++ ) { tripoint end_location = { rng( 0, SEEX * 2 - 1 ), rng( 0, SEEY * 2 - 1 ), abs_sub.z }; std::vector failure = line_to( portal_location, end_location ); @@ -1021,7 +1021,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } //Radiation from the portal killed the vegetation case 4: { - m.add_field( portal_location, fd_sleepiness, 3 ); + m.add_field( portal_location, fd_reality_tear, 3 ); const int rad = 5; for( int i = p.x - rad; i <= p.x + rad; i++ ) { for( int j = p.y - rad; j <= p.y + rad; j++ ) { @@ -1062,7 +1062,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } const tripoint portal_location = { p1 + tripoint( extra, abs_sub.z ) }; - m.add_field( portal_location, fd_sleepiness, 3 ); + m.add_field( portal_location, fd_reality_tear, 3 ); std::set ignited; place_fumarole( m, p1, p2, ignited ); @@ -1082,7 +1082,7 @@ static bool mx_portal_in( map &m, const tripoint &abs_sub ) } //Anomaly caused by the portal and spawned an artifact case 6: { - m.add_field( portal_location, fd_sleepiness, 3 ); + m.add_field( portal_location, fd_reality_tear, 3 ); artifact_natural_property prop = static_cast( rng( ARTPROP_NULL + 1, ARTPROP_MAX - 1 ) ); m.create_anomaly( portal_location, prop ); diff --git a/src/map_field.cpp b/src/map_field.cpp index 5c12fb5148918..237b47903bcd1 100644 --- a/src/map_field.cpp +++ b/src/map_field.cpp @@ -1661,7 +1661,7 @@ void map::player_in_field( Character &you ) } } } - if( ft == fd_sleepiness ) { + if( ft == fd_reality_tear ) { // Assume the rift is on the ground for now to prevent issues with the player being unable access vehicle controls on the same tile due to teleportation. if( !you.in_vehicle ) { // Teleports you... somewhere. @@ -1981,7 +1981,7 @@ void map::monster_in_field( monster &z ) cur.get_field_intensity() ) ); z.deal_damage( nullptr, bodypart_id( "torso" ), damage_instance( damage_electric, field_dmg ) ); } - if( cur_field_type == fd_sleepiness ) { + if( cur_field_type == fd_reality_tear ) { if( rng( 0, 2 ) < cur.get_field_intensity() ) { dam += cur.get_field_intensity(); teleport::teleport( z ); From f8c4e6f802ff14138059b8a173a4cc05c89a5db9 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Mon, 1 Apr 2024 20:41:39 -0700 Subject: [PATCH 09/13] Update data/mods/MindOverMatter/mapgen/microlab_rooms.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- data/mods/MindOverMatter/mapgen/microlab_rooms.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/mods/MindOverMatter/mapgen/microlab_rooms.json b/data/mods/MindOverMatter/mapgen/microlab_rooms.json index d6c5f7ba90c28..4c263bc8ebfa3 100644 --- a/data/mods/MindOverMatter/mapgen/microlab_rooms.json +++ b/data/mods/MindOverMatter/mapgen/microlab_rooms.json @@ -67,7 +67,13 @@ "place_monster": [ { "group": "GROUP_LAB", "x": [ 2, 21 ], "y": [ 2, 21 ], "chance": 60, "repeat": [ 1, 5 ] }, { "group": "GROUP_FERAL_TELEPORTER", "x": [ 3, 20 ], "y": [ 3, 20 ], "chance": 30, "repeat": [ 1, 2 ] }, - { "group": "GROUP_NETHER_REALITY_TEAR_FIELD", "x": [ 10, 12 ], "y": [ 6, 7 ], "chance": 50, "repeat": [ 2, 3 ] } + { + "group": "GROUP_NETHER_REALITY_TEAR_FIELD", + "x": [ 10, 12 ], + "y": [ 6, 7 ], + "chance": 50, + "repeat": [ 2, 3 ] + } ], "computers": { "7": { From 15a65ee8740737886c094f8a17d2f030e76d50db Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Wed, 3 Apr 2024 12:59:34 -0700 Subject: [PATCH 10/13] missed some fd_sleepiness --- src/magic_spell_effect.cpp | 13 +++++++------ src/suffer.cpp | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index 7786fab8a8190..8fe00d60ff788 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -852,14 +852,15 @@ static std::pair spell_remove_field( const spell &sp, return std::pair {field_removed, field_position}; } -static void handle_remove_fd_sleepiness_field( const std::pair - &fd_sleepiness_field, +static void handle_remove_fd_reality_tear_field( const std::pair + &fd_reality_tear_field, Creature &caster ) { - for( const std::pair &fd : std::get<0>( fd_sleepiness_field ) ) { + for( const std::pair &fd : std::get<0> + ( fd_reality_tear_field ) ) { const int &intensity = fd.second.get_field_intensity(); const translation &intensity_name = fd.second.get_intensity_level().name; - const tripoint &field_position = std::get<1>( fd_sleepiness_field ); + const tripoint &field_position = std::get<1>( fd_reality_tear_field ); const bool sees_field = caster.sees( field_position ); switch( intensity ) { @@ -911,8 +912,8 @@ void spell_effect::remove_field( const spell &sp, Creature &caster, const tripoi if( fd.first.is_valid() && !fd.first.id().is_null() ) { sp.make_sound( caster.pos(), caster ); - if( fd.first.id() == fd_sleepiness ) { - handle_remove_fd_sleepiness_field( field_removed, caster ); + if( fd.first.id() == fd_reality_tear ) { + handle_remove_fd_reality_tear_field( field_removed, caster ); } else { caster.add_msg_if_player( m_neutral, _( "The %s dissipates." ), fd.second.get_intensity_level().name ); diff --git a/src/suffer.cpp b/src/suffer.cpp index fac0d9301fde2..4e15e345f65bf 100644 --- a/src/suffer.cpp +++ b/src/suffer.cpp @@ -1565,7 +1565,7 @@ void suffer::from_artifact_resonance( Character &you, int amt ) you.add_msg_player_or_npc( m_bad, _( "Reality gives way under your feet like rotten scaffolding." ), _( "Reality gives way under 's feet like rotten scaffolding." ) ); map &here = get_map(); - here.add_field( you.pos(), fd_sleepiness, 1 ); + here.add_field( you.pos(), fd_reality_tear, 1 ); } else if( rng_outcome == 3 ) { you.add_msg_player_or_npc( m_bad, _( "You suddenly lose all substance and corporeality." ), _( " suddenly loses all substance and corporeality." ) ); From 2e5421d14e79552b3291a5d409d2b44f614b7e0d Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:35:21 -0700 Subject: [PATCH 11/13] fd_sleepines in tests I really thought I got these already gr. --- tests/magic_spell_effect_test.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/magic_spell_effect_test.cpp b/tests/magic_spell_effect_test.cpp index 0aeca47681240..38f7ddb5178f2 100644 --- a/tests/magic_spell_effect_test.cpp +++ b/tests/magic_spell_effect_test.cpp @@ -75,7 +75,7 @@ TEST_CASE( "line_attack", "[magic]" ) } } -TEST_CASE( "remove_field_fd_sleepiness", "[magic]" ) +TEST_CASE( "remove_field_fd_reality_tear", "[magic]" ) { // Test relies on lighting conditions, so ensure we control the level of // daylight. @@ -93,15 +93,15 @@ TEST_CASE( "remove_field_fd_sleepiness", "[magic]" ) CAPTURE( with_light ); CHECK( dummy.get_location() == player_initial_pos ); - // create fd_sleepiness of each intensity near player + // create fd_reality_tear of each intensity near player tripoint_abs_ms p1 = player_initial_pos + tripoint_east * 10; tripoint_abs_ms p2 = player_initial_pos + tripoint_east * 11; tripoint_abs_ms p3 = player_initial_pos + tripoint_east * 12; tripoint_abs_ms p4 = player_initial_pos + tripoint_east * 13; - m.add_field( m.getlocal( p1 ), fd_sleepiness, 1, 1_hours ); - m.add_field( m.getlocal( p2 ), fd_sleepiness, 2, 1_hours ); - m.add_field( m.getlocal( p3 ), fd_sleepiness, 3, 1_hours ); - m.add_field( m.getlocal( p4 ), fd_sleepiness, 3, 1_hours ); + m.add_field( m.getlocal( p1 ), fd_reality_tear, 1, 1_hours ); + m.add_field( m.getlocal( p2 ), fd_reality_tear, 2, 1_hours ); + m.add_field( m.getlocal( p3 ), fd_reality_tear, 3, 1_hours ); + m.add_field( m.getlocal( p4 ), fd_reality_tear, 3, 1_hours ); if( with_light ) { player_add_headlamp(); @@ -114,7 +114,7 @@ TEST_CASE( "remove_field_fd_sleepiness", "[magic]" ) dummy.recalc_sight_limits(); CHECK( m.getglobal( dummy.pos() ) == player_initial_pos ); - CHECK( count_fields_near( p1, fd_sleepiness ) == std::set { p1, p2, p3, p4 } ); + CHECK( count_fields_near( p1, fd_reality_tear ) == std::set { p1, p2, p3, p4 } ); spell_effect::remove_field( sp, dummy, m.getlocal( player_initial_pos ) ); calendar::turn += 1_turns; @@ -123,7 +123,7 @@ TEST_CASE( "remove_field_fd_sleepiness", "[magic]" ) m.process_fields(); CHECK( m.getglobal( dummy.pos() ) == player_initial_pos ); - CHECK( count_fields_near( p1, fd_sleepiness ) == std::set { p2, p3, p4 } ); + CHECK( count_fields_near( p1, fd_reality_tear ) == std::set { p2, p3, p4 } ); spell_effect::remove_field( sp, dummy, m.getlocal( player_initial_pos ) ); calendar::turn += 1_turns; @@ -132,7 +132,7 @@ TEST_CASE( "remove_field_fd_sleepiness", "[magic]" ) m.process_fields(); CHECK( m.getglobal( dummy.pos() ) == player_initial_pos ); - CHECK( count_fields_near( p1, fd_sleepiness ) == std::set { p3, p4 } ); + CHECK( count_fields_near( p1, fd_reality_tear ) == std::set { p3, p4 } ); spell_effect::remove_field( sp, dummy, m.getlocal( player_initial_pos ) ); calendar::turn += 1_turns; @@ -140,7 +140,7 @@ TEST_CASE( "remove_field_fd_sleepiness", "[magic]" ) calendar::turn += 1_turns; m.process_fields(); - CHECK( count_fields_near( p1, fd_sleepiness ) == std::set { p4 } ); + CHECK( count_fields_near( p1, fd_reality_tear ) == std::set { p4 } ); }; setup_and_remove_fields( true ); From bcb92293d8b0bedb6b9a91c55f1a125fb20d8c87 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:59:15 -0700 Subject: [PATCH 12/13] Update doc/MAGIC.md --- doc/MAGIC.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/MAGIC.md b/doc/MAGIC.md index 98687b34722f8..11bdfa523e449 100644 --- a/doc/MAGIC.md +++ b/doc/MAGIC.md @@ -188,7 +188,7 @@ Effect | Description `recharge_vehicle` | Increases or decreases the battery charge of a vehicle or battery-connected power grid. Damage is equal to the charge (negative decreases). `recover_energy` | Recovers an energy source equal to damage of the spell. The energy source is defined in `effect_str` and may be one of `BIONIC`, `SLEEPINESS`, `PAIN`, `MANA` or `STAMINA`. `remove_effect` | Removes `effect_str` effects from all creatures in the aoe. -`remove_field` | Removes a `effect_str` field in the aoe. Causes teleglow of varying intensity and potentially teleportation depending on field density, if the field removed is `fd_sleepiness`. (see `ter_transform` for more versatility) +`remove_field` | Removes a `effect_str` field in the aoe. Causes teleglow of varying intensity and potentially teleportation depending on field density, if the field removed is `fd_reality_tear`. (see `ter_transform` for more versatility) `revive` | Revives a monster like a zombie necromancer. The monster must have the `REVIVES` flag. `revive_dormant` | Revives a dormant monster. The monster must have the `REVIVES` AND the `DORMANT` flag. `short_range_teleport` | Teleports the player randomly range spaces with aoe variation. See also the `TARGET_TELEPORT` and `UNSAFE_TELEPORT` flags. From f2ed412eaa6e40d075d3fbfab4eb4d189fda4d87 Mon Sep 17 00:00:00 2001 From: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com> Date: Thu, 4 Apr 2024 08:21:19 -0700 Subject: [PATCH 13/13] some clang fizes --- src/field_type.cpp | 2 +- tests/widget_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field_type.cpp b/src/field_type.cpp index 50e73ee8b9e0f..33d15733385b2 100644 --- a/src/field_type.cpp +++ b/src/field_type.cpp @@ -25,7 +25,6 @@ const field_type_str_id fd_dazzling( "fd_dazzling" ); const field_type_str_id fd_electricity( "fd_electricity" ); const field_type_str_id fd_electricity_unlit( "fd_electricity_unlit" ); const field_type_str_id fd_extinguisher( "fd_extinguisher" ); -const field_type_str_id fd_reality_tear( "fd_reality_tear" ); const field_type_str_id fd_fire( "fd_fire" ); const field_type_str_id fd_fire_vent( "fd_fire_vent" ); const field_type_str_id fd_flame_burst( "fd_flame_burst" ); @@ -47,6 +46,7 @@ const field_type_str_id fd_last_known( "fd_last_known" ); const field_type_str_id fd_nuke_gas( "fd_nuke_gas" ); const field_type_str_id fd_plasma( "fd_plasma" ); const field_type_str_id fd_push_items( "fd_push_items" ); +const field_type_str_id fd_reality_tear( "fd_reality_tear" ); const field_type_str_id fd_relax_gas( "fd_relax_gas" ); const field_type_str_id fd_sap( "fd_sap" ); const field_type_str_id fd_shock_vent( "fd_shock_vent" ); diff --git a/tests/widget_test.cpp b/tests/widget_test.cpp index 29733cd059fe7..6a862bffc6c66 100644 --- a/tests/widget_test.cpp +++ b/tests/widget_test.cpp @@ -84,7 +84,6 @@ static const widget_id widget_test_compass_legend_3( "test_compass_legend_3" ); static const widget_id widget_test_compass_legend_5( "test_compass_legend_5" ); static const widget_id widget_test_dex_color_num( "test_dex_color_num" ); static const widget_id widget_test_disabled_when_empty( "test_disabled_when_empty" ); -static const widget_id widget_test_sleepiness_clause( "test_sleepiness_clause" ); static const widget_id widget_test_focus_num( "test_focus_num" ); static const widget_id widget_test_health_clause( "test_health_clause" ); static const widget_id widget_test_health_color_num( "test_health_color_num" ); @@ -109,6 +108,7 @@ static const widget_id widget_test_overmap_3x3_text( "test_overmap_3x3_text" ); static const widget_id widget_test_per_color_num( "test_per_color_num" ); static const widget_id widget_test_pool_graph( "test_pool_graph" ); static const widget_id widget_test_rad_badge_text( "test_rad_badge_text" ); +static const widget_id widget_test_sleepiness_clause( "test_sleepiness_clause" ); static const widget_id widget_test_speed_num( "test_speed_num" ); static const widget_id widget_test_stamina_graph( "test_stamina_graph" ); static const widget_id widget_test_stamina_num( "test_stamina_num" );