From 9819962dc102fa017f637d3e5e932a9b94d9a04f Mon Sep 17 00:00:00 2001 From: Standing-Storm <120433252+Standing-Storm@users.noreply.github.com> Date: Thu, 11 Apr 2024 11:03:29 -0500 Subject: [PATCH] [Bombastic Perks] Add more perks (#72940) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial commit * Add ARMOR_ALL to Built Tough * Update data/mods/BombasticPerks/perkmenu.json Co-authored-by: Jianxiang Wang (王健翔) * 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 (王健翔) --- .../perkdata/grit_your_teeth.json | 67 +++++++++++ .../BombasticPerks/perkdata/moonstruck.json | 109 ++++++++++++++++++ .../perkdata/undying_loyalty.json | 61 ++++++++++ data/mods/BombasticPerks/perkmenu.json | 89 ++++++++++++++ data/mods/BombasticPerks/perks.json | 99 +++++++++++++--- 5 files changed, 408 insertions(+), 17 deletions(-) create mode 100644 data/mods/BombasticPerks/perkdata/grit_your_teeth.json create mode 100644 data/mods/BombasticPerks/perkdata/moonstruck.json create mode 100644 data/mods/BombasticPerks/perkdata/undying_loyalty.json diff --git a/data/mods/BombasticPerks/perkdata/grit_your_teeth.json b/data/mods/BombasticPerks/perkdata/grit_your_teeth.json new file mode 100644 index 0000000000000..a5e5860d334f9 --- /dev/null +++ b/data/mods/BombasticPerks/perkdata/grit_your_teeth.json @@ -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" } ] + } +] diff --git a/data/mods/BombasticPerks/perkdata/moonstruck.json b/data/mods/BombasticPerks/perkdata/moonstruck.json new file mode 100644 index 0000000000000..37e184e6ac3d4 --- /dev/null +++ b/data/mods/BombasticPerks/perkdata/moonstruck.json @@ -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" } + ] + } + } + } + } + } + ] + } + } +] diff --git a/data/mods/BombasticPerks/perkdata/undying_loyalty.json b/data/mods/BombasticPerks/perkdata/undying_loyalty.json new file mode 100644 index 0000000000000..e4368bbf80407 --- /dev/null +++ b/data/mods/BombasticPerks/perkdata/undying_loyalty.json @@ -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 } ] } ] + } +] diff --git a/data/mods/BombasticPerks/perkmenu.json b/data/mods/BombasticPerks/perkmenu.json index 1523d476a5d56..d9f8a0e4d6137 100644 --- a/data/mods/BombasticPerks/perkmenu.json +++ b/data/mods/BombasticPerks/perkmenu.json @@ -502,6 +502,33 @@ ], "topic": "TALK_PERK_MENU_SELECT" }, + { + "condition": { "not": { "u_has_trait": "perk_undying_loyalty" } }, + "text": "Gain []", + "effect": [ + { "set_string_var": "", "target_var": { "context_val": "trait_name" } }, + { + "set_string_var": "", + "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 []", @@ -521,6 +548,30 @@ ], "topic": "TALK_PERK_MENU_SELECT" }, + { + "condition": { "not": { "u_has_trait": "perk_grit_your_teeth" } }, + "text": "Gain []", + "effect": [ + { "set_string_var": "", "target_var": { "context_val": "trait_name" } }, + { + "set_string_var": "", + "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 []", @@ -613,6 +664,25 @@ ], "topic": "TALK_PERK_MENU_SELECT" }, + { + "condition": { "not": { "u_has_trait": "perk_non_combatant" } }, + "text": "Gain []", + "effect": [ + { "set_string_var": "", "target_var": { "context_val": "trait_name" } }, + { + "set_string_var": "", + "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 []", @@ -922,6 +992,25 @@ ], "topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE" }, + { + "condition": { "not": { "u_has_trait": "perk_moonstruck" } }, + "text": "Gain []", + "effect": [ + { "set_string_var": "", "target_var": { "context_val": "trait_name" } }, + { + "set_string_var": "", + "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 []", diff --git a/data/mods/BombasticPerks/perks.json b/data/mods/BombasticPerks/perks.json index dd78481cdb7bb..163f1ed689b3c 100644 --- a/data/mods/BombasticPerks/perks.json +++ b/data/mods/BombasticPerks/perks.json @@ -109,22 +109,7 @@ "points": 0, "description": "You're like a walking tank! Take 5% less damage from all sources.", "category": [ "perk" ], - "enchantments": [ - { - "condition": "ALWAYS", - "values": [ - { "value": "ARMOR_ACID", "multiply": -0.05 }, - { "value": "ARMOR_BASH", "multiply": -0.05 }, - { "value": "ARMOR_BIO", "multiply": -0.05 }, - { "value": "ARMOR_BULLET", "multiply": -0.05 }, - { "value": "ARMOR_COLD", "multiply": -0.05 }, - { "value": "ARMOR_CUT", "multiply": -0.05 }, - { "value": "ARMOR_ELEC", "multiply": -0.05 }, - { "value": "ARMOR_HEAT", "multiply": -0.05 }, - { "value": "ARMOR_STAB", "multiply": -0.05 } - ] - } - ] + "enchantments": [ { "condition": "ALWAYS", "values": [ { "value": "ARMOR_ALL", "multiply": -0.05 } ] } ] }, { "type": "mutation", @@ -223,6 +208,17 @@ "category": [ "perk" ], "enchantments": [ "perk_ench_vengeful" ] }, + { + "type": "mutation", + "id": "perk_undying_loyalty", + "name": { + "//~": "This is a pun, based on undying literally meaning 'does not die' but also the figurative meaning of an emotion that lasts forever.", + "str": "Undying Loyalty" + }, + "points": 0, + "description": "You inspire your allies to protect you when you're seriously injured. If attacked when your head or torso health are at 50% or lower, all allies within 15 meters will take 20% reduced damage for one minute. This effect can only trigger once every five minutes.", + "category": [ "perk" ] + }, { "type": "mutation", "id": "perk_tuck_and_roll", @@ -232,6 +228,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": false, + "activated_eocs": [ "EOC_PERK_GRIT_YOUR_TEETH" ] + }, { "type": "mutation", "id": "perk_surgical_strikes", @@ -322,6 +329,56 @@ "category": [ "perk" ], "enchantments": [ { "condition": "ALWAYS", "values": [ { "value": "LEARNING_FOCUS", "add": 5.0 } ] } ] }, + { + "type": "mutation", + "id": "perk_non_combatant", + "name": { "str": "Non-Combatant" }, + "points": 0, + "description": "Hey, that's against the Geneva Convention! When not wielding a weapon, or object that could be used as an improvised weapon, you take -15% reduced damage.", + "category": [ "perk" ], + "//": "u_has_weapon checks if you're wielding ANYTHNG, not a weapon specifically, hence the long condition below.", + "enchantments": [ + { + "condition": { + "and": [ + { "not": { "u_has_wielded_with_weapon_category": "AUTOMATIC_PISTOLS" } }, + { "not": { "u_has_wielded_with_weapon_category": "SHIVS" } }, + { "not": { "u_has_wielded_with_weapon_category": "QUARTERSTAVES" } }, + { "not": { "u_has_wielded_with_weapon_category": "HOOKING_WEAPONRY" } }, + { "not": { "u_has_wielded_with_weapon_category": "AUTOMATIC_RIFLES" } }, + { "not": { "u_has_wielded_with_weapon_category": "KNIVES" } }, + { "not": { "u_has_wielded_with_weapon_category": "MEDIUM_SWORDS" } }, + { "not": { "u_has_wielded_with_weapon_category": "GREAT_HAMMERS" } }, + { "not": { "u_has_wielded_with_weapon_category": "GREAT_AXES" } }, + { "not": { "u_has_wielded_with_weapon_category": "MACES" } }, + { "not": { "u_has_wielded_with_weapon_category": "SPEARS" } }, + { "not": { "u_has_wielded_with_weapon_category": "FENCING_WEAPONRY" } }, + { "not": { "u_has_wielded_with_weapon_category": "LONG_SWORDS" } }, + { "not": { "u_has_wielded_with_weapon_category": "GREAT_SWORDS" } }, + { "not": { "u_has_wielded_with_weapon_category": "BIONIC_WEAPONRY" } }, + { "not": { "u_has_wielded_with_weapon_category": "SHORT_SWORDS" } }, + { "not": { "u_has_wielded_with_weapon_category": "HAND_AXES" } }, + { "not": { "u_has_wielded_with_weapon_category": "BATONS" } }, + { "not": { "u_has_wielded_with_weapon_category": "FLAILS" } }, + { "not": { "u_has_wielded_with_weapon_category": "POLEARMS" } }, + { "not": { "u_has_wielded_with_weapon_category": "LONG_THRUSTING_SWORDS" } }, + { "not": { "u_has_wielded_with_weapon_category": "BIONIC_SWORDS" } }, + { "not": { "u_has_wielded_with_flag": "OLD_GUN" } }, + { "not": { "u_has_wielded_with_flag": "NEVER_JAMS" } }, + { "not": { "u_has_wielded_with_flag": "NON_FOULING" } }, + { "not": { "u_has_wielded_with_flag": "RELOAD_AND_SHOOT" } }, + { "not": { "u_has_wielded_with_flag": "RELOAD_EJECT" } }, + { "not": { "u_has_wielded_with_flag": "RELOAD_ONE" } }, + { "not": { "u_has_wielded_with_flag": "STR_DRAW" } }, + { "not": { "u_has_wielded_with_flag": "DURABLE_MELEE" } }, + { "not": { "u_has_wielded_with_flag": "BIONIC_WEAPON" } }, + { "not": { "u_has_wielded_with_flag": "POLEARM" } } + ] + }, + "values": [ { "value": "ARMOR_ALL", "multiply": -0.25 } ] + } + ] + }, { "type": "mutation", "id": "perk_recycler", @@ -365,7 +422,7 @@ "id": "perk_frakenstein", "name": { "str": "Playing God" }, "points": 0, - "description": "You've been dissecting critters since high school. Last night a voice gave you an idea for how to bring them back to life activate the perk to gain insight into the nature of life itself!", + "description": "You've been dissecting critters since high school. Last night a voice gave you an idea for how to bring them back to life. Activate the perk to gain insight into the nature of life itself!", "category": [ "perk" ], "active": true, "activated_eocs": [ "EOC_frankenstein_insight" ] @@ -575,6 +632,14 @@ { "condition": { "u_has_wielded_with_flag": "OLD_GUN" }, "values": [ { "value": "RANGED_DAMAGE", "multiply": 0.25 } ] } ] }, + { + "type": "mutation", + "id": "perk_moonstruck", + "name": { "str": "Moonstruck" }, + "points": 0, + "description": "You've always been greatly affected by the phases of the moon. During a full moon, you gain a +3 bonus to all stats. During a waxing moon, you gain a +1 bonus to all stats, and during a new moon, you suffer a -2 penalty to all stats.", + "category": [ "perk" ] + }, { "type": "mutation", "id": "perk_ascetic_empowerment",