Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Standing-Storm committed Jun 24, 2024
1 parent 8a43e0c commit ebb053e
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 0 deletions.
91 changes: 91 additions & 0 deletions data/mods/BombasticPerks/perkdata/blood_drinking_heal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[
{
"type": "effect_on_condition",
"id": "EOC_perk_blood_drinking_heal",
"eoc_type": "EVENT",
"required_event": "character_eats_item",
"condition": {
"and": [
{
"or": [
{ "compare_string": [ "blood", { "context_val": "itype" } ] },
{ "compare_string": [ "animal_blood", { "context_val": "itype" } ] },
{ "compare_string": [ "demihuman_blood", { "context_val": "itype" } ] },
{ "compare_string": [ "mutant_human_blood", { "context_val": "itype" } ] }
]
},
{ "u_has_trait": "perk_blood_drinking_heal" }
]
},
"effect": [ { "math": [ "u_pain()", "-=", "2" ] }, { "run_eocs": "EOC_perk_blood_drinking_heal_hp_check" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_blood_drinking_heal_hp_check",
"condition": {
"or": [
{ "math": [ "u_hp('arm_l')", "<", "u_hp_max('arm_l')" ] },
{ "math": [ "u_hp('arm_r')", "<", "u_hp_max('arm_r')" ] },
{ "math": [ "u_hp('leg_l')", "<", "u_hp_max('leg_l')" ] },
{ "math": [ "u_hp('leg_r')", "<", "u_hp_max('leg_r')" ] },
{ "math": [ "u_hp('torso')", "<", "u_hp_max('torso')" ] },
{ "math": [ "u_hp('head')", "<", "u_hp_max('head')" ] }
]
},
"effect": [
{
"switch": { "math": [ "rand(5)" ] },
"cases": [
{ "case": 0, "effect": { "run_eocs": "EOC_perk_blood_drinking_heal_arm_l" } },
{ "case": 1, "effect": { "run_eocs": "EOC_perk_blood_drinking_heal_arm_r" } },
{ "case": 2, "effect": { "run_eocs": "EOC_perk_blood_drinking_heal_leg_l" } },
{ "case": 3, "effect": { "run_eocs": "EOC_perk_blood_drinking_heal_leg_r" } },
{ "case": 4, "effect": { "run_eocs": "EOC_perk_blood_drinking_heal_torso" } },
{ "case": 5, "effect": { "run_eocs": "EOC_perk_blood_drinking_heal_head" } }
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_blood_drinking_heal_arm_l",
"condition": { "math": [ "u_hp('arm_l')", "<", "u_hp_max('arm_l')" ] },
"effect": [ { "math": [ "u_hp('arm_l')", "+=", "2" ] } ],
"false_effect": [ { "run_eocs": "EOC_perk_blood_drinking_heal_hp_check" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_blood_drinking_heal_arm_r",
"condition": { "math": [ "u_hp('arm_r')", "<", "u_hp_max('arm_r')" ] },
"effect": [ { "math": [ "u_hp('arm_r')", "+=", "2" ] } ],
"false_effect": [ { "run_eocs": "EOC_perk_blood_drinking_heal_hp_check" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_blood_drinking_heal_leg_l",
"condition": { "math": [ "u_hp('leg_l')", "<", "u_hp_max('leg_l')" ] },
"effect": [ { "math": [ "u_hp('leg_l')", "+=", "2" ] } ],
"false_effect": [ { "run_eocs": "EOC_perk_blood_drinking_heal_hp_check" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_blood_drinking_heal_leg_r",
"condition": { "math": [ "u_hp('leg_r')", "<", "u_hp_max('leg_r')" ] },
"effect": [ { "math": [ "u_hp('leg_r')", "+=", "2" ] } ],
"false_effect": [ { "run_eocs": "EOC_perk_blood_drinking_heal_hp_check" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_blood_drinking_heal_torso",
"condition": { "math": [ "u_hp('torso')", "<", "u_hp_max('torso')" ] },
"effect": [ { "math": [ "u_hp('torso')", "+=", "2" ] } ],
"false_effect": [ { "run_eocs": "EOC_perk_blood_drinking_heal_hp_check" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_perk_blood_drinking_heal_head",
"condition": { "math": [ "u_hp('head')", "<", "u_hp_max('head')" ] },
"effect": [ { "math": [ "u_hp('head')", "+=", "2" ] } ],
"false_effect": [ { "run_eocs": "EOC_perk_blood_drinking_heal_hp_check" } ]
}
]
41 changes: 41 additions & 0 deletions data/mods/BombasticPerks/perkmenu.json
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,47 @@
],
"topic": "TALK_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "perk_blood_drinker" } },
"text": "Gain [<trait_name:perk_blood_drinker>]",
"effect": [
{ "set_string_var": "<trait_name:perk_blood_drinker>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_blood_drinker>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_blood_drinker", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must not have the Squeamish, Meat Intolerance, Herbivore, or Vegan traits.",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": { "not": { "u_has_any_trait": [ "SQUEAMISH", "VEGETARIAN", "HERBIVORE", "VEGAN" ] } }
}
],
"topic": "TALK_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "perk_blood_drinking_heal" } },
"text": "Gain [<trait_name:perk_blood_drinking_heal>]",
"effect": [
{ "set_string_var": "<trait_name:perk_blood_drinking_heal>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_blood_drinking_heal>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_blood_drinking_heal", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must have <trait_name:perk_blood_drinker>.",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{ "set_condition": "perk_condition", "condition": { "u_has_trait": "perk_blood_drinker" } }
],
"topic": "TALK_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "perk_long_shot" } },
"text": "Gain [<trait_name:perk_long_shot>]",
Expand Down
17 changes: 17 additions & 0 deletions data/mods/BombasticPerks/perks.json
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,23 @@
"processed_eocs": [ "EOC_troubleseeking" ],
"time": 20000
},
{
"type": "mutation",
"id": "perk_blood_drinker",
"name": { "str": "Hemophage" },
"points": 0,
"description": "You do not drink…wine. You are immune to the negative consequences of drinking blood, such as parasitic infection.",
"category": [ "perk" ],
"flags": [ "HEMOVORE" ]
},
{
"type": "mutation",
"id": "perk_blood_drinking_heal",
"name": { "str": "The Blood is the Life" },
"points": 0,
"description": "Drinking blood makes you feel really good. REALLY good. So good that all your aches and pains just seem to fade away. Every time you drink blood, you heal a bit of damage and lose a bit of pain.",
"category": [ "perk" ]
},
{
"type": "mutation",
"id": "perk_popeye",
Expand Down

0 comments on commit ebb053e

Please sign in to comment.