CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.28k stars 4.12k forks source link

New mutation system can't cancel/overwrite base traits #55959

Open 42Forty2 opened 2 years ago

42Forty2 commented 2 years ago

Describe the bug

The new mutation system behaves weirdly with regards to traits taken at chargen. They upgrade well enough, but trying to overwrite them seems impossible. It either doesn't pop (when trying to cancel a negative trait) or keeps both the positive AND negative version of the trait (if the positive was taken at chargen).

Steps to reproduce

  1. Spawn new character with base traits that Mutations can cancel (eg Ugly, Strong Back, or Slow Healer) or have otherwise conflicting traits of the same type (eg Fast Metabolism)
  2. Try debug Mutating into a trait that cancels it (eg Pretty, Bad Back, Regeneration, Persistence Hunter)
  3. It either doesn't pop or keeps both traits.

Expected behavior

Players should be able to mutate out of Traits taken at chargen.

Screenshots

No response

Versions and configuration

Additional context

Json for mutations from my personal build of Forty's Small Mod (42sm_mutations):

[
  {
    "//": "Balance tweak: Junkfood is a prevalent early-game food, so taking it at chargen is worth the extra point.",
    "type": "mutation",
    "id": "ANTIJUNK",
    "copy-from": "ANTIJUNK",
    "points": -2
  },
  {
    "type": "mutation",
    "id": "EAGLEEYED",
    "copy-from": "EAGLEEYED",
    "extend": {
        "category": [ "ELFA" ],
        "changes_to": [ "FEYEYES" ]
    }
  },
  {
    "//": "Quick aside - cannot stop thinking 'you got a purdy mouth' when looking at base HUMAN_MOUTH's types",
    "type": "mutation",
    "id": "HUMAN_MOUTH",
    "copy-from": "HUMAN_MOUTH",
    "types": [ "TEETH", "MUZZLE" ]
  },
  {
    "//": "An attempt to fix the issue for Pretty/Ugly under the assumption that my Fangs starting trait was the problem. Not the case.",
    "type": "mutation",
    "id": "HUMAN_BEAUTY",
    "name": { "str": "Plain Jane" },
    "points": 0,
    "player_display": false,
    "category": [ "HUMAN" ],
    "types": [ "ATTRACTIVENESS" ],
    "description": "You look normal, neither deformed nor drop-dead gorgeous."
  },
  {
    "//": "If genetically modified catgirls and wolfbuys wasn't officially one of XEDRA's goals, then what was the point of it all?",
    "type": "mutation",
    "id": "PRETTY",
    "copy-from": "PRETTY",
    "extend": {
        "category": [ "FELINE", "LUPINE" ]
    }
  },
  {
    "//": "Bugfix - base Rosebuds has no scentmask while Flowering does, making it a downgrade.",
    "type": "mutation",
    "id": "ROSEBUDS",
    "name": { "str": "Rosebuds" },
    "copy-from": "ROSEBUDS",
    "scent_mask": -300,
    "social_modifiers": { "lie": 15, "persuade": 10 }
  },
  {
    "type": "mutation",
    "id": "FEYEYES",
    "name": { "str": "Fey Scout" },
    "points": 4,
    "description": "Legolas, what do your Elf Eyes see? Even the keenest of human eyes cannot hope to best your ability to spot distant landmarks, further extending your sight range on the overmap. Also Perception +2",
    "prereqs": [ "EAGLEEYED" ],
    "prereqs2": [ "ELFAEYES" ],
    "threshreq": [ "THRESH_ELFA" ],
    "category": [ "ELFA" ],
    "cancels": [ "MYOPIC", "UNOBSERVANT" ],
    "overmap_sight": 10,
    "passive_mods": { "per_mod": 2 }
  }
]
MylieDaniels commented 2 years ago

Not being able to cancel initial mutations is the current intention, and the bug with obtaining positive and negative versions seems to be limited to obtaining Strong Back then Bad Back- Bad Back does not cancel Strong Back, which I will fix.

LeahLuong commented 2 years ago

55237 fixed the Knees-related traits but #54602 -- an early example of this issue -- is still open.

MylieDaniels commented 2 years ago

54602 is not an early example of this issue.

LeahLuong commented 2 years ago

@MylieDaniels Your statement is kind of meaningless w/out further qualification. Please explain to me how, when my char has the inherent trait Pretty, subsequently mutates Deformed, & yet still retains the inherent trait, this is not an example of this issue:

It either doesn't pop (when trying to cancel a negative trait) or keeps both the positive AND negative version of the trait (if the positive was taken at chargen).

I could have simply stopped after the 1st sentence of this comment but that would have been akin to the comment you just made. See how that's unproductive & could easily be read as unjustified hostility??

kevingranade commented 2 years ago

@LeahLuong Ok this is a pretty minor example, but I've warned you about this a number of times so it's pretty clear you're not changing your behavior. You keep accusing people of hostility and/or acting hostile yourself, and I'm not going to let this keep going.