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

Add support for damage overtime and move super healing from panacea to Aftershock #40082

Merged
merged 8 commits into from
May 4, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Unhardcode healing from panacea and move it to Aftershock
Fris0uman committed May 2, 2020
commit 395ddc7f99c0963d68531c800a762b371ee7f8dc
23 changes: 23 additions & 0 deletions data/mods/Aftershock/items/comestibles.json
Original file line number Diff line number Diff line change
@@ -90,5 +90,28 @@
{ "id": "downed", "duration": 1 }
]
}
},
{
"id": "panacea",
"type": "COMESTIBLE",
"comestible_type": "MED",
"name": { "str": "Panaceus", "str_pl": "Panaceii" },
"symbol": "!",
"color": "red",
"copy-from": "panacea",
"use_action": {
"type": "consume_drug",
"activation_message": "You feel AMAZING!",
"effects": [ { "id": "panacea", "duration": "1 m" }, { "id": "cureall" } ],
"damage_over_time": [
{
"damage_type": "true",
"duration": "1 m",
"amount": -10,
"bodyparts": [ "torso", "head", "arm_l", "leg_l", "arm_r", "leg_r" ]
}
]
},
"flags": [ "NPC_SAFE", "IRREPLACEABLE_CONSUMABLE" ]
}
]
6 changes: 0 additions & 6 deletions src/player_hardcoded_effects.cpp
Original file line number Diff line number Diff line change
@@ -1307,12 +1307,6 @@ void player::hardcoded_effects( effect &it )
// Just unpause, in case someone added it as a temporary effect (numbing poison etc.)
it.unpause_effect();
}
} else if( id == effect_panacea ) {
// restore health all body parts, dramatically reduce pain
for( int i = 0; i < num_hp_parts; i++ ) {
hp_cur[i] += 10;
}
mod_pain( -10 );
} else if( id == effect_toxin_buildup ) {
// Loosely based on toxic man-made compounds (mostly pesticides) which don't degrade
// easily, leading to build-up in muscle and fat tissue through bioaccumulation.