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

[Bombastic Perks] Add more perks #72940

Merged
merged 9 commits into from
Apr 11, 2024
58 changes: 58 additions & 0 deletions data/mods/BombasticPerks/perkdata/grit_your_teeth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[
{
"type": "effect_type",
"id": "effect_perk_grit_your_teeth_cooldown",
"//": "No name or description to hide effect",
"name": [ "" ],
"desc": [ "" ],
"rating": "bad"
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_GRIT_YOUR_TEETH",
"condition": { "not": { "u_has_effect": "effect_perk_grit_your_teeth_cooldown" } },
"effect": [
{ "math": [ "u_grit_your_teeth_pain_value", "=", "u_pain()" ] },
{
"u_add_effect": "effect_perk_grit_your_teeth_cooldown",
"duration": { "math": [ "u_grit_your_teeth_pain_value * 60" ] }
},
{ "run_eocs": "EOC_PERK_GRIT_YOUR_TEETH_2" }
],
"false_effect": [ { "u_message": "You need more time to collect yourself before you can grit your teeth again.", "type": "mixed" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_GRIT_YOUR_TEETH_2",
"condition": { "math": [ "u_grit_your_teeth_pain_value", ">=", "62" ] },
"effect": [
{ "math": [ "u_grit_your_teeth_pain_value_removed", "=", "u_pain() / 2" ] },
{ "math": [ "u_pain()", "-=", "u_grit_your_teeth_pain_value_removed" ] },
{ "queue_eocs": "EOC_PERK_GRIT_YOUR_TEETH_DEACTIVATE", "time_in_future": 180 }
],
"false_effect": [
{
"run_eocs": {
"id": "EOC_PERK_GRIT_YOUR_TEETH_3",
"condition": { "math": [ "u_grit_your_teeth_pain_value", ">=", "30" ] },
"effect": [
{ "math": [ "u_grit_your_teeth_pain_value_removed", "=", "30" ] },
{ "math": [ "u_pain()", "-=", "u_grit_your_teeth_pain_value_removed" ] },
{ "queue_eocs": "EOC_PERK_GRIT_YOUR_TEETH_DEACTIVATE", "time_in_future": 180 }
],
"false_effect": [
{ "math": [ "u_grit_your_teeth_pain_value_removed", "=", "u_pain()" ] },
{ "math": [ "u_pain()", "==", "0" ] },

Check failure on line 45 in data/mods/BombasticPerks/perkdata/grit_your_teeth.json

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

(all_mods)=> Comparison operators can only be used in conditional statements "false_effect": [ { "math": [ "u_grit_your_teeth_pain_value_removed", "=", "u_pain()" ] }, { "math": [ "u_pain()", "==", "0" ] }, ▲▲▲ { "queue_eocs": "EOC_PERK_GRIT_YOUR_TEETH_DEACTIVATE", "time_in_future": 180 } ]
{ "queue_eocs": "EOC_PERK_GRIT_YOUR_TEETH_DEACTIVATE", "time_in_future": 180 }
]
}
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_GRIT_YOUR_TEETH_DEACTIVATE",
"condition": { "u_has_effect": "effect_perk_grit_your_teeth_cooldown" },
"effect": [ { "math": [ "u_pain()", "+=", "u_grit_your_teeth_pain_value_removed" ] } ]
}
]
24 changes: 24 additions & 0 deletions data/mods/BombasticPerks/perkmenu.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,30 @@
],
"topic": "TALK_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "perk_grit_your_teeth" } },
"text": "Gain [<trait_name:perk_grit_your_teeth>]",
"effect": [
{ "set_string_var": "<trait_name:perk_grit_your_teeth>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_grit_your_teeth>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_grit_your_teeth", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must have the Built Tough perk./n/nMust not have the Pain Sensitive, Hyperalgesia, or Extreme Hyperalgesia Traits",
Standing-Storm marked this conversation as resolved.
Show resolved Hide resolved
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": {
"and": [ { "u_has_trait": "perk_built_tough" }, { "not": { "u_has_any_trait": [ "MORE_PAIN", "MORE_PAIN2", "MORE_PAIN3" ] } } ]
}
}
],
"topic": "TALK_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "perk_recycler" } },
"text": "Gain [<trait_name:perk_recycler>]",
Expand Down
11 changes: 11 additions & 0 deletions data/mods/BombasticPerks/perks.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,17 @@
"category": [ "perk" ],
"enchantments": [ { "condition": "ALWAYS", "values": [ { "value": "FALL_DAMAGE", "multiply": -0.4 } ] } ]
},
{
"type": "mutation",
"id": "perk_grit_your_teeth",
"name": { "str": "Grit Your Teeth" },
"points": 0,
"description": "When you have to you can wipe the blood off your chin, grit your teeth, and get it done. Use to reduce your pain by 30 or half (whichever is greater) for 3 minutes.\n\nThe cooldown on this perk scales based on your pain at the time you used it.",
"category": [ "perk" ],
"active": true,
"activated_is_setup": true,
"activated_eocs": [ "EOC_PERK_GRIT_YOUR_TEETH" ]
},
{
"type": "mutation",
"id": "perk_surgical_strikes",
Expand Down