Skip to content

Commit

Permalink
[Bombastic Perks] Add Stormwrought line of playstyle perks (#72963)
Browse files Browse the repository at this point in the history
* Initial commit

* Initial commit

* Fixes

* Add u_mutate to cause immediate mutation

* Kick tests

* Raise mutagen amount to allow threshold breaking
  • Loading branch information
Standing-Storm authored Apr 16, 2024
1 parent 4991400 commit 64f6f5f
Show file tree
Hide file tree
Showing 3 changed files with 410 additions and 0 deletions.
152 changes: 152 additions & 0 deletions data/mods/BombasticPerks/perkdata/stormwrought.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
[
{
"type": "effect_on_condition",
"id": "EOC_PERK_PORTAL_STORM_BIRD_MUTATOR",
"recurrence": [ "5 minutes", "30 minutes" ],
"condition": {
"and": [
{
"or": [ { "is_weather": "distant_portal_storm" }, { "is_weather": "portal_storm" }, { "is_weather": "close_portal_storm" } ]
},
{ "u_has_trait": "perk_portal_storm_mutator_bird" },
{ "test_eoc": "EOC_PORTAL_STORM_CONDITION_FLAG_PORTAL_PROOF" },
"u_is_outside",
{ "x_in_y_chance": { "x": 1, "y": 3 } }
]
},
"deactivate_condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_bird" } },
"effect": [
{ "u_message": "Your whole body pulses in time with the raging storm.", "type": "info" },
{ "math": [ "u_vitamin('mutagen_bird')", "+=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "+=", "1000" ] },
{ "u_mutate": 0 },
{ "math": [ "u_vitamin('mutagen_bird')", "-=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_PORTAL_STORM_FELINE_MUTATOR",
"recurrence": [ "5 minutes", "30 minutes" ],
"condition": {
"and": [
{
"or": [ { "is_weather": "distant_portal_storm" }, { "is_weather": "portal_storm" }, { "is_weather": "close_portal_storm" } ]
},
{ "u_has_trait": "perk_portal_storm_mutator_feline" },
{ "test_eoc": "EOC_PORTAL_STORM_CONDITION_FLAG_PORTAL_PROOF" },
"u_is_outside",
{ "x_in_y_chance": { "x": 1, "y": 3 } }
]
},
"deactivate_condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_feline" } },
"effect": [
{ "u_message": "Your whole body pulses in time with the raging storm.", "type": "info" },
{ "math": [ "u_vitamin('mutagen_feline')", "+=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "+=", "1000" ] },
{ "u_mutate": 0 },
{ "math": [ "u_vitamin('mutagen_feline')", "-=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_PORTAL_STORM_INSECT_MUTATOR",
"recurrence": [ "5 minutes", "30 minutes" ],
"condition": {
"and": [
{
"or": [ { "is_weather": "distant_portal_storm" }, { "is_weather": "portal_storm" }, { "is_weather": "close_portal_storm" } ]
},
{ "u_has_trait": "perk_portal_storm_mutator_insect" },
{ "test_eoc": "EOC_PORTAL_STORM_CONDITION_FLAG_PORTAL_PROOF" },
"u_is_outside",
{ "x_in_y_chance": { "x": 1, "y": 3 } }
]
},
"deactivate_condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_insect" } },
"effect": [
{ "u_message": "Your whole body pulses in time with the raging storm.", "type": "info" },
{ "math": [ "u_vitamin('mutagen_insect')", "+=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "+=", "1000" ] },
{ "u_mutate": 0 },
{ "math": [ "u_vitamin('mutagen_insect')", "-=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_PORTAL_STORM_LUPINE_MUTATOR",
"recurrence": [ "5 minutes", "30 minutes" ],
"condition": {
"and": [
{
"or": [ { "is_weather": "distant_portal_storm" }, { "is_weather": "portal_storm" }, { "is_weather": "close_portal_storm" } ]
},
{ "u_has_trait": "perk_portal_storm_mutator_lupine" },
{ "test_eoc": "EOC_PORTAL_STORM_CONDITION_FLAG_PORTAL_PROOF" },
"u_is_outside",
{ "x_in_y_chance": { "x": 1, "y": 3 } }
]
},
"deactivate_condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_lupine" } },
"effect": [
{ "u_message": "Your whole body pulses in time with the raging storm.", "type": "info" },
{ "math": [ "u_vitamin('mutagen_lupine')", "+=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "+=", "1000" ] },
{ "u_mutate": 0 },
{ "math": [ "u_vitamin('mutagen_lupine')", "-=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_PORTAL_STORM_PLANT_MUTATOR",
"recurrence": [ "5 minutes", "30 minutes" ],
"condition": {
"and": [
{
"or": [ { "is_weather": "distant_portal_storm" }, { "is_weather": "portal_storm" }, { "is_weather": "close_portal_storm" } ]
},
{ "u_has_trait": "perk_portal_storm_mutator_plant" },
{ "test_eoc": "EOC_PORTAL_STORM_CONDITION_FLAG_PORTAL_PROOF" },
"u_is_outside",
{ "x_in_y_chance": { "x": 1, "y": 3 } }
]
},
"deactivate_condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_plant" } },
"effect": [
{ "u_message": "Your whole body pulses in time with the raging storm.", "type": "info" },
{ "math": [ "u_vitamin('mutagen_plant')", "+=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "+=", "1000" ] },
{ "u_mutate": 0 },
{ "math": [ "u_vitamin('mutagen_plant')", "-=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_PERK_PORTAL_STORM_SPIDER_MUTATOR",
"recurrence": [ "5 minutes", "30 minutes" ],
"condition": {
"and": [
{
"or": [ { "is_weather": "distant_portal_storm" }, { "is_weather": "portal_storm" }, { "is_weather": "close_portal_storm" } ]
},
{ "u_has_trait": "perk_portal_storm_mutator_spider" },
{ "test_eoc": "EOC_PORTAL_STORM_CONDITION_FLAG_PORTAL_PROOF" },
"u_is_outside",
{ "x_in_y_chance": { "x": 1, "y": 3 } }
]
},
"deactivate_condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_spider" } },
"effect": [
{ "u_message": "Your whole body pulses in time with the raging storm.", "type": "info" },
{ "math": [ "u_vitamin('mutagen_spider')", "+=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "+=", "1000" ] },
{ "u_mutate": 0 },
{ "math": [ "u_vitamin('mutagen_spider')", "-=", "2500" ] },
{ "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }
]
}
]
210 changes: 210 additions & 0 deletions data/mods/BombasticPerks/perkmenu.json
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,216 @@
],
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
},
{ "text": "Playstyle Perks: Stormwrought", "topic": "TALK_PERK_MENU_PLAYSTYLE_STORMWROUGHT" },
{ "text": "Lifestyle Perks", "topic": "TALK_PERK_MENU_MAIN" },
{ "text": "Settings", "topic": "TALK_PERK_MENU_CONFIG" },
{ "text": "Quit.", "topic": "TALK_DONE" }
]
},
{
"type": "talk_topic",
"id": "TALK_PERK_MENU_PLAYSTYLE_STORMWROUGHT",
"dynamic_line": "Stormwrought Playstyle Perks:\nLevel <u_val:current_level>.\n<u_val:num_perks> perk points to spend.\nCurrent EXP: <u_val:available_exp>.\nEXP to next level: <u_val:exp_to_perk>.",
"responses": [
{
"condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_bird" } },
"text": "Gain [<trait_name:perk_portal_storm_mutator_bird>]",
"effect": [
{ "set_string_var": "<trait_name:perk_portal_storm_mutator_bird>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_portal_storm_mutator_bird>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_portal_storm_mutator_bird", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must not have another Stormwrought perk.",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": {
"not": {
"u_has_any_trait": [
"perk_portal_storm_mutator_bird",
"perk_portal_storm_mutator_feline",
"perk_portal_storm_mutator_insect",
"perk_portal_storm_mutator_lupine",
"perk_portal_storm_mutator_plant",
"perk_portal_storm_mutator_spider"
]
}
}
}
],
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
},
{
"condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_feline" } },
"text": "Gain [<trait_name:perk_portal_storm_mutator_feline>]",
"effect": [
{ "set_string_var": "<trait_name:perk_portal_storm_mutator_feline>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_portal_storm_mutator_feline>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_portal_storm_mutator_feline", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must not have another Stormwrought perk.",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": {
"not": {
"u_has_any_trait": [
"perk_portal_storm_mutator_bird",
"perk_portal_storm_mutator_feline",
"perk_portal_storm_mutator_insect",
"perk_portal_storm_mutator_lupine",
"perk_portal_storm_mutator_plant",
"perk_portal_storm_mutator_spider"
]
}
}
}
],
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
},
{
"condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_insect" } },
"text": "Gain [<trait_name:perk_portal_storm_mutator_insect>]",
"effect": [
{ "set_string_var": "<trait_name:perk_portal_storm_mutator_insect>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_portal_storm_mutator_insect>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_portal_storm_mutator_insect", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must not have another Stormwrought perk.",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": {
"not": {
"u_has_any_trait": [
"perk_portal_storm_mutator_bird",
"perk_portal_storm_mutator_feline",
"perk_portal_storm_mutator_insect",
"perk_portal_storm_mutator_lupine",
"perk_portal_storm_mutator_plant",
"perk_portal_storm_mutator_spider"
]
}
}
}
],
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
},
{
"condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_lupine" } },
"text": "Gain [<trait_name:perk_portal_storm_mutator_lupine>]",
"effect": [
{ "set_string_var": "<trait_name:perk_portal_storm_mutator_lupine>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_portal_storm_mutator_lupine>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_portal_storm_mutator_lupine", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must not have another Stormwrought perk.",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": {
"not": {
"u_has_any_trait": [
"perk_portal_storm_mutator_bird",
"perk_portal_storm_mutator_feline",
"perk_portal_storm_mutator_insect",
"perk_portal_storm_mutator_lupine",
"perk_portal_storm_mutator_plant",
"perk_portal_storm_mutator_spider"
]
}
}
}
],
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
},
{
"condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_plant" } },
"text": "Gain [<trait_name:perk_portal_storm_mutator_plant>]",
"effect": [
{ "set_string_var": "<trait_name:perk_portal_storm_mutator_plant>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_portal_storm_mutator_plant>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_portal_storm_mutator_plant", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must not have another Stormwrought perk.",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": {
"not": {
"u_has_any_trait": [
"perk_portal_storm_mutator_bird",
"perk_portal_storm_mutator_feline",
"perk_portal_storm_mutator_insect",
"perk_portal_storm_mutator_lupine",
"perk_portal_storm_mutator_plant",
"perk_portal_storm_mutator_spider"
]
}
}
}
],
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
},
{
"condition": { "not": { "u_has_trait": "perk_portal_storm_mutator_spider" } },
"text": "Gain [<trait_name:perk_portal_storm_mutator_spider>]",
"effect": [
{ "set_string_var": "<trait_name:perk_portal_storm_mutator_spider>", "target_var": { "context_val": "trait_name" } },
{
"set_string_var": "<trait_description:perk_portal_storm_mutator_spider>",
"target_var": { "context_val": "trait_description" }
},
{ "set_string_var": "perk_portal_storm_mutator_spider", "target_var": { "context_val": "trait_id" } },
{
"set_string_var": "Must not have another Stormwrought perk.",
"target_var": { "context_val": "trait_requirement_description" },
"i18n": true
},
{
"set_condition": "perk_condition",
"condition": {
"not": {
"u_has_any_trait": [
"perk_portal_storm_mutator_bird",
"perk_portal_storm_mutator_feline",
"perk_portal_storm_mutator_insect",
"perk_portal_storm_mutator_lupine",
"perk_portal_storm_mutator_plant",
"perk_portal_storm_mutator_spider"
]
}
}
}
],
"topic": "TALK_PERK_MENU_SELECT_PLAYSTYLE"
},
{ "text": "Playstyle Perks", "topic": "TALK_PERK_MENU_PLAYSTYLE" },
{ "text": "Lifestyle Perks", "topic": "TALK_PERK_MENU_MAIN" },
{ "text": "Settings", "topic": "TALK_PERK_MENU_CONFIG" },
{ "text": "Quit.", "topic": "TALK_DONE" }
Expand Down
Loading

0 comments on commit 64f6f5f

Please sign in to comment.