diff --git a/data/json/effects.json b/data/json/effects.json index 85cbe7f8b6905..92808178e2cca 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -3054,74 +3054,6 @@ "max_duration": 14515200, "dur_add_perc": 50 }, - { - "//": "For player, indistinguishable from pre_conjunctivitis_bacterial, but separate here to allow for separate resistances from antibiotics.", - "type": "effect_type", - "id": "pre_conjunctivitis_viral", - "show_in_info": false, - "immune_flags": [ "INFECTION_IMMUNE", "SEESLEEP" ], - "blood_analysis_description": "Viral Infection", - "max_duration": "71 h" - }, - { - "//": "For player, indistinguishable from pre_conjunctivitis_viral, but separate here to allow for separate resistances from antibiotics.", - "type": "effect_type", - "id": "pre_conjunctivitis_bacterial", - "show_in_info": false, - "immune_flags": [ "INFECTION_IMMUNE", "SEESLEEP" ], - "blood_analysis_description": "Bacterial Infection", - "max_duration": "71 h" - }, - { - "//": "For player, indistinguishable from conjunctivitis_bacterial, but separate here to allow for separate resistances from antibiotics.", - "type": "effect_type", - "id": "conjunctivitis_viral", - "name": [ "Conjunctivitis" ], - "desc": [ - "Commonly known as pinkeye, this minor infection can be treated with antihistamines. If it's bacterial, antibiotics may help, but you can't tell without a lab analysis." - ], - "apply_memorial_log": "Got pinkeye.", - "remove_memorial_log": "Got over a pinkeye infection.", - "apply_message": "Your itchy eye leaks a filmy discharge.", - "rating": "bad", - "resist_effects": [ "took_antihistamine", "took_flumed" ], - "resist_traits": [ "INFRESIST", "PER_SLIME_OK" ], - "immune_flags": [ "INFECTION_IMMUNE", "SEESLEEP" ], - "int_dur_factor": "50 m", - "base_mods": { "int_mod": [ -1 ], "per_mod": [ -2 ], "pain_min": [ 1 ], "pain_chance": [ 400, 1000 ] }, - "limb_score_mods": [ - { "limb_score": "vision", "modifier": 0.8, "resist_modifier": 0.9 }, - { "limb_score": "night_vis", "modifier": 0.8, "resist_modifier": 0.9 } - ], - "miss_messages": [ [ "It feels like there's sand in your eye.", 1 ] ], - "flags": [ "EFFECT_LIMB_SCORE_MOD" ], - "blood_analysis_description": "Viral Infection" - }, - { - "//": "For player, indistinguishable from conjunctivitis_bacterial, but separate here to allow for separate resistances from antibiotics.", - "type": "effect_type", - "id": "conjunctivitis_bacterial", - "name": [ "Conjunctivitis" ], - "desc": [ - "Commonly known as pinkeye, this minor infection can be treated with antihistamines. If it's bacterial, antibiotics may help, but you can't tell without a lab analysis." - ], - "apply_memorial_log": "Got pinkeye.", - "remove_memorial_log": "Got over a pinkeye infection.", - "apply_message": "Your itchy eye leaks a filmy discharge.", - "rating": "bad", - "resist_effects": [ "took_antihistamine", "took_flumed" ], - "resist_traits": [ "INFRESIST", "PER_SLIME_OK" ], - "immune_flags": [ "INFECTION_IMMUNE", "SEESLEEP" ], - "int_dur_factor": "50 m", - "base_mods": { "int_mod": [ -1 ], "per_mod": [ -2 ], "pain_min": [ 1 ], "pain_chance": [ 400, 1000 ] }, - "miss_messages": [ [ "It feels like there's sand in your eye.", 1 ] ], - "limb_score_mods": [ - { "limb_score": "vision", "modifier": 0.8, "resist_modifier": 0.9 }, - { "limb_score": "night_vis", "modifier": 0.8, "resist_modifier": 0.9 } - ], - "flags": [ "EFFECT_LIMB_SCORE_MOD" ], - "blood_analysis_description": "Bacterial Infection" - }, { "type": "effect_type", "id": "prophylactic_antivenom", @@ -3139,14 +3071,6 @@ "max_duration": 86400, "blood_analysis_description": "Antiasthmatics" }, - { - "type": "effect_type", - "id": "took_antihistamine", - "name": [ "Took Antihistamine Drugs" ], - "desc": [ "You have taken an antihistamine drug recently." ], - "rating": "good", - "blood_analysis_description": "Antihistamines" - }, { "type": "effect_type", "id": "cureall", @@ -3169,10 +3093,6 @@ "rat_bite_fever", "infected", "asthma", - "pre_conjunctivitis_viral", - "pre_conjunctivitis_bacterial", - "conjunctivitis_viral", - "conjunctivitis_bacterial", "common_cold", "flu" ], @@ -4792,21 +4712,6 @@ } ] }, - { - "id": "slippery_terrain", - "type": "effect_type", - "max_duration": "1 s", - "name": [ "Slick Surface", "Slippery Terrain", "Dangerously Slippery" ], - "desc": [ - "There's a slippery surface here, running may be a bad idea.", - "It's quite slippery, it may not be safe to stand here.", - "This area is extremely slippery." - ], - "rating": "bad", - "show_intensity": true, - "resist_traits": [ "GASTROPOD_BALANCE" ], - "show_in_info": true - }, { "type": "effect_type", "id": "hay_fever", 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..6a8bc97ae8509 100644 --- a/data/json/effects_on_condition/misc_effect_on_condition.json +++ b/data/json/effects_on_condition/misc_effect_on_condition.json @@ -127,62 +127,6 @@ "id": "add_effect", "effect": { "u_add_effect": { "context_val": "effect" }, "duration": { "context_val": "duration" } } }, - { - "type": "effect_on_condition", - "id": "EOC_PRE_CONJUNCTIVITIS_VIRAL", - "recurrence": [ "24 hours", "72 hours" ], - "condition": { - "and": [ - { "u_has_effect": "pre_conjunctivitis_viral" }, - { "not": { "u_has_effect": "conjunctivitis_bacterial" } }, - { "not": { "u_has_effect": "conjunctivitis_viral" } }, - { "not": { "u_has_trait": "SEESLEEP" } }, - { "not": { "u_has_bionics": "armor_bio_eyes" } } - ] - }, - "effect": [ - { "u_add_effect": "conjunctivitis_viral", "duration": { "math": [ "rand(259200) + 432000" ] }, "target_part": "eyes" }, - { "u_lose_effect": "pre_conjunctivitis_bacterial" }, - { "u_lose_effect": "pre_conjunctivitis_viral" } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_PRE_CONJUNCTIVITIS_BACTERIAL", - "recurrence": [ "24 hours", "72 hours" ], - "condition": { - "and": [ - { "u_has_effect": "pre_conjunctivitis_bacterial" }, - { "not": { "u_has_effect": "conjunctivitis_bacterial" } }, - { "not": { "u_has_effect": "conjunctivitis_viral" } }, - { "not": { "u_has_trait": "SEESLEEP" } }, - { "not": { "u_has_bionics": "armor_bio_eyes" } } - ] - }, - "effect": [ - { - "u_add_effect": "conjunctivitis_bacterial", - "duration": { "math": [ "rand(259200) + 432000" ] }, - "target_part": "eyes" - }, - { "u_lose_effect": "pre_conjunctivitis_viral" }, - { "u_lose_effect": "pre_conjunctivitis_bacterial" } - ] - }, - { - "type": "effect_on_condition", - "id": "EOC_CONJUNCTIVITIS", - "recurrence": [ "10 minutes", "45 minutes" ], - "condition": { - "and": [ - { "or": [ { "u_has_effect": "conjunctivitis_viral" }, { "u_has_effect": "conjunctivitis_bacterial" } ] }, - { "not": { "u_has_effect": "formication" } }, - { "not": { "u_has_effect": "took_antihistamine" } }, - { "not": { "u_has_effect": "sleep" } } - ] - }, - "effect": [ { "u_add_effect": "formication", "duration": "5 minutes", "target_part": "head" } ] - }, { "type": "effect_on_condition", "id": "sewer_morale_debuff", diff --git a/data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json b/data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json index 5d77a3fe147a3..fcdd2de9cd2ca 100644 --- a/data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json +++ b/data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json @@ -226,15 +226,8 @@ { "type": "effect_on_condition", "id": "rashy_skin", - "recurrence": [ "2 hours", "24 hours" ], - "condition": { - "and": [ - { "u_has_trait": "SKIN_RASHY" }, - { "not": { "u_has_effect": "took_flumed" } }, - { "not": { "u_has_effect": "took_antihistamine" } }, - { "not": { "u_has_effect": "formication" } } - ] - }, + "recurrence": [ "2 hour", "24 hours" ], + "condition": { "and": [ { "u_has_trait": "SKIN_RASHY" }, { "not": { "u_has_effect": "formication" } } ] }, "effect": [ { "u_add_effect": "formication", "duration": "10 minutes", "target_part": "random" } ] }, { diff --git a/data/json/field_type.json b/data/json/field_type.json index 8e2b04307a668..f21c236689002 100644 --- a/data/json/field_type.json +++ b/data/json/field_type.json @@ -17,51 +17,12 @@ "id": "fd_bile", "type": "field_type", "legacy_enum_id": 2, - "intensity_levels": [ - { - "name": "bile splatter", - "sym": "}", - "color": "pink", - "effects": [ - { - "effect_id": "slippery_terrain", - "intensity": 1, - "min_duration": "1 second", - "immune_in_vehicle": true, - "is_environmental": false - } - ] - }, - { - "name": "bile stain", - "effects": [ - { - "effect_id": "slippery_terrain", - "intensity": 2, - "min_duration": "1 second", - "immune_in_vehicle": true, - "is_environmental": false - } - ] - }, - { - "name": "puddle of bile", - "effects": [ - { - "effect_id": "slippery_terrain", - "intensity": 3, - "min_duration": "1 second", - "immune_in_vehicle": true, - "is_environmental": false - } - ] - } - ], + "intensity_levels": [ { "name": "bile splatter", "color": "pink" }, { "name": "bile stain" }, { "name": "puddle of bile" } ], "description_affix": "covered_in", "underwater_age_speedup": "25 minutes", "decay_amount_factor": 2, "is_splattering": true, - "half_life": "30 minutes", + "half_life": "1 days", "phase": "liquid", "accelerated_decay": true, "display_field": true, @@ -215,50 +176,15 @@ "type": "field_type", "legacy_enum_id": 6, "intensity_levels": [ - { - "name": "slime trail", - "color": "light_green", - "effects": [ - { - "effect_id": "slippery_terrain", - "intensity": 1, - "min_duration": "1 second", - "immune_in_vehicle": true, - "is_environmental": false - } - ] - }, - { - "name": "slime stain", - "effects": [ - { - "effect_id": "slippery_terrain", - "intensity": 2, - "min_duration": "1 second", - "immune_in_vehicle": true, - "is_environmental": false - } - ] - }, - { - "name": "puddle of slime", - "color": "green", - "effects": [ - { - "effect_id": "slippery_terrain", - "intensity": 3, - "min_duration": "1 second", - "immune_in_vehicle": true, - "is_environmental": false - } - ] - } + { "name": "slime trail", "color": "light_green" }, + { "name": "slime stain" }, + { "name": "puddle of slime", "color": "green" } ], "description_affix": "covered_in", "decay_amount_factor": 2, "apply_slime_factor": 10, "is_splattering": true, - "half_life": "25 minutes", + "half_life": "1 days", "phase": "liquid", "accelerated_decay": true, "display_field": true, diff --git a/data/json/itemgroups/Drugs_Tobacco_Alcohol/drugs.json b/data/json/itemgroups/Drugs_Tobacco_Alcohol/drugs.json index 50f8d35408538..6d985e20572a5 100644 --- a/data/json/itemgroups/Drugs_Tobacco_Alcohol/drugs.json +++ b/data/json/itemgroups/Drugs_Tobacco_Alcohol/drugs.json @@ -338,7 +338,6 @@ { "prob": 25, "group": "caffeine_bottle_plastic_pill_supplement_1_10" }, { "prob": 15, "group": "pills_sleep_bottle_plastic_pill_prescription_1_10" }, { "prob": 10, "group": "melatonin_tablet_bottle_plastic_pill_supplement_1_30" }, - { "prob": 15, "group": "antihistamine_bottle_plastic_pill_supplement_1_30" }, { "prob": 5, "group": "iodine_bottle_plastic_pill_supplement_1_10" }, { "prob": 5, "group": "prussian_blue_bottle_plastic_pill_supplement_1_10" }, { "item": "dayquil", "prob": 70, "charges": [ 1, 5 ] }, @@ -739,13 +738,6 @@ "container-item": "bottle_plastic_pill_prescription", "entries": [ { "item": "melatonin_tablet", "container-item": "null", "count": 30 } ] }, - { - "type": "item_group", - "id": "antihistamine_bottle_full", - "subtype": "collection", - "container-item": "bottle_plastic_pill_prescription", - "entries": [ { "item": "antihistamine", "container-item": "null", "count": 30 } ] - }, { "type": "item_group", "id": "protein_bottle_full", diff --git a/data/json/itemgroups/collections_domestic.json b/data/json/itemgroups/collections_domestic.json index 99e1583ca7b24..bb31136dd6310 100644 --- a/data/json/itemgroups/collections_domestic.json +++ b/data/json/itemgroups/collections_domestic.json @@ -277,7 +277,6 @@ [ "holy_symbol", 5 ], [ "pills_sleep", 5 ], { "prob": 3, "group": "melatonin_tablet_bottle_plastic_pill_supplement_1_30" }, - { "prob": 5, "group": "antihistamine_bottle_plastic_pill_supplement_1_30" }, { "item": "nyquil", "prob": 5, "charges": [ 1, 5 ] }, { "group": "mansion_guns", "prob": 3 }, { "group": "harddrugs", "prob": 1 }, @@ -1527,13 +1526,6 @@ "container-item": "bottle_plastic_pill_supplement", "entries": [ { "item": "melatonin_tablet", "container-item": "null", "count": [ 1, 30 ] } ] }, - { - "type": "item_group", - "id": "antihistamine_bottle_plastic_pill_supplement_1_30", - "subtype": "collection", - "container-item": "bottle_plastic_pill_supplement", - "entries": [ { "item": "antihistamine", "container-item": "null", "count": [ 1, 30 ] } ] - }, { "type": "item_group", "id": "coke_bag_zipper_1_8", diff --git a/data/json/itemgroups/stashes.json b/data/json/itemgroups/stashes.json index 8263ae4ff96a8..bcf7f85ee9eab 100644 --- a/data/json/itemgroups/stashes.json +++ b/data/json/itemgroups/stashes.json @@ -56,7 +56,6 @@ "id": "stash_drugs", "items": [ { "prob": 15, "group": "pills_sleep_bottle_plastic_pill_prescription_1_10" }, - { "prob": 10, "group": "antihistamine_bottle_plastic_pill_supplement_1_30" }, { "prob": 5, "group": "melatonin_tablet_bottle_plastic_pill_supplement_1_30" }, { "prob": 4, "group": "oxycodone_bottle_plastic_pill_prescription_1_10" }, { "item": "morphine", "prob": 4, "count": [ 1, 4 ] }, diff --git a/data/json/items/armor/eyewear.json b/data/json/items/armor/eyewear.json index 88641bf58a93e..a79c110224cf4 100644 --- a/data/json/items/armor/eyewear.json +++ b/data/json/items/armor/eyewear.json @@ -94,7 +94,7 @@ "material_thickness": 3, "environmental_protection": 4, "flags": [ "WATER_FRIENDLY", "SUN_GLASSES", "SKINTIGHT" ], - "armor": [ { "encumbrance": 5, "coverage": 95, "covers": [ "eyes" ], "rigid_layer_only": true } ] + "armor": [ { "encumbrance": 5, "coverage": 100, "covers": [ "eyes" ], "rigid_layer_only": true } ] }, { "id": "glasses_bifocal", diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json index 8990b97297225..19c63f076b5cc 100644 --- a/data/json/items/comestibles/med.json +++ b/data/json/items/comestibles/med.json @@ -1377,31 +1377,6 @@ "addiction_type": "sleeping pill", "use_action": [ "FLUSLEEP" ] }, - { - "id": "antihistamine", - "type": "COMESTIBLE", - "comestible_type": "MED", - "name": { "str_sp": "antihistamine pill" }, - "description": "Over-the-counter allergy medication. These are meant to be taken once a day and can cause drowsiness.", - "//": "Diphenhydramine HCl. Many flu meds including nyquil contain this drug, so the overlap with cough syrup is intentional.", - "material": [ "drug_filler" ], - "weight": "1 g", - "volume": "1 ml", - "price": "25 cent", - "price_postapoc": "25 cent", - "symbol": "!", - "color": "light_red", - "container": "bottle_plastic_pill_supplement", - "stim": -6, - "flags": [ "IRREPLACEABLE_CONSUMABLE", "EDIBLE_FROZEN" ], - "addiction_potential": 4, - "addiction_type": "sleeping pill", - "use_action": { - "type": "consume_drug", - "activation_message": "You take an antihistamine pill.", - "effects": [ { "id": "took_antihistamine", "duration": "10 h" } ] - } - }, { "id": "oxycodone", "type": "COMESTIBLE", diff --git a/data/json/obsoletion_and_migration_0.I/migration_items.json b/data/json/obsoletion_and_migration_0.I/migration_items.json index 19729c67253d9..7af177bb9472f 100644 --- a/data/json/obsoletion_and_migration_0.I/migration_items.json +++ b/data/json/obsoletion_and_migration_0.I/migration_items.json @@ -1141,5 +1141,10 @@ "id": "ak74", "type": "MIGRATION", "replace": "ak74_semi" + }, + { + "id": "antihistamine", + "type": "MIGRATION", + "replace": "weak_antibiotic" } ] diff --git a/data/json/obsoletion_and_migration_0.I/obsolete_effect.json b/data/json/obsoletion_and_migration_0.I/obsolete_effect.json new file mode 100644 index 0000000000000..bb5048160fa6d --- /dev/null +++ b/data/json/obsoletion_and_migration_0.I/obsolete_effect.json @@ -0,0 +1,93 @@ +[ + { + "//": "For player, indistinguishable from pre_conjunctivitis_bacterial, but separate here to allow for separate resistances from antibiotics.", + "type": "effect_type", + "id": "pre_conjunctivitis_viral", + "show_in_info": false, + "immune_flags": [ "INFECTION_IMMUNE", "SEESLEEP" ], + "blood_analysis_description": "Viral Infection", + "max_duration": "71 h" + }, + { + "//": "For player, indistinguishable from pre_conjunctivitis_viral, but separate here to allow for separate resistances from antibiotics.", + "type": "effect_type", + "id": "pre_conjunctivitis_bacterial", + "show_in_info": false, + "immune_flags": [ "INFECTION_IMMUNE", "SEESLEEP" ], + "blood_analysis_description": "Bacterial Infection", + "max_duration": "71 h" + }, + { + "//": "For player, indistinguishable from conjunctivitis_bacterial, but separate here to allow for separate resistances from antibiotics.", + "type": "effect_type", + "id": "conjunctivitis_viral", + "name": [ "Conjunctivitis" ], + "desc": [ + "Commonly known as pinkeye, this minor infection can be treated with antihistamines. If it's bacterial, antibiotics may help, but you can't tell without a lab analysis." + ], + "apply_memorial_log": "Got pinkeye.", + "remove_memorial_log": "Got over a pinkeye infection.", + "apply_message": "Your itchy eye leaks a filmy discharge.", + "rating": "bad", + "resist_effects": [ "took_antihistamine", "took_flumed" ], + "resist_traits": [ "INFRESIST", "PER_SLIME_OK" ], + "immune_flags": [ "INFECTION_IMMUNE", "SEESLEEP" ], + "int_dur_factor": "50 m", + "base_mods": { "int_mod": [ -1 ], "per_mod": [ -2 ], "pain_min": [ 1 ], "pain_chance": [ 400, 1000 ] }, + "limb_score_mods": [ + { "limb_score": "vision", "modifier": 0.8, "resist_modifier": 0.9 }, + { "limb_score": "night_vis", "modifier": 0.8, "resist_modifier": 0.9 } + ], + "miss_messages": [ [ "It feels like there's sand in your eye.", 1 ] ], + "flags": [ "EFFECT_LIMB_SCORE_MOD" ], + "blood_analysis_description": "Viral Infection" + }, + { + "//": "For player, indistinguishable from conjunctivitis_bacterial, but separate here to allow for separate resistances from antibiotics.", + "type": "effect_type", + "id": "conjunctivitis_bacterial", + "name": [ "Conjunctivitis" ], + "desc": [ + "Commonly known as pinkeye, this minor infection can be treated with antihistamines. If it's bacterial, antibiotics may help, but you can't tell without a lab analysis." + ], + "apply_memorial_log": "Got pinkeye.", + "remove_memorial_log": "Got over a pinkeye infection.", + "apply_message": "Your itchy eye leaks a filmy discharge.", + "rating": "bad", + "resist_effects": [ "took_antihistamine", "took_flumed" ], + "resist_traits": [ "INFRESIST", "PER_SLIME_OK" ], + "immune_flags": [ "INFECTION_IMMUNE", "SEESLEEP" ], + "int_dur_factor": "50 m", + "base_mods": { "int_mod": [ -1 ], "per_mod": [ -2 ], "pain_min": [ 1 ], "pain_chance": [ 400, 1000 ] }, + "miss_messages": [ [ "It feels like there's sand in your eye.", 1 ] ], + "limb_score_mods": [ + { "limb_score": "vision", "modifier": 0.8, "resist_modifier": 0.9 }, + { "limb_score": "night_vis", "modifier": 0.8, "resist_modifier": 0.9 } + ], + "flags": [ "EFFECT_LIMB_SCORE_MOD" ], + "blood_analysis_description": "Bacterial Infection" + }, + { + "type": "effect_type", + "id": "took_antihistamine", + "name": [ "Took Antihistamine Drugs" ], + "desc": [ "You have taken an antihistamine drug recently." ], + "rating": "good", + "blood_analysis_description": "Antihistamines" + }, + { + "id": "slippery_terrain", + "type": "effect_type", + "max_duration": "1 s", + "name": [ "Slick Surface", "Slippery Terrain", "Dangerously Slippery" ], + "desc": [ + "There's a slippery surface here, running may be a bad idea.", + "It's quite slippery, it may not be safe to stand here.", + "This area is extremely slippery." + ], + "rating": "bad", + "show_intensity": true, + "resist_traits": [ "GASTROPOD_BALANCE" ], + "show_in_info": true + } +] diff --git a/data/json/obsoletion_and_migration_0.I/obsolete_eoc.json b/data/json/obsoletion_and_migration_0.I/obsolete_eoc.json new file mode 100644 index 0000000000000..19f61b90c85c9 --- /dev/null +++ b/data/json/obsoletion_and_migration_0.I/obsolete_eoc.json @@ -0,0 +1,18 @@ +[ + { + "type": "effect_on_condition", + "id": "EOC_PRE_CONJUNCTIVITIS_VIRAL" + }, + { + "type": "effect_on_condition", + "id": "EOC_PRE_CONJUNCTIVITIS_BACTERIAL" + }, + { + "type": "effect_on_condition", + "id": "EOC_CONJUNCTIVITIS" + }, + { + "type": "effect_on_condition", + "id": "EOC_crazy_cataclysm_benadryl" + } +] diff --git a/data/mods/CrazyCataclysm/crazy_effect_on_condition.json b/data/mods/CrazyCataclysm/crazy_effect_on_condition.json deleted file mode 100644 index 0820ae9c465fd..0000000000000 --- a/data/mods/CrazyCataclysm/crazy_effect_on_condition.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "type": "effect_on_condition", - "id": "EOC_crazy_cataclysm_benadryl", - "recurrence": "5 minutes", - "condition": { "and": [ { "x_in_y_chance": { "x": 1, "y": 100 } }, { "u_has_effect": "took_antihistamine" } ] }, - "effect": [ - { - "u_spawn_monster": "mon_gracke", - "real_count": 1, - "min_radius": 3, - "max_radius": 10, - "lifespan": [ "40 seconds", "2 minutes" ], - "spawn_message": "Out of the corner of your eye you glimpse the silhouette of a man wearing a hat." - } - ] - } -] diff --git a/src/character.cpp b/src/character.cpp index 33cb0b9855949..09c25ea1238af 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -205,8 +205,6 @@ static const efftype_id effect_boomered( "boomered" ); static const efftype_id effect_brainworms( "brainworms" ); static const efftype_id effect_chafing( "chafing" ); static const efftype_id effect_common_cold( "common_cold" ); -static const efftype_id effect_conjunctivitis_bacterial( "conjunctivitis_bacterial" ); -static const efftype_id effect_conjunctivitis_viral( "conjunctivitis_viral" ); static const efftype_id effect_contacts( "contacts" ); static const efftype_id effect_controlled( "controlled" ); static const efftype_id effect_corroding( "corroding" ); @@ -250,15 +248,12 @@ static const efftype_id effect_pkill1_generic( "pkill1_generic" ); static const efftype_id effect_pkill1_nsaid( "pkill1_nsaid" ); static const efftype_id effect_pkill2( "pkill2" ); static const efftype_id effect_pkill3( "pkill3" ); -static const efftype_id effect_pre_conjunctivitis_bacterial( "pre_conjunctivitis_bacterial" ); -static const efftype_id effect_pre_conjunctivitis_viral( "pre_conjunctivitis_viral" ); static const efftype_id effect_recently_coughed( "recently_coughed" ); static const efftype_id effect_recover( "recover" ); static const efftype_id effect_ridden( "ridden" ); static const efftype_id effect_riding( "riding" ); static const efftype_id effect_sleep( "sleep" ); static const efftype_id effect_slept_through_alarm( "slept_through_alarm" ); -static const efftype_id effect_slippery_terrain( "slippery_terrain" ); static const efftype_id effect_stumbled_into_invisible( "stumbled_into_invisible" ); static const efftype_id effect_stunned( "stunned" ); static const efftype_id effect_subaquatic_sonar( "subaquatic_sonar" ); @@ -340,7 +335,6 @@ static const json_character_flag json_flag_WING_GLIDE( "WING_GLIDE" ); static const limb_score_id limb_score_balance( "balance" ); static const limb_score_id limb_score_breathing( "breathing" ); -static const limb_score_id limb_score_footing( "footing" ); static const limb_score_id limb_score_grip( "grip" ); static const limb_score_id limb_score_lift( "lift" ); static const limb_score_id limb_score_manip( "manip" ); @@ -398,7 +392,6 @@ static const start_location_id start_location_sloc_shelter_a( "sloc_shelter_a" ) static const trait_id trait_ADRENALINE( "ADRENALINE" ); static const trait_id trait_ANTENNAE( "ANTENNAE" ); -static const trait_id trait_AQUEOUS( "AQUEOUS" ); static const trait_id trait_BADBACK( "BADBACK" ); static const trait_id trait_BIRD_EYE( "BIRD_EYE" ); static const trait_id trait_CANNIBAL( "CANNIBAL" ); @@ -408,7 +401,6 @@ static const trait_id trait_CF_HAIR( "CF_HAIR" ); static const trait_id trait_CHEMIMBALANCE( "CHEMIMBALANCE" ); static const trait_id trait_CHLOROMORPH( "CHLOROMORPH" ); static const trait_id trait_CLUMSY( "CLUMSY" ); -static const trait_id trait_COMPOUND_EYES( "COMPOUND_EYES" ); static const trait_id trait_DEBUG_CLOAK( "DEBUG_CLOAK" ); static const trait_id trait_DEBUG_HS( "DEBUG_HS" ); static const trait_id trait_DEBUG_LS( "DEBUG_LS" ); @@ -433,14 +425,12 @@ static const trait_id trait_HEAVYSLEEPER( "HEAVYSLEEPER" ); static const trait_id trait_HEAVYSLEEPER2( "HEAVYSLEEPER2" ); static const trait_id trait_HIBERNATE( "HIBERNATE" ); static const trait_id trait_ILLITERATE( "ILLITERATE" ); -static const trait_id trait_INFRESIST( "INFRESIST" ); static const trait_id trait_INSOMNIA( "INSOMNIA" ); static const trait_id trait_INT_SLIME( "INT_SLIME" ); static const trait_id trait_LEG_TENT_BRACE( "LEG_TENT_BRACE" ); static const trait_id trait_LIGHTSTEP( "LIGHTSTEP" ); static const trait_id trait_LOVES_BOOKS( "LOVES_BOOKS" ); static const trait_id trait_MASOCHIST( "MASOCHIST" ); -static const trait_id trait_MUCUS_SECRETION( "MUCUS_SECRETION" ); static const trait_id trait_MUTE( "MUTE" ); static const trait_id trait_M_IMMUNE( "M_IMMUNE" ); static const trait_id trait_M_SKIN3( "M_SKIN3" ); @@ -1870,19 +1860,12 @@ void Character::dismount() } } -float Character::balance_roll() const -{ - /** @EFFECT_DEX improves player balance roll */ - /** Balance and footing influence stability rolls */ - /** @EFFECT_SWIMMING improves player stability roll */ - return ( get_dex() + get_skill_level( skill_swimming ) ) * ( ( get_limb_score( - limb_score_balance ) * 3 + get_limb_score( limb_score_footing ) ) / 4.0f ); -} - float Character::stability_roll() const { /** @EFFECT_STR improves player stability roll */ + /** Balance and reaction scores influence stability rolls */ + /** @EFFECT_MELEE improves player stability roll */ return ( get_melee() + get_str() ) * ( ( get_limb_score( limb_score_balance ) * 3 + get_limb_score( limb_score_reaction ) ) / 4.0f ); @@ -8328,7 +8311,6 @@ void Character::on_hit( Creature *source, bodypart_id bp_hit, enchantment_cache->cast_hit_me( *this, source ); } - /* Where damage to character is actually applied to hit body parts Might be where to put bleed stuff rather than in player::deal_damage() @@ -11312,71 +11294,6 @@ void Character::process_effects() } } - if( has_effect( effect_boomered ) && ( is_avatar() || is_npc() ) && one_in( 10 ) && - !has_trait( trait_COMPOUND_EYES ) && !has_effect( effect_pre_conjunctivitis_bacterial ) && - !has_effect( effect_pre_conjunctivitis_viral ) && !has_effect( effect_conjunctivitis_bacterial ) && - !has_effect( effect_conjunctivitis_viral ) ) { - //Washing your eyes out in time may save you from getting pinkeye. - float checked_health = get_lifestyle() + 200.0; - //Some animal eyes are more vulnerable to infection. - if( has_trait_flag( json_flag_EYE_MEMBRANE ) ) { - checked_health -= 50; - } - //Ditto for contact lenses. - if( has_effect( effect_contacts ) || has_effect( effect_transition_contacts ) ) { - checked_health -= 50; - } - if( has_trait( trait_INFRESIST ) ) { - checked_health += 50; - } - float pinkeye_chance = 4.0 + 6.0 / 25.0 * checked_health; - if( one_in( pinkeye_chance ) ) { - if( one_in( 2 ) ) { - add_effect( effect_pre_conjunctivitis_bacterial, 70_hours ); - } else { - add_effect( effect_pre_conjunctivitis_viral, 70_hours ); - } - } - } - - map &here = get_map(); - if( has_effect( effect_slippery_terrain ) && !is_on_ground() && !is_crouching() && - here.has_flag( ter_furn_flag::TFLAG_FLAT, pos() ) ) { - int rolls = 0; - bool u_see = get_player_view().sees( *this ); - //ROAD tiles are hard, flat surfaces, so they are extra slippery. - if( here.has_flag( ter_furn_flag::TFLAG_ROAD, pos() ) ) { - rolls++; - } - if( has_trait( trait_DEFT ) ) { - rolls--; - } - if( is_running() || ( ( worn_with_flag( flag_ROLLER_ONE ) || worn_with_flag( flag_ROLLER_INLINE ) || - worn_with_flag( flag_ROLLER_QUAD ) ) && !has_trait( trait_PROF_SKATER ) ) ) { - rolls++; - } - //Slimy people are used to everything being slippery. - if( has_trait( trait_SLIMY ) || has_trait( trait_AQUEOUS ) || has_trait( trait_MUCUS_SECRETION ) ) { - rolls--; - } - if( has_trait( trait_CLUMSY ) ) { - rolls++; - } - int intensity = get_effect_int( effect_slippery_terrain ); - rolls += intensity; - //A healthy unencumbered person with 18 dex can usually walk across a moderately slippery surface without issue. - //Survivors rarely meet those qualifications in practice. - if( balance_roll() < dice( rolls, 6 ) ) { - if( !is_avatar() ) { - if( u_see ) { - add_msg( _( "%1$s slips and falls!" ), get_name() ); - } - } else { - add_msg( m_bad, _( "You lose your balance and fall on the slippery ground!" ) ); - } - add_effect( effect_downed, rng( 1_turns, 2_turns ) ); - } - } Creature::process_effects(); } diff --git a/src/character.h b/src/character.h index 31267a7e6fb8e..b258edbe4761d 100644 --- a/src/character.h +++ b/src/character.h @@ -1199,9 +1199,7 @@ class Character : public Creature, public visitable bool is_stealthy() const; /** Returns true if the current martial art works with the player's current weapon */ bool can_melee() const; - /** Returns value of player's footing on narrow or slippery terrain */ - float balance_roll() const; - /** Returns value of player's footing on skates or similar */ + /** Returns value of player's stable footing */ float stability_roll() const override; /** Returns true if the player can learn the entered martial art */ bool can_autolearn( const matype_id &ma_id ) const; diff --git a/src/character_attire.cpp b/src/character_attire.cpp index fcf63c8cb8815..cf92e69a901f6 100644 --- a/src/character_attire.cpp +++ b/src/character_attire.cpp @@ -2718,6 +2718,10 @@ float outfit::clothing_wetness_mult( const bodypart_id &bp ) const clothing_mult = std::min( clothing_mult, breathability ); } } + + // always some evaporation even if completely covered + // doesn't handle things that would be "air tight" + clothing_mult = std::max( clothing_mult, .1f ); return clothing_mult; } @@ -2762,4 +2766,4 @@ void outfit::organize_items_menu() to_organize.push_back( &i ); } pocket_management_menu( _( "Inventory Organization" ), to_organize ); -} \ No newline at end of file +} diff --git a/src/character_body.cpp b/src/character_body.cpp index 4c3a4e7f47707..6e24a03bf3ac5 100644 --- a/src/character_body.cpp +++ b/src/character_body.cpp @@ -134,10 +134,7 @@ void Character::update_body_wetness( const w_point &weather ) } // Make clothing slow down drying - const float base_clothing_mult = worn.clothing_wetness_mult( bp ); - // always some evaporation even if completely covered - // doesn't handle things that would be "air tight" - const float clothing_mult = std::max( base_clothing_mult, .1f ); + const float clothing_mult = worn.clothing_wetness_mult( bp ); const time_duration drying = bp->drying_increment * average_drying * trait_mult * weather_mult * temp_mult / clothing_mult; diff --git a/src/creature.cpp b/src/creature.cpp index 47f066a435649..da13549001c9b 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -1693,41 +1693,6 @@ bool Creature::add_env_effect( const efftype_id &eff_id, const bodypart_id &vect intensity, force ); } -bool Creature::add_liquid_effect( const efftype_id &eff_id, const bodypart_id &vector, int strength, - const time_duration &dur, const bodypart_id &bp, bool permanent, int intensity, bool force ) -{ - if( !force && is_immune_effect( eff_id ) ) { - return false; - } - if( is_monster() ) { - if( dice( strength, 3 ) > dice( get_env_resist( vector ), 3 ) ) { - //Monsters don't have clothing wetness multipliers, so we still use enviro for them. - add_effect( effect_source::empty(), eff_id, dur, bodypart_str_id::NULL_ID(), permanent, intensity, - true ); - return true; - } else { - return false; - } - } - const Character *c = as_character(); - //d100 minus strength should never be less than 1 so we don't have liquids phasing through sealed power armor. - if( std::max( dice( 1, 100 ) - strength, - 1 ) < ( c->worn.clothing_wetness_mult( vector ) * 100 ) ) { - // Don't check immunity (force == true), because we did check above - add_effect( effect_source::empty(), eff_id, dur, bp, permanent, intensity, true ); - return true; - } else { - //To do: make absorbent armor filthy, damage it with acid, etc - return false; - } -} -bool Creature::add_liquid_effect( const efftype_id &eff_id, const bodypart_id &vector, int strength, - const time_duration &dur, bool permanent, int intensity, bool force ) -{ - return add_liquid_effect( eff_id, vector, strength, dur, bodypart_str_id::NULL_ID(), permanent, - intensity, force ); -} - void Creature::clear_effects() { for( auto &elem : *effects ) { diff --git a/src/creature.h b/src/creature.h index 866f9b8942cca..e82a0d5cfb739 100644 --- a/src/creature.h +++ b/src/creature.h @@ -635,14 +635,6 @@ class Creature : public viewer bool force = false ); bool add_env_effect( const efftype_id &eff_id, const bodypart_id &vector, int strength, const time_duration &dur, bool permanent = false, int intensity = 1, bool force = false ); - /** Applies effects by spraying liquid on the creature. Returns false if the liquid was blocked - * by waterproof gear. This is a simple method for effects which deal no damage and don't harm clothing. - * For more complex stuff, see outfit::splash */ - bool add_liquid_effect( const efftype_id &eff_id, const bodypart_id &vector, int strength, - const time_duration &dur, const bodypart_id &bp, bool permanent = false, int intensity = 1, - bool force = false ); - bool add_liquid_effect( const efftype_id &eff_id, const bodypart_id &vector, int strength, - const time_duration &dur, bool permanent = false, int intensity = 1, bool force = false ); /** Removes a listed effect. If the bodypart is not specified remove all effects of * a given type, targeted or untargeted. Returns true if anything was * removed. */ diff --git a/src/iuse.cpp b/src/iuse.cpp index 7e24e88dec26f..970e7ee7aa7ec 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -161,8 +161,6 @@ static const efftype_id effect_boomered( "boomered" ); static const efftype_id effect_bouldering( "bouldering" ); static const efftype_id effect_brainworms( "brainworms" ); static const efftype_id effect_cig( "cig" ); -static const efftype_id effect_conjunctivitis_bacterial( "conjunctivitis_bacterial" ); -static const efftype_id effect_conjunctivitis_viral( "conjunctivitis_viral" ); static const efftype_id effect_contacts( "contacts" ); static const efftype_id effect_corroding( "corroding" ); static const efftype_id effect_critter_well_fed( "critter_well_fed" ); @@ -202,7 +200,6 @@ static const efftype_id effect_onfire( "onfire" ); static const efftype_id effect_paincysts( "paincysts" ); static const efftype_id effect_pet( "pet" ); static const efftype_id effect_poison( "poison" ); -static const efftype_id effect_pre_conjunctivitis_bacterial( "pre_conjunctivitis_bacterial" ); static const efftype_id effect_ridden( "ridden" ); static const efftype_id effect_riding( "riding" ); static const efftype_id effect_run( "run" ); @@ -635,24 +632,6 @@ std::optional iuse::antibiotic( Character *p, item *, const tripoint & ) p->add_msg_if_player( m_warning, _( "The medication does nothing to help the spasms." ) ); } } - if( p->has_effect( effect_conjunctivitis_bacterial ) ) { - if( one_in( 2 ) ) { - p->remove_effect( effect_conjunctivitis_bacterial ); - p->add_msg_if_player( m_good, _( "Your pinkeye seems to be clearing up." ) ); - } else { - p->add_msg_if_player( m_warning, _( "Your pinkeye doesn't feel any better." ) ); - } - } - if( p->has_effect( effect_pre_conjunctivitis_bacterial ) ) { - if( one_in( 2 ) ) { - //There were no symptoms yet, so we skip telling the player they feel better. - p->remove_effect( effect_pre_conjunctivitis_bacterial ); - } - } - if( p->has_effect( effect_conjunctivitis_viral ) ) { - //Antibiotics don't kill viruses. - p->add_msg_if_player( m_warning, _( "Your pinkeye doesn't feel any better." ) ); - } if( p->has_effect( effect_infected ) && !p->has_effect( effect_antibiotic ) ) { p->add_msg_if_player( m_good, _( "Maybe this is just the placebo effect, but you feel a little better as the dose settles in." ) ); diff --git a/src/monattack.cpp b/src/monattack.cpp index 64ffae9771e68..5ec40fa859ef4 100644 --- a/src/monattack.cpp +++ b/src/monattack.cpp @@ -1064,7 +1064,7 @@ bool mattack::boomer( monster *z ) } if( !target->dodge_check( z, 1.0f ) ) { - target->add_liquid_effect( effect_boomered, bodypart_id( "eyes" ), 3, 12_turns ); + target->add_env_effect( effect_boomered, bodypart_id( "eyes" ), 3, 12_turns ); } else if( u_see ) { target->add_msg_player_or_npc( _( "You dodge it!" ), _( " dodges it!" ) ); @@ -1104,11 +1104,11 @@ bool mattack::boomer_glow( monster *z ) } if( !target->dodge_check( z, 1.0f ) ) { - target->add_liquid_effect( effect_boomered, bodypart_id( "eyes" ), 5, 25_turns ); + target->add_env_effect( effect_boomered, bodypart_id( "eyes" ), 5, 25_turns ); target->on_dodge( z, 5, 1.0f ); for( int i = 0; i < rng( 2, 4 ); i++ ) { const bodypart_id &bp = target->random_body_part(); - target->add_liquid_effect( effect_glowing, bp, 4, 4_minutes ); + target->add_env_effect( effect_glowing, bp, 4, 4_minutes ); if( target->has_effect( effect_glowing ) ) { break; } diff --git a/src/monster.cpp b/src/monster.cpp index 5ab339fa53857..b472a43edf805 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -118,7 +118,6 @@ static const efftype_id effect_poison( "poison" ); static const efftype_id effect_psi_stunned( "psi_stunned" ); static const efftype_id effect_ridden( "ridden" ); static const efftype_id effect_run( "run" ); -static const efftype_id effect_slippery_terrain( "slippery_terrain" ); static const efftype_id effect_spooked( "spooked" ); static const efftype_id effect_spooked_recent( "spooked_recent" ); static const efftype_id effect_stunned( "stunned" ); @@ -3327,26 +3326,6 @@ void monster::process_effects() } } - // Check to see if critter slips on bile or whatever. - if( has_effect( effect_slippery_terrain ) && !is_immune_effect( effect_downed ) && !flies() && - !digging() && !has_effect( effect_downed ) ) { - map &here = get_map(); - if( here.has_flag( ter_furn_flag::TFLAG_FLAT, pos() ) ) { - int intensity = get_effect_int( effect_slippery_terrain ); - intensity -= 1; - //ROAD tiles are hard, flat surfaces, and easier to slip on. - if( here.has_flag( ter_furn_flag::TFLAG_ROAD, pos() ) ) { - intensity++; - } - int slipchance = ( round( get_speed() / 50 ) - round( get_dodge() / 3 ) ); - if( intensity + slipchance > dice( 1, 12 ) ) { - add_effect( effect_downed, rng( 1_turns, 2_turns ) ); - add_msg_if_player_sees( pos(), m_info, _( "The %1s slips and falls!" ), - name() ); - } - } - } - // Apply or remove the cramped_space effect, which needs specific information about the monster's surroundings. map &here = get_map(); const tripoint z_pos = pos();