Compare commits
5 Commits
fvtt-hawkm
...
fvtt-hawkm
| Author | SHA1 | Date | |
|---|---|---|---|
| 50e42d4ecf | |||
| f88fbf977d | |||
| 927ddf1328 | |||
| ad5f91fbb2 | |||
| 4f04a3c97b |
BIN
assets/icons/contacts.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
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/icons/ressources.webp
Normal file
|
After Width: | Height: | Size: 12 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 |
@@ -20,7 +20,7 @@ export class HawkmoonActorSheet extends ActorSheet {
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
|
||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||
editScore: false
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -43,10 +43,12 @@ 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}),
|
||||
habitat: await TextEditor.enrichHTML(this.object.system.biodata.habitat, {async: true}),
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
editScore: this.options.editScore,
|
||||
@@ -58,7 +60,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 +103,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 +120,14 @@ export class HawkmoonActorSheet extends ActorSheet {
|
||||
this.actor.incDecQuantity( li.data("item-id"), +1 );
|
||||
} );
|
||||
|
||||
html.find('.roll-initiative').click((event) => {
|
||||
this.actor.rollAttribut("pre", true)
|
||||
})
|
||||
|
||||
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, false)
|
||||
})
|
||||
html.find('.roll-competence').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item")
|
||||
@@ -154,13 +180,9 @@ 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)
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
_updateObject(event, formData) {
|
||||
// Update the Actor
|
||||
return this.object.update(formData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,49 @@ 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 }
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getVigueur() {
|
||||
return this.system.sante.vigueur
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getBonneAventure() {
|
||||
@@ -299,7 +339,7 @@ export class HawkmoonActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getBonusDegats() {
|
||||
return __degatsBonus[this.system.attributs.pui.value]
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -336,11 +376,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 +412,20 @@ export class HawkmoonActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getInitiativeScore( ) {
|
||||
return Number(this.system.attributs.adr.value) + Number(this.system.combat.initbonus)
|
||||
getInitiativeScore() {
|
||||
return this.lastInit || -1
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
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 +437,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 +463,36 @@ 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, isInit = false) {
|
||||
let rollData = this.getCommonRollData(attrKey)
|
||||
rollData.multiplier = (isInit)? 1 : 2
|
||||
rollData.isInit = isInit
|
||||
let rollDialog = await HawkmoonRollDialog.create(this, rollData)
|
||||
rollDialog.render(true)
|
||||
}
|
||||
@@ -445,6 +500,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)
|
||||
@@ -456,9 +512,6 @@ export class HawkmoonActor extends Actor {
|
||||
if (arme.type == "arme") {
|
||||
arme = this.prepareArme(arme)
|
||||
}
|
||||
if (arme.type == "bouclier") {
|
||||
arme = this.prepareBouclier(arme)
|
||||
}
|
||||
let rollData = this.getCommonRollData(arme.system.attrKey, arme.system.competence._id)
|
||||
rollData.arme = arme
|
||||
console.log("ARME!", rollData)
|
||||
@@ -467,16 +520,18 @@ export class HawkmoonActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollArmeDegats(armeId) {
|
||||
async rollArmeDegats(armeId, targetVigueur = undefined) {
|
||||
let arme = this.items.get(armeId)
|
||||
if (arme.type == "arme") {
|
||||
arme = this.prepareArme(arme)
|
||||
}
|
||||
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 nbEtatPerdus = 0
|
||||
if (targetVigueur) {
|
||||
nbEtatPerdus = Math.floor(roll.total / targetVigueur)
|
||||
}
|
||||
let rollData = {
|
||||
arme: arme,
|
||||
finalResult: roll.total,
|
||||
@@ -484,9 +539,11 @@ export class HawkmoonActor extends Actor {
|
||||
actorImg: this.img,
|
||||
actorId: this.id,
|
||||
actionImg: arme.img,
|
||||
targetVigueur: targetVigueur,
|
||||
nbEtatPerdus: nbEtatPerdus
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,11 +9,9 @@ export class HawkmoonCombat extends Combat {
|
||||
for (let cId = 0; cId < ids.length; cId++) {
|
||||
const c = this.combatants.get(ids[cId]);
|
||||
let id = c._id || c.id;
|
||||
let initBonus = c.actor ? c.actor.getInitiativeScore() : 0
|
||||
let roll = new Roll("1d10 + "+initBonus).roll({ async: false})
|
||||
await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"))
|
||||
let initValue = c.actor ? c.actor.getInitiativeScore() : 0
|
||||
//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;
|
||||
|
||||
26
modules/hawkmoon-creature-sheet.js
Normal 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
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,8 @@ export const defaultItemImg = {
|
||||
historique: "systems/fvtt-hawkmoon-cyd/assets/icons/historique.webp",
|
||||
profil: "systems/fvtt-hawkmoon-cyd/assets/icons/profil.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",
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
import { HawkmoonActor } from "./hawkmoon-actor.js";
|
||||
import { HawkmoonItemSheet } from "./hawkmoon-item-sheet.js";
|
||||
import { HawkmoonActorSheet } from "./hawkmoon-actor-sheet.js";
|
||||
import { HawkmoonCreatureSheet } from "./hawkmoon-creature-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 +33,7 @@ Hooks.once("init", async function () {
|
||||
/* -------------------------------------------- */
|
||||
// Set an initiative formula for the system
|
||||
CONFIG.Combat.initiative = {
|
||||
formula: "1d6",
|
||||
formula: "1d10",
|
||||
decimals: 1
|
||||
};
|
||||
|
||||
@@ -54,7 +56,8 @@ 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", HawkmoonCreatureSheet, { types: ["creature"], makeDefault: true })
|
||||
Actors.registerSheet("fvtt-hawkmoon-cyd", HawkmoonCelluleSheet, { types: ["cellule"], makeDefault: true });
|
||||
|
||||
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})`)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -110,6 +132,14 @@ export class HawkmoonUtility {
|
||||
rollData.competence = duplicate(actor.getCompetence(rollData.competence._id))
|
||||
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)
|
||||
})
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -268,10 +298,9 @@ export class HawkmoonUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
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
|
||||
diceValue *= (rollData.doubleD20) ? 2 : 1
|
||||
//console.log("PAIR/IMP", diceValue)
|
||||
if (diceValue % 2 == 1) {
|
||||
//console.log("PAIR/IMP2", diceValue)
|
||||
rollData.finalResult -= rollData.roll.terms[0].results[0].result // Substract value
|
||||
@@ -288,6 +317,7 @@ export class HawkmoonUtility {
|
||||
rollData.isHeroique = ((rollData.finalResult - rollData.difficulte) >= 10)
|
||||
rollData.isDramatique = ((rollData.finalResult - rollData.difficulte) <= -10)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -333,9 +363,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}`
|
||||
@@ -348,6 +380,9 @@ export class HawkmoonUtility {
|
||||
|
||||
rollData.finalResult = myRoll.total
|
||||
this.computeResult(rollData)
|
||||
if (rollData.isInit) {
|
||||
actor.lastInit = rollData.finalResult
|
||||
}
|
||||
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-generic-result.html`, rollData)
|
||||
@@ -399,7 +434,7 @@ export class HawkmoonUtility {
|
||||
chatGM.whisper = this.getUsers(user => user.isGM);
|
||||
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content;
|
||||
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 });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -477,6 +512,7 @@ export class HawkmoonUtility {
|
||||
rollData.defenderTokenId = target.id
|
||||
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||
rollData.armeDefense = defender.getBestDefenseValue()
|
||||
rollData.targetVigueur = defender.getVigueur()
|
||||
if ( rollData.armeDefense) {
|
||||
rollData.difficulte = rollData.armeDefense.system.totalDefensif
|
||||
} else {
|
||||
|
||||
@@ -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"] {
|
||||
color: rgba(36, 37, 37, 0.75);
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 0 none;
|
||||
/*background: rgba(255, 255, 255, 0.05);*/
|
||||
border: 2px saddlebrown;
|
||||
border-width: 2px;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
@@ -420,6 +421,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
|
||||
object-position: 50% 0;
|
||||
margin: 0.5rem 0 0.5rem 0.5rem;
|
||||
padding: 0;
|
||||
border:0px;
|
||||
}
|
||||
|
||||
.sheet nav.sheet-tabs {
|
||||
@@ -844,6 +846,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 +1180,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 +1292,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 +1300,7 @@ ul, li {
|
||||
}
|
||||
|
||||
#logo {
|
||||
content : url(../assets/logos/mournblade_logo_texte.webp);
|
||||
content : url(../assets/logos/hawkmoon_logo.webp);
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
}
|
||||
@@ -1352,4 +1375,14 @@ ul, li {
|
||||
.item-field {
|
||||
justify-content: flex-start;
|
||||
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;
|
||||
}
|
||||
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.17",
|
||||
"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.17.zip",
|
||||
"packs": [
|
||||
{
|
||||
"type": "Item",
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"Actor": {
|
||||
"types": [
|
||||
"personnage"
|
||||
"personnage",
|
||||
"cellule",
|
||||
"creature"
|
||||
],
|
||||
"templates": {
|
||||
"biodata": {
|
||||
@@ -14,7 +16,7 @@
|
||||
"sexe": "",
|
||||
"yeux": "",
|
||||
"description": "",
|
||||
"amemultiplier": 2,
|
||||
"habitat": "",
|
||||
"notes": "",
|
||||
"statut": "",
|
||||
"gmnotes": ""
|
||||
@@ -73,6 +75,9 @@
|
||||
"rouge": 0,
|
||||
"noire": 0
|
||||
},
|
||||
"vitesse": {
|
||||
"value": 0
|
||||
},
|
||||
"combat": {
|
||||
"initbonus": 0,
|
||||
"vitessebonus": 0,
|
||||
@@ -91,10 +96,21 @@
|
||||
"core"
|
||||
]
|
||||
},
|
||||
"pnj": {
|
||||
"cellule": {
|
||||
"notoriete": 0,
|
||||
"resistance": 0,
|
||||
"developpement": 0,
|
||||
"members": [],
|
||||
"description": ""
|
||||
},
|
||||
"creature": {
|
||||
"templates": [
|
||||
"npccore"
|
||||
]
|
||||
"core",
|
||||
"biodata"
|
||||
],
|
||||
"ressources": {
|
||||
"value": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"Item": {
|
||||
@@ -123,8 +139,20 @@
|
||||
"protection",
|
||||
"monnaie",
|
||||
"equipement",
|
||||
"artefact"
|
||||
"artefact",
|
||||
"ressource",
|
||||
"contact"
|
||||
],
|
||||
"ressource": {
|
||||
"pointdev": 0,
|
||||
"description": ""
|
||||
},
|
||||
"contact": {
|
||||
"contacttype": "",
|
||||
"niveau": "",
|
||||
"pointdev": 0,
|
||||
"description": ""
|
||||
},
|
||||
"talent": {
|
||||
"talenttype": "",
|
||||
"utilisation": "",
|
||||
|
||||
@@ -11,11 +11,6 @@
|
||||
|
||||
<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 ">
|
||||
<h4 class="item-name-label competence-name">Bonne Aventure</h4>
|
||||
<label class="item-name-label competence-name item-field-label-short">Base</label>
|
||||
@@ -67,7 +62,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}}
|
||||
@@ -76,9 +71,6 @@
|
||||
</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">
|
||||
<li class="item flexrow">
|
||||
@@ -98,9 +90,39 @@
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
@@ -193,6 +215,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>
|
||||
|
||||
@@ -238,10 +287,10 @@
|
||||
</span>
|
||||
|
||||
{{#if arme.system.isdefense}}
|
||||
<span class="item-field-label-short arme-defensif"><label
|
||||
class="arme-defensif">{{arme.system.totalDefensif}}</label></span>
|
||||
<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="arme-defensif">-</label></span>
|
||||
<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">
|
||||
@@ -329,61 +378,58 @@
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab biodata" data-group="primary" data-tab="biodata">
|
||||
<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>
|
||||
<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>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<ul class="item-list alternate-list">
|
||||
<li class="item flexrow" data-item-id="{{historique._id}}">
|
||||
<label class="generic-label">Historique : </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">
|
||||
<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>
|
||||
<ul>
|
||||
<li class="flexrow item">
|
||||
<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" />
|
||||
</li>
|
||||
<li class="item flexrow">
|
||||
<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" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<ul>
|
||||
<li class="item flexrow">
|
||||
<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" />
|
||||
</li>
|
||||
<li class="item flexrow">
|
||||
<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" />
|
||||
</li>
|
||||
</ul>
|
||||
@@ -392,17 +438,17 @@
|
||||
<div>
|
||||
<li class="item flexrow">
|
||||
<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" />
|
||||
</li>
|
||||
<li class="flexrow item">
|
||||
<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" />
|
||||
</li>
|
||||
<li class="flexrow item">
|
||||
<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" />
|
||||
</li>
|
||||
</div>
|
||||
@@ -412,7 +458,7 @@
|
||||
<h3>Description</h3>
|
||||
</span>
|
||||
<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>
|
||||
|
||||
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,8 +19,10 @@
|
||||
<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>
|
||||
{{#if targetVigueur}}
|
||||
<li>Vigueur de la cible : {{targetVigueur}}</li>
|
||||
<li>Etats de Combativité perdus : {{nbEtatPerdus}}</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
<div>
|
||||
<ul>
|
||||
<li class="hawkmoon-roll">Attribut : {{attr.label}}</li>
|
||||
<li class="hawkmoon-roll">Attribut : {{attr.label}} ({{attr.value}})</li>
|
||||
|
||||
{{#if competence}}
|
||||
<li>Compétence : {{competence.name}}</li>
|
||||
<li>Compétence : {{competence.name}} ({{competence.system.niveau}})</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if selectedMaitrise}}
|
||||
@@ -34,35 +34,50 @@
|
||||
{{/if}}
|
||||
|
||||
<li>Formule : {{diceFormula}}</li>
|
||||
|
||||
<li>Résultat du dé : {{diceResult}}</li>
|
||||
|
||||
{{#if bonusRoll}}
|
||||
<li>{{textBonus}} : +{{bonusRoll.total}}</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
<li>Total : {{finalResult}}</li>
|
||||
|
||||
{{#if difficulte}}
|
||||
{{#if isSuccess}}
|
||||
<li>Succés!!!</li>
|
||||
<li class="chat-success">Succés!!!</li>
|
||||
{{else}}
|
||||
<li>Echec ...</li>
|
||||
<li class="chat-failure">Echec ...</li>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if isHeroique}}
|
||||
<li>Succés Héroïque!!!</li>
|
||||
<li class="chat-success">Succés Héroïque!!!</li>
|
||||
{{/if}}
|
||||
{{#if isDramatique}}
|
||||
<li>Echec Dramatique!!!</li>
|
||||
<li class="chat-failure">Echec Dramatique!!!</li>
|
||||
{{/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|}}
|
||||
<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>
|
||||
{{/each}}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
357
templates/creature-sheet.html
Normal 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=""> </div>
|
||||
<div class=""> </div>
|
||||
<div class=""> </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"> </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"> </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"> </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"> </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"> </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>
|
||||
|
||||
</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"> </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"> </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"> </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"> </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>
|
||||
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,7 @@
|
||||
{{#select system.talenttype}}
|
||||
<option value="personnage">Personnage</option>
|
||||
<option value="cellule">Cellule</option>
|
||||
<option value="traitespece">Trait d'espèce</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
@@ -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>
|
||||
|
||||