Divers fixes + fiches creatures

This commit is contained in:
sladecraven 2022-11-13 23:01:41 +01:00
parent f88fbf977d
commit 50e42d4ecf
17 changed files with 552 additions and 105 deletions

BIN
assets/icons/contacts.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -20,7 +20,7 @@ export class HawkmoonActorSheet extends ActorSheet {
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }], tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }], dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editScore: false editScore: false
}); })
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -48,6 +48,7 @@ export class HawkmoonActorSheet extends ActorSheet {
combat: this.actor.getCombatValues(), combat: this.actor.getCombatValues(),
equipements: duplicate(this.actor.getEquipments()), equipements: duplicate(this.actor.getEquipments()),
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}), description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
habitat: await TextEditor.enrichHTML(this.object.system.biodata.habitat, {async: true}),
options: this.options, options: this.options,
owner: this.document.isOwner, owner: this.document.isOwner,
editScore: this.options.editScore, editScore: this.options.editScore,
@ -120,13 +121,13 @@ export class HawkmoonActorSheet extends ActorSheet {
} ); } );
html.find('.roll-initiative').click((event) => { html.find('.roll-initiative').click((event) => {
this.actor.rollAttribut("pre", 1) this.actor.rollAttribut("pre", true)
}) })
html.find('.roll-attribut').click((event) => { html.find('.roll-attribut').click((event) => {
const li = $(event.currentTarget).parents(".item") const li = $(event.currentTarget).parents(".item")
let attrKey = li.data("attr-key") let attrKey = li.data("attr-key")
this.actor.rollAttribut(attrKey, 2) this.actor.rollAttribut(attrKey, false)
}) })
html.find('.roll-competence').click((event) => { html.find('.roll-competence').click((event) => {
const li = $(event.currentTarget).parents(".item") const li = $(event.currentTarget).parents(".item")
@ -184,10 +185,4 @@ export class HawkmoonActorSheet extends ActorSheet {
} }
} }
/* -------------------------------------------- */
/** @override */
_updateObject(event, formData) {
// Update the Actor
return this.object.update(formData);
}
} }

View File

