Cataclysm-dda: Whiskers are useless under a long scarf

Created on 4 Oct 2020  路  1Comment  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug


Whiskers lose its dodge bonus under a scarf (even a loose scarf which allows for special mutated attacks (bites)).

Steps To Reproduce

Steps to reproduce the behavior:

  1. Make a character with whiskers.
  2. Observe its dodge ability (with modifiers)
  3. Spawn and wear a long scarf and loose it.
  4. Observe again its dodge ability, it should have lost the bonus from the whiskers.

Expected behavior

To be able to sense vibrations with my whiskers when my scarf doesn't hinders them (The scarfs are worn in the neck... And if I loose one so I can bite enemies without it hindering me, then my whiskers should not be hindered too).

Screenshots

whiskers 4
whiskers 1
whiskers 2
whiskers 3

Versions and configuration

  • OS: Windows

    • OS Version: 10.0 1903

  • Game Version: 0.E-6459-ge49eaa0 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Whaleys Hair Mod (UDP Tweaks) [WHALEYHAIR_UDP],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills]
    ]

Additional context

Inspired by #42620 in which its resolved a similar problem with the feet mutations and some clothing that should not hinder them.
This problem could also be present in other face mutations... Didn't check.

<Bug> Mutations / Traits / Professions

Most helpful comment

Confirmed in 0.E-7041-gdb7d1378fa, with a basic starting character. Without whiskers, dodge is 2.4; with whiskers, it becomes 3.4. But a scarf (whether loosened or not) reduces it to 2.4 again. This code prevents whiskers from working if the body part is covered at all, not taking into account the "won't hinder special attacks" flag:

https://github.com/CleverRaven/Cataclysm-DDA/blob/089c59fe229593d189b71292c1021d8d014ad93d/src/avatar.cpp#L1276-L1279

This can be fixed by changing the wearing_something_on call with natural_attack_restricted_on, to allow a loosened scarf to be exempt. I have submitted a PR to fix this.

>All comments

Confirmed in 0.E-7041-gdb7d1378fa, with a basic starting character. Without whiskers, dodge is 2.4; with whiskers, it becomes 3.4. But a scarf (whether loosened or not) reduces it to 2.4 again. This code prevents whiskers from working if the body part is covered at all, not taking into account the "won't hinder special attacks" flag:

https://github.com/CleverRaven/Cataclysm-DDA/blob/089c59fe229593d189b71292c1021d8d014ad93d/src/avatar.cpp#L1276-L1279

This can be fixed by changing the wearing_something_on call with natural_attack_restricted_on, to allow a loosened scarf to be exempt. I have submitted a PR to fix this.

Was this page helpful?
0 / 5 - 0 ratings