CleverRaven / Cataclysm-DDA

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

Moving quadrupedally through acid or fire damages both your hands and feet #74639

Closed GalacticApple closed 1 week ago

GalacticApple commented 1 week ago

Summary

Bugfixes "updates ench_quadruped_movement_full and the map::player_in_field function to consider quadrupedal movement."

Purpose of change

When you're moving on your hands and feet through a hazard, damage should also be applied to your hands.

Describe the solution

I updated ench_quadruped_movement_full in enchantments.json to call the "quadruped_full" effect when you meet the right conditions (this also fixes a bug related to you being able to see over objects while running on all-fours).

Then I updated the map::player_in_field function in map_field.cpp so that you burn your hands when moving through acid while quadrupedal. You also receive damage to all your body parts when moving through fire.

Describe alternatives you've considered

Testing

Compiled and tested on my copy of CDDA.

Additional context

I removed

"ench_effects": [ { "effect": "natural_stance", "intensity": 1 } ]

from the Digitigrade mutation in mutations.json since this is also called by ench_quadruped_movement_full (and thus redundant).

gitelitko commented 1 week ago

What about moving through hazards while prone?

GalacticApple commented 1 week ago

That was already accounted for by the game. If you're moving through acid while prone, you get covered in acid. If you move through fire while prone, you're consumed by fire.