[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
develop
pre-commit-ci[bot] 2023-08-24 15:49:53 +00:00
parent 30488dc310
commit 771d7f6c6c
2 changed files with 25 additions and 25 deletions

@ -26,22 +26,22 @@ skill they have in crossbows or general ranged combat.
If sorted by "leadership", then the citizen is sorted according to the highest If sorted by "leadership", then the citizen is sorted according to the highest
skill they have in leader, teacher, or military tactics. skill they have in leader, teacher, or military tactics.
If sorting is done by "melee potential" citizens are arranged based on their If sorting is done by "melee potential" citizens are arranged based on their
melee potential rating. This rating is a heuristic measure that takes into melee potential rating. This rating is a heuristic measure that takes into
account genetic predispositions in physical and mental attributes, as account genetic predispositions in physical and mental attributes, as
well as body size. The goal is to assign a higher value to dwarves (and other well as body size. The goal is to assign a higher value to dwarves (and other
humanoid creatures) that are expected to be more effective in melee combat humanoid creatures) that are expected to be more effective in melee combat
against opponents of similar skill levels. against opponents of similar skill levels.
If sorting is done by "ranged potential" citizens are arranged based on their If sorting is done by "ranged potential" citizens are arranged based on their
ranged potential rating. This rating is a heuristic measure that takes into ranged potential rating. This rating is a heuristic measure that takes into
account genetic predispositions in physical and mental attributes. account genetic predispositions in physical and mental attributes.
The goal is to assign a higher value to dwarves (and other humanoid creatures) The goal is to assign a higher value to dwarves (and other humanoid creatures)
that are expected to be more effective in ranged combat. that are expected to be more effective in ranged combat.
If sorting is done by "mental stability" citizens are arranged based on their If sorting is done by "mental stability" citizens are arranged based on their
mental stability rating. This rating is a measure that takes into account mental stability rating. This rating is a measure that takes into account
facets and values of an individual and correlates to better stress values. facets and values of an individual and correlates to better stress values.
It is designed to be higher for more stress-resistant citizens. It is designed to be higher for more stress-resistant citizens.
You can search for a dwarf by name by typing in the Search field. You can also You can search for a dwarf by name by typing in the Search field. You can also

@ -224,8 +224,8 @@ local function melee_potential(unit)
local kinestheticSense = unit.status.current_soul.mental_attrs.KINESTHETIC_SENSE.max_value local kinestheticSense = unit.status.current_soul.mental_attrs.KINESTHETIC_SENSE.max_value
-- strength/bodysize is a dirty approximation of momentum formula -- strength/bodysize is a dirty approximation of momentum formula
local rating = 10000*strength/bodySize + strength*4 + agility*3 + toughness local rating = 10000*strength/bodySize + strength*4 + agility*3 + toughness
+ endurance + recuperation/3 + diseaseResistance/3 + endurance + recuperation/3 + diseaseResistance/3
+ kinestheticSense*3 + willpower/2 + spatialSense/2 + focus/4 + kinestheticSense*3 + willpower/2 + spatialSense/2 + focus/4
return rating return rating
end end
@ -277,7 +277,7 @@ local function ranged_potential(unit)
local kinestheticSense = unit.status.current_soul.mental_attrs.KINESTHETIC_SENSE.max_value local kinestheticSense = unit.status.current_soul.mental_attrs.KINESTHETIC_SENSE.max_value
local rating = strength + agility*4 + toughness + endurance + recuperation/2 local rating = strength + agility*4 + toughness + endurance + recuperation/2
+ diseaseResistance/2 - bodySize/2 + diseaseResistance/2 - bodySize/2
+ kinestheticSense + willpower + spatialSense*3 + focus + kinestheticSense + willpower + spatialSense*3 + focus
return rating return rating
end end
@ -338,16 +338,16 @@ local function mental_stability(unit)
local SKILL = setbelief.getUnitBelief(unit, df.value_type['SKILL']) local SKILL = setbelief.getUnitBelief(unit, df.value_type['SKILL'])
-- Calculate the rating using the defined variables -- Calculate the rating using the defined variables
local rating = (CRAFTSMANSHIP * -0.01) + (FAMILY * -0.09) + (HARMONY * 0.05) local rating = (CRAFTSMANSHIP * -0.01) + (FAMILY * -0.09) + (HARMONY * 0.05)
+ (INDEPENDENCE * 0.06) + (KNOWLEDGE * -0.30) + (LEISURE_TIME * 0.24) + (INDEPENDENCE * 0.06) + (KNOWLEDGE * -0.30) + (LEISURE_TIME * 0.24)
+ (NATURE * 0.27) + (SKILL * -0.21) + (ALTRUISM * 0.13) + (NATURE * 0.27) + (SKILL * -0.21) + (ALTRUISM * 0.13)
+ (ANXIETY_PROPENSITY * -0.06) + (BRAVERY * 0.06) + (ANXIETY_PROPENSITY * -0.06) + (BRAVERY * 0.06)
+ (CHEER_PROPENSITY * 0.41) + (CURIOUS * -0.06) + (DISCORD * 0.14) + (CHEER_PROPENSITY * 0.41) + (CURIOUS * -0.06) + (DISCORD * 0.14)
+ (DUTIFULNESS * -0.03) + (EMOTIONALLY_OBSESSIVE * -0.13) + (DUTIFULNESS * -0.03) + (EMOTIONALLY_OBSESSIVE * -0.13)
+ (HUMOR * -0.05) + (LOVE_PROPENSITY * 0.15) + (PERSEVERENCE * -0.07) + (HUMOR * -0.05) + (LOVE_PROPENSITY * 0.15) + (PERSEVERENCE * -0.07)
+ (POLITENESS * -0.14) + (PRIVACY * 0.03) + (STRESS_VULNERABILITY * -0.20) + (POLITENESS * -0.14) + (PRIVACY * 0.03) + (STRESS_VULNERABILITY * -0.20)
+ (TOLERANT * -0.11) + (TOLERANT * -0.11)
return rating return rating
end end
@ -809,4 +809,4 @@ end
make_sort_order = utils.make_sort_order make_sort_order = utils.make_sort_order
]] ]]
return _ENV return _ENV