Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit 41a31d3

Browse files
committed
fast healing
1 parent a7a1d43 commit 41a31d3

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

resources/templateCharacter.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
**AC** {{ @rollData.attributes.ac.normal.total }}, touch {{ @rollData.attributes.ac.touch.total }}, flat-footed {{ @rollData.attributes.ac.flatFooted.total }}
99
**hp** {{ #health }}
1010
**Fort** {{ @rollData.attributes.savingThrows.fort.total }}, **Ref** {{ @rollData.attributes.savingThrows.ref.total }}, **Will** {{ @rollData.attributes.savingThrows.will.total }}
11-
**DR** {{ @rollData.traits.dr }}; **Immune** {}; **SR** {{ @rollData.attributes.sr.total }}
11+
**DR** {{ @rollData.traits.dr }}; **Immune** {}; **Resist** {{ @rollData.traits.eres }}; **SR** {{ @rollData.attributes.sr.total }}
1212
**Weaknesses** {}
1313

1414
#### OFFENSE

scripts/lib/ComputedProperties/AlignmentBlockProperty.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export class AlignmentBlockProperty extends ComputedProperty {
2222
for (const class1 of classes) {
2323
// console.log(class1);
2424
if (class1.data.classType !== 'racial') {
25-
classesTextArr.push(`${class1.name} ${class1.data.level}`)
25+
classesTextArr.push(`${class1.name} ${class1.data.level}`);
2626
}
2727
}
28-
classesText += classesTextArr.join('/')
28+
classesText += classesTextArr.join('/');
2929

3030
let race = this.input?.race?.data?.name;
3131
let alignment = this.input?._rollData?.details?.alignment;

scripts/lib/ComputedProperties/HealthProperty.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ export class HealthProperty extends ComputedProperty {
2424
}
2525
}
2626

27-
return `${this.input?._rollData?.attributes?.hp?.max} (${classesTextArr.join('+')}${Helpers.fancyNumber(this.propertyStore.get('conHpBonus'))})`;
27+
let ret = `${this.input?._rollData?.attributes?.hp?.max} (${classesTextArr.join('+')}${Helpers.fancyNumber(this.propertyStore.get('conHpBonus'))})`;
28+
let fastHealing = this.input?._rollData?.traits?.fastHealing?.toLowerCase();
29+
30+
fastHealing = fastHealing?.replace('fast healing', '').trim();
31+
32+
if (fastHealing !== '' && fastHealing !== '0') {
33+
ret += `; fast healing ${fastHealing}`;
34+
}
35+
36+
return ret;
2837
}
2938

3039
getDependencies() {

scripts/lib/ComputedProperties/SpellsProperty.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class SpellsProperty extends ComputedProperty {
4646
} else {
4747
let spellsPerDay = this.input?._rollData?.spells[this.spellBookType]?.spells[`spell${key}`]?.max;
4848
if (spellsPerDay === null) {
49-
spellsPerDay = '???'
49+
spellsPerDay = '???';
5050
}
5151
str += ` (${spellsPerDay}/day) - `;
5252
}

scripts/module.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Hooks.on('getActorSheetHeaderButtons', async (sheet, buttons) => {
1515
class: 'export-sb',
1616
icon: 'fas fa-file-export',
1717
onclick: async () => {
18-
// Open Config window
1918
let sbConverter = new SbConverter(sheet.actor);
2019

2120
console.log(sheet.actor);

0 commit comments

Comments
 (0)