Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to enchantment armor with mutations #55328

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

bombasticSlacks
Copy link
Contributor

Summary

Bugfixes "Further fixes to enchantment armor with mutations"

Purpose of change

Some mutations were still failing to apply their effects when worn with the enchantment system. An example that works are the traits from my #53567 which just give a simple "weight_capacity_modifier": 1.1. This shouldn't be the case, all mutations should apply.

Describe the solution

It seems that traits like this are queried through the cached_mutations vector in a pretty convoluted call stack. To the place I migrated stuff for safety in #54852 I've also added a call to update the cached_mutation character vector identically to how it is when gaining/losing a mutation normally.

Describe alternatives you've considered

Testing

I tested with this + my nomad stuff from #53567.

[
  {
    "type": "mutation_type",
    "id": "Equipment"
  },
  {
    "type": "mutation",
    "id": "well_distributed",
    "name": { "str": "Well Distributed Gear" },
    "points": 0,
    "description": "You are wearing equipment that helps to distribute weight allowing you to carry more.",
    "valid": false,
    "purifiable": false,
    "types": [ "Equipment" ],
    "weight_capacity_modifier": 1.1
  }
]

and add to an armor

"relic_data": { "passive_effects": [ { "has": "WORN", "condition": "ALWAYS", "mutations": [ "well_distributed" ] } ] },

Additional context

I don't think this can possibly break anything but I don't fully understand all of the mutation system under the hood.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Feb 13, 2022
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 13, 2022
@Maleclypse Maleclypse added Mechanics: Enchantments / Spells Enchantments and spells <Bugfix> This is a fix for a bug (or closes open issue) labels Feb 14, 2022
@kevingranade kevingranade merged commit 8447514 into CleverRaven:master Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions Mechanics: Enchantments / Spells Enchantments and spells
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants