basics of tome and ritual item sheets done

This commit is contained in:
TheLastScrub
2024-08-02 16:40:06 -07:00
parent 6a976a2c7a
commit 008ee88c58
6 changed files with 126 additions and 17 deletions
+1 -1
View File
@@ -1062,7 +1062,7 @@ input.item-sheet-short-input {
.tome-sheet-handler-info-horizontal-grid-2col {
display: grid;
grid-template-columns: max-content auto;
align-items: left;
align-items: center;
text-align: left;
column-gap: 10px;
row-gap: 10px;
+6 -1
View File
@@ -297,5 +297,10 @@
"DG.ItemWindow.Tome.UnnaturalIncrease": "Unnatural Skill Increase",
"DG.ItemWindow.Tome.StudySanityDamage": "Study Sanity Damage",
"DG.ItemWindow.Tome.HandlerOnlyTabHeader": "Handler Only",
"DG.ItemWindow.Tome.HandlerNotes": "Handler"
"DG.ItemWindow.Tome.HandlerNotes": "Handler Notes",
"DG.ItemWindow.Ritual.ActivationSanityDamage": "Activation SAN Damage",
"DG.ItemWindow.Ritual.ActivationTime": "Activation Time",
"DG.ItemWindow.Ritual.ActivationCosts": "Activation Costs",
"DG.ItemWindow.Ritual.StudyTime": "Study Time"
}
+5 -5
View File
@@ -45,7 +45,7 @@ export default class DeltaGreenItemSheet extends ItemSheet {
{ async: true },
);
if (data.item.type === "tome" || data.type === "ritual") {
if (data.item.type === "tome" || data.item.type === "ritual") {
data.enrichedHandlerNotes = await TextEditor.enrichHTML(
this.object.system.handlerNotes,
{ async: true },
@@ -144,10 +144,10 @@ export default class DeltaGreenItemSheet extends ItemSheet {
}
case "sanity-damage": {
let combinedFormula;
if (this.item.type === "tome") {
const { successLoss, failedLoss } = this.item.system.sanity;
combinedFormula = `{${successLoss}, ${failedLoss}}`;
}
const { successLoss, failedLoss } = this.item.system.sanity;
combinedFormula = `{${successLoss}, ${failedLoss}}`;
roll = new DGSanityDamageRoll(combinedFormula, {}, rollOptions);
break;
}
+10 -6
View File
@@ -582,7 +582,7 @@
"sanity": {
"notes": "",
"failedLoss": "1D6",
"successLoss": "1"
"successLoss": "1D4"
},
"handlerNotes": "",
"revealed": false
@@ -590,13 +590,17 @@
"ritual": {
"templates": ["base"],
"studyTime": "weeks",
"studySanCost": "1D10",
"studyUnnaturalIncrease": 1,
"activationSanCost": "1D10",
"sanity": {
"notes": "",
"failedLoss": "1D10",
"successLoss": "0"
},
"unnaturalSkillIncrease": 1,
"activationCosts": "6 WP, 0 POW, 0 HP",
"complexity": "Simple",
"activationTime": "days",
"handlerNotes": ""
"complexity": "Simple",
"handlerNotes": "",
"revealed": false
}
}
}
+101
View File
@@ -0,0 +1,101 @@
<form class="{{cssClass}} {{getCharacterSheetStyle}}" autocomplete="off">
<header class="">
<div class="gear-sheet-grid-2col">
<img class="item-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="tome-sheet-horizontal-grid-2col">
{{#if item.system.revealed}}
<span class="resource-label">
{{#if (playerHasGamemasterPrivileges)}}<a class="tome-show-hide-info"><i class="far fa-eye"></i></a>{{/if}}
{{localize 'DG.Tome.Name'}}:
</span>
<input name="name" type="text" value="{{item.name}}" placeholder="{{localize 'DG.ItemWindow.Tome.NamePlaceholder'}}"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.StudyTime'}}:</span>
<input name="system.studyTime" type="text" value="{{item.system.studyTime}}" placeholder="{{localize 'DG.ItemWindow.Tome.StudyTime'}}"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.ActivationTime'}}:</span>
<input name="system.activationTime" type="text" value="{{item.system.activationTime}}" placeholder="{{localize 'DG.ItemWindow.Ritual.ActivationTime'}}"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.ActivationCosts'}}:</span>
<input name="system.activationCosts" type="text" value="{{item.system.activationCosts}}" placeholder="{{localize 'DG.ItemWindow.Ritual.ActivationCosts'}}"/>
{{else}}
{{#if (playerHasGamemasterPrivileges)}}
<span class="resource-label">
{{#if (playerHasGamemasterPrivileges)}}<a class="tome-show-hide-info"><i class="far fa-eye-slash"></i></a>{{/if}}
{{localize 'DG.Tome.Name'}}:
</span>
<input name="name" type="text" value="{{item.name}}" placeholder="{{localize 'DG.ItemWindow.Tome.NamePlaceholder'}}"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.StudyTime'}}:</span>
<input name="system.studyTime" type="text" value="{{item.system.studyTime}}" placeholder="{{localize 'DG.ItemWindow.Tome.StudyTime'}}"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.ActivationTime'}}:</span>
<input name="system.activationTime" type="text" value="{{item.system.activationTime}}" placeholder="{{localize 'DG.ItemWindow.Ritual.ActivationTime'}}"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.ActivationCosts'}}:</span>
<input name="system.activationCosts" type="text" value="{{item.system.activationCosts}}" placeholder="{{localize 'DG.ItemWindow.Ritual.ActivationCosts'}}"/>
{{else}}
<span class="resource-label">
{{#if (playerHasGamemasterPrivileges)}}<a class="tome-show-hide-info"><i class="far fa-eye-slash"></i></a>{{/if}}
{{localize 'DG.Tome.Name'}}:
</span>
<span>???</span>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.StudyTime'}}:</span>
<span>???</span>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.ActivationTime'}}:</span>
<span>???</span>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.ActivationCosts'}}:</span>
<span>???</span>
{{/if}}
{{/if}}
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="description">{{localize 'DG.ItemWindow.Tome.Description'}}</a>
{{#if (playerHasGamemasterPrivileges)}}
<a class="item" data-tab="handler">{{localize 'DG.ItemWindow.Tome.HandlerOnlyTabHeader'}}</a>
{{/if}}
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Description Tab --}}
<div class="tab top-div-border" data-group="primary" data-tab="description">
{{editor enrichedDescription target="system.description" button=true owner=owner editable=editable}}
</div>
{{!-- Handler Notes Tab --}}
{{#if (playerHasGamemasterPrivileges)}}
<div class="tab" data-group="primary" data-tab="handler">
<div class="tome-sheet-handler-info-horizontal-grid-2col">
<span class="resource-label">{{localize 'DG.ItemWindow.Tome.UnnaturalIncrease'}}:</span>
<input class="item-sheet-short-input" name="system.unnaturalSkillIncrease" type="text" value="{{item.system.unnaturalSkillIncrease}}" type="integer" data-dtype="Number"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Ritual.ActivationSanityDamage'}}:</span>
<span>
<input class="item-sheet-short-input" name="system.sanity.successLoss" type="text" value="{{item.system.sanity.successLoss}}" type="text" />
/
<input class="item-sheet-short-input" name="system.sanity.failedLoss" type="text" value="{{item.system.sanity.failedLoss}}" type="text" />
<i class="fas fa-dice rollable" data-rolltype="sanity-damage"></i>
</span>
</div>
<span class="resource-label">{{localize 'DG.ItemWindow.Tome.HandlerNotes'}}:</span>
<div class="tab top-div-border">
{{editor enrichedHandlerNotes target="system.handlerNotes" button=true owner=owner editable=editable}}
</div>
</div>
{{/if}}
</section>
</form>
+3 -4
View File
@@ -34,7 +34,7 @@
{{#if (playerHasGamemasterPrivileges)}}<a class="tome-show-hide-info"><i class="far fa-eye-slash"></i></a>{{/if}}
{{localize 'DG.Tome.Name'}}:
</span>
<span>???<span>
<span>???</span>
<span class="resource-label">Language:</span>
<span>???</span>
@@ -45,7 +45,6 @@
{{/if}}
</div>
</div>
</div>
</header>
@@ -78,9 +77,9 @@
<span class="resource-label">{{localize 'DG.ItemWindow.Tome.StudySanityDamage'}}:</span>
<span>
<input class="item-sheet-short-input" name="system.sanity.successLoss" type="text" value="{{item.system.sanity.successLoss}}" type="text" data-dtype="Text"/>
<input class="item-sheet-short-input" name="system.sanity.successLoss" type="text" value="{{item.system.sanity.successLoss}}" type="text" />
/
<input class="item-sheet-short-input" name="system.sanity.failedLoss" type="text" value="{{item.system.sanity.failedLoss}}" type="text" data-dtype="Text"/>
<input class="item-sheet-short-input" name="system.sanity.failedLoss" type="text" value="{{item.system.sanity.failedLoss}}" type="text" />
<i class="fas fa-dice rollable" data-rolltype="sanity-damage"></i>
</span>
</div>