Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/module/actor/sheets/gcs-actor-sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,20 @@ class GurpsActorGcsSheet extends GurpsBaseActorSheet<

protected _preparePools(): PoolEntry[] {
const pools: PoolEntry[] = []
const systemSource = this.actor.system._source

const useConditionalInjury = getGame().settings.get('gurps', 'useConditionalInjury')

if (useConditionalInjury) pools.push(...this._prepareConditionalInjuryPools())
else pools.push(...this._prepareDefaultPools())
else {
const hpThresholds = HitPoints.getThresholds(systemSource.HP.max).reverse()

pools.push(this.#prepareAttributePool('HP', hpThresholds))
}
Comment thread
rinickolous marked this conversation as resolved.

const fpThresholds = Fatigue.getThresholds(systemSource.FP.max).reverse()

pools.push(this.#prepareAttributePool('FP', fpThresholds))

const useQuintessence = getGame().settings.get('gurps', 'use-quintessence')

Expand Down Expand Up @@ -435,15 +444,6 @@ class GurpsActorGcsSheet extends GurpsBaseActorSheet<

/* ---------------------------------------- */

protected _prepareDefaultPools(): PoolEntry[] {
const systemSource = this.actor.system._source

const hpThresholds = HitPoints.getThresholds(systemSource.HP.max).reverse()
const fpThresholds = Fatigue.getThresholds(systemSource.FP.max).reverse()

return [this.#prepareAttributePool('HP', hpThresholds), this.#prepareAttributePool('FP', fpThresholds)]
}

#prepareAttributePool(key: 'HP' | 'FP' | 'QP', thresholds: ThresholdDescriptor[]): PoolEntry {
const systemFields = this.actor.system.schema.fields
const systemSource = this.actor.system._source
Expand Down