Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opiate vitamin and MME per item #75159

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions data/json/items/comestibles/med.json
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": { "str_sp": "codeine" },
"//": "Based on 30mg Codeine Sulfate Tablets.",
"description": "A mild opiate used in the suppression of pain, cough, and other ailments. While relatively weak for a narcotic, it is still addictive, with a potential for overdose.",
"material": [ "drug_filler" ],
"weight": "1 g",
Expand All @@ -433,6 +434,7 @@
"fun": 10,
"flags": [ "IRREPLACEABLE_CONSUMABLE", "WATER_DISSOLVE", "EDIBLE_FROZEN" ],
"addiction_potential": 10,
"vitamins": [ [ "vit_mme", 450 ] ],
"addiction_type": "opiate",
"use_action": {
"type": "consume_drug",
Expand Down Expand Up @@ -1163,6 +1165,8 @@
"stim": -10,
"healthy": -5,
"fun": 50,
"vitamins": [ [ "vit_mme", 1000 ] ],
"//": "Heroin due to being cut is at best 50% it's weight equivalent in morphine.",
"addiction_potential": 75,
"addiction_type": "opiate",
"flags": [ "NO_INGEST", "IRREPLACEABLE_CONSUMABLE", "WATER_DISSOLVE", "EDIBLE_FROZEN" ],
Expand Down Expand Up @@ -1292,9 +1296,10 @@
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": { "str_sp": "morphine" },
"//": "10mg syrette in army medkits",
"description": "A very strong, naturally-occurring narcotic used to treat intense pain in hospital settings. You'll need a syringe to inject it, and it's very addictive, so be careful.",
"weight": "1 g",
"volume": "2 ml",
"volume": "75 ml",
"price": "40 cent",
"price_postapoc": "250 cent",
"material": [ "powder" ],
Expand All @@ -1305,6 +1310,7 @@
"fun": 25,
"addiction_potential": 25,
"addiction_type": "opiate",
"vitamins": [ [ "vit_mme", 3000 ] ],
"flags": [ "NO_INGEST", "IRREPLACEABLE_CONSUMABLE", "EDIBLE_FROZEN" ],
"use_action": {
"type": "consume_drug",
Expand Down Expand Up @@ -1430,13 +1436,13 @@
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": { "str_sp": "oxycodone" },
"//": "15mg Oxycodone pills",
"description": "A strong semi-synthetic narcotic used in the treatment of intense pain. Highly addictive.",
"material": [ "drug_filler" ],
"weight": "1 g",
"volume": "1 ml",
"price": "275 cent",
"price_postapoc": "2 USD",
"//": "Fairly controlled substance as they go.",
"symbol": "!",
"color": "light_green",
"container": "bottle_plastic_pill_prescription",
Expand All @@ -1445,6 +1451,7 @@
"fun": 18,
"flags": [ "IRREPLACEABLE_CONSUMABLE", "EDIBLE_FROZEN" ],
"addiction_potential": 16,
"vitamins": [ [ "vit_mme", 2250 ] ],
"addiction_type": "opiate",
"use_action": {
"type": "consume_drug",
Expand Down Expand Up @@ -1491,6 +1498,7 @@
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": { "str_sp": "poppy painkiller" },
"//": "ML equivalent to 1 mg of morphine",
"description": "A potent opioid palliative produced by the refining of the mutated poppy. Notably devoid of euphoric or sedative effects, but as an opiate it can still be addictive.",
"weight": "1 g",
"volume": "2 ml",
Expand All @@ -1502,6 +1510,7 @@
"healthy": -2,
"addiction_potential": 10,
"addiction_type": "opiate",
"vitamins": [ [ "vit_mme", 200 ] ],
"flags": [ "EDIBLE_FROZEN" ],
"use_action": {
"type": "consume_drug",
Expand All @@ -1514,6 +1523,7 @@
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": { "str_sp": "poppy sleep" },
"//": "ML equivalent to 1 mg of morphine",
"description": "A potent sleep aid extracted from mutated poppy seeds. Effective, but as an opiate it can be addictive.",
"weight": "1 g",
"volume": "2 ml",
Expand All @@ -1523,6 +1533,7 @@
"symbol": "!",
"color": "magenta",
"healthy": -2,
"vitamins": [ [ "vit_mme", 200 ] ],
"addiction_type": "opiate",
"flags": [ "EDIBLE_FROZEN" ],
"use_action": {
Expand All @@ -1545,6 +1556,7 @@
"symbol": "~",
"color": "magenta",
"phase": "liquid",
"vitamins": [ [ "vit_mme", 200 ] ],
"container": "bottle_plastic_small",
"stim": -3,
"healthy": -1,
Expand Down Expand Up @@ -1735,6 +1747,7 @@
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": { "str_sp": "tramadol" },
"//": "60mg Ultram",
"description": "A painkiller used to manage moderate pain. The effects last for several hours, but are relatively subdued for an opioid.",
"material": [ "drug_filler" ],
"weight": "1 g",
Expand All @@ -1746,6 +1759,7 @@
"container": "bottle_plastic_pill_prescription",
"fun": 6,
"flags": [ "IRREPLACEABLE_CONSUMABLE", "EDIBLE_FROZEN" ],
"vitamins": [ [ "vit_mme", 600 ] ],
"addiction_potential": 6,
"addiction_type": "opiate",
"use_action": {
Expand Down
12 changes: 12 additions & 0 deletions data/json/vitamin.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@
"rate": "100 s",
"disease_excess": [ [ 10, 216 ] ]
},
{
"id": "vit_mme",
"type": "vitamin",
"vit_type": "drug",
"name": { "str": "Morphine Milligram Equivalent (percentile)" },
"//": "1 vit_mme is equivalent to 1% of an MME. Need to adjust excess and rate at minimum.",
"excess": "opiate_eff",
"min": 0,
"max": 40000,
"rate": "100 s",
"disease_excess": [ [ 100, 216 ] ]
},
{
"id": "mutant_toxin",
"type": "vitamin",
Expand Down
1 change: 1 addition & 0 deletions data/mods/Xedra_Evolved/items/alchemy.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
"healthy": -7,
"fun": 30,
"addiction_potential": 15,
"vitamins": [ [ "vit_mme", 200 ] ],
"addiction_type": [ "amphetamine", { "addiction": "opiate", "potential": 10 } ],
"flags": [ "NO_INGEST", "WATER_DISSOLVE", "EDIBLE_FROZEN" ],
"use_action": {
Expand Down
33 changes: 33 additions & 0 deletions doc/VITAMIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,36 @@ This only happens with natural decay, as determined by `rate`; other sources of

- ```NO_DISPLAY``` - This vitamin will not be shown when examining a food.
- ```OBSOLETE``` - This vitamin will not be displayed when tracking vitamins in the consume menu.


#### opiate MME conversion chart
Opioid Oral Morphine Milligram Equivalent (MME) Conversion Factorsi,ii
Type of Opioid (strength units) MME Conversion Factor
Buprenorphine film/tabletiii (mg) -----------------?
Buprenorphine patchiii (mcg/hr) -------------------?
Buprenorphine film iii (mcg)-----------------------?
Butorphanol (mg) ----------------------------------7
Codeine (mg) --------------------------------------0.15
Dihydrocodeine (mg) -------------------------------0.25
Fentanyl buccal or SL tablets, or lozenge/trocheiv
(mcg) ---------------------------------------------0.13
Fentanyl film or oral sprayv (mcg) ----------------0.18
Fentanyl nasal sprayvi (mcg) ----------------------0.16
Fentanyl patchvii (mcg) ---------------------------7.2
Hydrocodone (mg) ----------------------------------1
Hydromorphone (mg) --------------------------------4
Levorphanol tartrate (mg) -------------------------11
Meperidine hydrochloride (mg) ---------------------0.1
Methadoneviii (mg) --------------------------------3
>0, <= 20 -----------------------------------------4
>20, <=40 -----------------------------------------8
>40, <=60 -----------------------------------------10
>60 -----------------------------------------------12
Morphine (mg) -------------------------------------1
Opium (mg) ----------------------------------------1
Mutated Poppy (mg) in game only -------------------1
Oxycodone (mg) ------------------------------------1.5
Oxymorphone (mg) ----------------------------------3
Pentazocine (mg) ----------------------------------0.37
Tapentadolix (mg) ---------------------------------0.4
Tramadol (mg) -------------------------------------0.1
6 changes: 6 additions & 0 deletions src/consumption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,12 @@ static bool consume_med( item &target, Character &you )
you.modify_sleepiness( comest );
you.modify_addiction( comest );
you.modify_morale( target );
nutrients food_nutrients = you.compute_effective_nutrients( target );
for( const auto &vitamin : food_nutrients.vitamins() ) {
std::map<vitamin_id, int> vitamins;
vitamins[vitamin.first] = vitamin.second;
you.vitamins_mod( you.effect_vitamin_mod( vitamins ) );
}
activate_consume_eocs( you, target );
} else {
// Take by mouth
Expand Down
Loading