Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Standing-Storm committed Apr 9, 2024
1 parent 2c47a81 commit dd092e5
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
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",
"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

0 comments on commit dd092e5

Please sign in to comment.