reprise du projet

This commit is contained in:
Erwan Lemaire
2025-04-17 14:55:41 +02:00
parent 62f13c8cc3
commit d380efeed5
16 changed files with 526 additions and 244 deletions
+1
View File
@@ -34,6 +34,7 @@
- [X] faire l'update l' l'actor juste après s'etre accorder des rerolls, et avoir utiliser le sang-froid - [X] faire l'update l' l'actor juste après s'etre accorder des rerolls, et avoir utiliser le sang-froid
- [X] update des reserves de sang-froids lors de jets - [X] update des reserves de sang-froids lors de jets
- [X] ajout des domaines de prédilections - [X] ajout des domaines de prédilections
- [ ] gérer le dés en +/- selon l'influence du totem adapté ou humain selon les domaines
- [ ] gérer les réussites auto - [ ] gérer les réussites auto
- [ ] gérer les seuils auto si compétence non maitrisée - [ ] gérer les seuils auto si compétence non maitrisée
+1 -1
View File
File diff suppressed because one or more lines are too long
+14
View File
@@ -46,6 +46,20 @@ export class VermineActor extends Actor {
// things organized. // things organized.
this._prepareCharacterData(actorData); this._prepareCharacterData(actorData);
this._prepareNpcData(actorData); this._prepareNpcData(actorData);
//combat initiative reaction difficulty
console.log(this.system.combatStatus)
switch (parseInt(this.system.combatStatus.difficulty)) {
case 5: this.system.combatStatus.label = "Offensif";
break;
case 7: this.system.combatStatus.label = "Actif";
break;
case 9: this.system.combatStatus.label = "Passif";
break;
default:
this.system.combatStatus.label = "Passif";
this.system.combatStatus.difficulty = "9";
}
} }
/** /**
+5 -4
View File
@@ -182,7 +182,7 @@ export class VermineCharacterSheet extends VermineActorSheet {
event.preventDefault(); event.preventDefault();
const element = event.currentTarget; const element = event.currentTarget;
const dataset = element.dataset; const dataset = element.dataset;
console.log("Ceci est un jet d'un personnage joueur"); console.log("Ceci est un jet d'un personnage joueur", this.actor);
// Handle item rolls. // Handle item rolls.
if (dataset.rollType) { if (dataset.rollType) {
if (dataset.rollType == 'item') { if (dataset.rollType == 'item') {
@@ -197,7 +197,7 @@ export class VermineCharacterSheet extends VermineActorSheet {
dataset.rollType = dataset.type; dataset.rollType = dataset.type;
let data = { let data = {
actorId: this.actor.id, actorId: this.object.id,
rollType: dataset.rollType, rollType: dataset.rollType,
labelKey: dataset.label, labelKey: dataset.label,
@@ -205,8 +205,9 @@ export class VermineCharacterSheet extends VermineActorSheet {
}; };
let dial = await RollDialog.create(data); let dial = await RollDialog.create(data);
dial.render(true) console.log("from sheet", data, this)
return true; return dial.render(true)
} }
} }
+6 -6
View File
@@ -47,10 +47,14 @@ export default class RollDialog extends Dialog {
rolltype: null, rolltype: null,
NoD: 1, NoD: 1,
Reroll: false, Reroll: false,
actorId: game.user.character.id actorId: game.user.character?.id || canvas.tokens.controlled[0]?.actor.id
}) { }) {
// Retrieve the actor data based on the actorId // Retrieve the actor data based on the actorId
data.actor = await game.actors.get(data.actorId); data.actor = await game.actors.get(data.actorId);
if (!data.actor) {
return await ui.notifications.warn("Vous n'avez pas de personnage attitré ou de token selectionné");
}
console.log(data.actor) console.log(data.actor)
data.availableSpecialties = data.actor.items.filter(it => it.type == "specialty"); data.availableSpecialties = data.actor.items.filter(it => it.type == "specialty");
console.log(data.availableSpecialties) console.log(data.availableSpecialties)
@@ -177,13 +181,9 @@ export default class RollDialog extends Dialog {
return html.querySelector('select#ability').options[html.querySelector('select#ability').selectedIndex].dataset.label return html.querySelector('select#ability').options[html.querySelector('select#ability').selectedIndex].dataset.label
} }
displaySpecialties() { displaySpecialties() {
console.log(this)
let specialties = this.element[0].querySelectorAll('[data-spec-skill]'); let specialties = this.element[0].querySelectorAll('[data-spec-skill]');
for (let specEl of specialties) { for (let specEl of specialties) {
if (specEl.dataset.specSkill != this.getLabel()) { specEl.style.display = "inline"
specEl.style.display = "none";
specEl.querySelector('input').checked = null;
} else { specEl.style.display = "inline" }
} }
} }
/** /**
-2
View File
@@ -421,7 +421,6 @@ export class VermineCombatant extends Combatant {
constructor(data, context) { constructor(data, context) {
super(data, context); super(data, context);
this.setDefaultAttitude(); this.setDefaultAttitude();
console.log(this)
} }
setDefaultAttitude() { setDefaultAttitude() {
@@ -429,7 +428,6 @@ export class VermineCombatant extends Combatant {
} }
_getInitiativeFormula() { _getInitiativeFormula() {
console.log(this);
return String(CONFIG.Combat.initiative.formula || game.system.initiative); return String(CONFIG.Combat.initiative.formula || game.system.initiative);
} }
+22 -13
View File
@@ -34,19 +34,6 @@ Hooks.once('init', async function () {
VermineCombat VermineCombat
}; };
// Add custom constants for configuration.
CONFIG.VERMINE = VERMINE;
CONFIG.VERMINE.model = game.system.template;
/**
* Set an initiative formula for the system
* @type {String}
*/
CONFIG.Combat.initiative = {
formula: "(@abilities.reflexes.value + @skills.alertness.value)d10cs>=@combatStatus.difficulty",
decimals: 2
};
// Define custom Document classes // Define custom Document classes
CONFIG.Actor.documentClass = VermineActor; CONFIG.Actor.documentClass = VermineActor;
CONFIG.Item.documentClass = VermineItem; CONFIG.Item.documentClass = VermineItem;
@@ -84,8 +71,30 @@ Hooks.once('init', async function () {
registerHooks(); // register Hooks registerHooks(); // register Hooks
registerSettings(); // register Vermine Settings registerSettings(); // register Vermine Settings
//CONFIG AFTER INIT documentypes
// Add custom constants for configuration.
CONFIG.VERMINE = VERMINE;
CONFIG.VERMINE.model = {
Actor: game.system.template.Actor,
Item: game.system.template.Item
}
/**
* Set an initiative formula for the system
* @type {String}
*/
CONFIG.Combat.initiative = {
formula: "(@abilities.reflexes.value + @skills.alertness.value)d10cs>=@combatStatus.difficulty",
decimals: 2
};
//afficher le mode de jeu //afficher le mode de jeu
let mode = game.settings.get('vermine2047', 'game-mode'); let mode = game.settings.get('vermine2047', 'game-mode');
if (!mode) { mode = '1'; await game.settings.set('vermine2047', 'game-mode', '1') }
let el = document.createElement('SPAN'); let el = document.createElement('SPAN');
switch (mode) { switch (mode) {
case '1': case '1':
+2 -1
View File
@@ -5,9 +5,10 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"launch Foundry12": "cd C:/Program Files/Foundry Virtual Tabletop_V12/resources/app && node main.js", "launch_Foundry12": "node /home/rwan/foundry/foundry_software/FoundryVTT-12.331/resources/app/main.js",
"watch": "gulp watch", "watch": "gulp watch",
"buildStyle": "gulp buildStyles", "buildStyle": "gulp buildStyles",
"dev": "npm run launch_Foundry12 & xdg-open http://localhost:30000/",
"pushLDBtoYAML": "node ./tools/pushLDBtoYAML.mjs", "pushLDBtoYAML": "node ./tools/pushLDBtoYAML.mjs",
"pullYAMLtoLDB": "node ./tools/pullYAMLtoLDB.mjs" "pullYAMLtoLDB": "node ./tools/pullYAMLtoLDB.mjs"
}, },
+10 -4
View File
@@ -679,11 +679,17 @@ ul.unstyled li {
} }
} }
.system-vermine2047 .sheet.actor .preferred { .system-vermine2047 .sheet.actor .skill-category {
padding: .3rem;
h4, &.preferred {
label {
text-shadow: 0px 0px 5px rgba(0, 128, 0, 0.411) h4,
label {
text-shadow: 0px 0px 5px rgba(0, 128, 0, 0.411)
}
box-shadow: 0px 0px 30px rgba(0, 128, 0, 0.306) inset;
} }
} }
+24 -3
View File
@@ -10,8 +10,15 @@
}, },
"authors": [ "authors": [
{ {
"name": "François-Xavier Guillois", "name": "François-Xavier Guillois"
"flags": {} },
{
"name": "Rwanoux",
"discord": "rwanoux"
},
{
"name": "Pretre",
"discord": "pretre"
} }
], ],
"esmodules": [ "esmodules": [
@@ -141,5 +148,19 @@
"manifest": "https://raw.githubusercontent.com/rwanoux/vermine2047/refs/heads/main/system.json", "manifest": "https://raw.githubusercontent.com/rwanoux/vermine2047/refs/heads/main/system.json",
"download": "https://github.com/rwanoux/vermine2047/archive/refs/heads/main.zip", "download": "https://github.com/rwanoux/vermine2047/archive/refs/heads/main.zip",
"license": "LICENSE.txt", "license": "LICENSE.txt",
"changelog": "CHANGELOG.md" "changelog": "CHANGELOG.md",
"flags": {
"hotReload": {
"extensions": [
"css",
"hbs",
"json"
],
"paths": [
"assets",
"lang",
"templates"
]
}
}
} }
+78 -26
View File
@@ -1,22 +1,38 @@
<form class="{{cssClass}} {{actor.type}} flexcol form" autocomplete="off"> <form
class="{{cssClass}} {{actor.type}} flexcol form"
autocomplete="off"
>
<div class="form"> <div class="form">
{{log this}} {{log this}}
<aside> <aside>
<div class="flexrow" id="edit"> <div
class="flexrow"
id="edit"
>
<span>mode jeu</span> <span>mode jeu</span>
<input type="checkbox" name="flags.world.editMode" <input
type="checkbox"
name="flags.world.editMode"
{{#if actor.flags.world.editMode}} {{#if actor.flags.world.editMode}}
checked checked
{{/if}} /> {{/if}}
/>
<span>mode edit</span> <span>mode edit</span>
</div> </div>
<img class="logo mx-auto" <img
src="systems/vermine2047/assets/images/ui/logo.webp" width="200" class="logo mx-auto"
alt="logo Vermine" /> src="systems/vermine2047/assets/images/ui/logo.webp"
width="200"
alt="logo Vermine"
/>
<div class="sidebar" data-group="dashboard" data-tab="sidebar"> <div
class="sidebar"
data-group="dashboard"
data-tab="sidebar"
>
<!--ID --> <!--ID -->
{{> "systems/vermine2047/templates/actor/character/character-id.hbs"}} {{> "systems/vermine2047/templates/actor/character/character-id.hbs"}}
</div> </div>
@@ -26,29 +42,46 @@
{{> "systems/vermine2047/templates/actor/character/character-header.hbs"}} {{> "systems/vermine2047/templates/actor/character/character-header.hbs"}}
<!-- SHEET NAVIGATION --> <!-- SHEET NAVIGATION -->
<nav class="sheet-navigation sheet-tabs tabs flex-group-center" <nav
data-group="primary"> class="sheet-navigation sheet-tabs tabs flex-group-center"
<a class="item" data-tab="character" data-group="primary"
data-tooltip="{{localize "VERMINE.tabs.abilities"}}"> >
<a
class="item"
data-tab="character"
data-tooltip="{{localize "VERMINE.tabs.abilities"}}"
>
<i class="fas fa-address-card"></i> <i class="fas fa-address-card"></i>
</a> </a>
<a class="item" data-tab="totem" <a
data-tooltip="{{localize "VERMINE.tabs.totem"}}"> class="item"
data-tab="totem"
data-tooltip="{{localize "VERMINE.tabs.totem"}}"
>
<i class="fas fa-star"></i> <i class="fas fa-star"></i>
</a> </a>
<a class="item" data-tab="equipment" <a
data-tooltip="{{localize "VERMINE.tabs.equipment"}}"> class="item"
data-tab="equipment"
data-tooltip="{{localize "VERMINE.tabs.equipment"}}"
>
<i class="fas fa-hammer"></i> <i class="fas fa-hammer"></i>
</a> </a>
<a class="item" data-tab="stories" <a
data-tooltip="{{localize "VERMINE.tabs.stories"}}"> class="item"
data-tab="stories"
data-tooltip="{{localize "VERMINE.tabs.stories"}}"
>
<i class="fas fa-book-open-reader"></i> <i class="fas fa-book-open-reader"></i>
</a> </a>
<a class="item" data-tab="combat" <a
data-tooltip="{{localize "VERMINE.tabs.combat"}}"> class="item"
data-tab="combat"
data-tooltip="{{localize "VERMINE.tabs.combat"}}"
>
<i class="fas fa-medal"></i> <i class="fas fa-medal"></i>
</a> </a>
@@ -60,30 +93,49 @@
<!-- BODY --> <!-- BODY -->
<section class="sheet-body"> <section class="sheet-body">
<section class="sheet-content"> <section class="sheet-content">
<div class="tab character character-pane active" data-group="primary" <div
data-tab="character"> class="tab character character-pane active"
data-group="primary"
data-tab="character"
>
<!-- Character --> <!-- Character -->
{{> {{>
"systems/vermine2047/templates/actor/character/character-features.hbs"}} "systems/vermine2047/templates/actor/character/character-features.hbs"}}
</div> </div>
<div class="tab totem" data-group="primary" data-tab="totem"> <div
class="tab totem"
data-group="primary"
data-tab="totem"
>
<h3>{{ localize 'IDENTITY.totem'}}</h3> <h3>{{ localize 'IDENTITY.totem'}}</h3>
{{> {{>
"systems/vermine2047/templates/actor/character/character-totem.hbs"}} "systems/vermine2047/templates/actor/character/character-totem.hbs"}}
</div> </div>
<div class="tab equipment" data-group="primary" data-tab="equipment"> <div
class="tab equipment"
data-group="primary"
data-tab="equipment"
>
<h3>{{ localize 'VERMINE.equipment'}}</h3> <h3>{{ localize 'VERMINE.equipment'}}</h3>
<!-- Rituals --> <!-- Rituals -->
{{> "systems/vermine2047/templates/actor/parts/actor-items.hbs"}} {{> "systems/vermine2047/templates/actor/parts/actor-items.hbs"}}
</div> </div>
<div class="tab combat" data-group="primary" data-tab="combat"> <div
class="tab combat"
data-group="primary"
data-tab="combat"
>
<h3>{{ localize 'VERMINE.combat'}}</h3> <h3>{{ localize 'VERMINE.combat'}}</h3>
<!-- effects --> <!-- effects -->
{{> {{>
"systems/vermine2047/templates/actor/character/character-combat.hbs"}} "systems/vermine2047/templates/actor/character/character-combat.hbs"}}
</div> </div>
<div class="tab stories" data-group="primary" data-tab="stories"> <div
class="tab stories"
data-group="primary"
data-tab="stories"
>
<h3>{{ localize 'VERMINE.stories'}}</h3> <h3>{{ localize 'VERMINE.stories'}}</h3>
{{> {{>
"systems/vermine2047/templates/actor/character/character-stories.hbs"}} "systems/vermine2047/templates/actor/character/character-stories.hbs"}}
@@ -4,12 +4,11 @@
<div class="flexrow align-center combat-status"> <div class="flexrow align-center combat-status">
{{#each config.combatStatus as |dif label|}} {{#each config.combatStatus as |dif label|}}
<div> <div>
<label for="combatStatus1">{{label}}</label> <label for="combat-status-{{diff}}">{{label}}</label>
<input <input
id="combat-status-{{diff}}"
type="radio" type="radio"
style="width:1rem"
name="system.combatStatus.difficulty" name="system.combatStatus.difficulty"
id="combatStatus1"
value="{{dif}}" value="{{dif}}"
{{#ife @root.system.combatStatus.difficulty dif}}checked {{#ife @root.system.combatStatus.difficulty dif}}checked
{{/ife}} {{/ife}}
@@ -2,84 +2,112 @@
<h3>Caractéristiques</h3> <h3>Caractéristiques</h3>
<div class="grid grid-4col"> <div class="grid grid-4col">
{{#each config.abilityCategories as |abilityCategory ackey|}} {{#each config.abilityCategories as |abilityCategory ackey|}}
<div class="characteristics"> <div class="characteristics">
<h4 class="align-center">{{ smarttl "ABILITY_CATEGORIES" ackey }}</h4> <h4 class="align-center">{{ smarttl "ABILITY_CATEGORIES" ackey }}</h4>
{{#each @root.system.abilities as |ability key|}} {{#each @root.system.abilities as |ability key|}}
{{#if (eq ability.category ackey) }} {{#if (eq ability.category ackey) }}
<div class="ability flexrow flex-group-center items-center"> <div class="ability flexrow flex-group-center items-center">
<label for="system.abilities.{{key}}.value" <label
class="resource-label rollable flexlarge align-left" data-type="ability" for="system.abilities.{{key}}.value"
data-label="{{ key }}">{{ smarttl "ABILITIES" key }}</label> class="resource-label rollable flexlarge align-left"
<input type="number" class="hexa" name="system.abilities.{{key}}.value" data-type="ability"
value="{{ability.value}}" data-dtype="Number" min="1" max="5" /> data-label="{{ key }}"
</div> >{{ smarttl "ABILITIES" key }}</label>
{{/if}} <input
{{/each}} type="number"
class="hexa"
name="system.abilities.{{key}}.value"
value="{{ability.value}}"
data-dtype="Number"
min="1"
max="5"
/>
</div>
{{/if}}
{{/each}}
</div> </div>
{{/each}} {{/each}}
</div> </div>
<h3>Compétences</h3> <h3>Compétences</h3>
<div class="grid grid-2col"> <div class="grid grid-2col">
{{#each system.skill_categories as |skillCategory sckey|}} {{#each system.skill_categories as |skillCategory sckey|}}
{{#if skillCategory.label}} {{#if skillCategory.label}}
<div class="col <div class="col skill-category
{{#ife sckey @root.system.skill_categories.preferred}} {{#ife sckey @root.system.skill_categories.preferred}}
preferred preferred
{{/ife}}"> {{/ife}}">
<h4>{{ smarttl "SKILLS_CATEGORIES" sckey }} <h4>{{ smarttl "SKILLS_CATEGORIES" sckey }}
<input type="radio" data-tooltip="domaine de prédilection ?" <input
name="system.skill_categories.preferred" value="{{sckey}}" type="radio"
{{#ife sckey @root.system.skill_categories.preferred}} data-tooltip="domaine de prédilection ?"
checked name="system.skill_categories.preferred"
{{/ife}}> value="{{sckey}}"
</h4> {{#ife sckey @root.system.skill_categories.preferred}}
{{#each @root.system.skills as |skill skey|}} checked
{{/ife}}
>
</h4>
{{#each @root.system.skills as |skill skey|}}
{{#if (eq skill.category sckey) }} {{#if (eq skill.category sckey) }}
<div class="ability flexrow "> <div class="ability flexrow ">
<label for="system.skills.{{skey}}.value" <label
class="resource-label rollable flexlarge align-left" data-type="skill" for="system.skills.{{skey}}.value"
data-label="{{ skey }}"> class="resource-label rollable flexlarge align-left"
{{ smarttl "SKILLS" skey }} data-type="skill"
{{#if (eq skill.rarity 1)}}<sup>(I)</sup>{{/if}} data-label="{{ skey }}"
{{#if (eq skill.rarity 2)}}<sup>(II)</sup>{{/if}} >
{{ smarttl "SKILLS" skey }}
{{#if (eq skill.rarity 1)}}<sup>(I)</sup>{{/if}}
{{#if (eq skill.rarity 2)}}<sup>(II)</sup>{{/if}}
</label> </label>
<div class="specialties"> <div class="specialties">
{{#ifgt skill.value 1}} {{#ifgt skill.value 1}}
<i class="fas fa-add add-specialty" <i
data-tooltip="ajout de spécialité"></i> class="fas fa-add add-specialty"
{{/ifgt}} data-tooltip="ajout de spécialité"
{{#each skill.specialties as |spe ind|}} ></i>
{{#ife spe.system.skill skey}} {{/ifgt}}
<i class="specialty" {{#each skill.specialties as |spe ind|}}
data-tooltip="spécialité utilisable">{{spe.name}}</i> {{#ife spe.system.skill skey}}
{{/ife}} <i
{{/each}} class="specialty"
</div> data-tooltip="spécialité utilisable"
<select name="system.skills.{{skey}}.value" class="skill-select"> >{{spe.name}}</i>
{{selectOptions @root.config.SkillLevels selected=value {{/ife}}
{{/each}}
</div>
<select
name="system.skills.{{skey}}.value"
class="skill-select"
>
{{selectOptions @root.config.SkillLevels selected=value
localize=true}} localize=true}}
</select> </select>
<span class="hexa">{{skill.value}}</span> <span class="hexa">{{skill.value}}</span>
<div class="skill-dots flexrow"> <div class="skill-dots flexrow">
{{#repeat (skillLevel "dicePool" skill.value) 0 "dicepool"}} {{#repeat (skillLevel "dicePool" skill.value) 0 "dicepool"}}
<div class="dice-pool-dot" <div
data-tooltip="{{localize "VERMINE.pool"}}"></div> class="dice-pool-dot"
{{/repeat}} data-tooltip="{{localize "VERMINE.pool"}}"
{{#repeat (skillLevel "reroll" skill.value) 0 "dicereroll"}} ></div>
<div class="dice-reroll-dot" {{/repeat}}
data-tooltip="{{localize "VERMINE.reroll"}}">X</div> {{#repeat (skillLevel "reroll" skill.value) 0 "dicereroll"}}
{{/repeat}} <div
class="dice-reroll-dot"
data-tooltip="{{localize "VERMINE.reroll"}}"
>X</div>
{{/repeat}}
</div>
</div>
{{/if}}
{{/each}}
</div> </div>
</div>
{{/if}} {{/if}}
{{/each}}
</div>
{{/if}}
{{/each}} {{/each}}
</div> </div>
+223 -106
View File
@@ -1,12 +1,32 @@
<form id="dice-pool-form" class="vermine form" <form
data-actor-id="{{ speakerId }}"> id="dice-pool-form"
{{log this}} class="vermine form"
<input type="hidden" name="label" id="label" value="{{ label }}" /> data-actor-id="{{ speakerId }}"
<input type="hidden" name="rollType" id="rollType" value="{{ rollType }}" /> >
<input type="hidden" name="abilityScore" id="abilityScore" <input
value="{{ abilityScore }}" /> type="hidden"
<input type="hidden" name="skillScore" id="skillScore" name="label"
value="{{ skillScore }}" /> id="label"
value="{{ label }}"
/>
<input
type="hidden"
name="rollType"
id="rollType"
value="{{ rollType }}"
/>
<input
type="hidden"
name="abilityScore"
id="abilityScore"
value="{{ abilityScore }}"
/>
<input
type="hidden"
name="skillScore"
id="skillScore"
value="{{ skillScore }}"
/>
<div class="dice-pool flexcol"> <div class="dice-pool flexcol">
<h1 class="flexrow row lgb flex-group-center"> <h1 class="flexrow row lgb flex-group-center">
<span>Type de jet <strong>{{#if (eq rollType 'skill')}}{{ localize <span>Type de jet <strong>{{#if (eq rollType 'skill')}}{{ localize
@@ -18,30 +38,54 @@
<div class="flexrow"> <div class="flexrow">
<label class="label">{{localize <label class="label">{{localize
'VERMINE.difficulty'}}</label> 'VERMINE.difficulty'}}</label>
<select class="info-value" data-roll="tue" <select
class="info-value"
data-roll="tue"
data-dtype="String" data-dtype="String"
type="number" name="difficulty" id="difficulty" min="3" max="10"> type="number"
name="difficulty"
id="difficulty"
min="3"
max="10"
>
{{#select difficulty }} {{#select difficulty }}
<option value="{{ diffLevel 'difficulty' 1}}">{{ diffLevel 'label' 1}} - <option value="{{ diffLevel 'difficulty' 1}}">{{ diffLevel 'label' 1}} -
{{ diffLevel 'difficulty' 1}}</option> {{ diffLevel 'difficulty' 1}}
<option value="{{ diffLevel 'difficulty' 2}}">{{ diffLevel 'label' 2}} - </option>
{{ diffLevel 'difficulty' 2}}</option> <option value="{{ diffLevel 'difficulty' 2}}">{{ diffLevel 'label' 2}} -
<option value="{{ diffLevel 'difficulty' 3}}" selected>{{ diffLevel {{ diffLevel 'difficulty' 2}}
</option>
<option
value="{{ diffLevel 'difficulty' 3}}"
selected
>{{ diffLevel
'label' 3}} - {{ diffLevel 'difficulty' 3}}</option> 'label' 3}} - {{ diffLevel 'difficulty' 3}}</option>
<option value="{{ diffLevel 'difficulty' 4}}">{{ diffLevel 'label' 4}} - <option value="{{ diffLevel 'difficulty' 4}}">{{ diffLevel 'label' 4}} -
{{ diffLevel 'difficulty' 4}}</option> {{ diffLevel 'difficulty' 4}}
<option value="{{ diffLevel 'difficulty' 5}}">{{ diffLevel 'label' 5}} - </option>
{{ diffLevel 'difficulty' 5}}</option> <option value="{{ diffLevel 'difficulty' 5}}">{{ diffLevel 'label' 5}} -
{{ diffLevel 'difficulty' 5}}
</option>
{{/select}} {{/select}}
</select> </select>
<label for="handicap">Handicap</label> <label for="handicap">Handicap</label>
<select class="info-value" data-roll="tue" <select
class="info-value"
data-roll="tue"
data-dtype="String" data-dtype="String"
type="number" name="handicap" id="handicap" min="0" max="2"> type="number"
name="handicap"
id="handicap"
min="0"
max="2"
>
{{#select difficulty }} {{#select difficulty }}
<option value="1" selected>aucun</option> <option
<option value="2">(I)</option> value="1"
<option value="3">(II)</option> selected
>aucun</option>
<option value="2">(I)</option>
<option value="3">(II)</option>
{{/select}} {{/select}}
</select> </select>
</div> </div>
@@ -49,28 +93,37 @@
<h2 class="flexcol"> <h2 class="flexcol">
<label class="label">{{localize <label class="label">{{localize
'VERMINE.ability'}}</label> 'VERMINE.ability'}}</label>
<select class="info-value" data-roll="true" <select
class="info-value"
data-roll="true"
data-dtype="String" data-dtype="String"
type="number" name="ability" id="ability" min="1" max="5"> type="number"
name="ability"
id="ability"
min="1"
max="5"
>
<option value="0">-- Choisissez une caractéristique <option value="0">-- Choisissez une caractéristique
--</option> --</option>
{{#each config.abilityCategories as |abilCategory catkey|}} {{#each config.abilityCategories as |abilCategory catkey|}}
<optgroup label="{{ smarttlk 'ABILITY_CATEGORIES' catkey 'name' }}"> <optgroup label="{{ smarttlk 'ABILITY_CATEGORIES' catkey 'name' }}">
{{#each @root.actor.system.abilities as |abil key|}} {{#each @root.actor.system.abilities as |abil key|}}
{{#ife abil.category catkey}} {{#ife abil.category catkey}}
<option value="{{abil.value}}" <option
data-label="{{key}}" value="{{abil.value}}"
{{#ife @root.rollType "ability"}} data-label="{{key}}"
{{#ife @root.labelKey key}} {{#ife @root.rollType "ability"}}
selected="true" {{#ife @root.labelKey key}}
{{/ife}} selected="true"
{{/ife}}>{{ smarttlk 'ABILITIES' key 'name' {{/ife}}
{{/ife}}
>{{ smarttlk 'ABILITIES' key 'name'
}} / {{abil.value}}</option> }} / {{abil.value}}</option>
{{/ife}} {{/ife}}
{{/each}} {{/each}}
</optgroup> </optgroup>
{{/each}} {{/each}}
</select> </select>
@@ -78,53 +131,71 @@
<h3 class="flexcol"> <h3 class="flexcol">
<label class="label">{{localize <label class="label">{{localize
'VERMINE.skill_title'}}</label> 'VERMINE.skill_title'}}</label>
<select class="info-value" data-roll="true" <select
class="info-value"
data-roll="true"
data-dtype="String" data-dtype="String"
type="number" name="skill" id="skill" min="1" max="5"> type="number"
name="skill"
id="skill"
min="1"
max="5"
>
<option>-- Choisissez une compétence <option>-- Choisissez une compétence
--</option> --</option>
{{#each config.skillCategories as |skillCategory catkey|}} {{#each config.skillCategories as |skillCategory catkey|}}
<optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' catkey 'name' }}"> <optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' catkey 'name' }}">
{{#each @root.actor.system.skills as |skill key|}} {{#each @root.actor.system.skills as |skill key|}}
{{#ife skill.category catkey}} {{#ife skill.category catkey}}
<option value="{{skill.value}}" data-pool="{{skillLevel "dicePool" <option
value="{{skill.value}}"
data-pool="{{skillLevel "dicePool"
skill.value}}" skill.value}}"
data-label="{{key}}" data-label="{{key}}"
data-reroll="{{skillLevel "reroll" skill.value}}" data-reroll="{{skillLevel "reroll" skill.value}}"
{{#ife @root.rollType "skill"}} {{#ife @root.rollType "skill"}}
{{#ife @root.labelKey key}} {{#ife @root.labelKey key}}
selected="true" selected="true"
{{/ife}} {{/ife}}
{{/ife}}> {{/ife}}
<b>{{ smarttlk 'SKILLS' key 'name' }},</b> >
<i>{{skillLevel "label" skill.value}}</i> <b>{{ smarttlk 'SKILLS' key 'name' }},</b>
</option> <i>{{skillLevel "label" skill.value}}</i>
{{/ife}} </option>
{{/each}} {{/ife}}
</optgroup> {{/each}}
</optgroup>
{{/each}} {{/each}}
</select> </select>
{{log availableSpecialties.length}}
{{#if availableSpecialties.length}} {{#if availableSpecialties.length}}
<label class="label">{{localize 'VERMINE.specialty'}} (+1D)</label> <label class="label">{{localize 'VERMINE.specialty'}} (+1D)</label>
<div class="flexrow"> <div class="flexrow">
<span data-spec-skill="{{spec.system.skill}}"> <span data-spec-skill="{{spec.system.skill}}">
<i>aucunes</i> <i>aucunes</i>
<input type="radio" data-roll="true" name="usingSpecialization" <input
id="usingSpecialization" type="radio"
value="aucune"> data-roll="true"
</span> name="usingSpecialization"
{{#each availableSpecialties as |spec ind|}} id="usingSpecialization"
value="aucune"
>
</span>
{{#each availableSpecialties as |spec ind|}}
<span data-spec-skill="{{spec.system.skill}}"> <span data-spec-skill="{{spec.system.skill}}">
<i>{{spec.name}}</i> <i>{{spec.name}}</i>
<input type="radio" data-roll="true" name="usingSpecialization" <input
id="usingSpecialization" type="radio"
value="{{spec.name}}" {{#if specialty}}checked{{/if}}> data-roll="true"
</span> name="usingSpecialization"
{{/each}} id="usingSpecialization"
value="{{spec.name}}"
{{#if specialty}}checked{{/if}}
>
</span>
{{/each}}
</div> </div>
{{/if}} {{/if}}
</h3> </h3>
</div> </div>
@@ -132,25 +203,44 @@
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flexrow row smb"> <div class="flexrow row smb">
<label class="label">{{localize 'VERMINE.help'}} (+1D)</label> <label class="label">{{localize 'VERMINE.help'}} (+1D)</label>
<input type="checkbox" data-roll="true" name="helped" id="helped" <input
value="1" {{#if type="checkbox"
help}}checked{{/if}}> data-roll="true"
name="helped"
id="helped"
value="1"
{{#if
help}}checked{{/if}}
>
</div> </div>
<div class="flexrow row mdb"> <div class="flexrow row mdb">
<label class="label">{{localize <label class="label">{{localize
'VERMINE.group'}}</label> 'VERMINE.group'}}</label>
<input type="number" data-roll="true" class="numeric-entry" <input
type="number"
data-roll="true"
class="numeric-entry"
style="text-align: center;" style="text-align: center;"
name="group" id="group" min="0" max="5" value="0"> name="group"
id="group"
min="0"
max="5"
value="0"
>
</div> </div>
<div class="flexrow row mdb"> <div class="flexrow row mdb">
<label class="label">{{localize <label class="label">{{localize
'VERMINE.self_control'}} + <span id="self_control_value">0</span>D 'VERMINE.self_control'}} + <span id="self_control_value">0</span>D
</label> </label>
<input type="range" id="self_control" data-roll="true" <input
type="range"
id="self_control"
data-roll="true"
name="self_control" name="self_control"
min="0" min="0"
max="0" value="0" /> max="0"
value="0"
/>
</div> </div>
<div class="flexcol row mdb"> <div class="flexcol row mdb">
<label class="label">{{localize 'VERMINE.tooling'}} (+1D)</label> <label class="label">{{localize 'VERMINE.tooling'}} (+1D)</label>
@@ -158,16 +248,26 @@
<div class="item-list grid grid-4col"> <div class="item-list grid grid-4col">
<h3> <h3>
<i>Auncun</i> <i>Auncun</i>
<input type="radio" data-roll="true" name="usingTools" <input
id="usingTools" value="0" checked> type="radio"
data-roll="true"
name="usingTools"
id="usingTools"
value="0"
checked
>
</h3> </h3>
{{#each availableItems as |item ind|}} {{#each availableItems as |item ind|}}
<span> <span>
<i>{{item.name}}</i> <i>{{item.name}}</i>
<input type="radio" data-roll="true" name="usingTools" <input
id="usingTools" type="radio"
value="{{item.name}}"> data-roll="true"
</span> name="usingTools"
id="usingTools"
value="{{item.name}}"
>
</span>
{{/each}} {{/each}}
</div> </div>
</div> </div>
@@ -176,25 +276,42 @@
<label class="label">utiliser des dés totems ? <label class="label">utiliser des dés totems ?
</label> </label>
{{#ifgt @root.actor.system.adaptation.totems.human.value 0}} {{#ifgt @root.actor.system.adaptation.totems.human.value 0}}
<div class="totem-human"> <div class="totem-human">
<h4 for="human-totem">totem humain </h4> <h4 for="human-totem">totem humain </h4>
<input type="checkbox" data-roll="true" name="human-totem" <input
id="human-totem" type="checkbox"
value="1"> data-roll="true"
</div> name="human-totem"
id="human-totem"
value="1"
>
</div>
{{/ifgt}} {{/ifgt}}
{{#ifgt @root.actor.system.adaptation.totems.adapted.value 0}} {{#ifgt @root.actor.system.adaptation.totems.adapted.value 0}}
<div class="totem-adapted"> <div class="totem-adapted">
<h4 for="human-totem">totem adapté </h4> <h4 for="human-totem">totem adapté </h4>
<input type="checkbox" data-roll="true" name="adapted-totem" <input
id="adapted-totem" type="checkbox"
value="1"> data-roll="true"
</div> name="adapted-totem"
id="adapted-totem"
value="1"
>
</div>
{{/ifgt}} {{/ifgt}}
</div> </div>
</div> </div>
</div> </div>
<p><input type="hidden" name="speakerId" value="{{ speakerId }}" /> <p><input
<input type="hidden" name="skillLabel" value="{{ skill }}" /></p> type="hidden"
name="speakerId"
value="{{ speakerId }}"
/>
<input
type="hidden"
name="skillLabel"
value="{{ skill }}"
/>
</p>
</form> </form>
+30 -6
View File
@@ -1,20 +1,44 @@
<form class="{{cssClass}}" autocomplete="off"> <form
class="{{cssClass}}"
autocomplete="off"
>
{{log this}}
<header class="sheet-header"> <header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/> <img
class="profile-img"
src="{{item.img}}"
data-edit="img"
title="{{item.name}}"
/>
<div class="header-fields"> <div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1> <h1 class="charname"><input
<select name="system.skill" class="skill-select"> name="name"
type="text"
value="{{item.name}}"
placeholder="Name"
/></h1>
<select
name="system.skill"
class="skill-select"
>
{{#each @root.config.skillCategories as |skillCategory sckey|}} {{#each @root.config.skillCategories as |skillCategory sckey|}}
{{log skillCategory}} {{log skillCategory}}
{{log @root.config.model.Actor.character.skills}}
<optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' sckey 'name' }}"> <optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' sckey 'name' }}">
{{#each @root.config.model.Actor.character.skills as |skill key|}} {{#each @root.config.model.Actor.character.skills as |skill key|}}
{{log sckey}}
{{log skill}}
{{#ife skill.category sckey}} {{#ife skill.category sckey}}
<option value="{{key}}" {{#ife key @root.item.system.skill}} selected {{/ife}}>{{ smarttlk 'SKILLS' key 'name' }}</option> <option
value="{{key}}"
{{#ife key @root.item.system.skill}}
selected
{{/ife}}
>{{ smarttlk 'SKILLS' key 'name' }}</option>
{{/ife}} {{/ife}}
{{/each}} {{/each}}
</optgroup> </optgroup>
+11
View File
@@ -0,0 +1,11 @@
{
"folders": [
{
"path": "."
},
{
"path": "../noc"
}
],
"settings": {}
}