Skip to content

Commit 1b07f7d

Browse files
[Bombastic Perks] Add more perks (#82893)
* Initial commit * Add Second Chance * Fix error, second chance gives back stamina too * Extra perks * Fixes
1 parent a6368f0 commit 1b07f7d

File tree

6 files changed

+298
-2
lines changed

6 files changed

+298
-2
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[
2+
{
3+
"type": "effect_on_condition",
4+
"id": "EOC_PERK_PERCUSSIVE_ENTRY_SMASHING",
5+
"eoc_type": "EVENT",
6+
"required_event": "character_smashes_tile",
7+
"condition": { "u_has_trait": "perk_percussive_entry" },
8+
"effect": [ { "u_add_effect": "effect_perk_percussive_entry", "duration": 2 } ]
9+
},
10+
{
11+
"type": "effect_type",
12+
"id": "effect_perk_percussive_entry",
13+
"name": [ "" ],
14+
"desc": [ "" ],
15+
"max_intensity": 100,
16+
"int_add_val": 3,
17+
"enchantments": [
18+
{
19+
"values": [
20+
{ "value": "STRENGTH", "multiply": { "math": [ "0 + (u_effect_intensity('effect_perk_percussive_entry') / 100 )" ] } }
21+
]
22+
}
23+
]
24+
},
25+
{
26+
"type": "effect_on_condition",
27+
"id": "EOC_PERK_PERCUSSIVE_ENTRY_LOSE_BONUS_WHEN_MOVING",
28+
"eoc_type": "EVENT",
29+
"required_event": "avatar_moves",
30+
"condition": { "u_has_effect": "effect_perk_percussive_entry" },
31+
"effect": [ { "u_lose_effect": "effect_perk_percussive_entry" } ]
32+
}
33+
]
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[
2+
{
3+
"type": "mutation",
4+
"id": "perk_second_chance_limiter",
5+
"name": { "str": "Second Chance Limiter", "//~": "NO_I18N" },
6+
"points": 0,
7+
"purifiable": false,
8+
"valid": false,
9+
"player_display": false,
10+
"description": { "str": "You used up your second chance perk and it won't work again.", "//~": "NO_I18N" }
11+
},
12+
{
13+
"type": "effect_on_condition",
14+
"id": "EOC_PERK_SECOND_CHANCE_PREVENTION",
15+
"eoc_type": "PREVENT_DEATH",
16+
"condition": { "and": [ { "u_has_trait": "perk_second_chance" }, { "not": { "u_has_trait": "perk_second_chance_limiter" } } ] },
17+
"effect": [
18+
{ "u_message": "As the wounds overtake you, you feel a surge of inner strength.", "popup": true },
19+
{ "run_eocs": [ "EOC_PERK_SECOND_CHANCE_PREVENTION_ACTIVATE" ] }
20+
]
21+
},
22+
{
23+
"type": "effect_on_condition",
24+
"id": "EOC_PERK_SECOND_CHANCE_PREVENTION_ACTIVATE",
25+
"condition": { "u_has_trait": "perk_second_chance" },
26+
"effect": [
27+
{ "math": [ "u_pain() = 0" ] },
28+
{ "math": [ "u_hp('ALL_MINOR') = 999" ] },
29+
{ "math": [ "u_hp('torso') = max( u_hp('torso'), 10)" ] },
30+
{ "math": [ "u_hp('head') = max( u_hp('head'), 10)" ] },
31+
{ "math": [ "u_hp('arm_l') = max( u_hp('arm_l'), 10)" ] },
32+
{ "math": [ "u_hp('arm_r') = max( u_hp('arm_r'), 10)" ] },
33+
{ "math": [ "u_hp('leg_l') = max( u_hp('leg_l'), 10)" ] },
34+
{ "math": [ "u_hp('leg_r') = max( u_hp('leg_r'), 10)" ] },
35+
{ "u_lose_effect": [ "onfire", "dazed", "downed", "bleed", "blind", "deaf", "stunned" ] },
36+
{ "u_add_trait": "perk_second_chance_limiter" },
37+
{ "u_add_effect": "effect_perk_second_chance", "duration": 5 }
38+
]
39+
},
40+
{
41+
"type": "effect_type",
42+
"id": "effect_perk_second_chance",
43+
"name": [ "Surge of Energy" ],
44+
"desc": [ "You are filled with vitality!" ],
45+
"remove_message": "Your surge of vitality fades away!",
46+
"max_duration": "5 s",
47+
"max_intensity": 5,
48+
"int_dur_factor": "1 s",
49+
"rating": "good",
50+
"removes_effects": [ "dazed", "downed", "bleed", "blind", "deaf", "stunned" ],
51+
"enchantments": [
52+
{
53+
"condition": "ALWAYS",
54+
"values": [
55+
{ "value": "EVASION", "add": 1 },
56+
{ "value": "CLIMATE_CONTROL_HEAT", "add": 2000 },
57+
{ "value": "CLIMATE_CONTROL_CHILL", "add": 2000 }
58+
]
59+
}
60+
],
61+
"scaling_mods": { "stamina_min": [ 2000 ], "stamina_max": [ 4500 ], "stamina_chance": [ 1 ] },
62+
"flags": [ "PAIN_IMMUNE" ]
63+
}
64+
]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[
2+
{
3+
"type": "effect_on_condition",
4+
"id": "EOC_PERK_SLIPPERY_ESCAPE",
5+
"effect": [
6+
{ "math": [ "u_pain() += rand(4) + 2" ] },
7+
{ "u_lose_effect": "grabbed" },
8+
{ "u_add_effect": "effect_perk_slippery_escape", "duration": 1 }
9+
]
10+
},
11+
{
12+
"type": "effect_type",
13+
"id": "effect_perk_slippery_escape",
14+
"//": "Hidden effect, blocks grab for one turn.",
15+
"name": [ "" ],
16+
"desc": [ "" ],
17+
"removes_effects": [ "grabbed" ]
18+
}
19+
]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[
2+
{
3+
"type": "effect_type",
4+
"id": "effect_perk_twice_shy",
5+
"name": [ "Twice Shy" ],
6+
"desc": [ "That first time really smarts. +2 effective dodge, +1 dodge attempt." ],
7+
"rating": "good",
8+
"int_dur_factor": "1 s",
9+
"max_duration": "5 s",
10+
"show_in_info": true,
11+
"enchantments": [ { "condition": "ALWAYS", "values": [ { "value": "BONUS_DODGE", "add": 1 }, { "value": "DODGE_CHANCE", "add": 2 } ] } ]
12+
},
13+
{
14+
"type": "effect_on_condition",
15+
"id": "EOC_PERK_TWICE_SHY_TAKE_DAMAGE",
16+
"eoc_type": "EVENT",
17+
"required_event": "character_takes_damage",
18+
"condition": { "u_has_trait": "perk_twice_shy" },
19+
"effect": [ { "u_add_effect": "effect_perk_twice_shy", "duration": "5 seconds" } ]
20+
}
21+
]

data/mods/BombasticPerks/perkmenu.json

Lines changed: 111 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,34 @@
240240
],
241241
"topic": "TALK_PERK_MENU_SELECT"
242242
},
243+
{
244+
"condition": { "not": { "u_has_trait": "perk_percussive_entry" } },
245+
"text": "Gain [<trait_name:perk_percussive_entry>]",
246+
"effect": [
247+
{ "set_string_var": "<trait_name:perk_percussive_entry>", "target_var": { "context_val": "trait_name" } },
248+
{
249+
"set_string_var": "<trait_description:perk_percussive_entry>",
250+
"target_var": { "context_val": "trait_description" }
251+
},
252+
{ "set_string_var": "perk_percussive_entry", "target_var": { "context_val": "trait_id" } },
253+
{
254+
"set_string_var": "Requires strength 12, the <trait_name:perk_STR_UP_2> perk, or the <trait_name:perk_way_closedfist> perk.",
255+
"target_var": { "context_val": "trait_requirement_description" },
256+
"i18n": true
257+
},
258+
{
259+
"set_condition": "perk_condition",
260+
"condition": {
261+
"or": [
262+
{ "math": [ "u_val('strength_base') + u_val('strength_bonus') >= 12" ] },
263+
{ "u_has_trait": "perk_STR_UP_2" },
264+
{ "u_has_trait": "perk_way_closedfist" }
265+
]
266+
}
267+
}
268+
],
269+
"topic": "TALK_PERK_MENU_SELECT"
270+
},
243271
{
244272
"condition": { "not": { "u_has_trait": "perk_holdout_pocket" } },
245273
"text": "Gain [<trait_name:perk_holdout_pocket>]",
@@ -566,6 +594,25 @@
566594
],
567595
"topic": "TALK_PERK_MENU_SELECT"
568596
},
597+
{
598+
"condition": { "not": { "u_has_trait": "perk_animal_friend" } },
599+
"text": "Gain [<trait_name:perk_animal_friend>]",
600+
"effect": [
601+
{ "set_string_var": "<trait_name:perk_animal_friend>", "target_var": { "context_val": "trait_name" } },
602+
{
603+
"set_string_var": "<trait_description:perk_animal_friend>",
604+
"target_var": { "context_val": "trait_description" }
605+
},
606+
{ "set_string_var": "perk_animal_friend", "target_var": { "context_val": "trait_id" } },
607+
{
608+
"set_string_var": "No Requirements",
609+
"target_var": { "context_val": "trait_requirement_description" },
610+
"i18n": true
611+
},
612+
{ "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
613+
],
614+
"topic": "TALK_PERK_MENU_SELECT"
615+
},
569616
{
570617
"condition": { "not": { "u_has_trait": "perk_quickdraw" } },
571618
"text": "Gain [<trait_name:perk_quickdraw>]",
@@ -596,11 +643,30 @@
596643
},
597644
{ "set_string_var": "perk_vengeful", "target_var": { "context_val": "trait_id" } },
598645
{
599-
"set_string_var": "No requirements",
646+
"set_string_var": "Cannot have the Twice Shy perk",
600647
"target_var": { "context_val": "trait_requirement_description" },
601648
"i18n": true
602649
},
603-
{ "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
650+
{ "set_condition": "perk_condition", "condition": { "not": { "u_has_trait": "perk_twice_shy" } } }
651+
],
652+
"topic": "TALK_PERK_MENU_SELECT"
653+
},
654+
{
655+
"condition": { "not": { "u_has_trait": "perk_twice_shy" } },
656+
"text": "Gain [<trait_name:perk_twice_shy>]",
657+
"effect": [
658+
{ "set_string_var": "<trait_name:perk_twice_shy>", "target_var": { "context_val": "trait_name" } },
659+
{
660+
"set_string_var": "<trait_description:perk_twice_shy>",
661+
"target_var": { "context_val": "trait_description" }
662+
},
663+
{ "set_string_var": "perk_twice_shy", "target_var": { "context_val": "trait_id" } },
664+
{
665+
"set_string_var": "Cannot have the Vengeful perk",
666+
"target_var": { "context_val": "trait_requirement_description" },
667+
"i18n": true
668+
},
669+
{ "set_condition": "perk_condition", "condition": { "not": { "u_has_trait": "perk_vengeful" } } }
604670
],
605671
"topic": "TALK_PERK_MENU_SELECT"
606672
},
@@ -769,6 +835,30 @@
769835
],
770836
"topic": "TALK_PERK_MENU_SELECT"
771837
},
838+
{
839+
"condition": { "not": { "u_has_trait": "perk_slippery_escape" } },
840+
"text": "Gain [<trait_name:perk_slippery_escape>]",
841+
"effect": [
842+
{ "set_string_var": "<trait_name:perk_slippery_escape>", "target_var": { "context_val": "trait_name" } },
843+
{
844+
"set_string_var": "<trait_description:perk_slippery_escape>",
845+
"target_var": { "context_val": "trait_description" }
846+
},
847+
{ "set_string_var": "perk_slippery_escape", "target_var": { "context_val": "trait_id" } },
848+
{
849+
"set_string_var": "Must have the <trait_name:perk_DEX_UP_2> perk or dexterity 12",
850+
"target_var": { "context_val": "trait_requirement_description" },
851+
"i18n": true
852+
},
853+
{
854+
"set_condition": "perk_condition",
855+
"condition": {
856+
"or": [ { "math": [ "u_val('dexterity_base') + u_val('dexterity_bonus') >= 12" ] }, { "u_has_trait": "perk_DEX_UP_2" } ]
857+
}
858+
}
859+
],
860+
"topic": "TALK_PERK_MENU_SELECT"
861+
},
772862
{
773863
"condition": { "not": { "u_has_trait": "perk_jumpy" } },
774864
"text": "Gain [<trait_name:perk_jumpy>]",
@@ -1562,6 +1652,25 @@
15621652
],
15631653
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
15641654
},
1655+
{
1656+
"condition": { "not": { "u_has_trait": "perk_second_chance" } },
1657+
"text": "Gain [<trait_name:perk_second_chance>]",
1658+
"effect": [
1659+
{ "set_string_var": "<trait_name:perk_second_chance>", "target_var": { "context_val": "trait_name" } },
1660+
{
1661+
"set_string_var": "<trait_description:perk_second_chance>",
1662+
"target_var": { "context_val": "trait_description" }
1663+
},
1664+
{ "set_string_var": "perk_second_chance", "target_var": { "context_val": "trait_id" } },
1665+
{
1666+
"set_string_var": "No Requirements",
1667+
"target_var": { "context_val": "trait_requirement_description" },
1668+
"i18n": true
1669+
},
1670+
{ "set_condition": "perk_condition", "condition": { "math": [ "0 == 0" ] } }
1671+
],
1672+
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
1673+
},
15651674
{
15661675
"condition": { "not": { "u_has_trait": "perk_skeleton" } },
15671676
"text": "Gain [<trait_name:perk_skeleton>]",

data/mods/BombasticPerks/perks.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@
145145
"description": "Your sharp gazes misses little. +25% to Vision and Night Vision limb scores.",
146146
"enchantments": [ { "condition": "ALWAYS", "ench_effects": [ { "effect": "effect_perk_eagle_eyes", "intensity": 1 } ] } ]
147147
},
148+
{
149+
"type": "mutation",
150+
"id": "perk_percussive_entry",
151+
"name": { "str": "Percussive Entry" },
152+
"points": 0,
153+
"purifiable": false,
154+
"valid": false,
155+
"description": "If one kick doesn't open the door, just try another. Or a few more. How about another dozen or so? You can up to double your strength for the purposes of smashing terrain; this bonus gradually increases over the course of multiple smashes."
156+
},
148157
{
149158
"type": "mutation",
150159
"id": "perk_holdout_pocket",
@@ -271,6 +280,16 @@
271280
"description": "Practicing with handguns has improved your draw speed with pretty much everything. Retrieve objects 25% faster from containers.",
272281
"enchantments": [ { "values": [ { "value": "OBTAIN_COST_MULTIPLIER", "multiply": -0.25 } ] } ]
273282
},
283+
{
284+
"type": "mutation",
285+
"id": "perk_animal_friend",
286+
"name": { "str": "Animal Friend" },
287+
"points": 0,
288+
"purifiable": false,
289+
"valid": false,
290+
"description": "Even with everything that's happened, you still find solace in nature. Natural animals are less likely to attack you.",
291+
"flags": [ "ANIMALEMPATH" ]
292+
},
274293
{
275294
"type": "mutation",
276295
"id": "perk_vengeful",
@@ -281,6 +300,15 @@
281300
"description": "Oh, they're not getting away with THAT. You do +15% damage for two turns after you're hit.",
282301
"enchantments": [ "perk_ench_vengeful" ]
283302
},
303+
{
304+
"type": "mutation",
305+
"id": "perk_twice_shy",
306+
"name": { "str": "Twice Shy" },
307+
"points": 0,
308+
"purifiable": false,
309+
"valid": false,
310+
"description": "Pain is really painful; best to avoid it. For five turns after you are hit, you gain +1 bonus dodge and +2 dodge skill."
311+
},
284312
{
285313
"type": "mutation",
286314
"id": "perk_undying_loyalty",
@@ -345,6 +373,19 @@
345373
"activated_is_setup": false,
346374
"activated_eocs": [ "EOC_PERK_GRIT_YOUR_TEETH" ]
347375
},
376+
{
377+
"type": "mutation",
378+
"id": "perk_slippery_escape",
379+
"name": { "str": "Slippery Escape" },
380+
"points": 0,
381+
"purifiable": false,
382+
"valid": false,
383+
"description": "Your joints are flexible enough that you can twist out of nearly anything when given a mind, though that doesn't make it hurt any less. At the cost of some pain, you can twist out of enemy grabs.",
384+
"active": true,
385+
"activated_is_setup": false,
386+
"activation_msg": "You twist out of the grab with a wrench!",
387+
"activated_eocs": [ "EOC_PERK_SLIPPERY_ESCAPE" ]
388+
},
348389
{
349390
"type": "mutation",
350391
"id": "perk_surgical_strikes",
@@ -973,6 +1014,15 @@
9731014
{ "condition": { "and": [ "is_day", "u_is_outside" ] }, "values": [ { "value": "PERCEPTION", "add": -2 } ] }
9741015
]
9751016
},
1017+
{
1018+
"type": "mutation",
1019+
"id": "perk_second_chance",
1020+
"name": { "str": "Second Chance" },
1021+
"points": 0,
1022+
"purifiable": false,
1023+
"valid": false,
1024+
"description": "Something is watching over you, though whether for good or ill you cannot tell. The first time you suffer fatal damage, you will heal slightly, remove all pain, and gain a speed bonus, temperature immunity, and immunity to damage for a very short time. After that expires, though, you're on your own to resolve whatever problem you're in. This perk <color_red>only works once</color>."
1025+
},
9761026
{
9771027
"type": "mutation",
9781028
"id": "perk_ascetic_empowerment",

0 commit comments

Comments
 (0)