Skip to content

Commit

Permalink
Merge pull request CleverRaven#52375 from anoobindisguise/anoobindisg…
Browse files Browse the repository at this point in the history
…uise-eatpoisondead

EATPOISON now affects mutant toxins, does not allow eating zombie meat
  • Loading branch information
Rivet-the-Zombie authored Oct 24, 2021
2 parents 25ec152 + daa0e90 commit 61774b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions data/json/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3593,12 +3593,13 @@
"id": "EATPOISON",
"name": { "str": "Intestinal Fortitude" },
"points": 3,
"description": "Your guts have developed the ability to handle poisonous food. Mostly.",
"description": "Your guts have developed the ability to handle the toxic elements of mutated flesh. Mostly.",
"changes_to": [ "EATDEAD" ],
"prereqs": [ "NAUSEA", "VOMITOUS", "POISRESIST", "POISONOUS" ],
"//": "Yes, you eventually got over the massive digestive upset. Mutations aren't easy on a system!",
"prereqs2": [ "SAPROVORE", "TOLERANCE" ],
"threshreq": [ "THRESH_TROGLOBITE", "THRESH_CHIMERA", "THRESH_RAPTOR", "THRESH_RAT", "THRESH_MOUSE", "THRESH_BATRACHIAN" ],
"vitamins_absorb_multi": [ [ "all", [ [ "mutant_toxin", 0.25 ] ] ] ],
"category": [ "TROGLOBITE", "RAPTOR", "RAT", "CHIMERA", "BATRACHIAN" ],
"valid": false
},
Expand All @@ -3607,10 +3608,11 @@
"id": "EATDEAD",
"name": { "str": "Eater Of The Dead" },
"points": 4,
"description": "Eating rotting, long-dead flesh is good for the struggle, and safe--if still completely unappealing--for you.",
"description": "Your digestion has evolved further. In addition to mutated meat, you can also stomach the tainted and long-dead flesh of zombies… if you can stand the taste, of course.",
"prereqs": [ "EATPOISON" ],
"threshreq": [ "THRESH_CHIMERA", "THRESH_RAT", "THRESH_MOUSE" ],
"cancels": [ "VEGETARIAN", "HERBIVORE", "RUMINANT", "GRAZER" ],
"vitamins_absorb_multi": [ [ "all", [ [ "mutant_toxin", 0.25 ] ] ] ],
"category": [ "RAT", "CHIMERA", "MOUSE" ],
"flags": [ "IMMUNE_SPOIL" ],
"valid": false
Expand Down
3 changes: 1 addition & 2 deletions src/consumption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ static const trait_id trait_CANNIBAL( "CANNIBAL" );
static const trait_id trait_CARNIVORE( "CARNIVORE" );
static const trait_id trait_EATDEAD( "EATDEAD" );
static const trait_id trait_EATHEALTH( "EATHEALTH" );
static const trait_id trait_EATPOISON( "EATPOISON" );
static const trait_id trait_GIZZARD( "GIZZARD" );
static const trait_id trait_GOURMAND( "GOURMAND" );
static const trait_id trait_HERBIVORE( "HERBIVORE" );
Expand Down Expand Up @@ -952,7 +951,7 @@ static bool eat( item &food, Character &you, bool force )

// If it's poisonous... poison us.
// TODO: Move this to a flag
if( food.poison > 0 && !you.has_trait( trait_EATPOISON ) &&
if( food.poison > 0 &&
!you.has_trait( trait_EATDEAD ) ) {
if( food.poison >= rng( 2, 4 ) ) {
you.add_effect( effect_poison, food.poison * 10_minutes );
Expand Down

0 comments on commit 61774b2

Please sign in to comment.