Browse Source

Tattoo + reorganized techniques

master
Pierre Vanhulst 11 months ago
parent
commit
33a5ff0498
  1. 3
      l5r4.js
  2. 2
      lang/en.json
  3. 2
      lang/fr.json
  4. 23
      module/sheets/L5R4PcSheet.js
  5. 8
      template.json
  6. 28
      templates/partials/pc-spells-techniques.hbs
  7. 2
      templates/partials/pc-stats.hbs
  8. 79
      templates/partials/pc-tab-capacities.hbs
  9. 28
      templates/partials/tattoo-card.hbs
  10. 12
      templates/sheets/tattoo-sheet.hbs

3
l5r4.js

@ -21,10 +21,10 @@ async function preloadHandlebarsTemplates() {
"systems/l5r4/templates/partials/pc-stats.hbs",
"systems/l5r4/templates/partials/pc-honor-and-combat.hbs",
"systems/l5r4/templates/partials/pc-init.hbs",
"systems/l5r4/templates/partials/pc-spells-techniques.hbs",
"systems/l5r4/templates/partials/pc-armors.hbs",
"systems/l5r4/templates/partials/pc-armor-tn.hbs",
"systems/l5r4/templates/partials/pc-tab-background.hbs",
"systems/l5r4/templates/partials/pc-tab-capacities.hbs",
"systems/l5r4/templates/partials/pc-tab-combat.hbs",
"systems/l5r4/templates/partials/pc-tab-equipment.hbs",
"systems/l5r4/templates/partials/pc-tab-skills.hbs",
@ -33,6 +33,7 @@ async function preloadHandlebarsTemplates() {
"systems/l5r4/templates/partials/npc-skills.hbs",
"systems/l5r4/templates/partials/npc-wounds.hbs",
"systems/l5r4/templates/partials/npc-stats.hbs",
'systems/l5r4/templates/partials/tattoo-card.hbs',
"systems/l5r4/templates/partials/npc-rings.hbs",
"systems/l5r4/templates/chat/simple-roll.hbs",
"systems/l5r4/templates/chat/weapon-chat.hbs",

2
lang/en.json

@ -163,6 +163,8 @@
"katas": "Katas",
"kiho": "Kiho",
"kihos": "Kihos",
"tattoo": "Tattoo",
"tattoos": "Tattoos",
"addTechSpell": "Add technique/spell",
"shugenja": "Shugenja",
"equipment": "Equipment",

2
lang/fr.json

@ -163,6 +163,8 @@
"katas": "Katas",
"kiho": "Kiho",
"kihos": "Kihos",
"tattoo": "Tatouage",
"tattoos": "Tatouages",
"addTechSpell": "Ajoute un avantage/désavantage/technique/sort/kata/kiho",
"shugenja": "Shugenja",
"equipment": "Équipement",

23
module/sheets/L5R4PcSheet.js

@ -58,17 +58,18 @@ export default class L5R4PcSheet extends ActorSheet {
items: baseData.items
}
sheetData.commonItems = sheetData.items.filter(function (item) { return item.type == "commonItem" });
sheetData.weapons = sheetData.items.filter(function (item) { return item.type == "weapon" });
sheetData.bows = sheetData.items.filter(function (item) { return item.type == "bow" });
sheetData.armors = sheetData.items.filter(function (item) { return item.type == "armor" });
sheetData.skills = sheetData.items.filter(function (item) { return item.type == "skill" });
sheetData.techniques = sheetData.items.filter(function (item) { return item.type == "technique" });
sheetData.advantages = sheetData.items.filter(function (item) { return item.type == "advantage" });
sheetData.disadvantages = sheetData.items.filter(function (item) { return item.type == "disadvantage" });
sheetData.spells = sheetData.items.filter(function (item) { return item.type == "spell" });
sheetData.katas = sheetData.items.filter(function (item) { return item.type == "kata" });
sheetData.kihos = sheetData.items.filter(function (item) { return item.type == "kiho" });
sheetData.commonItems = sheetData.items.filter(item => item.type ==='commonItem');
sheetData.weapons = sheetData.items.filter(item => item.type ==='weapon');
sheetData.bows = sheetData.items.filter(item => item.type ==='bow');
sheetData.armors = sheetData.items.filter(item => item.type ==='armor');
sheetData.skills = sheetData.items.filter(item => item.type ==='skill');
sheetData.techniques = sheetData.items.filter(item => item.type ==='technique');
sheetData.advantages = sheetData.items.filter(item => item.type ==='advantage');
sheetData.disadvantages = sheetData.items.filter(item => item.type ==='disadvantage');
sheetData.spells = sheetData.items.filter(item => item.type ==='spell');
sheetData.katas = sheetData.items.filter(item => item.type === 'kata');
sheetData.kihos = sheetData.items.filter(item => item.type === 'kiho');
sheetData.tattoos = sheetData.items.filter(item => item.type === 'tattoo')
sheetData.masteries = [];
for (let skill of sheetData.skills) {

8
template.json

@ -194,7 +194,8 @@
"technique",
"spell",
"kata",
"kiho"
"kiho",
"tattoo"
],
"templates": {
"itemDescription": {
@ -298,6 +299,11 @@
"ring": "earth",
"mastery": 1,
"type": "internal"
},
"tattoo": {
"templates": [
"itemDescription"
]
}
}
}

28
templates/partials/pc-spells-techniques.hbs

@ -1,28 +0,0 @@
<section class="spells techniques panelBorder">
<h2>
<div>{{localize "l5r4.sheet.techniques"}} & {{localize "l5r4.sheet.spells"}}</div>
<a class="item-create" data-type="spell" title="{{localize " l5r4.sheet.addTechSpell"}}">
<i class="fas fa-plus"></i>
</a>
</h2>
<section class="special-list techniques-list">
{{#each techniques as |technique id|}}
{{> "systems/l5r4/templates/partials/technique-card.hbs" technique inSheet=true}}
{{/each}}
</section>
<section class="special-list spells-list">
{{#each spells as |spell id|}}
{{> "systems/l5r4/templates/partials/spell-card.hbs" spell inSheet=true}}
{{/each}}
</section>
<section class="special-list kata-list">
{{#each katas as |kata id|}}
{{> "systems/l5r4/templates/partials/kata-card.hbs" kata inSheet=true}}
{{/each}}
</section>
<section class="special-list kiho-list">
{{#each kihos as |kiho id|}}
{{> "systems/l5r4/templates/partials/kiho-card.hbs" kiho inSheet=true}}
{{/each}}
</section>
</section>

2
templates/partials/pc-stats.hbs

@ -220,7 +220,7 @@
{{> "systems/l5r4/templates/partials/pc-tab-skills.hbs"}}
</div>
<div class="tab" data-tab="techniques" data-group="primary-tabs">
{{> "systems/l5r4/templates/partials/pc-spells-techniques.hbs"}}
{{> "systems/l5r4/templates/partials/pc-tab-capacities.hbs"}}
</div>
<div class="tab" data-tab="equipment" data-group="primary-tabs">
{{> "systems/l5r4/templates/partials/pc-tab-equipment.hbs"}}

79
templates/partials/pc-tab-capacities.hbs

@ -0,0 +1,79 @@
{{#if techniques}}
<section class="tab-section">
<h2>
<span>{{localize "l5r4.sheet.techniques"}}</span>
<a class="item-create" data-type="technique" title="{{localize " l5r4.sheet.addEquipment"}}">
<i class="fas fa-plus"></i>
</a>
</h2>
<section class="special-list techniques-list">
{{#each techniques as |technique id|}}
{{> "systems/l5r4/templates/partials/technique-card.hbs" technique inSheet=true}}
{{/each}}
</section>
</section>
{{/if}}
{{#if spells}}
<section class="tab-section">
<h2>
<span>{{localize "l5r4.sheet.spells"}}</span>
<a class="item-create" data-type="spell" title="{{localize " l5r4.sheet.addTechSpell"}}">
<i class="fas fa-plus"></i>
</a>
</h2>
<section class="special-list spells-list">
{{#each spells as |spell id|}}
{{> "systems/l5r4/templates/partials/spell-card.hbs" spell inSheet=true}}
{{/each}}
</section>
</section>
{{/if}}
{{#if katas}}
<section class="tab-section">
<h2>
<span>{{localize 'l5r4.sheet.katas'}}</span>
<a class="item-create" data-type="kata" title="{{localize " l5r4.sheet.addTechSpell"}}">
<i class="fas fa-plus"></i>
</a>
</h2>
<section class="special-list kata-list">
{{#each katas as |kata id|}}
{{> "systems/l5r4/templates/partials/kata-card.hbs" kata inSheet=true}}
{{/each}}
</section>
</section>
{{/if}}
{{#if kihos}}
<section class="tab-section">
<h2>
<span>{{localize 'l5r4.sheet.kihos'}}</span>
<a class="item-create" data-type="kiho" title="{{localize " l5r4.sheet.addTechSpell"}}">
<i class="fas fa-plus"></i>
</a>
</h2>
<section class="special-list kiho-list">
{{#each kihos as |kiho id|}}
{{> "systems/l5r4/templates/partials/kiho-card.hbs" kiho inSheet=true}}
{{/each}}
</section>
</section>
{{/if}}
{{#if kihos}}
<section class="tab-section">
<h2>
<span>{{localize 'l5r4.sheet.tattoos'}}</span>
<a class="item-create" data-type="tattoo" title="{{localize " l5r4.sheet.addTechSpell"}}">
<i class="fas fa-plus"></i>
</a>
</h2>
<section class="special-list tattoo-list">
{{#each tattoos as |tattoo id|}}
{{> "systems/l5r4/templates/partials/tattoo-card.hbs" tattoo inSheet=true}}
{{/each}}
</section>
</section>
{{/if}}

28
templates/partials/tattoo-card.hbs

@ -0,0 +1,28 @@
<div class="item-border {{data.type}}">
<div class="tattoo-card item" data-item-id="{{_id}}">
<div class="tattoo-info tattoo-name">
<h3>
{{#if inSheet}}
{{#if img}}
<img width="30px" height="30px" src="{{img}}" alt="{{name}}" />
{{else}}
<img width="30px" height="30px" src="icons/magic/light/swords-light-glowing-white.webp" alt="{{name}}"/>
{{/if}}
<a title="{{localize " l5r4.sheet.edit"}}" class="item-edit">{{name}}</a>
{{else}}
{{name}}
{{/if}}
</h3>
</div>
<div>
<div class="technique-effects">
{{{data.specialRules}}}
</div>
</div>
{{#if inSheet}}
<div>
<a class="item-edit" title="{{localize " l5r4.sheet.edit"}}"><i class="fas fa-edit fa-fw"></i></a>
</div>
{{/if}}
</div>
</div>

12
templates/sheets/tattoo-sheet.hbs

@ -0,0 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img src="{{item.img}}" data-edit="img" title="{{item.name}}" height="64" width="64" />
<h1><input name="name" type="text" value="{{item.name}}" placeholder="Name" /></h1>
</header>
<div class="sheet-content">
<h2>{{localize "l5r4.sheet.rulesSummary"}}</h2>
{{editor content=data.specialRules target="data.specialRules" button=true owner=owner editable=editable}}
<h2>{{localize "l5r4.sheet.description"}}</h2>
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</form>
Loading…
Cancel
Save