[Rework] Damage and Damage Resource split (#2094)

This commit is contained in:
WBHarry 2026-07-18 23:31:38 +02:00 committed by GitHub
parent c90c6afc19
commit 3b68c6c895
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 730 additions and 531 deletions

View file

@ -104,15 +104,13 @@ export default class DhCharacter extends DhCreature {
trait: 'strength'
},
damage: {
parts: {
hitPoints: {
type: ['physical'],
applyTo: 'hitPoints',
value: {
custom: {
enabled: true,
formula: '@profd4'
}
main: {
type: ['physical'],
applyTo: 'hitPoints',
value: {
custom: {
enabled: true,
formula: '@profd4'
}
}
}
@ -838,7 +836,7 @@ export default class DhCharacter extends DhCreature {
isReversed: true
};
this.attack.damage.parts.hitPoints.value.custom.formula = `@prof${this.basicAttackDamageDice}${this.rules.attack.damage.bonus ? ` + ${this.rules.attack.damage.bonus}` : ''}`;
this.attack.damage.main.value.custom.formula = `@prof${this.basicAttackDamageDice}${this.rules.attack.damage.bonus ? ` + ${this.rules.attack.damage.bonus}` : ''}`;
// Clamp resources (must be done last to ensure all updates occur)
this.resources.clamp();