Compare commits
4 Commits
fvtt-hawkm
...
fvtt-hawkm
| Author | SHA1 | Date | |
|---|---|---|---|
| f88fbf977d | |||
| 927ddf1328 | |||
| ad5f91fbb2 | |||
| 4f04a3c97b |
BIN
assets/icons/gemme_bleue.webp
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
assets/icons/gemme_noire.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
assets/icons/gemme_rouge.webp
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
assets/logos/hawkmoon_logo.webp
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
assets/logos/logo_pause_hawkmoon_beige.webp
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
assets/logos/logo_pause_hawkmoon_rouge.webp
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
assets/logos/logo_pause_hawkmoon_stone.webp
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
assets/logos/logo_pause_hawkmoon_violet.webp
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
assets/logos/logo_pause_resistance.webp
Normal file
|
After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 53 KiB |
BIN
assets/tokens/token_hawkmoon_PJ.webp
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
assets/tokens/token_hawkmoon_PNJ.webp
Normal file
|
After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 45 KiB |
BIN
assets/ui/fond_hawkmoon.webp
Normal file
|
After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 236 KiB |
@@ -43,7 +43,8 @@ export class HawkmoonActorSheet extends ActorSheet {
|
||||
protections: duplicate(this.actor.getArmors()),
|
||||
historique: duplicate(this.actor.getHistorique() || {}),
|
||||
talents: duplicate(this.actor.getTalents() || {}),
|
||||
profils: duplicate(this.actor.getProfil() || {}),
|
||||
talentsCell: this.getCelluleTalents(),
|
||||
profils: duplicate(this.actor.getProfils() || {}),
|
||||
combat: this.actor.getCombatValues(),
|
||||
equipements: duplicate(this.actor.getEquipments()),
|
||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||
@@ -58,7 +59,20 @@ export class HawkmoonActorSheet extends ActorSheet {
|
||||
return formData;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getCelluleTalents( ) {
|
||||
let talents = []
|
||||
for(let cellule of game.actors) {
|
||||
if (cellule.type == "cellule") {
|
||||
let found = cellule.system.members.find( it => it.id == this.actor.id)
|
||||
if (found) {
|
||||
talents = talents.concat( cellule.getTalents() )
|
||||
}
|
||||
}
|
||||
}
|
||||
return talents
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
@@ -88,7 +102,14 @@ export class HawkmoonActorSheet extends ActorSheet {
|
||||
let value = ev.currentTarget.value
|
||||
this.actor.editItemField(itemId, itemType, itemField, dataType, value)
|
||||
})
|
||||
|
||||
|
||||
html.find('.adversite-modify').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item")
|
||||
let adv = li.data("adversite")
|
||||
let value = Number($(event.currentTarget).data("adversite-value"))
|
||||
this.actor.incDecAdversite(adv, value)
|
||||
})
|
||||
|
||||
html.find('.quantity-minus').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
this.actor.incDecQuantity( li.data("item-id"), -1 );
|
||||
@@ -98,10 +119,14 @@ export class HawkmoonActorSheet extends ActorSheet {
|
||||
this.actor.incDecQuantity( li.data("item-id"), +1 );
|
||||
} );
|
||||
|
||||
html.find('.roll-initiative').click((event) => {
|
||||
this.actor.rollAttribut("pre", 1)
|
||||
})
|
||||
|
||||
html.find('.roll-attribut').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item")
|
||||
let attrKey = li.data("attr-key")
|
||||
this.actor.rollAttribut(attrKey)
|
||||
this.actor.rollAttribut(attrKey, 2)
|
||||
})
|
||||
html.find('.roll-competence').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item")
|
||||
@@ -154,6 +179,8 @@ export class HawkmoonActorSheet extends ActorSheet {
|
||||
let autoresult = HawkmoonAutomation.processAutomations("on-drop", item, this.actor)
|
||||
if ( autoresult.isValid ) {
|
||||
super._onDropItem(event, dragData)
|
||||
} else {
|
||||
ui.notifications.warn( autoresult.warningMessage)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,9 +56,8 @@ export class HawkmoonActor extends Actor {
|
||||
arme.system.attrKey = "pui"
|
||||
arme.system.totalDegats = arme.system.degats + "+" + combat.bonusDegatsTotal
|
||||
arme.system.totalOffensif = this.system.attributs.pui.value + arme.system.competence.system.niveau + arme.system.bonusmaniementoff
|
||||
if (arme.system.isdefense) {
|
||||
arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.bonusmaniementdef
|
||||
}
|
||||
arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.seuildefense
|
||||
arme.system.isdefense = true
|
||||
}
|
||||
if (arme.system.typearme == "jet" || arme.system.typearme == "tir") {
|
||||
arme.system.competence = duplicate(this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "armes à distance"))
|
||||
@@ -66,7 +65,7 @@ export class HawkmoonActor extends Actor {
|
||||
arme.system.totalOffensif = this.system.attributs.adr.value + arme.system.competence.system.niveau + arme.system.bonusmaniementoff
|
||||
arme.system.totalDegats = arme.system.degats
|
||||
if (arme.system.isdefense) {
|
||||
arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.bonusmaniementdef
|
||||
arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.seuildefense
|
||||
}
|
||||
}
|
||||
return arme
|
||||
@@ -83,7 +82,18 @@ export class HawkmoonActor extends Actor {
|
||||
return armes
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* ----------------------- --------------------- */
|
||||
addMember( actorId) {
|
||||
let members = duplicate(this.system.members)
|
||||
members.push( {id: actorId} )
|
||||
this.update ({'system.members': members})
|
||||
}
|
||||
async removeMember(actorId) {
|
||||
let members = this.system.members.filter(it => it.id != actorId )
|
||||
this.update ({'system.members': members})
|
||||
}
|
||||
|
||||
/* ----------------------- --------------------- */
|
||||
getEquipments() {
|
||||
return this.items.filter(item => item.type == "equipement")
|
||||
}
|
||||
@@ -94,12 +104,18 @@ export class HawkmoonActor extends Actor {
|
||||
getHistorique() {
|
||||
return this.items.find(item => item.type == "historique")
|
||||
}
|
||||
getProfil() {
|
||||
return this.items.find(item => item.type == "profil")
|
||||
getProfils() {
|
||||
return this.items.filter(item => item.type == "profil")
|
||||
}
|
||||
getTalents() {
|
||||
return this.items.filter(item => item.type == "talent")
|
||||
}
|
||||
getRessources() {
|
||||
return this.items.filter(item => item.type == "ressource")
|
||||
}
|
||||
getContacts() {
|
||||
return this.items.filter(item => item.type == "contact")
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getSkills() {
|
||||
let comp = []
|
||||
@@ -135,13 +151,26 @@ export class HawkmoonActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getDefenseBase() {
|
||||
return this.system.attributs.tre.value
|
||||
return Math.max(this.system.attributs.tre.value, this.system.attributs.pui.value)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getVitesseBase() {
|
||||
return 5 + __vitesseBonus[this.system.attributs.adr.value]
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getProtection() {
|
||||
let equipProtection = 0
|
||||
for(let armor in this.items) {
|
||||
if (armor.type == "protection" && armor.system.equipped) {
|
||||
equipProtection += Number(armor.system.protection)
|
||||
}
|
||||
}
|
||||
if (equipProtection < 4) {
|
||||
return 4 + equipProtection // Cas des boucliers + sans armure
|
||||
}
|
||||
return equipProtection // Uniquement la protection des armures + boucliers
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getCombatValues() {
|
||||
@@ -153,7 +182,8 @@ export class HawkmoonActor extends Actor {
|
||||
vitesseBase: this.getVitesseBase(),
|
||||
vitesseTotal: this.getVitesseBase() + this.system.combat.vitessebonus,
|
||||
defenseBase: this.getDefenseBase(),
|
||||
defenseTotal: this.getDefenseBase() + this.system.combat.defensebonus
|
||||
protection : this.getProtection(),
|
||||
defenseTotal: this.getDefenseBase() + this.system.combat.defensebonus + this.getProtection() - this.getTotalAdversite()
|
||||
}
|
||||
return combat
|
||||
}
|
||||
@@ -171,9 +201,9 @@ export class HawkmoonActor extends Actor {
|
||||
prepareDerivedData() {
|
||||
|
||||
if (this.type == 'personnage') {
|
||||
let vigueur = Math.floor( (this.system.attributs.pui.value + this.system.attributs.tre.value) / 2)
|
||||
let vigueur = Math.floor((this.system.attributs.pui.value + this.system.attributs.tre.value) / 2)
|
||||
if (vigueur != this.system.sante.vigueur) {
|
||||
this.update( { 'system.sante.vigueur': vigueur})
|
||||
this.update({ 'system.sante.vigueur': vigueur })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,39 +250,45 @@ export class HawkmoonActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
checkAttribut(attribut, minLevel) {
|
||||
let attr = this.system.attributs.find( at => at.labelnorm == attribut.toLowerCase() )
|
||||
checkAttribut(attribut, minLevel) {
|
||||
let attr = this.system.attributs.find(at => at.labelnorm == attribut.toLowerCase())
|
||||
if (attr && attr.value >= minLevel) {
|
||||
return {isValid: true, attr: duplicate(attr) }
|
||||
return { isValid: true, attr: duplicate(attr) }
|
||||
}
|
||||
return {isValid: false}
|
||||
return { isValid: false }
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
checkCompetenceLevel(compName, minLevel) {
|
||||
checkAttributOrCompetenceLevel(compName, minLevel) {
|
||||
let comp = this.items.find(i => i.type == "competence" && i.name.toLowerCase() == compName.toLowerCase() && i.system.niveau >= minLevel)
|
||||
if ( comp) {
|
||||
return {isValid: true, item: duplicate(comp) }
|
||||
if (comp) {
|
||||
return { isValid: true, item: duplicate(comp) }
|
||||
} else {
|
||||
for (let attrKey in this.system.attributs) {
|
||||
if (this.system.attributs[attrKey].label.toLowerCase() == compName.toLowerCase() && this.system.attributs[attrKey].value >= minLevel) {
|
||||
return { isValid: true, item: duplicate(this.system.attributs[attrKey]) }
|
||||
}
|
||||
}
|
||||
}
|
||||
return {isValid: false, warningMessage: `Prérequis insuffisant : la compétence ${compName} doit être de niveau ${minLevel} au minimum`}
|
||||
return { isValid: false, warningMessage: `Prérequis insuffisant : la compétence/attribut ${compName} doit être de niveau ${minLevel} au minimum` }
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
addCompetenceBonus(compName, bonus, baCost) {
|
||||
let comp = this.items.find(i => i.type == "competence" && i.name.toLowerCase() == compName.toLowerCase())
|
||||
if ( comp) {
|
||||
if (comp) {
|
||||
comp = duplicate(comp)
|
||||
comp.system.bonus = bonus
|
||||
comp.system.baCost = baCost
|
||||
return {isValid: true, item: comp }
|
||||
return { isValid: true, item: comp }
|
||||
}
|
||||
return {isValid: false, warningMessage: `Compétence ${compName} non trouvée`}
|
||||
return { isValid: false, warningMessage: `Compétence ${compName} non trouvée` }
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
checkIfCompetence( compName ) {
|
||||
checkIfCompetence(compName) {
|
||||
let comp = this.items.find(i => i.type == "competence" && i.name.toLowerCase() == compName.toLowerCase())
|
||||
if ( comp) {
|
||||
return {isValid: true, item: comp}
|
||||
if (comp) {
|
||||
return { isValid: true, item: comp }
|
||||
}
|
||||
return {isValid: false }
|
||||
return { isValid: false }
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getBonneAventure() {
|
||||
@@ -299,7 +335,7 @@ export class HawkmoonActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getBonusDegats() {
|
||||
return __degatsBonus[this.system.attributs.pui.value]
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -336,11 +372,24 @@ export class HawkmoonActor extends Actor {
|
||||
await this.update({ 'system.subactors': newArray });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getTotalAdversite() {
|
||||
return this.system.adversite.bleue + this.system.adversite.rouge + this.system.adversite.noire
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async incDecAdversite(adv, incDec = 0) {
|
||||
let adversite = duplicate(this.system.adversite)
|
||||
adversite[adv] += Number(incDec)
|
||||
adversite[adv] = Math.max(adversite[adv], 0)
|
||||
this.update({ 'system.adversite': adversite })
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async incDecQuantity(objetId, incDec = 0) {
|
||||
let objetQ = this.items.get(objetId)
|
||||
if (objetQ) {
|
||||
let newQ = objetQ.system.quantity + incDec;
|
||||
let newQ = objetQ.system.quantity + incDec
|
||||
newQ = Math.max(newQ, 0)
|
||||
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'system.quantity': newQ }]); // pdates one EmbeddedEntity
|
||||
}
|
||||
}
|
||||
@@ -359,22 +408,19 @@ export class HawkmoonActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getInitiativeScore( ) {
|
||||
getInitiativeScore() {
|
||||
return Number(this.system.attributs.adr.value) + Number(this.system.combat.initbonus)
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getBestDefenseValue() {
|
||||
let defenseList = this.items.filter(item => (item.type =="arme" || item.type == "bouclier") && item.system.equipped)
|
||||
let defenseList = this.items.filter(item => (item.type == "arme") && item.system.equipped)
|
||||
let maxDef = 0
|
||||
let bestArme
|
||||
for(let arme of defenseList) {
|
||||
if (arme.type == "arme" && arme.system.isdefense) {
|
||||
for (let arme of defenseList) {
|
||||
if (arme.type == "arme" ) {
|
||||
arme = this.prepareArme(arme)
|
||||
}
|
||||
if (arme.type == "bouclier" ) {
|
||||
arme = this.prepareBouclier(arme)
|
||||
}
|
||||
if ( arme.system.totalDefensif > maxDef) {
|
||||
if (arme.system.totalDefensif > maxDef) {
|
||||
maxDef = arme.system.totalDefensif
|
||||
bestArme = duplicate(arme)
|
||||
}
|
||||
@@ -386,15 +432,15 @@ export class HawkmoonActor extends Actor {
|
||||
searchRelevantTalents(competence) {
|
||||
let talents = []
|
||||
|
||||
for( let talent of this.items) {
|
||||
for (let talent of this.items) {
|
||||
if (talent.type == "talent" && talent.system.isautomated && talent.system.automations.length > 0) {
|
||||
for (let auto of talent.system.automations) {
|
||||
if (auto.eventtype === "prepare-roll") {
|
||||
if (auto.competence.toLowerCase() == competence.name.toLowerCase() ) {
|
||||
if (auto.competence.toLowerCase() == competence.name.toLowerCase()) {
|
||||
talent = duplicate(talent)
|
||||
talent.system.bonus = auto.bonus
|
||||
talent.system.bonus = auto.bonus
|
||||
talent.system.baCost = auto.baCost
|
||||
talents.push( talent )
|
||||
talents.push(talent)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -412,32 +458,35 @@ export class HawkmoonActor extends Actor {
|
||||
rollData.img = this.img
|
||||
rollData.attributs = HawkmoonUtility.getAttributs()
|
||||
rollData.maitriseId = "none"
|
||||
rollData.nbEclat = this.system.eclat.value
|
||||
rollData.nbEclat = this.system.eclat.value
|
||||
rollData.nbBA = this.system.bonneaventure.actuelle
|
||||
rollData.nbAdversites = this.getTotalAdversite()
|
||||
rollData.talents = []
|
||||
|
||||
if (attrKey) {
|
||||
rollData.attrKey = attrKey
|
||||
if (attrKey != "tochoose") {
|
||||
rollData.actionImg = "systems/fvtt-mournblade-cyd/assets/icons/" + this.system.attributs[attrKey].labelnorm + ".webp"
|
||||
rollData.actionImg = "systems/fvtt-hawkmoon-cyd/assets/icons/" + this.system.attributs[attrKey].labelnorm + ".webp"
|
||||
rollData.attr = duplicate(this.system.attributs[attrKey])
|
||||
}
|
||||
}
|
||||
if (compId) {
|
||||
rollData.competence = duplicate(this.items.get(compId) || {})
|
||||
rollData.maitrises = rollData.competence.system.predilections.filter(p => p.maitrise )
|
||||
rollData.actionImg = rollData.competence?.img
|
||||
rollData.talents = this.searchRelevantTalents( rollData.competence)
|
||||
rollData.maitrises = rollData.competence.system.predilections.filter(p => p.maitrise)
|
||||
rollData.actionImg = rollData.competence?.img
|
||||
rollData.talents = this.searchRelevantTalents(rollData.competence)
|
||||
}
|
||||
if (compName) {
|
||||
rollData.competence = duplicate(this.items.find( item => item.name.toLowerCase() == compName.toLowerCase()) || {})
|
||||
rollData.competence = duplicate(this.items.find(item => item.name.toLowerCase() == compName.toLowerCase()) || {})
|
||||
rollData.actionImg = rollData.competence?.img
|
||||
}
|
||||
return rollData
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollAttribut(attrKey) {
|
||||
let rollData = this.getCommonRollData(attrKey)
|
||||
async rollAttribut(attrKey, multiplier = 1) {
|
||||
let rollData = this.getCommonRollData(attrKey)
|
||||
rollData.multiplier = multiplier
|
||||
let rollDialog = await HawkmoonRollDialog.create(this, rollData)
|
||||
rollDialog.render(true)
|
||||
}
|
||||
@@ -445,6 +494,7 @@ export class HawkmoonActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
async rollCompetence(attrKey, compId) {
|
||||
let rollData = this.getCommonRollData(attrKey, compId)
|
||||
rollData.multiplier = 1 // Attr multiplier, always 1 in competence mode
|
||||
console.log("RollDatra", rollData)
|
||||
let rollDialog = await HawkmoonRollDialog.create(this, rollData)
|
||||
rollDialog.render(true)
|
||||
@@ -475,7 +525,8 @@ export class HawkmoonActor extends Actor {
|
||||
if (arme.type == "bouclier") {
|
||||
arme = this.prepareBouclier(arme)
|
||||
}
|
||||
let roll = new Roll(arme.system.totalDegats).roll({ async: false })
|
||||
console.log("DEGATS", arme)
|
||||
let roll = new Roll( "1d10+"+arme.system.totalDegats).roll({ async: false })
|
||||
await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"));
|
||||
let rollData = {
|
||||
arme: arme,
|
||||
@@ -486,7 +537,7 @@ export class HawkmoonActor extends Actor {
|
||||
actionImg: arme.img,
|
||||
}
|
||||
HawkmoonUtility.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-mournblade/templates/chat-degats-result.html`, rollData)
|
||||
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-degats-result.html`, rollData)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -31,13 +31,22 @@ export class HawkmoonAutomation {
|
||||
if ( !relevantAutomations || relevantAutomations.length == 0) {
|
||||
return {isValid: true}
|
||||
}
|
||||
|
||||
|
||||
let validTab = []
|
||||
for(let auto of relevantAutomations) {
|
||||
if ( event == "on-drop") {
|
||||
return actor.checkCompetenceLevel( auto.competence, auto.minLevel)
|
||||
if ( event == "on-drop") {
|
||||
validTab.push( actor.checkAttributOrCompetenceLevel( auto.competence, auto.minLevel) )
|
||||
}
|
||||
}
|
||||
return {isValid: false}
|
||||
|
||||
// Post process validation array
|
||||
for (let ret of validTab) {
|
||||
if ( !ret.isValid) {
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
return {isValid: true}
|
||||
}
|
||||
|
||||
}
|
||||
165
modules/hawkmoon-cellule-sheet.js
Normal file
@@ -0,0 +1,165 @@
|
||||
/**
|
||||
* Extend the basic ActorSheet with some very simple modifications
|
||||
* @extends {ActorSheet}
|
||||
*/
|
||||
|
||||
import { HawkmoonUtility } from "./hawkmoon-utility.js";
|
||||
import { HawkmoonAutomation } from "./hawkmoon-automation.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const __ALLOWED_ITEM_CELLULE = { "talent": 1, "ressource": 1, "contact": 1}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class HawkmoonCelluleSheet extends ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["fvtt-hawkmoon-cyd", "sheet", "actor"],
|
||||
template: "systems/fvtt-hawkmoon-cyd/templates/cellule-sheet.html",
|
||||
width: 640,
|
||||
height: 720,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "talents" }],
|
||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||
editScore: false
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = duplicate(this.object)
|
||||
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: objectData.id,
|
||||
type: objectData.type,
|
||||
img: objectData.img,
|
||||
name: objectData.name,
|
||||
editable: this.isEditable,
|
||||
cssClass: this.isEditable ? "editable" : "locked",
|
||||
system: objectData.system,
|
||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
|
||||
limited: this.object.limited,
|
||||
talents: duplicate(this.actor.getTalents() || {}),
|
||||
ressources: duplicate(this.actor.getRessources()),
|
||||
contacts: duplicate(this.actor.getContacts()),
|
||||
members: this.getMembers(),
|
||||
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
editScore: this.options.editScore,
|
||||
isGM: game.user.isGM
|
||||
}
|
||||
this.formData = formData;
|
||||
|
||||
console.log("CELLULE : ", formData, this.object);
|
||||
return formData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getMembers( ) {
|
||||
let membersFull = []
|
||||
for(let def of this.actor.system.members) {
|
||||
let actor = game.actors.get(def.id)
|
||||
membersFull.push( { name: actor.name, id: actor.id, img: actor.img } )
|
||||
}
|
||||
return membersFull
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.actor-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item")
|
||||
let actorId = li.data("actor-id")
|
||||
const actor = game.actors.get(actorId)
|
||||
actor.sheet.render(true)
|
||||
})
|
||||
html.find('.actor-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item")
|
||||
let actorId = li.data("actor-id")
|
||||
this.actor.removeMember(actorId)
|
||||
})
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.item-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item")
|
||||
let itemId = li.data("item-id")
|
||||
const item = this.actor.items.get(itemId)
|
||||
item.sheet.render(true)
|
||||
})
|
||||
// Delete Inventory Item
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
HawkmoonUtility.confirmDelete(this, li);
|
||||
})
|
||||
html.find('.edit-item-data').change(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item")
|
||||
let itemId = li.data("item-id")
|
||||
let itemType = li.data("item-type")
|
||||
let itemField = $(ev.currentTarget).data("item-field")
|
||||
let dataType = $(ev.currentTarget).data("dtype")
|
||||
let value = ev.currentTarget.value
|
||||
this.actor.editItemField(itemId, itemType, itemField, dataType, value)
|
||||
})
|
||||
|
||||
html.find('.quantity-minus').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
this.actor.incDecQuantity(li.data("item-id"), -1);
|
||||
});
|
||||
html.find('.quantity-plus').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
this.actor.incDecQuantity(li.data("item-id"), +1);
|
||||
});
|
||||
|
||||
html.find('.lock-unlock-sheet').click((event) => {
|
||||
this.options.editScore = !this.options.editScore;
|
||||
this.render(true);
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onDropActor(event, dragData) {
|
||||
const actor = fromUuidSync(dragData.uuid)
|
||||
if (actor) {
|
||||
this.actor.addMember(actor.id)
|
||||
} else {
|
||||
ui.notifications.warn("Cet acteur n'a pas été trouvé.")
|
||||
}
|
||||
super._onDropActor(event)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onDropItem(event, dragData) {
|
||||
let data = event.dataTransfer.getData('text/plain')
|
||||
let dataItem = JSON.parse(data)
|
||||
let item = fromUuidSync(dataItem.uuid)
|
||||
if (item.pack) {
|
||||
item = await HawkmoonUtility.searchItem(item)
|
||||
}
|
||||
if ( __ALLOWED_ITEM_CELLULE[item.type]) {
|
||||
super._onDropItem(event, dragData)
|
||||
return
|
||||
}
|
||||
ui.notifications("Ce type d'item n'est pas autorisé sur une Cellule.")
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
setPosition(options = {}) {
|
||||
const position = super.setPosition(options);
|
||||
const sheetBody = this.element.find(".sheet-body");
|
||||
const bodyHeight = position.height - 192;
|
||||
sheetBody.css("height", bodyHeight);
|
||||
return position;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
import { HawkmoonActor } from "./hawkmoon-actor.js";
|
||||
import { HawkmoonItemSheet } from "./hawkmoon-item-sheet.js";
|
||||
import { HawkmoonActorSheet } from "./hawkmoon-actor-sheet.js";
|
||||
import { HawkmoonCelluleSheet } from "./hawkmoon-cellule-sheet.js";
|
||||
import { HawkmoonUtility } from "./hawkmoon-utility.js";
|
||||
import { HawkmoonCombat } from "./hawkmoon-combat.js";
|
||||
import { HawkmoonItem } from "./hawkmoon-item.js";
|
||||
@@ -31,7 +32,7 @@ Hooks.once("init", async function () {
|
||||
/* -------------------------------------------- */
|
||||
// Set an initiative formula for the system
|
||||
CONFIG.Combat.initiative = {
|
||||
formula: "1d6",
|
||||
formula: "1d10",
|
||||
decimals: 1
|
||||
};
|
||||
|
||||
@@ -54,7 +55,7 @@ Hooks.once("init", async function () {
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
Actors.registerSheet("fvtt-hawkmoon-cyd", HawkmoonActorSheet, { types: ["personnage"], makeDefault: true })
|
||||
//Actors.registerSheet("fvtt-hawkmoon-cyd", HawkmoonNPCSheet, { types: ["npc"], makeDefault: false });
|
||||
Actors.registerSheet("fvtt-hawkmoon-cyd", HawkmoonCelluleSheet, { types: ["cellule"], makeDefault: false });
|
||||
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("fvtt-hawkmoon-cyd", HawkmoonItemSheet, { makeDefault: true })
|
||||
|
||||
@@ -42,6 +42,23 @@ export class HawkmoonUtility {
|
||||
return parseInt(a) * parseInt(b);
|
||||
})
|
||||
|
||||
game.settings.register("fvtt-hawkmoon-cyd", "hawkmoon-pause-logo", {
|
||||
name: "Logo de pause",
|
||||
scope: "world",
|
||||
config: true,
|
||||
requiresReload: true,
|
||||
default: "logo_pause_resistance",
|
||||
type: String,
|
||||
choices: { // If choices are defined, the resulting setting will be a select menu
|
||||
"hawkmoon_logo": "Hawmoon (Texte)",
|
||||
"logo_pause_resistance": "Résistance",
|
||||
"logo_pause_hawkmoon_stone": "Hawkmoon (Pierre)",
|
||||
"logo_pause_hawkmoon_violet": "Hawkmoon (Violet)",
|
||||
"logo_pause_hawkmoon_beiget": "Hawkmoon (Beige)",
|
||||
"logo_pause_hawkmoon_rouge": "Hawkmoon (Rouge)"
|
||||
},
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -79,6 +96,11 @@ export class HawkmoonUtility {
|
||||
static async ready() {
|
||||
const skills = await HawkmoonUtility.loadCompendium("fvtt-hawkmoon-cyd.skills")
|
||||
this.skills = skills.map(i => i.toObject())
|
||||
|
||||
// Setup pause logo
|
||||
let logoPause = "systems/fvtt-hawkmoon-cyd/assets/logos/" + game.settings.get("fvtt-hawkmoon-cyd", "hawkmoon-pause-logo") + ".webp"
|
||||
let logoImg = document.querySelector('#pause').children[0]
|
||||
logoImg.setAttribute('style', `content: url(${logoPause})`)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -333,9 +355,11 @@ export class HawkmoonUtility {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rollData.diceFormula += `+${rollData.attr.value}*2+${rollData.modificateur}`
|
||||
rollData.diceFormula += `+${rollData.attr.value}*${rollData.multiplier}+${rollData.modificateur}`
|
||||
}
|
||||
|
||||
// Ajout adversités
|
||||
rollData.diceFormula += `-${rollData.nbAdversites}`
|
||||
|
||||
if (rollData.arme && rollData.arme.type == "arme") {
|
||||
rollData.diceFormula += `+${rollData.arme.system.bonusmaniementoff}`
|
||||
|
||||
@@ -844,6 +844,25 @@ ul, li {
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
.adversite-text {
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.icon-adversite-container {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
color: white;
|
||||
width: 64px;
|
||||
min-height: 48px;
|
||||
}
|
||||
.icon-adversite {
|
||||
width: 48px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.actor-icon {
|
||||
float: left;
|
||||
width: 48px;
|
||||
@@ -1159,16 +1178,18 @@ ul, li {
|
||||
box-shadow: inset 0px 1px 0px 0px #a6827e;
|
||||
background: linear-gradient(to bottom, #21374afc 5%, #152833ab 100%);
|
||||
background-color: #7d5d3b00;
|
||||
border-radius: 3px;
|
||||
border-radius: 4px;
|
||||
border: 2px ridge #846109;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
color: #ffffff;
|
||||
padding: 2px 6px 0px 6px;
|
||||
padding: 3px 6px 2px 6px;
|
||||
text-decoration: none;
|
||||
text-shadow: 0px 1px 0px #4d3534;
|
||||
position: relative;
|
||||
margin:3px;
|
||||
max-width: 24px;
|
||||
max-height: 24px;
|
||||
}
|
||||
|
||||
.river-button:hover,
|
||||
@@ -1269,7 +1290,7 @@ ul, li {
|
||||
color: #CCC
|
||||
}
|
||||
#pause > img {
|
||||
content: url(../assets/logos/mournblade_logo_chaos.webp);
|
||||
content: url(../assets/logos/hawkmoon_logo.webp);
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
top: -80px;
|
||||
@@ -1277,7 +1298,7 @@ ul, li {
|
||||
}
|
||||
|
||||
#logo {
|
||||
content : url(../assets/logos/mournblade_logo_texte.webp);
|
||||
content : url(../assets/logos/hawkmoon_logo.webp);
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
24
system.json
@@ -1,11 +1,31 @@
|
||||
{
|
||||
"id": "fvtt-hawkmoon-cyd",
|
||||
"description": "Hawmoon RPG for FoundryVTT (CYD system - French)",
|
||||
"version": "10.0.8",
|
||||
"version": "10.0.16",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Uberwald/LeRatierBretonnien",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Prêtre",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Blondin",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Zechrub/Chris",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Kyllian",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Lightbringer",
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"esmodules": [
|
||||
@@ -15,7 +35,7 @@
|
||||
"gridUnits": "m",
|
||||
"license": "LICENSE.txt",
|
||||
"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.8.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.0.16.zip",
|
||||
"packs": [
|
||||
{
|
||||
"type": "Item",
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"Actor": {
|
||||
"types": [
|
||||
"personnage"
|
||||
"personnage",
|
||||
"cellule"
|
||||
],
|
||||
"templates": {
|
||||
"biodata": {
|
||||
@@ -91,6 +92,13 @@
|
||||
"core"
|
||||
]
|
||||
},
|
||||
"cellule": {
|
||||
"notoriete": 0,
|
||||
"resistance": 0,
|
||||
"developpement": 0,
|
||||
"members": [],
|
||||
"description": ""
|
||||
},
|
||||
"pnj": {
|
||||
"templates": [
|
||||
"npccore"
|
||||
@@ -123,8 +131,20 @@
|
||||
"protection",
|
||||
"monnaie",
|
||||
"equipement",
|
||||
"artefact"
|
||||
"artefact",
|
||||
"ressource",
|
||||
"contact"
|
||||
],
|
||||
"ressource": {
|
||||
"pointdev": 0,
|
||||
"description": ""
|
||||
},
|
||||
"contact": {
|
||||
"contacttype": "",
|
||||
"niveau": "",
|
||||
"pointdev": 0,
|
||||
"description": ""
|
||||
},
|
||||
"talent": {
|
||||
"talenttype": "",
|
||||
"utilisation": "",
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<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 item-field-label-short" type="text"
|
||||
<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}}
|
||||
@@ -78,6 +78,25 @@
|
||||
</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=""> </div>
|
||||
<div class=""> </div>
|
||||
<div class=""> </div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="sheet-box color-bg-archetype">
|
||||
<h4 class="item-name-label competence-name">Santé</h4>
|
||||
<ul class="item-list alternate-list">
|
||||
@@ -98,7 +117,7 @@
|
||||
<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">Lancer l'initiative</button>
|
||||
<button class="chat-card-button roll-initiative">Initiative</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -193,6 +212,33 @@
|
||||
{{/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"> </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"> </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>
|
||||
|
||||
@@ -332,35 +378,24 @@
|
||||
<div class="grid grid-3col">
|
||||
<div>
|
||||
<ul class="item-list alternate-list">
|
||||
<li class="item flexrow" data-item-id="{{origine._id}}">
|
||||
<label class="generic-label">Origine : </label>
|
||||
<label class="generic-label">{{origine.name}}</label>
|
||||
<li class="item flexrow" data-item-id="{{historique._id}}">
|
||||
<label class="generic-label">Historique : </label>
|
||||
<label class="generic-label">{{historique.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>
|
||||
<li class="item flexrow" data-item-id="{{heritage._id}}">
|
||||
<label class="generic-label">Héritage : </label>
|
||||
<label class="generic-label">{{heritage.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>
|
||||
<li class="item flexrow" data-item-id="{{metier._id}}">
|
||||
<label class="generic-label">Métier : </label>
|
||||
<label class="generic-label">{{metier.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>
|
||||
<li class="flexrow item">
|
||||
<label class="generic-label">Multiplicateur d'âme</label>
|
||||
<input type="text" class="" name="system.biosystem.amemultiplier"
|
||||
value="{{system.biosystem.amemultiplier}}" data-dtype="Number" />
|
||||
</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>
|
||||
<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>
|
||||
|
||||
|
||||
188
templates/cellule-sheet.html
Normal file
@@ -0,0 +1,188 @@
|
||||
<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 item-field-label-medium">Notoriété</h4>
|
||||
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
|
||||
name="system.notoriete" value="{{system.notoriete}}" data-dtype="Number" />
|
||||
|
||||
<h4 class="item-name-label competence-name item-field-label-long">Résistance</h4>
|
||||
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
|
||||
name="system.resistance" value="{{system.resistance}}" data-dtype="Number" />
|
||||
</li>
|
||||
|
||||
<li class="item flexrow ">
|
||||
<h4 class="item-name-label competence-name item-field-label-long">Développement</h4>
|
||||
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
|
||||
name="system.developpement" value="{{system.developpement}}" 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="talents">Membres&Talents</a>
|
||||
<a class="item" data-tab="contacts">Contacts</a>
|
||||
<a class="item" data-tab="ressources">Ressources</a>
|
||||
<a class="item" data-tab="biodata">Description</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Talents Tab --}}
|
||||
<div class="tab talents" data-group="primary" data-tab="talents">
|
||||
|
||||
<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">Membres</label></h3>
|
||||
</span>
|
||||
<div class="item-filler"> </div>
|
||||
</li>
|
||||
{{#each members as |membre key|}}
|
||||
<li class="item flexrow " data-actor-id="{{membre.id}}" >
|
||||
<img class="item-name-img" src="{{membre.img}}" />
|
||||
<span class="item-name-label competence-name">{{membre.name}}</span>
|
||||
|
||||
<div class="item-filler"> </div>
|
||||
<div class="item-controls item-controls-fixed">
|
||||
<a class="item-control actor-edit" title="Edit Actor"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control actor-delete" title="Delete Actor"><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">
|
||||
<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"> </div>
|
||||
</li>
|
||||
{{#each talents as |talent key|}}
|
||||
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="talent">
|
||||
<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"> </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>
|
||||
|
||||
{{!-- Contacts Tab --}}
|
||||
<div class="tab contacts" data-group="primary" data-tab="contacts">
|
||||
|
||||
<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">Contacts</label></h3>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">Type</label>
|
||||
</span>
|
||||
<span class="item-field-label-medium">
|
||||
<label class="short-label">Niveau</label>
|
||||
</span>
|
||||
<div class="item-filler"> </div>
|
||||
</li>
|
||||
{{#each contacts as |contact key|}}
|
||||
<li class="item flexrow " data-item-id="{{contact._id}}" data-item-type="competence">
|
||||
<img class="item-name-img" src="{{contact.img}}" />
|
||||
<span class="item-name-label competence-name">{{contact.name}}</span>
|
||||
<span class="item-name-label item-field-label-medium">{{upperFirst contact.system.contacttype}}</span>
|
||||
<span class="item-name-label item-field-label-medium">{{contact.system.niveau}}</span>
|
||||
|
||||
<div class="item-filler"> </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>
|
||||
|
||||
{{!-- Ressources Tab --}}
|
||||
<div class="tab ressources" data-group="primary" data-tab="ressources">
|
||||
|
||||
<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">Ressources</label></h3>
|
||||
</span>
|
||||
<div class="item-filler"> </div>
|
||||
</li>
|
||||
{{#each ressources as |ressource key|}}
|
||||
<li class="item flexrow " data-item-id="{{ressource._id}}" data-item-type="competence">
|
||||
<img class="item-name-img" src="{{ressource.img}}" />
|
||||
<span class="item-name-label competence-name">{{ressource.name}}</span>
|
||||
|
||||
<div class="item-filler"> </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.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</form>
|
||||
@@ -19,7 +19,7 @@
|
||||
<div>
|
||||
<ul>
|
||||
<li>Arme : {{arme.name}} (+{{arme.system.totalDegats}})</li>
|
||||
<li>Dégats : {{finalResult}} {{#if arme.system.nonletaux}}(Non létaux){{else}}(Létaux){{/if}}</li>
|
||||
<li>Dégats : {{finalResult}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
50
templates/item-contact-sheet.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
|
||||
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
|
||||
<ul class="item-list alternate-list">
|
||||
<li class="flexrow item">
|
||||
|
||||
<label class="generic-label item-field-label-long">Type : </label>
|
||||
<select class="item-field-label-long" type="text" name="system.contacttype" value="{{system.contacttype}}" data-dtype="String">
|
||||
{{#select system.contacttype}}
|
||||
<option value="contact">Contact</option>
|
||||
<option value="allie">Allié</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
|
||||
<label class="generic-label item-field-label-long">Niveau : </label>
|
||||
<select class="item-field-label-long" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number">
|
||||
{{#select system.niveau}}
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="flexrow item">
|
||||
<label class="generic-label item-field-label-long">Développement : </label>
|
||||
<input type="text" class="padd-right item-field-label-long" name="system.pointdev"
|
||||
value="{{system.pointdev}}" data-dtype="Number" />
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</form>
|
||||
31
templates/item-ressource-sheet.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
|
||||
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
|
||||
<ul class="item-list alternate-list">
|
||||
|
||||
<li class="flexrow item">
|
||||
<label class="generic-label item-field-label-long">Développement : </label>
|
||||
<input type="text" class="padd-right item-field-label-long" name="system.pointdev"
|
||||
value="{{system.pointdev}}" data-dtype="Number" />
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</form>
|
||||
@@ -24,6 +24,13 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{#if nbAdversites}}
|
||||
<div class="flexrow">
|
||||
<span class="roll-dialog-label">Malus d'adversités : </span>
|
||||
<span class="small-label">- {{nbAdversites}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if competence}}
|
||||
<div class="flexrow">
|
||||
<span class="roll-dialog-label">{{competence.name}}</span>
|
||||
|
||||