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

Tetanus #7551

Merged
merged 5 commits into from May 12, 2014
Merged

Tetanus #7551

Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -1447,6 +1447,7 @@
["antibiotics", 25],
["antifungal", 2],
["antiparasitic", 3],
["diazepam", 4],
["syringe", 8]
]
},{
@@ -3490,6 +3491,7 @@
["smoxygen_tank", 10],
["antifungal", 5],
["antiparasitic", 10],
["diazepam", 10],
["jar_3l_glass", 15]
]
},{
@@ -3538,6 +3540,7 @@
["blanket", 50],
["smoxygen_tank", 10],
["antiparasitic", 3],
["diazepam", 3],
["recipe_augs", 3],
["holybook_bible1", 4],
["holybook_bible2", 3],
@@ -5879,6 +5882,7 @@
["30gal_drum", 30],
["wearable_light", 10],
["antiparasitic", 5],
["diazepam", 5],
["misc_repairkit", 5],
["apron_leather", 10]
]
@@ -6605,6 +6609,7 @@
["pur_tablets", 10],
["optical_cloak", 1],
["antiparasitic", 2],
["diazepam", 1],
["bot_laserturret", 1]
]
},{
@@ -6778,6 +6783,7 @@
["crackpipe", 7],
["antifungal", 1],
["antiparasitic", 2],
["diazepam", 1],
["lsd", 6]
]
},{
@@ -7468,6 +7474,7 @@
["fungicide", 10],
["antifungal", 1],
["antiparasitic", 5],
["diazepam", 1],
["throw_extinguisher", 2],
["small_repairkit", 14],
["grapnel", 6],
@@ -15184,5 +15184,37 @@
"stack_size" : 40,
"bashing" : 0,
"fun" : 8
},
{
"type" : "COMESTIBLE",
"id" : "diazepam",
"category" : "drugs",
"name" : "diazepam",
"weight" : 1,
"color" : "white",
"addiction_type" : "none",
"spoils_in" : 0,
"use_action" : "ANTICONVULSANT",
"stim" : 0,
"container" : "null",
"to_hit" : 0,
"comestible_type" : "MED",
"symbol" : "!",
"quench" : 0,
"heal" : -5,
"addiction_potential" : 0,
"nutrition" : 0,
"description" : "It is commonly used to treat muscle spasms, anxiety, seizures, and panic attacks",
"price" : 100000,
"material" : "null",
"tool" : "null",
"volume" : 1,
"cutting" : 0,
"phase" : "solid",
"charges" : 10,
"stack_size" : 100,
"bashing" : 0,
"fun" : 0
}

]
@@ -24,6 +24,7 @@ enum dis_type_enum {
// Diseases
DI_INFECTION,
DI_COMMON_COLD, DI_FLU, DI_RECOVER, DI_TAPEWORM, DI_BLOODWORMS, DI_BRAINWORM, DI_PAINCYSTS,
DI_TETANUS,
// Fields - onfire moved to effects
DI_CRUSHED, DI_BOULDERING,
// Monsters
@@ -92,6 +93,7 @@ void game::init_diseases() {
disease_type_lookup["tapeworm"] = DI_TAPEWORM;
disease_type_lookup["bloodworms"] = DI_BLOODWORMS;
disease_type_lookup["brainworm"] = DI_BRAINWORM;
disease_type_lookup["tetanus"] = DI_TETANUS;
disease_type_lookup["paincysts"] = DI_PAINCYSTS;
disease_type_lookup["crushed"] = DI_CRUSHED;
disease_type_lookup["bouldering"] = DI_BOULDERING;
@@ -1080,6 +1082,18 @@ void dis_effect(player &p, disease &dis)
}
break;

case DI_TETANUS:
p.mod_dex_bonus(-4);
if (one_in(25)) {
add_msg(m_bad, "Your muscles spasm.");
p.add_effect("downed",rng(1,4));
p.add_effect("stunned",8);
if (one_in(10)) {
p.mod_pain(rng(1, 10));
}
}
break;

case DI_BLOODWORMS:
if (p.has_trait("PARAIMMUNE")) {
p.rem_disease("bloodworms");
@@ -11593,6 +11593,9 @@ bool game::plmove(int dx, int dy)
int side = random_side(bp);
if(u.hit(NULL, bp, side, 0, rng(1, 4)) > 0)
add_msg(m_bad, _("You cut your %s on the %s!"), body_part_name(bp, side).c_str(), m.tername(x, y).c_str());
if (one_in(35)) {
u.add_disease("tetanus",1,true);
}
}
}
if (u.has_trait("LEG_TENT_BRACE") && (!(u.wearing_something_on(bp_feet))) ) {
@@ -192,6 +192,7 @@ void Item_factory::init(){
iuse_function_list["FUNGICIDE"] = &iuse::fungicide;
iuse_function_list["ANTIFUNGAL"] = &iuse::antifungal;
iuse_function_list["ANTIPARASITIC"] = &iuse::antiparasitic;
iuse_function_list["ANTICONVULSANT"] = &iuse::anticonvulsant;
iuse_function_list["WEED"] = &iuse::weed;
iuse_function_list["COKE"] = &iuse::coke;
iuse_function_list["CRACK"] = &iuse::crack;
@@ -1030,6 +1030,20 @@ int iuse::antiparasitic(player *p, item *it, bool) {
return it->type->charges_to_use();
}

int iuse::anticonvulsant(player *p, item *it, bool) {
p->add_msg_if_player(_("You take some anticonvulsant medication."));
if (p->has_disease("tetanus")) {
if (one_in(3)) {
p->rem_disease("tetanus");
p->add_msg_if_player(m_good, _("The muscle spasms start to go away."));
} else {
p->add_msg_if_player(m_warning, _("The medication does nothing to help the spasms."));
}

}
return it->type->charges_to_use();
}

int iuse::weed(player *p, item *it, bool b) {
// Requires flame and something to smoke with.
bool hasPipe = (p->has_amount("apparatus", 1));
@@ -40,6 +40,7 @@ class iuse
int fungicide (player*, item*, bool);
int antifungal (player*, item*, bool);
int antiparasitic (player*, item*, bool);
int anticonvulsant (player*, item*, bool);
int weed (player*, item*, bool);
int coke (player*, item*, bool);
int crack (player*, item*, bool);
@@ -8352,7 +8352,7 @@ bool player::wear_item(item *to_wear, bool interactive)
}
return false;
}

if (armor->covers & mfb(bp_mouth) && has_trait("MANDIBLES"))
{
if(interactive)
@@ -54,6 +54,9 @@ void trapfunc::beartrap(int x, int y)
pgettext("memorial_female", "Caught by a beartrap."));
g->sound(x, y, 8, _("SNAP!"));
g->u.hit(NULL, bp_legs, random_side(bp_legs), 10, 16);
if (one_in(35)) {
g->u.add_disease("tetanus",1,true);
}
g->u.add_disease("beartrap", 1, true);
g->m.remove_trap(x, y);
g->m.spawn_item(x, y, "beartrap");
@@ -85,6 +88,9 @@ void trapfunc::board(int, int)
pgettext("memorial_female", "Stepped on a spiked board."));
g->u.hit(NULL, bp_feet, 0, 0, rng(6, 10));
g->u.hit(NULL, bp_feet, 1, 0, rng(6, 10));
if (one_in(35)) {
g->u.add_disease("tetanus",1,true);
}
}

void trapfuncm::board(monster *z, int x, int y)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.