@ -291,6 +291,10 @@ export class HawkmoonActor extends Actor {
return { isValid: false } return { isValid: false }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getVigueur() {
return this.system.sante.vigueur
}
/* -------------------------------------------- */
getBonneAventure() { getBonneAventure() {
return this.system.bonneaventure.actuelle return this.system.bonneaventure.actuelle
} }
@ -409,8 +413,9 @@ export class HawkmoonActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getInitiativeScore() { getInitiativeScore() {
return Number(this.system.attributs.adr.value) + Number(this.system.combat.initbonus) return this.lastInit || -1
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getBestDefenseValue() { getBestDefenseValue() {
let defenseList = this.items.filter(item => (item.type == "arme") && item.system.equipped) let defenseList = this.items.filter(item => (item.type == "arme") && item.system.equipped)
@ -484,9 +489,10 @@ export class HawkmoonActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollAttribut(attrKey, multiplier = 1) { async rollAttribut(attrKey, isInit = false) {
let rollData = this.getCommonRollData(attrKey) let rollData = this.getCommonRollData(attrKey)
rollData.multiplier = multiplier rollData.multiplier = (isInit)? 1 : 2
rollData.isInit = isInit
let rollDialog = await HawkmoonRollDialog.create(this, rollData) let rollDialog = await HawkmoonRollDialog.create(this, rollData)
rollDialog.render(true) rollDialog.render(true)
} }
@ -506,9 +512,6 @@ export class HawkmoonActor extends Actor {
if (arme.type == "arme") { if (arme.type == "arme") {
arme = this.prepareArme(arme) arme = this.prepareArme(arme)
} }
if (arme.type == "bouclier") {
arme = this.prepareBouclier(arme)
}
let rollData = this.getCommonRollData(arme.system.attrKey, arme.system.competence._id) let rollData = this.getCommonRollData(arme.system.attrKey, arme.system.competence._id)
rollData.arme = arme rollData.arme = arme
console.log("ARME!", rollData) console.log("ARME!", rollData)
@ -517,17 +520,18 @@ export class HawkmoonActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollArmeDegats(armeId) { async rollArmeDegats(armeId, targetVigueur = undefined) {
let arme = this.items.get(armeId) let arme = this.items.get(armeId)
if (arme.type == "arme") { if (arme.type == "arme") {
arme = this.prepareArme(arme) arme = this.prepareArme(arme)
} }
if (arme.type == "bouclier") {
arme = this.prepareBouclier(arme)
}
console.log("DEGATS", arme) console.log("DEGATS", arme)
let roll = new Roll( "1d10+"+arme.system.totalDegats).roll({ async: false }) let roll = new Roll( "1d10+"+arme.system.totalDegats).roll({ async: false })
await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode")); await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"));
let nbEtatPerdus = 0
if (targetVigueur) {
nbEtatPerdus = Math.floor(roll.total / targetVigueur)
}
let rollData = { let rollData = {
arme: arme, arme: arme,
finalResult: roll.total, finalResult: roll.total,
@ -535,6 +539,8 @@ export class HawkmoonActor extends Actor {
actorImg: this.img, actorImg: this.img,
actorId: this.id, actorId: this.id,
actionImg: arme.img, actionImg: arme.img,
targetVigueur: targetVigueur,
nbEtatPerdus: nbEtatPerdus
} }
HawkmoonUtility.createChatWithRollMode(rollData.alias, { HawkmoonUtility.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-degats-result.html`, rollData) content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-degats-result.html`, rollData)

View File

@ -9,11 +9,9 @@ export class HawkmoonCombat extends Combat {
for (let cId = 0; cId < ids.length; cId++) { for (let cId = 0; cId < ids.length; cId++) {
const c = this.combatants.get(ids[cId]); const c = this.combatants.get(ids[cId]);
let id = c._id || c.id; let id = c._id || c.id;
let initBonus = c.actor ? c.actor.getInitiativeScore() : 0 let initValue = c.actor ? c.actor.getInitiativeScore() : 0
let roll = new Roll("1d10 + "+initBonus).roll({ async: false})
await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"))
//console.log("Init bonus", initBonus, roll.total) //console.log("Init bonus", initBonus, roll.total)
await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: roll.total } ]); await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: initValue } ]);
} }
return this; return this;

View File

@ -0,0 +1,26 @@
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
import { HawkmoonActorSheet } from "./hawkmoon-actor-sheet.js";
import { HawkmoonUtility } from "./hawkmoon-utility.js";
import { HawkmoonAutomation } from "./hawkmoon-automation.js";
/* -------------------------------------------- */
export class HawkmoonCreatureSheet extends HawkmoonActorSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-hawkmoon-cyd", "sheet", "actor"],
template: "systems/fvtt-hawkmoon-cyd/templates/creature-sheet.html",
width: 640,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editScore: false
})
}
}

View File

