Data model change
This commit is contained in:
parent
dbf9c01cd7
commit
918d69e677
@ -80,7 +80,7 @@ export class CrucibleActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getEncumbranceCapacity() {
|
getEncumbranceCapacity() {
|
||||||
return this.data.data.statistics.str.value * 25
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -129,9 +129,6 @@ export class CrucibleActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getSkills() {
|
getSkills() {
|
||||||
let comp = duplicate(this.data.items.filter(item => item.type == 'skill') || []);
|
let comp = duplicate(this.data.items.filter(item => item.type == 'skill') || []);
|
||||||
for (let c of comp) {
|
|
||||||
c.data.dice = CrucibleUtility.getDiceFromLevel(c.data.level);
|
|
||||||
}
|
|
||||||
return comp;
|
return comp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +86,8 @@ export class CrucibleUtility {
|
|||||||
|
|
||||||
const templatePaths = [
|
const templatePaths = [
|
||||||
'systems/fvtt-crucible-rpg/templates/editor-notes-gm.html',
|
'systems/fvtt-crucible-rpg/templates/editor-notes-gm.html',
|
||||||
|
'systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html',
|
||||||
|
'systems/fvtt-crucible-rpg/templates/partial-actor-status.html',
|
||||||
'systems/fvtt-crucible-rpg/templates/partial-options-abilities.html',
|
'systems/fvtt-crucible-rpg/templates/partial-options-abilities.html',
|
||||||
'systems/fvtt-crucible-rpg/templates/partial-item-nav.html',
|
'systems/fvtt-crucible-rpg/templates/partial-item-nav.html',
|
||||||
'systems/fvtt-crucible-rpg/templates/partial-item-description.html',
|
'systems/fvtt-crucible-rpg/templates/partial-item-description.html',
|
||||||
|
@ -22,36 +22,43 @@
|
|||||||
"str":{
|
"str":{
|
||||||
"label": "Strength",
|
"label": "Strength",
|
||||||
"abbrev": "str",
|
"abbrev": "str",
|
||||||
|
"col": 1,
|
||||||
"value": 1
|
"value": 1
|
||||||
},
|
},
|
||||||
"agi":{
|
"agi":{
|
||||||
"label": "Agility",
|
"label": "Agility",
|
||||||
"abbrev": "agi",
|
"abbrev": "agi",
|
||||||
|
"col": 1,
|
||||||
"value": 1
|
"value": 1
|
||||||
},
|
},
|
||||||
"dex":{
|
"dex":{
|
||||||
"label": "Dexterity",
|
"label": "Dexterity",
|
||||||
"abbrev": "dex",
|
"abbrev": "dex",
|
||||||
|
"col": 1,
|
||||||
"value": 1
|
"value": 1
|
||||||
},
|
},
|
||||||
"con":{
|
"con":{
|
||||||
"label": "Constitution",
|
"label": "Constitution",
|
||||||
"abbrev": "con",
|
"abbrev": "con",
|
||||||
|
"col": 1,
|
||||||
"value": 1
|
"value": 1
|
||||||
},
|
},
|
||||||
"int":{
|
"int":{
|
||||||
"label": "Intelligence",
|
"label": "Intelligence",
|
||||||
"abbrev": "int",
|
"abbrev": "int",
|
||||||
|
"col": 2,
|
||||||
"value": 1
|
"value": 1
|
||||||
},
|
},
|
||||||
"wit":{
|
"wit":{
|
||||||
"label": "Wits",
|
"label": "Wits",
|
||||||
"abbrev": "wit",
|
"abbrev": "wit",
|
||||||
|
"col": 2,
|
||||||
"value": 1
|
"value": 1
|
||||||
},
|
},
|
||||||
"cha":{
|
"cha":{
|
||||||
"label": "Charisma",
|
"label": "Charisma",
|
||||||
"abbrev": "cha",
|
"abbrev": "cha",
|
||||||
|
"col": 2,
|
||||||
"value": 1
|
"value": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -11,60 +11,28 @@
|
|||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<ul>
|
<ul>
|
||||||
{{#each data.statistics as |stat key|}}
|
{{#each data.abilities as |ability key|}}
|
||||||
{{#if (eq stat.col 1)}}
|
{{#if (eq ability.col 1)}}
|
||||||
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}}
|
{{> systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html ability=ability key=key}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<li class="item flexrow list-item color-class-pool item-stat-roll" data-attr-key="pool">
|
|
||||||
<span class="stat-icon">
|
|
||||||
<img class="stat-icon" src="icons/dice/d12black.svg">
|
|
||||||
</span>
|
|
||||||
<span class="stat-label stat-margin" name="pool">
|
|
||||||
<h4 class="stat-text-white stat-margin"><a class="generic-pool-roll stat-margin"
|
|
||||||
data-stat-key="pool">Dice Pool</a></h4>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="stat-item">
|
<div class="stat-item">
|
||||||
<ul>
|
<ul>
|
||||||
{{#each data.statistics as |stat key|}}
|
{{#each data.abilities as |ability key|}}
|
||||||
{{#if (eq stat.col 2)}}
|
{{#if (eq ability.col 2)}}
|
||||||
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}}
|
{{> systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html ability=ability key=key}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<li class="item flexrow list-item color-class-mr item-stat-roll" data-attr-key="mr">
|
|
||||||
<span class="stat-icon">
|
|
||||||
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/MR.webp">
|
|
||||||
</span>
|
|
||||||
<span class="stat-label stat-margin" name="mr">
|
|
||||||
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="mr">MR</a>
|
|
||||||
</h4>
|
|
||||||
</span>
|
|
||||||
<select class="status-small-label color-class-common" type="text" name="data.mr.value"
|
|
||||||
value="{{data.mr.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
|
|
||||||
{{#select data.mr.value}}
|
|
||||||
{{{@root.optionsDiceList}}}
|
|
||||||
{{/select}}
|
|
||||||
</select>
|
|
||||||
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
|
|
||||||
name="data.mr.mod" value="{{data.mr.mod}}" data-dtype="Number" {{#unless
|
|
||||||
@root.editScore}}disabled{{/unless}} />
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="stat-item status-block">
|
<div class="stat-item status-block">
|
||||||
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-status.html}}
|
{{> systems/fvtt-crucible-rpg/templates/partial-actor-status.html}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--
|
|
||||||
<label class="status-small-label">Active NRG</label>
|
|
||||||
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -73,9 +41,9 @@
|
|||||||
|
|
||||||
{{!-- Sheet Tab Navigation --}}
|
{{!-- Sheet Tab Navigation --}}
|
||||||
<nav class="sheet-tabs tabs" data-group="primary">
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="skills">Skills</a>
|
||||||
<a class="item" data-tab="combat">Combat</a>
|
<a class="item" data-tab="combat">Combat</a>
|
||||||
<a class="item" data-tab="specs">Specialisations</a>
|
<a class="item" data-tab="lore">Lore</a>
|
||||||
<a class="item" data-tab="powers">Powers/Abilities</a>
|
|
||||||
<a class="item" data-tab="equipment">Equipment</a>
|
<a class="item" data-tab="equipment">Equipment</a>
|
||||||
<a class="item" data-tab="biodata">Biography</a>
|
<a class="item" data-tab="biodata">Biography</a>
|
||||||
</nav>
|
</nav>
|
||||||
@ -83,6 +51,41 @@
|
|||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
{{!-- Skills Tab --}}
|
||||||
|
<div class="tab items" data-group="primary" data-tab="skills">
|
||||||
|
|
||||||
|
<ul class="stat-list alternate-list">
|
||||||
|
<li class="item flexrow list-item items-title-bg">
|
||||||
|
<span class="item-name-label-header">
|
||||||
|
<h3><label class="items-title-text">Skills</label></h3>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-short">
|
||||||
|
<label class="short-label">Ability</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-short">
|
||||||
|
<label class="short-label">Score</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-long">
|
||||||
|
<label class="short-label">Background</label>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
{{#each skills as |skill key|}}
|
||||||
|
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{skill._id}}">
|
||||||
|
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
||||||
|
src="{{skill.img}}" /></a>
|
||||||
|
<span class="item-name-label"><a class="roll-spec">{{skill.name}}</a></span>
|
||||||
|
<span class="item-field-label-short">{{upper skill.data.ability}}</span>
|
||||||
|
<span class="item-field-label-short">{{skill.data.dice}}</span>
|
||||||
|
<span class="item-field-label-long"> - </span>
|
||||||
|
<div class="item-filler"> </div>
|
||||||
|
<div class="item-controls item-controls-fixed">
|
||||||
|
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{!-- Combat Tab --}}
|
{{!-- Combat Tab --}}
|
||||||
<div class="tab fight" data-group="primary" data-tab="combat">
|
<div class="tab fight" data-group="primary" data-tab="combat">
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
@ -317,55 +320,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{!-- Other Tab --}}
|
|
||||||
<div class="tab items" data-group="primary" data-tab="specs">
|
|
||||||
|
|
||||||
<ul class="stat-list alternate-list">
|
|
||||||
<li class="item flexrow list-item items-title-bg">
|
|
||||||
<span class="item-name-label-header">
|
|
||||||
<h3><label class="items-title-text">Specialisations</label></h3>
|
|
||||||
</span>
|
|
||||||
<span class="item-field-label-short">
|
|
||||||
<label class="short-label">Stat</label>
|
|
||||||
</span>
|
|
||||||
<span class="item-field-label-short">
|
|
||||||
<label class="short-label">Dice</label>
|
|
||||||
</span>
|
|
||||||
<span class="item-field-label-long">
|
|
||||||
<label class="short-label">Powergroup</label>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
{{#each specs as |spec key|}}
|
|
||||||
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{spec._id}}">
|
|
||||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
|
|
||||||
src="{{spec.img}}" /></a>
|
|
||||||
<span class="item-name-label"><a class="roll-spec">{{spec.name}}</a></span>
|
|
||||||
<span class="item-field-label-short">{{upper spec.data.statistic}}</span>
|
|
||||||
<span class="item-field-label-short">{{spec.data.dice}}</span>
|
|
||||||
{{#if spec.data.ispowergroup}}
|
|
||||||
{{#if spec.data.powersactivated}}
|
|
||||||
<span class="item-field-label-long"><a class="spec-group-deactivate">Deactivate</a></span>
|
|
||||||
{{else}}
|
|
||||||
<span class="item-field-label-long"><a class="spec-group-activate">Activate</a></span>
|
|
||||||
{{/if}}
|
|
||||||
{{else}}
|
|
||||||
<span class="item-field-label-long"> - </span>
|
|
||||||
{{/if}}
|
|
||||||
<div class="item-filler"> </div>
|
|
||||||
<div class="item-controls item-controls-fixed">
|
|
||||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{!-- Powers Tab --}}
|
{{!-- Powers Tab --}}
|
||||||
<div class="tab fight" data-group="primary" data-tab="powers">
|
<div class="tab fight" data-group="primary" data-tab="lore">
|
||||||
|
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
|
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
<li class="item flexrow list-item color-class-{{lower stat.abbrev}} item-stat-roll" data-attr-key="{{key}}">
|
|
||||||
<span class="stat-icon">
|
|
||||||
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/{{stat.abbrev}}.webp">
|
|
||||||
</span>
|
|
||||||
<span class="stat-label stat-margin" name="{{key}}">
|
|
||||||
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="{{key}}">{{stat.abbrev}}</a></h4>
|
|
||||||
</span>
|
|
||||||
<select class="status-small-label color-class-common" type="text" name="data.statistics.{{key}}.value" value="{{stat.value}}"
|
|
||||||
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
|
|
||||||
{{#select stat.value}}
|
|
||||||
{{{@root.optionsDiceList}}}
|
|
||||||
{{/select}}
|
|
||||||
</select>
|
|
||||||
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="data.statistics.{{key}}.mod" value="{{stat.mod}}"
|
|
||||||
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} />
|
|
||||||
</li>
|
|
Loading…
Reference in New Issue
Block a user