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

Fix issue with loading worn or wielded enchanted items #64206

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

Ramza13
Copy link
Contributor

@Ramza13 Ramza13 commented Mar 12, 2023

Summary

None

Purpose of change

Fix issue discovered in #64193
Worn or wielded items with any kind of dialog variables or conditions would not be loaded from a save correctly.

Describe the solution

Describe alternatives you've considered

Testing

Used this json, equipping/wielding it and then saving/ quitting and reloading.

{
    "type": "ARMOR",
    "id": "flaming_fist",
    "symbol": "3",
    "color": "red",
    "name": { "str": "flaming fist" },
    "description": "A heavy metal guard that covers the fist and increases striking power, with stout padding underneath to protect the wearers hand.  It has been enchanted to emit dark magical flames that only harm enemies.",
    "looks_like": "cestus",
    "material": [ "steel", "leather" ],
    "volume": "500 ml",
    "weight": "970 g",
    "to_hit": 2,
    "bashing": 2,
    "price_postapoc": 124000,
    "qualities": [ [ "HAMMER", 1 ] ],
    "flags": [ "ONLY_ONE", "DURABLE_MELEE", "NONCONDUCTIVE", "FLAMING" ],
    "relic_data": {
      "passive_effects": [ { "has": "WORN", "condition": { "not": "u_has_weapon" }, "values": [ { "value": "STRENGTH", "add": 7 } ] } ]
    },
    "armor": [ { "encumbrance": 5, "coverage": 20, "covers": [ "hand_r" ] } ]
  }

Additional context

@Ramza13 Ramza13 requested a review from KorGgenT as a code owner March 12, 2023 21:11
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Enchantments / Spells Enchantments and spells astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Mar 12, 2023
@dseguin dseguin merged commit ce1744a into CleverRaven:master Mar 13, 2023
@Ramza13 Ramza13 deleted the fix-enchantment-loading branch May 29, 2023 15:06
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 [C++] Changes (can be) made in C++. Previously named `Code` 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.

2 participants