@ -11,6 +11,8 @@ export const defaultItemImg = {
historique: "systems/fvtt-hawkmoon-cyd/assets/icons/historique.webp", historique: "systems/fvtt-hawkmoon-cyd/assets/icons/historique.webp",
profil: "systems/fvtt-hawkmoon-cyd/assets/icons/profil.webp", profil: "systems/fvtt-hawkmoon-cyd/assets/icons/profil.webp",
artefact: "systems/fvtt-hawkmoon-cyd/assets/icons/artefact.webp", artefact: "systems/fvtt-hawkmoon-cyd/assets/icons/artefact.webp",
contact: "systems/fvtt-hawkmoon-cyd/assets/icons/contacts.webp",
ressource: "systems/fvtt-hawkmoon-cyd/assets/icons/ressources.webp",
} }
/** /**

View File

@ -11,6 +11,7 @@
import { HawkmoonActor } from "./hawkmoon-actor.js"; import { HawkmoonActor } from "./hawkmoon-actor.js";
import { HawkmoonItemSheet } from "./hawkmoon-item-sheet.js"; import { HawkmoonItemSheet } from "./hawkmoon-item-sheet.js";
import { HawkmoonActorSheet } from "./hawkmoon-actor-sheet.js"; import { HawkmoonActorSheet } from "./hawkmoon-actor-sheet.js";
import { HawkmoonCreatureSheet } from "./hawkmoon-creature-sheet.js";
import { HawkmoonCelluleSheet } from "./hawkmoon-cellule-sheet.js"; import { HawkmoonCelluleSheet } from "./hawkmoon-cellule-sheet.js";
import { HawkmoonUtility } from "./hawkmoon-utility.js"; import { HawkmoonUtility } from "./hawkmoon-utility.js";
import { HawkmoonCombat } from "./hawkmoon-combat.js"; import { HawkmoonCombat } from "./hawkmoon-combat.js";
@ -55,7 +56,8 @@ Hooks.once("init", async function () {
// Register sheet application classes // Register sheet application classes
Actors.unregisterSheet("core", ActorSheet); Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("fvtt-hawkmoon-cyd", HawkmoonActorSheet, { types: ["personnage"], makeDefault: true }) Actors.registerSheet("fvtt-hawkmoon-cyd", HawkmoonActorSheet, { types: ["personnage"], makeDefault: true })
Actors.registerSheet("fvtt-hawkmoon-cyd", HawkmoonCelluleSheet, { types: ["cellule"], makeDefault: false }); Actors.registerSheet("fvtt-hawkmoon-cyd", HawkmoonCreatureSheet, { types: ["creature"], makeDefault: true })
Actors.registerSheet("fvtt-hawkmoon-cyd", HawkmoonCelluleSheet, { types: ["cellule"], makeDefault: true });
Items.unregisterSheet("core", ItemSheet); Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("fvtt-hawkmoon-cyd", HawkmoonItemSheet, { makeDefault: true }) Items.registerSheet("fvtt-hawkmoon-cyd", HawkmoonItemSheet, { makeDefault: true })

View File

@ -132,6 +132,14 @@ export class HawkmoonUtility {
rollData.competence = duplicate(actor.getCompetence(rollData.competence._id)) rollData.competence = duplicate(actor.getCompetence(rollData.competence._id))
HawkmoonUtility.rollHawkmoon(rollData) HawkmoonUtility.rollHawkmoon(rollData)
}) })
html.on("click", '.roll-chat-degat', async event => {
let messageId = HawkmoonUtility.findChatMessageId(event.currentTarget)
let message = game.messages.get(messageId)
let rollData = message.getFlag("world", "hawkmoon-roll")
let actor = game.actors.get(rollData.actorId)
actor.rollArmeDegats(rollData.arme._id, rollData.targetVigueur)
})
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -290,10 +298,9 @@ export class HawkmoonUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static computeResult(rollData) { static computeResult(rollData) {
if (rollData.mainDice == "1d20") { rollData.diceResult = rollData.roll.terms[0].results[0].result
if (rollData.mainDice.includes("d20") ) {
let diceValue = rollData.roll.terms[0].results[0].result let diceValue = rollData.roll.terms[0].results[0].result
diceValue *= (rollData.doubleD20) ? 2 : 1
//console.log("PAIR/IMP", diceValue)
if (diceValue % 2 == 1) { if (diceValue % 2 == 1) {
//console.log("PAIR/IMP2", diceValue) //console.log("PAIR/IMP2", diceValue)
rollData.finalResult -= rollData.roll.terms[0].results[0].result // Substract value rollData.finalResult -= rollData.roll.terms[0].results[0].result // Substract value
@ -310,6 +317,7 @@ export class HawkmoonUtility {
rollData.isHeroique = ((rollData.finalResult - rollData.difficulte) >= 10) rollData.isHeroique = ((rollData.finalResult - rollData.difficulte) >= 10)
rollData.isDramatique = ((rollData.finalResult - rollData.difficulte) <= -10) rollData.isDramatique = ((rollData.finalResult - rollData.difficulte) <= -10)
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -372,6 +380,9 @@ export class HawkmoonUtility {
rollData.finalResult = myRoll.total rollData.finalResult = myRoll.total
this.computeResult(rollData) this.computeResult(rollData)
if (rollData.isInit) {
actor.lastInit = rollData.finalResult
}
this.createChatWithRollMode(rollData.alias, { this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-generic-result.html`, rollData) content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-generic-result.html`, rollData)
@ -423,7 +434,7 @@ export class HawkmoonUtility {
chatGM.whisper = this.getUsers(user => user.isGM); chatGM.whisper = this.getUsers(user => user.isGM);
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content; chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content;
console.log("blindMessageToGM", chatGM); console.log("blindMessageToGM", chatGM);
game.socket.emit("system.fvtt-weapons-of-the-gods", { msg: "msg_gm_chat_message", data: chatGM }); game.socket.emit("system.fvtt-hawkmoon-cyd", { msg: "msg_gm_chat_message", data: chatGM });
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -501,6 +512,7 @@ export class HawkmoonUtility {
rollData.defenderTokenId = target.id rollData.defenderTokenId = target.id
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
rollData.armeDefense = defender.getBestDefenseValue() rollData.armeDefense = defender.getBestDefenseValue()
rollData.targetVigueur = defender.getVigueur()
if ( rollData.armeDefense) { if ( rollData.armeDefense) {
rollData.difficulte = rollData.armeDefense.system.totalDefensif rollData.difficulte = rollData.armeDefense.system.totalDefensif
} else { } else {

View File

@ -401,8 +401,9 @@ table {border: 1px solid #7a7971;}
.window-app.sheet .window-content .sheet-header input[type="text"], .window-app.sheet .window-content .sheet-header input[type="number"], .window-app.sheet .window-content .sheet-header input[type="password"], .window-app.sheet .window-content .sheet-header input[type="date"], .window-app.sheet .window-content .sheet-header input[type="time"] { .window-app.sheet .window-content .sheet-header input[type="text"], .window-app.sheet .window-content .sheet-header input[type="number"], .window-app.sheet .window-content .sheet-header input[type="password"], .window-app.sheet .window-content .sheet-header input[type="date"], .window-app.sheet .window-content .sheet-header input[type="time"] {
color: rgba(36, 37, 37, 0.75); color: rgba(36, 37, 37, 0.75);
background: rgba(255, 255, 255, 0.05); /*background: rgba(255, 255, 255, 0.05);*/
border: 0 none; border: 2px saddlebrown;
border-width: 2px;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
} }
@ -420,6 +421,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
object-position: 50% 0; object-position: 50% 0;
margin: 0.5rem 0 0.5rem 0.5rem; margin: 0.5rem 0 0.5rem 0.5rem;
padding: 0; padding: 0;
border:0px;
} }
.sheet nav.sheet-tabs { .sheet nav.sheet-tabs {
@ -1373,4 +1375,14 @@ ul, li {
.item-field { .item-field {
justify-content: flex-start; justify-content: flex-start;
flex-grow: 1; flex-grow: 1;
}
.chat-success {
font-size: 1.2rem;
font-weight: bold;
color: darkgreen;
}
.chat-failure {
font-size: 1.2rem;
font-weight: bold;
color: darkred;
} }

View File

@ -1,7 +1,7 @@
{ {
"id": "fvtt-hawkmoon-cyd", "id": "fvtt-hawkmoon-cyd",
"description": "Hawmoon RPG for FoundryVTT (CYD system - French)", "description": "Hawmoon RPG for FoundryVTT (CYD system - French)",
"version": "10.0.16", "version": "10.0.17",
"authors": [ "authors": [
{ {
"name": "Uberwald/LeRatierBretonnien", "name": "Uberwald/LeRatierBretonnien",
@ -35,7 +35,7 @@
"gridUnits": "m", "gridUnits": "m",
"license": "LICENSE.txt", "license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json", "manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.0.16.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.0.17.zip",
"packs": [ "packs": [
{ {
"type": "Item", "type": "Item",

View File

@ -2,7 +2,8 @@
"Actor": { "Actor": {
"types": [ "types": [
"personnage", "personnage",
"cellule" "cellule",
"creature"
], ],
"templates": { "templates": {
"biodata": { "biodata": {
@ -15,7 +16,7 @@
"sexe": "", "sexe": "",
"yeux": "", "yeux": "",
"description": "", "description": "",
"amemultiplier": 2, "habitat": "",
"notes": "", "notes": "",
"statut": "", "statut": "",
"gmnotes": "" "gmnotes": ""
@ -74,6 +75,9 @@
"rouge": 0, "rouge": 0,
"noire": 0 "noire": 0
}, },
"vitesse": {
"value": 0
},
"combat": { "combat": {
"initbonus": 0, "initbonus": 0,
"vitessebonus": 0, "vitessebonus": 0,
@ -99,10 +103,14 @@
"members": [], "members": [],
"description": "" "description": ""
}, },
"pnj": { "creature": {
"templates": [ "templates": [
"npccore" "core",
] "biodata"
],
"ressources": {
"value": 0
}
} }
}, },
"Item": { "Item": {

View File

@ -11,11 +11,6 @@
<ul class="item-list alternate-list"> <ul class="item-list alternate-list">
<li class="item flexrow ">
<h4 class="item-name-label competence-name">Profils</h4>
<h4 class="item-name-label competence-name">Historique</h4>
</li>
<li class="item flexrow "> <li class="item flexrow ">
<h4 class="item-name-label competence-name">Bonne Aventure</h4> <h4 class="item-name-label competence-name">Bonne Aventure</h4>
<label class="item-name-label competence-name item-field-label-short">Base</label> <label class="item-name-label competence-name item-field-label-short">Base</label>
@ -76,28 +71,6 @@
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
</div>
<div class="sheet-box color-bg-archetype">
<h4 class="item-name-label competence-name">Adversité</h4>
<ul class="item-list alternate-list">
{{#each system.adversite as |adv key|}}
<li class="item flexrow" data-adversite="{{key}}">
<a class="adversite-modify plus-minus-button" data-adversite-value="-1">-</a>
<div class="icon-adversite-container">
<img class="icon-adversite" src="systems/fvtt-hawkmoon-cyd/assets/icons/gemme_{{key}}.webp">
<div class="adversite-text">{{adv}}</div>
</div>
<a class="adversite-modify plus-minus-button" data-adversite-value="1">+</a>
<div class="">&nbsp;</div>
<div class="">&nbsp;</div>
<div class="">&nbsp;</div>
</li>
{{/each}}
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<h4 class="item-name-label competence-name">Santé</h4> <h4 class="item-name-label competence-name">Santé</h4>
<ul class="item-list alternate-list"> <ul class="item-list alternate-list">
<li class="item flexrow"> <li class="item flexrow">
@ -120,6 +93,36 @@
<button class="chat-card-button roll-initiative">Initiative</button> <button class="chat-card-button roll-initiative">Initiative</button>
</li> </li>
</ul> </ul>
</div>
<div class="sheet-box color-bg-archetype">
<h4 class="item-name-label competence-name">Adversité</h4>
<ul class="item-list alternate-list">
{{#each system.adversite as |adv key|}}
<li class="item flexrow" data-adversite="{{key}}">
<a class="adversite-modify plus-minus-button" data-adversite-value="-1">-</a>
<div class="icon-adversite-container">
<img class="icon-adversite" src="systems/fvtt-hawkmoon-cyd/assets/icons/gemme_{{key}}.webp">
<div class="adversite-text">{{adv}}</div>
</div>
<a class="adversite-modify plus-minus-button" data-adversite-value="1">+</a>
<div class="">&nbsp;</div>
<div class="">&nbsp;</div>
<div class="">&nbsp;</div>
</li>
{{/each}}
</ul>
<h4 class="item-name-label competence-name">Vitesse</h4>
<ul class="item-list alternate-list">
<li class="item flexrow" data-adversite="{{key}}">
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.vitesse.value"
value="{{system.vitesse.value}}" data-dtype="Number" />
</li>
</ul>
</div> </div>
</div> </div>
@ -284,10 +287,10 @@
</span> </span>
{{#if arme.system.isdefense}} {{#if arme.system.isdefense}}
<span class="item-field-label-short arme-defensif"><label <span class="item-field-label-short arme-defensif item-field-label-short"><label
class="arme-defensif">{{arme.system.totalDefensif}}</label></span> class="arme-defensif item-field-label-short">{{arme.system.totalDefensif}}</label></span>
{{else}} {{else}}
<span class="item-field-label-short arme-defensif"><label class="arme-defensif">-</label></span> <span class="item-field-label-short arme-defensif"><label class="item-field-label-short arme-defensif">-</label></span>
{{/if}} {{/if}}
<span class="item-field-label-short"> <span class="item-field-label-short">
@ -375,50 +378,58 @@
{{!-- Biography Tab --}} {{!-- Biography Tab --}}
<div class="tab biodata" data-group="primary" data-tab="biodata"> <div class="tab biodata" data-group="primary" data-tab="biodata">
<div class="grid grid-3col">
<div> <div>
<ul class="item-list alternate-list"> <ul class="item-list alternate-list">
<li class="item flexrow" data-item-id="{{historique._id}}"> <li class="item flexrow" data-item-id="{{historique._id}}">
<label class="generic-label">Historique : </label> <label class="generic-label">Historique : </label>
<label class="generic-label">{{historique.name}}</label> <label class="generic-label">{{historique.name}}</label>
<label></label>
<div class="item-controls item-controls-fixed">
<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 profils as |profil key|}}
<li class="item flexrow" data-item-id="{{profil._id}}">
<label class="generic-label">Profil : </label>
<label class="generic-label">{{profil.name}}</label>
<label></label>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></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> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
{{#each profils as |profil key|}} {{/each}}
<li class="item flexrow" data-item-id="{{profil._id}}"> </ul>
<label class="generic-label">Profil : </label> </div>
<label class="generic-label">{{profil.name}}</label>
<div class="item-controls item-controls-fixed">
<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 class="grid grid-3col">
<div> <div>
<ul> <ul>
<li class="flexrow item"> <li class="flexrow item">
<label class="generic-label">Sexe</label> <label class="generic-label">Sexe</label>
<input type="text" class="" name="system.biosystem.sex" value="{{system.biosystem.sex}}" <input type="text" class="" name="system.biodata.sex" value="{{system.biodata.sex}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label">Age</label> <label class="generic-label">Age</label>
<input type="text" class="" name="system.biosystem.age" value="{{system.biosystem.age}}" <input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
</ul>
</div>
<div>
<ul>
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label">Taille</label> <label class="generic-label">Taille</label>
<input type="text" class="" name="system.biosystem.size" value="{{system.biosystem.size}}" <input type="text" class="" name="system.biodata.size" value="{{system.biodata.size}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label">Cheveux</label> <label class="generic-label">Cheveux</label>
<input type="text" class="" name="system.biosystem.hair" value="{{system.biosystem.hair}}" <input type="text" class="" name="system.biodata.hair" value="{{system.biodata.hair}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
</ul> </ul>
@ -427,17 +438,17 @@
<div> <div>
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label">Yeux</label> <label class="generic-label">Yeux</label>
<input type="text" class="" name="system.biosystem.eyes" value="{{system.biosystem.eyes}}" <input type="text" class="" name="system.biodata.eyes" value="{{system.biodata.eyes}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="flexrow item"> <li class="flexrow item">
<label class="generic-label">Main préférée</label> <label class="generic-label">Main préférée</label>
<input type="text" class="" name="system.biosystem.preferredhand" value="{{system.biosystem.preferredhand}}" <input type="text" class="" name="system.biodata.preferredhand" value="{{system.biodata.preferredhand}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="flexrow item"> <li class="flexrow item">
<label class="generic-label">Poids</label> <label class="generic-label">Poids</label>
<input type="text" class="" name="system.biosystem.weight" value="{{system.biosystem.weight}}" <input type="text" class="" name="system.biodata.weight" value="{{system.biodata.weight}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
</div> </div>
@ -447,7 +458,7 @@
<h3>Description</h3> <h3>Description</h3>
</span> </span>
<div class="medium-editor item-text-long-line"> <div class="medium-editor item-text-long-line">
{{editor description target="system.biosystem.description" button=true owner=owner editable=editable}} {{editor description target="system.biodata.description" button=true owner=owner editable=editable}}
</div> </div>
</div> </div>

View File

@ -20,7 +20,9 @@
<ul> <ul>
<li>Arme : {{arme.name}} (+{{arme.system.totalDegats}})</li> <li>Arme : {{arme.name}} (+{{arme.system.totalDegats}})</li>
<li>Dégats : {{finalResult}}</li> <li>Dégats : {{finalResult}}</li>
{{#if targetVigueur}}
<li>Vigueur de la cible : {{targetVigueur}}</li>
<li>Etats de Combativité perdus : {{nbEtatPerdus}}</li>
{{/if}}
</ul> </ul>
</div> </div>
</div>

View File

@ -18,10 +18,10 @@
<div> <div>
<ul> <ul>
<li class="hawkmoon-roll">Attribut : {{attr.label}}</li> <li class="hawkmoon-roll">Attribut : {{attr.label}} ({{attr.value}})</li>
{{#if competence}} {{#if competence}}
<li>Compétence : {{competence.name}}</li> <li>Compétence : {{competence.name}} ({{competence.system.niveau}})</li>
{{/if}} {{/if}}
{{#if selectedMaitrise}} {{#if selectedMaitrise}}
@ -34,35 +34,50 @@
{{/if}} {{/if}}
<li>Formule : {{diceFormula}}</li> <li>Formule : {{diceFormula}}</li>
<li>Résultat du dé : {{diceResult}}</li>
{{#if bonusRoll}} {{#if bonusRoll}}
<li>{{textBonus}} : +{{bonusRoll.total}}</li> <li>{{textBonus}} : +{{bonusRoll.total}}</li>
{{/if}} {{/if}}
<li>Total : {{finalResult}}</li> <li>Total : {{finalResult}}</li>
{{#if difficulte}} {{#if difficulte}}
{{#if isSuccess}} {{#if isSuccess}}
<li>Succés!!!</li> <li class="chat-success">Succés!!!</li>
{{else}} {{else}}
<li>Echec ...</li> <li class="chat-failure">Echec ...</li>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if isHeroique}} {{#if isHeroique}}
<li>Succés Héroïque!!!</li> <li class="chat-success">Succés Héroïque!!!</li>
{{/if}} {{/if}}
{{#if isDramatique}} {{#if isDramatique}}
<li>Echec Dramatique!!!</li> <li class="chat-failure">Echec Dramatique!!!</li>
{{/if}} {{/if}}
{{#if isInit}}
<li>Initiative stockée ! </li>
{{/if}}
{{#if isSuccess}}
{{#if arme}}
<li>Votre adversaire perd 1 Etat de Combativité </li>
{{#if (not arme.system.onlevelonly)}}
<button class="chat-card-button roll-chat-degat">Dégats de l'arme</button>
{{/if}}
{{/if}}
{{/if}}
{{#each predilections as |pred key|}} {{#each predilections as |pred key|}}
<li> <li>
<button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">Predilection : {{pred.name}}</button> <button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">Predilection :
{{pred.name}}</button>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
</div> </div>
</div>

View File

@ -0,0 +1,357 @@
<form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}}
<header class="sheet-header">
<div class="header-fields">
<div class="flexrow">
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="flexcol">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
<div class="flexrow">
<ul class="item-list alternate-list">
<li class="item flexrow ">
<h4 class="item-name-label competence-name">Ressources</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.ressources.value" value="{{system.ressources.value}}" data-dtype="Number" />
</li>
</ul>
</div>
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="principal">Technique</a>
<a class="item" data-tab="competences">Compétences</a>
<a class="item" data-tab="talents">Talents</a>
<a class="item" data-tab="armes">Armes</a>
<a class="item" data-tab="biodata">Bio&Notes</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Main Tab --}}
<div class="tab principal" data-group="primary" data-tab="principal">
<div class="grid grid-2col">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
{{#each system.attributs as |attr key|}}
<li class="item flexrow " data-attr-key="{{key}}">
<img class="item-name-img" src="systems/fvtt-hawkmoon-cyd/assets/icons/{{attr.labelnorm}}.webp">
<span class="item-name-label competence-name item-field-label-medium"><a
class="roll-attribut">{{attr.label}}</a></span>
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="Number">
{{#select attr.value}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html}}
{{/select}}
</select>
</li>
{{/each}}
</ul>
<h4 class="item-name-label competence-name">Santé</h4>
<ul class="item-list alternate-list">
<li class="item flexrow">
<label class="label-name item-field-label-short">Vigueur</label>
<label class="label-name item-field-label-short">{{system.sante.vigueur}}</label>
</li>
<li class="item flexrow">
<label class="label-name item-field-label-short">Etat</label>
<select class="label-name item-field-label-medium" type="text" name="system.sante.etat" value="{{system.sante.etat}}" data-dtype="Number">
{{#select system.sante.etat}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-sante-etat.html}}
{{/select}}
</select>
</li>
</ul>
<h4 class="item-name-label competence-name">Combat</h4>
<ul class="item-list alternate-list">
<li class="item flexrow">
<button class="chat-card-button roll-initiative">Initiative</button>
</li>
</ul>
</div>
<div class="sheet-box color-bg-archetype">
<h4 class="item-name-label competence-name">Adversité</h4>
<ul class="item-list alternate-list">
{{#each system.adversite as |adv key|}}
<li class="item flexrow" data-adversite="{{key}}">
<a class="adversite-modify plus-minus-button" data-adversite-value="-1">-</a>
<div class="icon-adversite-container">
<img class="icon-adversite" src="systems/fvtt-hawkmoon-cyd/assets/icons/gemme_{{key}}.webp">
<div class="adversite-text">{{adv}}</div>
</div>
<a class="adversite-modify plus-minus-button" data-adversite-value="1">+</a>
<div class="">&nbsp;</div>
<div class="">&nbsp;</div>
<div class="">&nbsp;</div>
</li>
{{/each}}
</ul>
<h4 class="item-name-label competence-name">Vitesse</h4>
<ul class="item-list alternate-list">
<li class="item flexrow" data-adversite="{{key}}">
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.vitesse.value"
value="{{system.vitesse.value}}" data-dtype="Number" />
</li>
</ul>
</div>
</div>
</div>
{{!-- Competence Tab --}}
<div class="tab competences" data-group="primary" data-tab="competences">
<div class="flexrow">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-name-label-header">
<h3><label class="items-title-text">Compétences</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Niveau</label>
</span>
<div class="item-filler">&nbsp;</div>
</li>
{{#each skills as |skill key|}}
<li class="item flexrow " data-item-id="{{skill._id}}" data-item-type="competence">
<img class="item-name-img" src="{{skill.img}}" />
<span class="item-name-label competence-name"><a class="roll-competence item-field-label-short"
data-attr-key="tochoose">{{skill.name}}</a></span>
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
{{#select skill.system.niveau}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html}}
{{/select}}
</select>
{{#if (ne skill.system.attribut1 "none")}}
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut1}}">{{upper
skill.system.attribut1}} : {{skill.system.attribut1total}}</button>
{{/if}}
{{#if (ne skill.system.attribut2 "none")}}
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut2}}">{{upper
skill.system.attribut2}} : {{skill.system.attribut2total}}</button>
{{/if}}
{{#if (ne skill.system.attribut3 "none")}}
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut3}}">{{upper
skill.system.attribut3}} : {{skill.system.attribut3total}}</button>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<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>
{{!-- Talents Tab --}}
<div class="tab talents" data-group="primary" data-tab="talents">
<div class="flexrow">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-name-label-header">
<h3><label class="items-title-text">Talents</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Résumé</label>
</span>
<div class="item-filler">&nbsp;</div>
</li>
{{#each talents as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="competence">
<img class="item-name-img" src="{{talent.img}}" />
<span class="item-name-label competence-name">{{talent.name}}</span>
<span class="item-name-label item-field-label-long2">{{talent.system.resumebonus}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<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="flexrow">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-name-label-header">
<h3><label class="items-title-text">Talents de Cellule</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Résumé</label>
</span>
<div class="item-filler">&nbsp;</div>
</li>
{{#each talentsCell as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="competence">
<img class="item-name-img" src="{{talent.img}}" />
<span class="item-name-label competence-name">{{talent.name}}</span>
<span class="item-name-label item-field-label-long2">{{talent.system.resumebonus}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Equipement Tab --}}
<div class="tab armes" data-group="primary" data-tab="armes">
<div class="flexcol">
<div class="sheet-box color-bg-archetype">
<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">Armes</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Attaque</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Défense</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Dégats</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="arme" title="Ajouter une arme"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each armes as |arme key|}}
<li class="item flexrow " data-item-id="{{arme._id}}" data-item-type="arme">
<img class="item-name-img" src="{{arme.img}}" />
<span class="item-name-label competence-name">{{arme.name}}</span>
<span class="item-field-label-short">
{{#if arme.system.equipped}}
<button class="roll-arme-offensif button-sheet-roll">{{arme.system.totalOffensif}}</button>
{{else}}
<button disabled class="roll-arme-offensif button-sheet-roll">{{arme.system.totalOffensif}}</button>
{{/if}}
</span>
{{#if arme.system.isdefense}}
<span class="item-field-label-short arme-defensif item-field-label-short"><label
class="arme-defensif item-field-label-short">{{arme.system.totalDefensif}}</label></span>
{{else}}
<span class="item-field-label-short arme-defensif"><label class="item-field-label-short arme-defensif">-</label></span>
{{/if}}
<span class="item-field-label-short">
{{#if arme.system.equipped}}
<button class="roll-arme-degats button-sheet-roll">{{arme.system.totalDegats}}</button>
{{else}}
<button disabled class="roll-arme-degats button-sheet-roll">{{arme.system.totalDegats}}</button>
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if arme.system.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>
</div>
<div class="sheet-box color-bg-archetype">
<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">Protections</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Protection</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="arme" title="Ajouter une arme"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each protections as |protection key|}}
<li class="item flexrow " data-item-id="{{protection._id}}" data-item-type="protection">
<img class="item-name-img" src="{{protection.img}}" />
<span class="item-name-label competence-name">{{protection.name}}</span>
<span class="item-field-label-short arme-defensif"><label
class="arme-defensif">{{protection.system.protection}}</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<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>
{{!-- Biography Tab --}}
<div class="tab biodata" data-group="primary" data-tab="biodata">
<span>
<h3>Description</h3>
</span>
<div class="medium-editor item-text-long-line">
{{editor description target="system.biodata.description" button=true owner=owner editable=editable}}
</div>
<span>
<h3>Habitat</h3>
</span>
<div class="medium-editor item-text-long-line">
{{editor habitat target="system.biodata.habitat" button=true owner=owner editable=editable}}
</div>
</div>
</section>
</form>

View File

@ -24,6 +24,7 @@
{{#select system.talenttype}} {{#select system.talenttype}}
<option value="personnage">Personnage</option> <option value="personnage">Personnage</option>
<option value="cellule">Cellule</option> <option value="cellule">Cellule</option>
<option value="traitespece">Trait d'espèce</option>
{{/select}} {{/select}}
</select> </select>
</li> </li>