Add NPC sheet

This commit is contained in:
sladecraven 2022-08-29 17:39:19 +02:00
parent 35d500f24b
commit a22d1329b7
5 changed files with 561 additions and 207 deletions

View File

@ -119,7 +119,6 @@ export class CrucibleActorSheet extends ActorSheet {
let actorId = li.data("actor-id"); let actorId = li.data("actor-id");
this.actor.delSubActor(actorId); this.actor.delSubActor(actorId);
}); });
html.find('.quantity-minus').click(event => { html.find('.quantity-minus').click(event => {
const li = $(event.currentTarget).parents(".item"); const li = $(event.currentTarget).parents(".item");
this.actor.incDecQuantity( li.data("item-id"), -1 ); this.actor.incDecQuantity( li.data("item-id"), -1 );
@ -143,10 +142,11 @@ export class CrucibleActorSheet extends ActorSheet {
this.actor.rollAbility(abilityKey); this.actor.rollAbility(abilityKey);
}); });
html.find('.roll-skill').click((event) => { html.find('.roll-skill').click((event) => {
const li = $(event.currentTarget).parents(".item"); const li = $(event.currentTarget).parents(".item")
const skillId = li.data("item-id") const skillId = li.data("item-id")
this.actor.rollSkill(skillId) this.actor.rollSkill(skillId)
}); });
html.find('.roll-weapon').click((event) => { html.find('.roll-weapon').click((event) => {
const li = $(event.currentTarget).parents(".item"); const li = $(event.currentTarget).parents(".item");
const skillId = li.data("item-id") const skillId = li.data("item-id")

View File

@ -24,24 +24,37 @@ export class CrucibleNPCSheet extends ActorSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {
const objectData = CrucibleUtility.data(this.object); const objectData = this.object.system
let actorData = duplicate(objectData)
this.actor.prepareTraitsAttributes();
let actorData = duplicate(CrucibleUtility.templateData(this.object));
let formData = { let formData = {
title: this.title, title: this.title,
id: objectData.id, id: this.actor.id,
type: objectData.type, type: this.actor.type,
img: objectData.img, img: this.actor.img,
name: objectData.name, name: this.actor.name,
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
data: actorData, data: actorData,
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited, limited: this.object.limited,
equipments: this.actor.getEquipments(), skills: this.actor.getSkills( ),
weapons: this.actor.getWeapons(), weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())),
spells: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getLore())),
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
equippedWeapons: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquippedWeapons()) ),
equippedArmor: this.actor.getEquippedArmor(),
equippedShield: this.actor.getEquippedShield(),
feats: duplicate(this.actor.getFeats()),
subActors: duplicate(this.actor.getSubActors()),
race: duplicate(this.actor.getRace()),
moneys: duplicate(this.actor.getMoneys()),
encCapacity: this.actor.getEncumbranceCapacity(),
saveRolls: this.actor.getSaveRoll(),
conditions: this.actor.getConditions(),
containersTree: this.actor.containersTree,
encCurrent: this.actor.encCurrent,
options: this.options, options: this.options,
owner: this.document.isOwner, owner: this.document.isOwner,
editScore: this.options.editScore, editScore: this.options.editScore,
@ -49,7 +62,7 @@ export class CrucibleNPCSheet extends ActorSheet {
} }
this.formData = formData; this.formData = formData;
console.log("NPC : ", formData, this.object); console.log("PC : ", formData, this.object);
return formData; return formData;
} }
@ -60,43 +73,97 @@ export class CrucibleNPCSheet extends ActorSheet {
// Everything below here is only needed if the sheet is editable // Everything below here is only needed if the sheet is editable
if (!this.options.editable) return; if (!this.options.editable) return;
html.bind("keydown", function(e) { // Ignore Enter in actores sheet
if (e.keyCode === 13) return false;
});
// Update Inventory Item // Update Inventory Item
html.find('.item-edit').click(ev => { html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id"); let itemId = li.data("item-id")
const item = this.actor.items.get( itemId ); const item = this.actor.items.get( itemId );
item.sheet.render(true); item.sheet.render(true);
}); });
// Delete Inventory Item // Delete Inventory Item
html.find('.item-delete').click(ev => { html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item")
FraggedKingdomUtility.confirmDelete(this, li); CrucibleUtility.confirmDelete(this, li)
}); })
html.find('.item-add').click(ev => {
let dataType = $(ev.currentTarget).data("type")
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
})
html.find('.equip-activate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.equipActivate( itemId)
});
html.find('.equip-deactivate').click(ev => {
const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id")
this.actor.equipDeactivate( itemId)
});
html.find('.trait-link').click((event) => { html.find('.subactor-edit').click(ev => {
const itemId = $(event.currentTarget).data("item-id"); const li = $(ev.currentTarget).parents(".item");
const item = this.actor.getOwnedItem(itemId); let actorId = li.data("actor-id");
item.sheet.render(true); let actor = game.actors.get( actorId );
}); actor.sheet.render(true);
html.find('.competence-label a').click((event) => {
const li = $(event.currentTarget).parents(".item");
const competenceId = li.data("item-id");
this.actor.rollSkill(competenceId);
}); });
html.find('.weapon-label a').click((event) => {
html.find('.subactor-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
let actorId = li.data("actor-id");
this.actor.delSubActor(actorId);
});
html.find('.quantity-minus').click(event => {
const li = $(event.currentTarget).parents(".item"); const li = $(event.currentTarget).parents(".item");
const armeId = li.data("item-id"); this.actor.incDecQuantity( li.data("item-id"), -1 );
const statId = li.data("stat-id"); } );
this.actor.rollWeapon(armeId, statId); html.find('.quantity-plus').click(event => {
const li = $(event.currentTarget).parents(".item");
this.actor.incDecQuantity( li.data("item-id"), +1 );
} );
html.find('.ammo-minus').click(event => {
const li = $(event.currentTarget).parents(".item")
this.actor.incDecAmmo( li.data("item-id"), -1 );
} );
html.find('.ammo-plus').click(event => {
const li = $(event.currentTarget).parents(".item")
this.actor.incDecAmmo( li.data("item-id"), +1 )
} );
html.find('.roll-ability').click((event) => {
const abilityKey = $(event.currentTarget).data("ability-key");
this.actor.rollAbility(abilityKey);
});
html.find('.roll-skill').click((event) => {
const li = $(event.currentTarget).parents(".item")
const skillId = li.data("item-id")
this.actor.rollSkill(skillId)
}); });
html.find('.npc-fight-roll').click((event) => {
this.actor.rollNPCFight(); html.find('.roll-weapon').click((event) => {
}); const li = $(event.currentTarget).parents(".item");
html.find('.npc-skill-roll').click((event) => { const skillId = li.data("item-id")
this.actor.rollGenericSkill(); this.actor.rollWeapon(skillId)
}); });
html.find('.roll-armor-die').click((event) => {
this.actor.rollArmorDie()
});
html.find('.roll-shield-die').click((event) => {
this.actor.rollShieldDie()
});
html.find('.roll-save').click((event) => {
const saveKey = $(event.currentTarget).data("save-key")
this.actor.rollSave(saveKey)
});
html.find('.lock-unlock-sheet').click((event) => { html.find('.lock-unlock-sheet').click((event) => {
this.options.editScore = !this.options.editScore; this.options.editScore = !this.options.editScore;
this.render(true); this.render(true);
@ -109,9 +176,15 @@ export class CrucibleNPCSheet extends ActorSheet {
html.find('.item-equip').click(ev => { html.find('.item-equip').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item");
this.actor.equipItem( li.data("item-id") ); this.actor.equipItem( li.data("item-id") );
this.render(true); this.render(true);
}); });
html.find('.update-field').change(ev => {
const fieldName = $(ev.currentTarget).data("field-name");
let value = Number(ev.currentTarget.value);
this.actor.update( { [`${fieldName}`]: value } );
});
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -199,7 +199,7 @@
"styles": [ "styles": [
"styles/simple.css" "styles/simple.css"
], ],
"version": "10.0.7", "version": "10.0.8",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "10.279", "verified": "10.279",
@ -207,7 +207,7 @@
}, },
"title": "Crucible RPG", "title": "Crucible RPG",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json", "manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v10.0.7.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v10.0.8.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg", "url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg",
"background": "images/ui/crucible_welcome_page.webp", "background": "images/ui/crucible_welcome_page.webp",
"id": "fvtt-crucible-rpg" "id": "fvtt-crucible-rpg"

View File

@ -98,7 +98,7 @@
"templates": [ "biodata", "core" ] "templates": [ "biodata", "core" ]
}, },
"npc": { "npc": {
"templates": [ "npccore" ] "templates": [ "biodata", "core" ]
} }
}, },
"Item": { "Item": {

View File

@ -1,184 +1,465 @@
<form class="{{cssClass}}" autocomplete="off"> <form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}} {{!-- Sheet Header --}}
<header class="sheet-header"> <header class="sheet-header">
<div class="header-fields"> <div class="header-fields">
<div class="flexrow"> <h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" /> <div class="flexrow">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1> <img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="attribute">Main</a>
<a class="item" data-tab="defence">Defence/Weapons</a>
<a class="item" data-tab="equipment">Equipment</a>
<a class="item" data-tab="notes">Notes</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Carac Tab --}}
<div class="tab items" data-group="primary" data-tab="attribute">
<span><a class="lock-unlock-sheet"><img class="small-button-container"
src="systems/fvtt-fragged-kingdom/images/icons/{{#if editScore}}unlocked.svg{{else}}locked.svg{{/if}}" alt="Unlocked/Locked"
>{{#if editScore}}Unlocked{{else}}Locked{{/if}}</a>
</span>
<div class="grid grid-2col">
<div class="">
<span class="generic-label"><h3>Type</h3>
<select class="competence-base flexrow" type="text" name="data.npctype" value="{{data.npctype}}" data-dtype="String" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.npctype}}
<option value="henchman">Henchman</option>
<option value="drone">Troop</option>
{{/select}}
</select> </span>
<button class="npc-skill-roll">Generic Skill roll</button>
<div>
<span class="generic-label"><h3>Traits List</h3></span>
<ul>
{{#each traits as |trait key|}}
<li class="item flexrow list-item" data-item-id="{{trait.id}}">
<img class="sheet-competence-img" src="{{trait.img}}"/>
<span class="competence-label">{{trait.name}}</span>
<span class="competence-label">{{trait.data.data.type}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
<div class="">
<span class="generic-label"><h3>Stats & Numbers</h3></span>
<ul>
{{#each data.spec as |spec key|}}
<li class="item flexrow list-item stack-left" data-attr-key="{{key}}">
<span class="stat-label padd-right npc-stat-label" name="{{key}}">{{spec.label}}</span>
<input type="text" class="input-numeric-short padd-right" name="data.spec.{{key}}.value" value="{{spec.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}/>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Defence Tab --}}
<div class="tab defence" data-group="primary" data-tab="defence">
<div class="flexcol"> <div class="flexcol">
<div class=""> <div class="flexrow">
{{#each data.fight as |fight key|}} <div class="ability-item">
<ul> <ul>
<li class="item flexrow list-item stack-left"> {{#each data.abilities as |ability key|}}
<span class="stat-label padd-right"><strong>{{fight.label}}</strong></span> {{#if (eq ability.col 1)}}
<input type="text" class="input-numeric-short padd-right" name="data.fight.{{key}}.value" value="{{fight.value}}" data-dtype="Number"/> {{> systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html ability=ability key=key}}
</li> {{/if}}
{{#each fight.derivated as |derivated keydev|}} {{/each}}
<li class="item flexrow list-item"> </ul>
<span class="stat-label flexrow ">{{derivated.label}}</span>
<input type="text" class="input-numeric-short padd-right" name="data.fight.{{key}}.derivated.{{keydev}}.value" value="{{derivated.value}}" data-dtype="Number"/> <li class="item flexrow list-item" data-attr-key="class">
</li> <span class="ability-label " name="class">
{{/each}} <h4 class="ability-text-white ability-margin">Class</h4>
</ul> </span>
{{/each}} <select class="competence-base flexrow" type="text" name="system.biodata.class" value="{{data.biodata.class}}" data-dtype="String">
</div> {{#select data.biodata.class}}
<option value="chaplain">Chaplain</option>
<option value="magus">Magus</option>
<option value="martial">Martial</option>
<option value="skalawag">Skalawag</option>
<option value="warden">Warden</option>
{{/select}}
</select>
</li>
</div>
<div class="ability-item">
<ul>
{{#each data.abilities as |ability key|}}
{{#if (eq ability.col 2)}}
{{> systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html ability=ability key=key}}
{{/if}}
{{/each}}
{{#if equippedArmor}}
<li class="item flexrow list-item" data-attr-key="class">
<img class="sheet-competence-img" src="{{equippedArmor.img}}" />
<span class="ability-label " name="class">
<h4 class="ability-text-white ability-margin"><a class="roll-armor-die ability-margin">{{equippedArmor.name}}</a></h4>
</span>
</li>
{{/if}}
{{#if equippedShield}}
<li class="item flexrow list-item" data-attr-key="class">
<img class="sheet-competence-img" src="{{equippedShield.img}}" />
<span class="ability-label " name="equippedShield">
<h4 class="ability-text-white ability-margin"><a class="roll-shield-die ability-margin">{{equippedShield.name}}</a></h4>
</span>
</li>
{{/if}}
</ul>
</div>
<div class="ability-item status-block">
{{> systems/fvtt-crucible-rpg/templates/partial-actor-status.html}}
</div>
</div>
</div>
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="details">Details</a>
<a class="item" data-tab="biodata">Biography</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Skills Tab --}}
<div class="tab skills" data-group="primary" data-tab="details">
<ul class="stat-list alternate-list item-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">Dice</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-skill">{{skill.name}}</a></span>
<span class="item-field-label-short">{{upper skill.system.ability}}</span>
<span class="item-field-label-short">{{skill.system.skilldice}}</span>
<span class="item-field-label-long">&nbsp;-&nbsp;</span>
<div class="item-filler">&nbsp;</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>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Weapons</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Ability</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Range</label>
</span>
</li>
{{#each equippedWeapons as |weapon key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{weapon.img}}" /></a>
<span class="item-name-label-long"><a class ="roll-weapon">{{weapon.name}}</a></span>
<span class="item-field-label-short">{{weapon.system.ability}}</span>
<span class="item-field-label-medium">{{perk.system.range}}</span>
<div class="item-filler">&nbsp;</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>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Monster Powers</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Feature Die?</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">SL?</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">SL</label>
</span>
</li>
{{#each feats as |feat key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{feat._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{feat.img}}" /></a>
<span class="item-name-label-long">{{feat.name}}</span>
<span class="item-field-label-medium">{{upperFirst feat.system.isfeatdie}}</span>
<span class="item-field-label-medium">{{upperFirst feat.system.issl}}</span>
<span class="item-field-label-medium">{{feat.system.sl}}</span>
<div class="item-filler">&nbsp;</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>
<span class="generic-label"><h3>Weapons</h3></span>
<ul class="stat-list alternate-list"> <ul class="stat-list alternate-list">
{{#each weapons as |weapon key|}} <li class="item flexrow list-item items-title-bg">
<li class="item stat flexrow list-item" data-arme-id="{{weapon.id}}" data-item-id="{{weapon.id}}"> <span class="item-name-label-header-long">
<img class="sheet-competence-img" src="{{weapon.img}}"/> <h3><label class="items-title-text">Conditions</label></h3>
<span class="stat-label">{{weapon.name}}</span> </span>
<div class="item-controls"> </li>
<a class="item-control item-equip" title="Worn">{{#if weapon.data.data.equipped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a> {{#each conditions as |condition key|}}
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <li class="item flexrow list-item list-item-shadow" data-item-id="{{condition._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{condition.img}}" /></a>
<span class="item-name-label-long">{{condition.name}}</span>
<div class="item-filler">&nbsp;</div> {{!-- Equipement Tab --}}
<div class="tab equipment" data-group="primary" data-tab="equipment">
<div class="flexrow">
<h3>Encumbrance</h3>
<span class="small-label">Current : {{encCurrent}}</span>
<span class="small-label">Capacity : {{encCapacity}}</span>
</div>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Money</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Qty</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="money" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each moneys as |money key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{money._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{money.img}}" /></a>
<span class="item-name-label">{{money.name}}</span>
<span class="item-field-label-long"><label>
{{money.system.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label>
</span>
<span class="item-field-label-medium">
<label>{{money.system.weight}}</label>
</span>
<span class="item-field-label-medium">
{{#if money.system.idrDice}}
<a class="roll-idr" data-dice-value="{{money.data.idrDice}}">{{money.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</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>
<hr>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
<li class="item stat flexrow list-item stats-table" data-armure-id="{{weapon.id}}" data-item-id="{{weapon.id}}"> {{/each}}
{{#each weapon.data.data.weaponstats as |weaponstat statkey|}} </ul>
<ul>
<li class="item stat flexrow list-item" data-item-id="{{weapon.id}}" data-stat-id={{statkey}}><span class="stat-label weapon-label"><a name="{{weapon.name}}">Attack with {{weaponstat.name}}</a></span> <ul class="item-list alternate-list">
</li> <li class="item flexrow list-item items-title-bg">
<li>{{> "systems/fvtt-fragged-kingdom/templates/weapon-stats-section.html" stats=weaponstat.data.statstotal isfinal=false header=true}} <span class="item-name-label-header">
</li> <h3><label class="items-title-text">Weapons</label></h3>
</ul> </span>
{{/each}} <span class="item-field-label-short">
<label class="short-label">Attack</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Damage</label>
</span>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li> </li>
{{/each}} {{#each weapons as |weapon key|}}
</ul> <li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
</div> src="{{weapon.img}}" /></a>
</div> <span class="item-name-label">{{weapon.name}}</span>
<span class="item-field-label-short"><label>{{upper weapon.system.ability}}</label></span>
{{!-- Traits Tab --}} <span class="item-field-label-short"><label>{{upper weapon.system.damage}}</label></span>
<div class="tab traits" data-group="primary" data-tab="traits">
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if weapon.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Armors</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Absorption</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="armor" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each armors as |armor key|}}
<li class="item list-item flexrow list-item-shadow" data-item-id="{{armor._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{armor.img}}" /></a>
<span class="item-name-label">{{armor.name}}</span>
<span class="item-field-label-short">{{upper armor.system.armortype}}</span>
<span class="item-field-label-short">{{armor.system.absorprionroll}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if armor.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Shields</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Dice</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="shield" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each shields as |shield key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{shield._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{shield.img}}" /></a>
<span class="item-name-label">{{shield.name}}</span>
<span class="item-field-label-short">{{shield.system.levelDice}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if shield.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Equipment</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Quantity</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="equipment" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each containersTree as |equip key|}}
{{> systems/fvtt-crucible-rpg/templates/partial-actor-equipment.html equip=equip level=1}}
<ul class="item-list list-item-shadow2 list-item-margin1">
{{#each equip.data.contents as |subgear key|}}
{{> systems/fvtt-crucible-rpg/templates/partial-actor-equipment.html equip=subgear level=2}}
{{/each}}
</ul>
{{/each}}
</ul>
</div>
</div> </div>
{{!-- Features Tab --}} {{!-- Biography Tab --}}
<div class="tab equipment" data-group="primary" data-tab="equipment"> <div class="tab biodata" data-group="primary" data-tab="biodata">
<div class="flexcol"> <div class="grid grid-2col">
<div>
<div><h4>Equipment</h4></div>
<ul class="item-list alternate-list"> <ul class="item-list alternate-list">
<li class="item flexrow list-item"> <li class="item flexrow">
<span class="equipement-label">Name</span> <label class="generic-label">Origin</label>
<span class="equipement-label">Type</span> <input type="text" class="" name="system.biodata.origin" value="{{data.biodata.origin}}"
<div class="item-controls"> data-dtype="String" />
<span class="equipement-label">&nbsp;</span> </li>
<span class="equipement-label">&nbsp;</span> <li class="item flexrow">
<span class="equipement-label">&nbsp;</span> <label class="generic-label">Age</label>
</div> <input type="text" class="" name="system.biodata.age" value="{{data.biodata.age}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Height</label>
<input type="text" class="" name="system.biodata.height" value="{{data.biodata.height}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Eyes</label>
<input type="text" class="" name="system.biodata.eyes" value="{{data.biodata.eyes}}" data-dtype="String" />
</li>
<li class="item flexrow">
<label class="generic-label">Hair</label>
<input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li>
</ul>
</div>
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Size</label>
<select class="competence-base flexrow" type="text" name="system.biodata.size" value="{{data.biodata.size}}" data-dtype="Number">
{{#select data.biodata.size}}
<option value="1">Tiny</option>
<option value="2">Small</option>
<option value="3">Medium</option>
<option value="4">Large</option>
<option value="5">Huge</option>
<option value="6">Gargantuan</option>
{{/select}}
</select>
</li>
<li class="flexrow item">
<label class="generic-label">Sex</label>
<input type="text" class="" name="system.biodata.sex" value="{{data.biodata.sex}}" data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label">Preferred Hand</label>
<input type="text" class="" name="system.biodata.preferredhand" value="{{data.biodata.preferredhand}}"
data-dtype="String" />
</li>
<li class="flexrow item" data-item-id="{{race._id}}">
<label class="generic-label">Race</label>
<a class="item-edit"><img class="stat-icon" src="{{race.img}}"></a>
<input type="text" class="" name="system.biodata.racename" value="{{data.biodata.racename}}" data-dtype="String" />
</li> </li>
{{#each equipments as |equip key|}}
<li class="item flexrow list-item" data-item-id="{{equip.id}}">
<img class="sheet-competence-img" src="{{equip.img}}"/>
<span class="equipement-label">{{equip.name}}</span>
<span class="equipement-label">{{equip.type}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if equip.data.data.equipped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul> </ul>
</div> </div>
</div> </div>
{{!-- Notes Tab --}}
<div class="tab notes" data-group="primary" data-tab="notes"> <hr>
<article class="flexcol"> <h3>Background : </h3>
<h3>Description : </h3> <div class="form-group editor">
<div class="form-group editor"> {{editor data.biodata.description target="system.biodata.description" button=true owner=owner
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}} editable=editable}}
</div>
<hr>
<h3>Notes : </h3>
<div class="form-group editor">
{{editor content=data.notes target="data.notes" button=true owner=owner editable=editable}}
</div>
<hr>
{{>"systems/fvtt-fragged-kingdom/templates/editor-notes-gm.html"}}
</article>
</div> </div>
<hr>
<h3>Notes : </h3>
<div class="form-group editor">
{{editor data.biodata.notes target="system.biodata.notes" button=true owner=owner editable=editable}}
</div>
<hr>
</article>
</div>
</section> </section>
</form> </form>