The Strength System in Boot Hill is a core mechanic that governs a character's physical power and resilience. It is primarily used in combat but can also influence other actions and interactions within the game.
This system is implemented in the strengthSystem.ts
module, which provides functions for calculating strength, determining defeat/knockout, and handling strength updates, including a detailed strength history.
- Represents a character's maximum physical strength.
- Determined during character creation.
- Ranges from 8 to 20 for player characters.
- Used as the starting point for calculating current strength.
- Represents a character's current physical strength, which can be reduced by wounds.
- Calculated by subtracting the total strength reduction from wounds (accounting for location modifiers) from the character's current strength, using the
getCharacterStrength
function. - Cannot go below 1 unless explicitly allowed (e.g., for defeat checks).
- Used in combat calculations, such as determining damage dealt in brawls.
- Inflicted during combat or other dangerous situations.
- Each wound has a:
location
(e.g., "Left Leg", "Right Arm", "Body", "Head")severity
("Light", "Serious", "Mortal")damage
valuestrengthReduction
value (calculated based on damage and location modifiers)
- Each wound severity has an associated base strength reduction value, defined in
WOUND_EFFECTS
:- Light: 3
- Serious: 7
- Mortal: Infinity
- Location modifiers can increase the strength reduction (negative modifiers in
LOCATION_MODIFIERS
). - Multiple wounds can be sustained, and their effects stack.
- Tracks changes to a character's strength over time.
- Stored in the
strengthHistory
property of theCharacter
object. - Includes:
baseStrength
: The character's base strength.changes
: An array ofStrengthChange
objects, each representing a change in strength.
StrengthChange
objects include:previousValue
: The strength value before the change.newValue
: The strength value after the change.reason
: The reason for the change (e.g., "damage", "healing").timestamp
: The time the change occurred.
- A character becomes unconscious if their current strength is reduced to 0 or below, or if they receive a mortal wound.
- An unconscious character is considered defeated in combat, as determined by the
isCharacterDefeated
function.
The strengthSystem.ts
module provides the following functions:
Calculates a character's current strength, accounting for wound penalties and location modifiers.
- Parameters:
character
: TheCharacter
object whose strength is being calculated.allowZero
: (Optional) A boolean indicating whether to allow strength to go below 1. Defaults tofalse
.
- Returns: The character's current strength as a number.
Determines if a character is defeated based on Boot Hill v2 rules. A character is defeated if they are unconscious, have a mortal wound, or their current strength is 0 or less.
- Parameters:
character
: TheCharacter
object being checked for defeat.
- Returns:
true
if the character is defeated,false
otherwise.
Determines if an attack will result in a knockout. A knockout occurs when remaining strength would be reduced to 0.
- Parameters:
currentStrength
: The character's current strength.damage
: The amount of damage taken.
- Returns:
true
if the attack results in a knockout,false
otherwise.
calculateUpdatedStrength(character: Character, damage: number): { newStrength: number, updatedHistory: StrengthHistory }
Calculates the new strength value after taking damage, and logs the change to the character's strength history.
- Parameters:
character
: TheCharacter
object taking damage.damage
: The amount of damage taken.
- Returns: An object containing the new strength (
newStrength
) and the updated strength history (updatedHistory
).
Validates a proposed strength change, ensuring that the new strength does not exceed the base strength or current strength (unless it's a healing scenario, which is not yet implemented).
- Parameters:
currentStrength
: The character's current strength.newStrength
: The proposed new strength.baseStrength
: The character's base strength.
- Returns:
true
if the change is valid,false
otherwise.
Validates that a given strength value matches the calculated strength for a character, allowing for minor floating-point differences.
- Parameters:
strength
: The strength value to validate.character
: TheCharacter
object to check against.
- Returns:
true
if the strength value is valid,false
otherwise.
-
Character Creation:
baseStrength
is determined either randomly or through AI generation.strength
is initially set equal tobaseStrength
.strengthHistory
is initialized, with the first entry reflecting the initial strength.
-
Combat:
- In brawling combat, damage dealt is calculated based on the attacker's current
strength
and a dice roll. - In weapon combat, damage is determined by the weapon's damage rating.
- When a character takes damage, a wound is inflicted.
- The
calculateUpdatedStrength
function is called to:- Calculate the new strength value (accounting for damage and location modifiers).
- Update the character's
strengthHistory
with a newStrengthChange
entry.
- If
strength
reaches 0 or below, the character becomes unconscious, as determined byisCharacterDefeated
.
- In brawling combat, damage dealt is calculated based on the attacker's current
-
Status Display:
- The
StatusDisplayManager
component calculates thecurrentStrength
using thegetCharacterStrength
function fromstrengthSystem.ts
. - The
currentStrength
andbaseStrength
are passed to theStatusDisplay
component for visual representation. - The
StatusDisplay
component also displays the character'sstrengthHistory
in reverse chronological order.
- The
-
Game State Updates:
- The
gameReducer
handles actions that modify a character'sstrength
,baseStrength
,wounds
, andstrengthHistory
. - The
useBrawlingCombat
anduseWeaponCombat
hooks update the combat state, usingcalculateUpdatedStrength
to update character strength and history.
- The
- Strength is one of the six primary attributes determined during character creation.
- Players roll percentile dice (d100) and consult the Strength Table to determine the character's initial
baseStrength
(8-20). baseStrength
represents the character's maximum physical strength.strength
is initially set equal tobaseStrength
.
- Strength Base (STB): Calculated as
Strength ÷ 10
(round down). - Brawling:
- Base damage in brawling is determined by the attacker's STB.
- Modifiers may apply based on the specific brawling action (e.g., +2 for Kick, +4 for Groin Strike).
- Special moves like Throw and Pin are based on STB.
- Weapon Combat:
- Strength may modify damage for certain weapons (e.g., melee weapons).
- Wounds:
- Wounds reduce a character's current
strength
. - Each wound has a severity (Light, Serious, Mortal) with a corresponding strength reduction value.
- Light: 2-5 (depending on location)
- Serious: 5-10 (depending on location)
- Mortal: 10-25 (depending on location)
- If a character's
strength
is reduced to 0 or below, they are knocked unconscious.
- Wounds reduce a character's current
- Carrying Capacity: Strength determines how much weight a character can carry.
- Physical Feats: Strength is used for checks involving physical feats.
- Healing:
- Non-brawling wounds: Heal 1
strength
point per week per wound. - Brawling damage: Heal 1
strength
point per hour of rest. - Special penalties from wounds are removed when the wound is more than 50% healed.
- Non-brawling wounds: Heal 1
- Aging:
- Strength increases by 2% for each game year survived up to age 25.
- Strength decreases by 2% each year after age 35.
- The base game rules specify that a character's
baseStrength
is determined by rolling percentile dice and consulting a table, resulting in a value between 8 and 20. The app's implementation currently allows for a wider range of values during character creation, and AI-generated characters may have values outside this range.
- Brawling Damage: The base game rules specify that brawling damage is based on the attacker's Strength Base (STB), which is
strength ÷ 10
(round down). The app's implementation currently uses the character's currentstrength
attribute directly for damage calculation, without dividing by 10. - Weapon Combat: The base game rules specify that strength may modify damage for certain weapons (e.g., melee weapons). The app's implementation does not currently incorporate strength modifiers for weapon damage.
- Wound Penalties: The implementation uses
damage
andstrengthReduction
on wounds. ThestrengthReduction
is calculated based on damage and location modifiers.
- The base game rules specify that non-brawling wounds heal 1 strength point per week, and brawling damage heals 1 point per hour of rest. The app's implementation currently does not have a time system, so healing is handled differently.
- Carrying Capacity: The base game rules specify that strength determines carrying capacity, but this is not currently implemented in the app.
- Physical Feats: The base game rules mention using strength for checks involving physical feats, but this is not currently implemented in the app.
- Aging: The base game rules specify that strength changes with age, but this is not currently implemented in the app.
These differences should be addressed in order to bring the app's strength system more in line with the base game rules.
To further improve the strength system's implementation and bring it closer to the base game rules, the following refactors are suggested:
- Refactor Combat State: Modify the
CombatState
interface to directly referenceCharacter
objects instead of storing separate strength values. Pending. - Align Brawling Damage with Base Rules: Update
brawlingEngine.ts
anduseBrawlingCombat.ts
to use Strength Base (STB) for brawling damage. Pending. - Implement Campaign Rules: Implement time system, healing rules, and aging effects on strength. Pending.
- Streamline Character Creation: Enforce the 8-20 range for
baseStrength
during character creation. Pending. - Consider Other Uses of Strength: Design and implement systems for carrying capacity and physical feat checks. Pending.
These refactors will result in a more robust, maintainable, and accurate implementation of the strength system, aligning it more closely with the original Boot Hill v2 rules while also simplifying the codebase.