Skip to content

Commit

Permalink
[Bombastic Perks] Add more perks (CleverRaven#72940)
Browse files Browse the repository at this point in the history
* Initial commit

* Add ARMOR_ALL to Built Tough

* Update data/mods/BombasticPerks/perkmenu.json

Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>

* Add Undying Loyalty

* Add Non-combatant (now requiring Pacifist)

* Add Moonstruck

* Fixes

* Increase effect of non-combatant due to prerequisite

---------

Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>
  • Loading branch information
Standing-Storm and Qrox authored Apr 11, 2024
1 parent a573b71 commit 9819962
Show file tree
Hide file tree
Showing 5 changed files with 408 additions and 17 deletions.
67 changes: 67 additions & 0 deletions data/mods/BombasticPerks/perkdata/grit_your_teeth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[
{
"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" ] },
{ "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" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_GRIT_YOUR_TEETH_BACKUP_REMOVE",
"eoc_type": "EVENT",
"required_event": "character_wakes_up",
"//": "A backup to remove the cooldown in case the character ends up with a million pain or something.",
"condition": { "u_has_effect": "effect_perk_grit_your_teeth_cooldown" },
"effect": [ { "u_lose_effect": "effect_perk_grit_your_teeth_cooldown" } ]
}
]
109 changes: 109 additions & 0 deletions data/mods/BombasticPerks/perkdata/moonstruck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
[
{
"type": "effect_type",
"id": "effect_perk_moonstruck_full",
"name": [ "Moonstruck: Full Moon" ],
"desc": [ "Under the clear light of the full moon, you have unlocked your greatest potential." ],
"apply_message": "",
"rating": "good",
"max_duration": "1 days",
"enchantments": [
{
"values": [
{ "value": "STRENGTH", "add": 3 },
{ "value": "DEXTERITY", "add": 3 },
{ "value": "INTELLIGENCE", "add": 3 },
{ "value": "PERCEPTION", "add": 3 }
]
}
]
},
{
"type": "effect_type",
"id": "effect_perk_moonstruck_waxing",
"name": [ "Moonstruck: Waxing Moon" ],
"desc": [ "The silver light of the waxing moon enhances your prowess." ],
"apply_message": "",
"rating": "good",
"max_duration": "1 days",
"enchantments": [
{
"values": [
{ "value": "STRENGTH", "add": 1 },
{ "value": "DEXTERITY", "add": 1 },
{ "value": "INTELLIGENCE", "add": 1 },
{ "value": "PERCEPTION", "add": 1 }
]
}
]
},
{
"type": "effect_type",
"id": "effect_perk_moonstruck_new",
"name": [ "Moonstruck: New Moon" ],
"desc": [ "In the dark of the moon, you feel your vital essence weaken." ],
"apply_message": "",
"rating": "bad",
"max_duration": "1 days",
"enchantments": [
{
"values": [
{ "value": "STRENGTH", "add": -2 },
{ "value": "DEXTERITY", "add": -2 },
{ "value": "INTELLIGENCE", "add": -2 },
{ "value": "PERCEPTION", "add": -2 }
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_MOONSTRUCK",
"recurrence": [ "1 hours", "1 hours" ],
"condition": { "u_has_trait": "perk_moonstruck" },
"deactivate_condition": { "not": { "u_has_trait": "perk_moonstruck" } },
"effect": {
"run_eocs": [
{
"id": "EOC_PERK_MOONSTRUCK_2",
"condition": { "math": [ "moon_phase() == 4" ] },
"effect": [
{ "u_lose_effect": "effect_perk_moonstruck_full" },
{ "u_lose_effect": "effect_perk_moonstruck_waxing" },
{ "u_lose_effect": "effect_perk_moonstruck_new" },
{ "u_add_effect": "effect_perk_moonstruck_full", "duration": "2 hours" }
],
"false_effect": {
"run_eocs": {
"id": "EOC_PERK_MOONSTRUCK_3",
"condition": { "and": [ { "math": [ "moon_phase() <= 3" ] }, { "math": [ "moon_phase() >= 1" ] } ] },
"effect": [
{ "u_lose_effect": "effect_perk_moonstruck_full" },
{ "u_lose_effect": "effect_perk_moonstruck_waxing" },
{ "u_lose_effect": "effect_perk_moonstruck_new" },
{ "u_add_effect": "effect_perk_moonstruck_waxing", "duration": "2 hours" }
],
"false_effect": {
"run_eocs": {
"id": "EOC_PERK_MOONSTRUCK_4",
"condition": { "math": [ "moon_phase() == 0" ] },
"effect": [
{ "u_lose_effect": "effect_perk_moonstruck_full" },
{ "u_lose_effect": "effect_perk_moonstruck_waxing" },
{ "u_lose_effect": "effect_perk_moonstruck_new" },
{ "u_add_effect": "effect_perk_moonstruck_new", "duration": "2 hours" }
],
"false_effect": [
{ "u_lose_effect": "effect_perk_moonstruck_full" },
{ "u_lose_effect": "effect_perk_moonstruck_waxing" },
{ "u_lose_effect": "effect_perk_moonstruck_new" }
]
}
}
}
}
}
]
}
}
]
61 changes: 61 additions & 0 deletions data/mods/BombasticPerks/perkdata/undying_loyalty.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[
{
"type": "effect_on_condition",
"id": "EOC_PERK_UNDYING_LOYALTY",
"eoc_type": "EVENT",
"required_event": "character_takes_damage",
"condition": {
"and": [
{ "u_has_trait": "perk_undying_loyalty" },
{ "not": { "u_has_effect": "effect_perk_undying_loyalty_self" } },
{ "not": { "u_has_any_trait": [ "PRED1", "PRED2", "PRED3", "PRED4", "SAPIOVORE" ] } },
{ "math": [ "u_characters_nearby('radius': 15, 'attitude': 'allies')", ">", "0" ] },
{
"or": [
{ "math": [ "u_hp('head') / u_hp_max('head')", "<=", "0.5" ] },
{ "math": [ "u_hp('torso') / u_hp_max('torso')", "<=", "0.5" ] }
]
}
]
},
"effect": [
{ "u_cast_spell": { "id": "perk_undying_loyalty_spell" } },
{ "u_add_effect": "effect_perk_undying_loyalty_self", "duration": "5 minutes" }
]
},
{
"id": "perk_undying_loyalty_spell",
"type": "SPELL",
"name": "Undying Loyalty Spell",
"description": "The spell to activate the Undying Loyalty effect. It's a bug if you have it.",
"valid_targets": [ "ally" ],
"flags": [ "SILENT", "NO_HANDS", "NO_LEGS", "NO_EXPLOSION_SFX" ],
"effect": "attack",
"effect_str": "effect_perk_undying_loyalty",
"shape": "blast",
"difficulty": 1,
"min_duration": 6000,
"max_duration": 6000,
"min_aoe": 15,
"max_aoe": 15
},
{
"type": "effect_type",
"id": "effect_perk_undying_loyalty_self",
"//": "No name or description to hide effect",
"name": [ "" ],
"desc": [ "" ],
"rating": "bad"
},
{
"type": "effect_type",
"id": "effect_perk_undying_loyalty",
"name": [ "Undying Loyalty" ],
"desc": [ "You'll protect your allies no matter the cost." ],
"apply_message": "",
"rating": "good",
"show_in_info": true,
"max_duration": "1 minutes",
"enchantments": [ { "values": [ { "value": "ARMOR_ALL", "multiply": -0.15 } ] } ]
}
]
89 changes: 89 additions & 0 deletions data/mods/BombasticPerks/perkmenu.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,33 @@
],
"topic": "TALK_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "perk_undying_loyalty" } },
"text": "Gain [<trait_name:perk_undying_loyalty>]",
"effect": [
{ "set_string_var": "<trait_name:perk_undying_loyalty>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_undying_loyalty>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_undying_loyalty", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must have the Extrovert or Sociable trait\n\nMust not have the Culler, Hunter, Predator, Apex Predator, or Sapiovore traits.",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": {
"and": [
{ "or": [ { "u_has_trait": "SOCIAL1" }, { "u_has_trait": "SOCIAL2" } ] },
{ "not": { "u_has_any_trait": [ "PRED1", "PRED2", "PRED3", "PRED4", "SAPIOVORE" ] } }
]
}
}
],
"topic": "TALK_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "perk_tuck_and_roll" } },
"text": "Gain [<trait_name:perk_tuck_and_roll>]",
Expand All @@ -521,6 +548,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 Expand Up @@ -613,6 +664,25 @@
],
"topic": "TALK_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "perk_non_combatant" } },
"text": "Gain [<trait_name:perk_non_combatant>]",
"effect": [
{ "set_string_var": "<trait_name:perk_non_combatant>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_non_combatant>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_non_combatant", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must have the Pacifist trait",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{ "set_condition": "perk_condition", "condition": { "u_has_trait": "PACIFIST" } }
],
"topic": "TALK_PERK_MENU_SELECT"
},
{
"condition": { "not": { "u_has_trait": "perk_troubleseeker" } },
"text": "Gain [<trait_name:perk_troubleseeker>]",
Expand Down Expand Up @@ -922,6 +992,25 @@
],
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
},
{
"condition": { "not": { "u_has_trait": "perk_moonstruck" } },
"text": "Gain [<trait_name:perk_moonstruck>]",
"effect": [
{ "set_string_var": "<trait_name:perk_moonstruck>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_moonstruck>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_moonstruck", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "No Requirements",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{ "set_condition": "perk_condition", "condition": { "math": [ "0", "==", "0" ] } }
],
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
},
{
"condition": { "not": { "u_has_trait": "perk_skeleton" } },
"text": "Gain [<trait_name:perk_skeleton>]",
Expand Down
Loading

0 comments on commit 9819962

Please sign in to comment.