-Guilt death "spells" always hit, have infinite range
-Trauma is a new tracked value for characters, representing "temporary" trauma that you can work through, with time. It is added to deadening from guilt kills to calculate your total morale modifier.
-EOC support for getting/setting trauma
-Guilt kills give 1 trauma and 1 deadening.
-Professions can start with trauma.
-Some actions may cause trauma (butchering human bodies...)
* make weakpoint duration specified in time units
* add test to print the weakpoint distribution
* Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Please iwyu
* please clang
* please IWYU again
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Items can now define a per-quality speed modifier using the object
quality format: {"id": "SEW", "level": 2, "speed": 0.3}. The legacy
array format ["SEW", 2] still works (speed defaults to 1.0).
When a recipe step requires a quality, the best available tool's speed
modifier scales that step's time. A mixer with speed 0.5 on FOOD_PREP
halves mixing time without affecting baking or rising.
- item_quality struct on itype (replaces map<quality_id, int>)
- item_quality_reader preserving copy-from / extend / relative / delete
- item::get_quality_speed() mirroring get_quality() resolution
- best_quality_speed_modifier() scanning crafting inventory
- compute_tool_speeds() producing per-step vector
- batch_time() and step_budget_moves() with optional tool_speeds
- Speed-aware single-item floor in batch_time()
- do_turn() caching and passing tool speeds
- expected_time_to_craft() incorporating tool speeds for display
- 21 tests, loader validation for speed <= 0
* map/avatar bash return if they can smash
The skill/resistance are only used for this, so just simplify it.
* Use damage/hp for bashed objects
Add functions for bash data to generate damage/hp values, and use those
instead of directly querying str_{min,max}. This allows expanding how
furniture responds to damage in the future.
The bool arguments could be improved, but work well enough.
Sound shouldn't care about the supported/blocked strength, so just
ignore that, it won't be that different.
* Character/map bash respond to all damage types
Pass in a map of damage types and the amount, instead of just a strength
number.
Add a member to damage types that allows specifying how they convert
into bash damage. Right now, this is zero for all types but bash.
There are rough edges right now where this interacts with pathfinding
and monster bashing: those have a strength integer that they just
convert to {bash: strength}
For simplicity, keep a map::bash overload that takes integer strength,
and just converts it bash damage for the real bash function.
Special mention to the {{{}}} constructor, which is
pair{} -> initializer_list{pair{}} -> map{initializer_list{pair{}}}
* Monsters & pathfinding do bash by damage type
Instead of only bash damage.
This enables NPCs to properly pathfind based on their bash damage.
Enable specifying bash skill as more than just an amount of bash damage
for monsters. Not that anyone uses this in repo anyways. Update the
docs, including adding documentation for this feature.
* Allow specifying damage profile for bashing
Not everything will respond the same to attempting to break it in
different ways. Add infrastructure to allow specifying different
"profiles" for damage on bash data. Because there will be a fairly
limited set of these, and many objects will have the same, make a new
type for it, and just refer to it by id.
* Make bashing terrain/furniture deterministic
Because damage is stored, there's no reason to add a bunch of randomness
to this. Just directly apply damage, and update tests.
The "hp" for bash data can be updated to achieve the desired effect,
instead of rng.
* Add fireaxe test for bashing chances
Now that bashing can do multiple damage types, add a test case that uses
a weapon with a large non-bash damage component.
Because only bash is counted now, this doesn't look much different from
discarding the cut damage.
* Add bashing profile for wooden doors
As is seen in the famous documentary _The Shining_, fire axes are
relatively effective at breaking through doors. Add a bash profile that
favors cut damage, and apply it to wooden doors.
Adjust the tests to account for this.
* Allow fields to choose to be moppable
Currently, all liquid fields are moppable. Allow fields that are not
liquid to select that they can also be cleaned with a mop.
* use was_loaded properly for bash and deconstruct
was_loaded indicates whether or not it is the first time this object has
been loaded.
The terrain/furniture loading code was passing the terrain/furniture
was_loaded value, when they could be creating the object and thus it
would be it's first time being loaded.
Pass whether or not the object has been created as the was_loaded value
instead of whether or not the terrain/furniture it's part of has.
* Allow bashed terrain/furniture to create fields
Allow specifying a field and an intensity to spawn that field at when an
object is hit, and when an object is destroyed. The field spawn when it
is hit will also spawn when it is destroyed.
* Add dust and splinters fields for bashed ter/furn
The dust is in the gas phase and can spread - this allows bashing to
spread dust over the place, instead of only in the tile bashed.
Similarly for splinters, but it's less likely to spread, and will try to
spread dust.
* Add dust to everything that splinters
All terrain/furniture that produce "splinter" in their bash results have
been given the dust and splinters field produced on bash.
* Mods furn/terrain smashes into dust
All terrain/furniture in mods that break into splinters produce the dust
and splinters field on bash.
* Initial version as scenario EoCs
* Trait version with global variables
* Basics down
* Make it work for NPCs starting with the trait
* Add beast to test expandability
* Add a test EoC to check variable values easily
* Forgot math rng always uses floats
* Add abstract mutation and remove base line levels post cooldown
* Rearrange the setup logic
* Add another 23 glands >_<
* Regex to the rescue
* Add them to the scenario and make them neutral so they clog up the menu less
* Add delete so that they cancel cancelling themselves
* Deduplicate checking if a gained mutation is a gland mutation
* Move f_lose_trait documentation directly under f_add_trait
* Add thirst costs and minor crosses_mutation_threshold flavour
* Minor fixes
* Ugly check workaround
* Generic tie-down/haul system for furniture on vehicles
* Various improvements after code review from Ehughsbaird
-Add strength/lifting check when loading furniture, split it up for more specific feedback when something can't be loaded
-Switch the furniture's weight to being a member of the furniture class, loaded from its object (get rid of stored_furniture_weight)
-Don't error/return early on UI display when underlying carried furniture is invalid
-Add a feedback message when trying to unload/load furniture from a broken part
-Use furniture name where possible instead of generically referring to "the furniture"
-Make sure we actually clear the item var when panic aborting
* Break up vehicle::use_tiedown_furniture()
* Allow either furniture or items, but not both
* Tied-down furniture migration, or something