mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
159 - Companion (#224)
* Initial datamodel * Fixed attack * Temp * Fixed normal levelup * Fixed showing summary of new experiences * Touchups * level sync fixes * Reworked Action storage * Companions now take stress when damaged * Fixed Feature flow * Removed retroactive companion levelup * Restored delevel on partner removal * PR fixes * Added a check for card duplicates on character
This commit is contained in:
parent
6f1529fefe
commit
b7e4169079
57 changed files with 1682 additions and 1012 deletions
|
|
@ -10,6 +10,12 @@
|
|||
{{#if document.system.class.subclass}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.subclass') ' - ' document.system.class.subclass.name) type='subclass'}}
|
||||
{{/if}}
|
||||
{{#if document.system.features}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize "DAGGERHEART.Sheets.PC.Features") type='features'}}
|
||||
{{/if}}
|
||||
{{#if document.system.companionFeatures}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize "DAGGERHEART.Sheets.PC.CompanionFeatures") type='companionFeatures'}}
|
||||
{{/if}}
|
||||
{{#if document.system.community}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(concat (localize 'TYPES.Item.community') ' - ' document.system.community.name) type='community'}}
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<aside class="character-sidebar-sheet">
|
||||
<div class="portrait {{#if (gte document.system.resources.hitPoints.value document.system.resources.hitPoints.maxTotal)}}death-roll{{/if}}">
|
||||
<div class="portrait {{#if document.system.deathMoveViable}}death-roll{{/if}}">
|
||||
<img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
||||
<a class="death-roll-btn" data-tooltip="{{localize "DAGGERHEART.Sheets.PC.Health.DeathMoveTooltip"}}" data-action="makeDeathMove"><i class="fas fa-skull death-save" ></i></a>
|
||||
</div>
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
<div class="status-number">
|
||||
<div class='status-value armor-slots'>
|
||||
{{#if document.system.armor.system.marks}}
|
||||
<p>{{document.system.armor.system.marks.value}}/{{document.system.armor.system.marks.max}}</p>
|
||||
<p>{{document.system.armor.system.marks.value}}/{{document.system.armorScore}}</p>
|
||||
{{else}}
|
||||
<p>-</p>
|
||||
{{/if}}
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
<div class="experience-value">
|
||||
+{{experience.total}}
|
||||
</div>
|
||||
<input name="{{concat "system.experiences." id ".description"}}" data-experience={{id}} value="{{experience.description}}" type="text" />
|
||||
<input name="{{concat "system.experiences." id ".name"}}" data-experience={{id}} value="{{experience.name}}" type="text" />
|
||||
<div class="controls">
|
||||
<a data-action="toChat" data-type="experience" data-uuid="{{id}}"><i class="fa-regular fa-message"></i></a>
|
||||
</div>
|
||||
|
|
|
|||
44
templates/sheets/actors/companion/tempMain.hbs
Normal file
44
templates/sheets/actors/companion/tempMain.hbs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<div class="temp-container standard-form">
|
||||
<img class="profile" src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
||||
<div class="form-group">
|
||||
<div class="form-fields">
|
||||
<label>{{localize "DAGGERHEART.Sheets.Companion.FIELDS.partner.label"}}</label>
|
||||
<select class="partner-value">
|
||||
{{selectOptions playerCharacters selected=source.system.partner.uuid labelAttr="name" valueAttr="key" blank=""}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{formGroup systemFields.resources.fields.stress.fields.value value=source.system.resources.stress.value localize=true }}
|
||||
{{formGroup systemFields.evasion.fields.value value=source.system.evasion.value localize=true }}
|
||||
|
||||
<div>{{localize "DAGGERHEART.Sheets.Companion.Experiences"}}</div>
|
||||
<div class="flexcol">
|
||||
{{#each source.system.experiences as |experience key|}}
|
||||
<div class="flexrow">
|
||||
<input type="text" name="{{concat "system.experiences." key ".name"}}" value="{{experience.name}}" />
|
||||
<div>{{signedNumber experience.value}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div class="flexrow">
|
||||
<div class="form-group">
|
||||
<div class="form-fields">
|
||||
<label>{{localize "DAGGERHEART.Sheets.Companion.FIELDS.attack.name.label"}}</label>
|
||||
<input type="text" name="system.attack.name" value="{{source.system.attack.name}}" />
|
||||
<button data-action="attackRoll">Attack</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flexrow">
|
||||
<div class="form-group">
|
||||
<div class="form-fields">
|
||||
<label>{{localize "DAGGERHEART.Sheets.Companion.Level"}}</label>
|
||||
<div>{{source.system.levelData.level.changed}}</div>
|
||||
<button data-action="levelUp" {{#if (not source.system.levelData.canLevelUp)}}disabled{{/if}}>Level Up</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
16
templates/sheets/global/partials/action-item.hbs
Normal file
16
templates/sheets/global/partials/action-item.hbs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<li class="inventory-item" data-item-id="{{item.id}}" data-is-action="true" data-partner="{{partner}}">
|
||||
<img src="{{item.img}}" class="item-img" data-action="useItem" />
|
||||
<div class="item-label">
|
||||
<div class="item-name">{{item.name}}</div>
|
||||
{{!-- <div class="item-tags">
|
||||
<div class="tag">
|
||||
</div>
|
||||
<div class="tag">
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
<div class="controls">
|
||||
<a data-action="toChat" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToChat'}}"><i class="fa-regular fa-message"></i></a>
|
||||
<a data-action="triggerContextMenu" data-tooltip="{{localize 'DAGGERHEART.Tooltip.moreOptions'}}"><i class="fa-solid fa-ellipsis-vertical"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -34,6 +34,16 @@
|
|||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=effect type=../type}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#each document.system.features as |feature|}}
|
||||
{{#if (or (eq ../type 'features'))}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=feature}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#each document.system.companionFeatures as |feature|}}
|
||||
{{#if (or (eq ../type 'companionFeatures'))}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=feature companion=true}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{/unless}}
|
||||
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<li class="inventory-item" data-item-id="{{item.id}}">
|
||||
<li class="inventory-item" data-item-id="{{item.id}}" data-companion="{{companion}}">
|
||||
<img src="{{item.img}}" class="item-img" data-action="useItem"/>
|
||||
<div class="item-label">
|
||||
<div class="item-name">{{item.name}}</div>
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
<section
|
||||
class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}'
|
||||
data-tab='{{tabs.effects.id}}'
|
||||
data-group='{{tabs.effects.group}}'
|
||||
>
|
||||
<fieldset class="two-columns">
|
||||
<legend>{{localize "Effects"}}</legend>
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.addEffect"}}</span>
|
||||
<div class="nest-inputs">
|
||||
<select class="effect-select">
|
||||
{{selectOptions effectConfig.effectTypes selected=selectedEffectType labelAttr="name" localize=true blank=""}}
|
||||
</select>
|
||||
<a data-action="addEffect" {{disabled (not selectedEffectType)}}>
|
||||
<i class="fa-solid fa-plus icon-button {{disabled (not selectedEffectType)}}"></i>
|
||||
</a>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{{#each document.system.effects as |effect key|}}
|
||||
<fieldset class="two-columns">
|
||||
<legend>
|
||||
{{localize (concat 'DAGGERHEART.Effects.Types.' effect.type '.Name')}}
|
||||
<a>
|
||||
<i class="fa-solid fa-trash icon-button flex0" data-action="removeEffect" data-effect="{{key}}"></i>
|
||||
</a>
|
||||
</legend>
|
||||
{{#if effect.applyLocationChoices}}
|
||||
<span>
|
||||
{{localize "DAGGERHEART.Sheets.Feature.effects.applyLocation"}}
|
||||
</span>
|
||||
<select name="system.effects.{{key}}.appliesOn">
|
||||
{{selectOptions effect.applyLocationChoices selected=effect.appliesOn localize=true}}
|
||||
</select>
|
||||
{{/if}}
|
||||
{{#if (eq effect.valueType @root.effectConfig.valueTypes.numberString.id)}}
|
||||
{{#if (eq effect.type @root.effectConfig.effectTypes.damage.id) }}
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.value"}}</span>
|
||||
<input type="text" name="system.effects.{{key}}.valueData.value" value="{{effect.valueData.value}}" />
|
||||
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.initiallySelected"}}</span>
|
||||
<input type="checkbox" name="system.effects.{{key}}.initiallySelected" {{checked effect.initiallySelected}} />
|
||||
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.hopeIncrease"}}</span>
|
||||
<input type="text" name="system.effects.{{key}}.valueData.hopeIncrease" value="{{effect.valueData.hopeIncrease}}" />
|
||||
{{else}}
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.effects.value"}}</span>
|
||||
<input type="text" name="system.effects.{{key}}.valueData.value" value="{{effect.valueData.value}}" />
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (eq effect.valueType @root.effectConfig.valueTypes.select.id)}}
|
||||
<span>
|
||||
{{localize effect.valueData.fromValue}}
|
||||
</span>
|
||||
<select name="system.effects.{{key}}.valueData.fromValue" value="{{effect.valueData.fromValue}}">
|
||||
{{selectOptions effect.options selected=effect.valueData.fromValue labelAttr="name" valueAttr="value" localize=true blank="" }}
|
||||
</select>
|
||||
|
||||
<span>
|
||||
{{localize effect.valueData.name}}
|
||||
</span>
|
||||
<select name="system.effects.{{key}}.valueData.value" value="{{effect.valueData.value}}">
|
||||
{{selectOptions effect.options selected=effect.valueData.value labelAttr="name" valueAttr="value" localize=true blank="" }}
|
||||
</select>
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
{{/each}}
|
||||
</section>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<line-div></line-div>
|
||||
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
|
||||
<div class='item-description'>
|
||||
<h3>{{localize (concat 'DAGGERHEART.Feature.Type.' source.system.type)}}</h3>
|
||||
<h3>{{localize (concat 'TYPES.Item.feature' source.system.type)}}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<section
|
||||
class='tab {{tabs.settings.cssClass}} {{tabs.settings.id}}'
|
||||
data-tab='{{tabs.settings.id}}'
|
||||
data-group='{{tabs.settings.group}}'
|
||||
>
|
||||
<fieldset class="two-columns">
|
||||
<legend>{{localize tabs.settings.label}}</legend>
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.FeatureType"}}</span>
|
||||
{{formField systemFields.type value=source.system.type rootId=partId localize=true }}
|
||||
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.ActionType"}}</span>
|
||||
{{formField systemFields.actionType value=source.system.actionType rootId=partId localize=true }}
|
||||
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.RefreshType"}}</span>
|
||||
<div class="nest-inputs">
|
||||
<span><input type="text" name="system.refreshData.uses" value="{{source.system.refreshData.uses}}" data-dtype="Number" /></span>
|
||||
{{formField systemFields.refreshData.fields.type value=source.system.refreshData.type rootId=partId localize=true }}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="two-columns">
|
||||
<legend>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Title"}}</legend>
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Title"}}</span>
|
||||
<select name="system.featureType.type">
|
||||
{{selectOptions itemConfig.valueTypes selected=document.system.featureType.type labelAttr="name" localize=true}}
|
||||
</select>
|
||||
|
||||
{{#if (eq document.system.featureType.type "dice")}}
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Dice"}}</span>
|
||||
<select name="system.featureType.data.value">
|
||||
{{selectOptions dice selected=document.system.featureType.data.value }}
|
||||
</select>
|
||||
|
||||
<span>{{localize "DAGGERHEART.Feature.Max"}}</span>
|
||||
<input type="text" name="system.featureType.data.max" value="{{document.system.featureType.data.max}}" />
|
||||
|
||||
<span>{{localize "DAGGERHEART.Sheets.Feature.ValueType.Property"}}</span>
|
||||
<select name="system.featureType.data.property">
|
||||
{{selectOptions properties selected=document.system.featureType.data.property labelAttr="name" localize=true}}
|
||||
</select>
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<i class="fa-solid fa-caret-left"></i>
|
||||
<div class="health-category">{{localize "DAGGERHEART.Sheets.PC.Health.Severe"}}</div>
|
||||
</div>
|
||||
<i data-action="makeDeathMove" class="fas fa-skull death-save {{#if (lt resources.hitPoints.value document.system.resources.hitPoints.maxTotal)}}disabled{{/if}}" title="{{localize "DAGGERHEART.Sheets.PC.Health.DeathMoveTooltip"}}"></i>
|
||||
<i data-action="makeDeathMove" class="fas fa-skull death-save {{#if document.system.deathMoveViable}}disabled{{/if}}" title="{{localize "DAGGERHEART.Sheets.PC.Health.DeathMoveTooltip"}}"></i>
|
||||
</div>
|
||||
<div class="flexrow" style="flex-wrap: nowrap; align-items: center;">
|
||||
<div class="flexcol flex0">
|
||||
|
|
|
|||
|
|
@ -111,5 +111,16 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if this.vicious}}
|
||||
<div>
|
||||
<h3>{{localize "DAGGERHEART.Application.LevelUp.summary.vicious"}}</h3>
|
||||
{{#each this.vicious}}
|
||||
<div class="levelup-radio-choices">
|
||||
{{radioBoxes (concat "levelup." this.path ".data") @root.viciousChoices checked=(lookup this.data 0)}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -4,55 +4,58 @@
|
|||
data-group='{{tabs.summary.group}}'
|
||||
>
|
||||
<div class="section-container levelup-summary-container">
|
||||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.Application.LevelUp.summary.levelAchievements"}}</legend>
|
||||
{{#if this.achievements}}
|
||||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.Application.LevelUp.summary.levelAchievements"}}</legend>
|
||||
|
||||
<div class="level-achievements-container">
|
||||
{{#if this.achievements.proficiency.shown}}
|
||||
<div>
|
||||
<div class="increase-container">
|
||||
{{localize "DAGGERHEART.Application.LevelUp.summary.proficiencyIncrease" proficiency=this.achievements.proficiency.old }}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
{{this.achievements.proficiency.new}}
|
||||
<div class="level-achievements-container">
|
||||
{{#if this.achievements.proficiency.shown}}
|
||||
<div>
|
||||
<div class="increase-container">
|
||||
{{localize "DAGGERHEART.Application.LevelUp.summary.proficiencyIncrease" proficiency=this.achievements.proficiency.old }}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
{{this.achievements.proficiency.new}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div>
|
||||
<h5 class="summary-section">{{localize "DAGGERHEART.Application.LevelUp.summary.damageThresholds"}}{{#if this.levelAchievements.damageThresholds.unarmored}}({{localize "DAGGERHEART.General.unarmored"}}){{/if}}</h5>
|
||||
<div class="increase-container">
|
||||
{{localize "DAGGERHEART.Application.LevelUp.summary.damageThresholdMajorIncrease" threshold=this.achievements.damageThresholds.major.old }}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
{{this.achievements.damageThresholds.major.new}}
|
||||
</div>
|
||||
<div class="increase-container">
|
||||
{{localize "DAGGERHEART.Application.LevelUp.summary.damageThresholdSevereIncrease" threshold=this.achievements.damageThresholds.severe.old }}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
{{this.achievements.damageThresholds.severe.new}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if this.achievements.damageThresholds}}
|
||||
<div>
|
||||
<h5 class="summary-section">{{localize "DAGGERHEART.Application.LevelUp.summary.damageThresholds"}}{{#if this.levelAchievements.damageThresholds.unarmored}}({{localize "DAGGERHEART.General.unarmored"}}){{/if}}</h5>
|
||||
<div class="increase-container">
|
||||
{{localize "DAGGERHEART.Application.LevelUp.summary.damageThresholdMajorIncrease" threshold=this.achievements.damageThresholds.major.old }}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
{{this.achievements.damageThresholds.major.new}}
|
||||
</div>
|
||||
<div class="increase-container">
|
||||
{{localize "DAGGERHEART.Application.LevelUp.summary.damageThresholdSevereIncrease" threshold=this.achievements.damageThresholds.severe.old }}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
{{this.achievements.damageThresholds.severe.new}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if this.achievements.domainCards.shown}}
|
||||
<div>
|
||||
<h5>{{localize "DAGGERHEART.Application.LevelUp.summary.domainCards"}}</h5>
|
||||
<div class="summary-selection-container">
|
||||
{{#each this.achievements.domainCards.values}}
|
||||
<div class="summary-selection">{{this.name}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if this.achievements.experiences.shown}}
|
||||
<div>
|
||||
<h5>{{localize "DAGGERHEART.Application.LevelUp.summary.newExperiences"}}</h5>
|
||||
<div class="summary-selection-container">
|
||||
{{#each this.achievements.experiences.values}}
|
||||
<div class="summary-selection">{{this.name}} {{signedNumber this.modifier}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if this.achievements.domainCards.shown}}
|
||||
<div>
|
||||
<h5>{{localize "DAGGERHEART.Application.LevelUp.summary.domainCards"}}</h5>
|
||||
<div class="summary-selection-container">
|
||||
{{#each this.achievements.domainCards.values}}
|
||||
<div class="summary-selection">{{this.name}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if this.achievements.experiences.shown}}
|
||||
<div>
|
||||
<h5>{{localize "DAGGERHEART.Application.LevelUp.summary.newExperiences"}}</h5>
|
||||
<div class="summary-selection-container">
|
||||
{{#each this.achievements.experiences.values}}
|
||||
<div class="summary-selection">{{this.name}} {{signedNumber this.modifier}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.Application.LevelUp.summary.levelAdvancements"}}</legend>
|
||||
|
||||
|
|
@ -151,6 +154,26 @@
|
|||
</div>
|
||||
{{/with}}
|
||||
{{/if}}
|
||||
|
||||
{{#if this.advancements.vicious.damage}}
|
||||
<div class="increase-container">
|
||||
{{localize "DAGGERHEART.Application.LevelUp.summary.damageIncreased" damage=this.advancements.vicious.damage.old }}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
{{this.advancements.vicious.damage.new}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if this.advancements.vicious.range}}
|
||||
<div class="increase-container">
|
||||
{{localize "DAGGERHEART.Application.LevelUp.summary.rangeIncreased" range=this.advancements.vicious.range.old }}
|
||||
<i class="fa-solid fa-arrow-right-long"></i>
|
||||
{{this.advancements.vicious.range.new}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#each this.advancements.simple}}
|
||||
<div class="summary-selection-container">
|
||||
<div class="summary-selection">{{localize "DAGGERHEART.Application.LevelUp.summary.simpleFeature" feature=this}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue