Diverses prise en compte technique

This commit is contained in:
sladecraven 2022-10-25 17:54:13 +02:00
parent b64eeb226a
commit 5c54062b81
17 changed files with 159 additions and 291 deletions

View File

@ -71,6 +71,7 @@ export class HawkmoonActor extends Actor {
}
return arme
}
/* -------------------------------------------- */
getWeapons() {
let armes = []
@ -78,9 +79,6 @@ export class HawkmoonActor extends Actor {
if (arme.type == "arme") {
armes.push(this.prepareArme(arme))
}
if (arme.type == "bouclier") {
armes.push(this.prepareBouclier(arme))
}
}
return armes
}
@ -173,7 +171,10 @@ export class HawkmoonActor extends Actor {
prepareDerivedData() {
if (this.type == 'personnage') {
// TODO
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})
}
}
super.prepareDerivedData()
@ -350,9 +351,10 @@ export class HawkmoonActor extends Actor {
rollData.actorImg = this.img
rollData.actorId = this.id
rollData.img = this.img
rollData.canEclatDoubleD20 = true
rollData.doubleD20 = false
rollData.attributs = HawkmoonUtility.getAttributs()
rollData.maitriseId = "none"
rollData.nbEclat = this.system.eclat.value
rollData.nbBA = this.system.bonneaventure.actuelle
if (attrKey) {
rollData.attrKey = attrKey
@ -363,6 +365,7 @@ export class HawkmoonActor extends Actor {
}
if (compId) {
rollData.competence = duplicate(this.items.get(compId) || {})
rollData.maitrises = rollData.competence.system.predilections.filter(p => p.maitrise )
rollData.actionImg = rollData.competence?.img
}
if (compName) {

View File

@ -134,41 +134,56 @@ export class HawkmoonItemSheet extends ItemSheet {
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred[index].name = ev.currentTarget.value
this.object.update( { 'data.predilections': pred })
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('.edit-predilection-description').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred[index].description = ev.currentTarget.value
this.object.update( { 'data.predilections': pred })
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('.delete-prediction').click(ev => {
html.find('.predilection-acquise').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred.splice(index,1)
this.object.update( { 'data.predilections': pred })
})
pred[index].acquise = ev.currentTarget.checked
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('.predilection-maitrise').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred[index].maitrise = ev.currentTarget.checked
this.object.update( { 'data.predilections': pred })
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('.predilection-used').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred[index].used = ev.currentTarget.checked
this.object.update( { 'data.predilections': pred })
pred[index].id = pred[index].id || randomID(16)
this.object.update( { 'system.predilections': pred })
})
html.find('.delete-prediction').click(ev => {
const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index")
let pred = duplicate(this.object.system.predilections)
pred.splice(index,1)
this.object.update( { 'system.predilections': pred })
})
html.find('#add-predilection').click(ev => {
let pred = duplicate(this.object.system.predilections)
pred.push( { name: "Nouvelle prédilection", used: false })
this.object.update( { 'data.predilections': pred })
pred.push( { name: "Nouvelle prédilection", id: randomID(16), used: false })
this.object.update( { 'system.predilections': pred })
})
// Update Inventory Item
html.find('.item-delete').click(ev => {

View File

@ -20,12 +20,12 @@ export class HawkmoonRollDialog extends Dialog {
rolld10: {
icon: '<i class="fas fa-check"></i>',
label: "Lancer 1d10",
callback: () => { this.roll("1d10") }
callback: () => { this.roll("d10") }
},
rolld20: {
icon: '<i class="fas fa-check"></i>',
label: "Lancer 1d20",
callback: () => { this.roll("1d20") }
callback: () => { this.roll("d20") }
},
cancel: {
icon: '<i class="fas fa-times"></i>',
@ -66,14 +66,8 @@ export class HawkmoonRollDialog extends Dialog {
html.find('#attrKey').change(async (event) => {
this.rollData.attrKey = String(event.currentTarget.value)
})
html.find('#runemode').change(async (event) => {
this.rollData.runemode = String(event.currentTarget.value)
html.find('#select-maitrise').change(async (event) => {
this.rollData.maitriseId = String(event.currentTarget.value)
})
html.find('#runeame').change(async (event) => {
this.rollData.runeame = Number(event.currentTarget.value)
})
html.find('#doubleD20').change(async (event) => {
this.rollData.doubleD20 = event.currentTarget.checked
})
}
}

View File

@ -14,13 +14,10 @@ export class HawkmoonUtility {
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
HawkmoonUtility.pushInitiativeOptions(html, options);
})
Hooks.on("dropCanvasData", (canvas, data) => {
HawkmoonUtility.dropItemOnToken(canvas, data)
});
this.rollDataStore = {}
this.defenderStore = {}
HawkmoonCommands.init();
HawkmoonCommands.init()
Handlebars.registerHelper('count', function (list) {
return list.length;
@ -107,7 +104,7 @@ export class HawkmoonUtility {
let predIdx = $(event.currentTarget).data("predilection-index")
let messageId = HawkmoonUtility.findChatMessageId(event.currentTarget)
let message = game.messages.get(messageId)
let rollData = message.getFlag("world", "mournblade-roll")
let rollData = message.getFlag("world", "hawkmoon-roll")
let actor = game.actors.get(rollData.actorId)
await actor.setPredilectionUsed(rollData.competence._id, predIdx)
rollData.competence = duplicate(actor.getCompetence(rollData.competence._id))
@ -123,7 +120,8 @@ export class HawkmoonUtility {
'systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html'
'systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-sante-etat.html',
]
return loadTemplates(templatePaths);
}
@ -303,16 +301,16 @@ export class HawkmoonUtility {
rollData.attr = duplicate(actor.system.attributs[rollData.attrKey])
}
rollData.diceFormula = rollData.mainDice
if (rollData.doubleD20) { // Multiply result !
rollData.diceFormula += "*2"
if (!rollData.isReroll) {
actor.changeEclat(-1)
}
if ( rollData.maitriseId != "none") {
rollData.selectedMaitrise = rollData.maitrises.find(p => p.id == rollData.maitriseId )
rollData.diceFormula = "2" + rollData.mainDice + "kh"
} else {
rollData.diceFormula = "1" + rollData.mainDice
}
//console.log("BEFORE COMP", rollData)
if (rollData.competence) {
rollData.predilections = duplicate(rollData.competence.system.predilections.filter(pred => !pred.used) || [])
rollData.predilections = duplicate(rollData.competence.system.predilections.filter(pred => pred.acquise && !pred.maitrise && !pred.used) || [])
let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.system.niveau}+${rollData.modificateur}+${compmod}`
} else {
@ -341,14 +339,6 @@ export class HawkmoonUtility {
rollData.finalResult = myRoll.total
this.computeResult(rollData)
if (rollData.rune) {
let subAme = rollData.runeame
if (rollData.isEchec && !rollData.isDramatique) {
subAme = Math.ceil((subAme + 1) / 2)
}
actor.subPointsAme(rollData.runemode, subAme)
}
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-generic-result.html`, rollData)
}, rollData)
@ -451,7 +441,7 @@ export class HawkmoonUtility {
chatOptions.alias = chatOptions.alias || name
let msg = await ChatMessage.create(chatOptions)
console.log("=======>", rollData)
msg.setFlag("world", "mournblade-roll", rollData)
msg.setFlag("world", "hawkmoon-roll", rollData)
}
/* -------------------------------------------- */
@ -493,7 +483,7 @@ export class HawkmoonUtility {
let msgId = li.data("message-id")
let msg = game.messages.get(msgId)
if (msg) {
let rollData = msg.getFlag("world", "mournblade-roll")
let rollData = msg.getFlag("world", "hawkmoon-roll")
let actor = game.actors.get(rollData.actorId)
actor.changeBonneAventure(changed)
rollData.isReroll = true
@ -512,122 +502,57 @@ export class HawkmoonUtility {
let msgId = li.data("message-id")
let msg = game.messages.get(msgId)
if (msg) {
let rollData = msg.getFlag("world", "mournblade-roll")
let rollData = msg.getFlag("world", "hawkmoon-roll")
let actor = game.actors.get(rollData.actorId)
actor.changeEclat(changed)
rollData.isReroll = true
rollData.textBonus = "Bonus d'Eclat"
rollData.addedBonus = addedBonus
HawkmoonUtility.bonusRollHawkmoon(rollData)
if (addedBonus == "reroll") {
HawkmoonUtility.rollHawkmoon(rollData)
} else {
rollData.addedBonus = addedBonus
HawkmoonUtility.bonusRollHawkmoon(rollData)
}
}
}
/* -------------------------------------------- */
static chatRollMenu(html, options) {
let canApply = li => canvas.tokens.controlled.length && li.find(".mournblade-roll").length
let canApplyBALoyal = function (li) {
let canApply = li => canvas.tokens.controlled.length && li.find(".hawkmoon-roll").length
let canApplyBA = function (li) {
let message = game.messages.get(li.attr("data-message-id"))
let rollData = message.getFlag("world", "mournblade-roll")
let rollData = message.getFlag("world", "hawkmoon-roll")
let actor = game.actors.get(rollData.actorId)
return (!rollData.isReroll && actor.getBonneAventure() > 0 && actor.getAlignement() == "loyal")
return (!rollData.isReroll && actor.getBonneAventure() > 0 )
}
let canApplyPELoyal = function (li) {
let canApplyPE = function (li) {
let message = game.messages.get(li.attr("data-message-id"))
let rollData = message.getFlag("world", "mournblade-roll")
let rollData = message.getFlag("world", "hawkmoon-roll")
let actor = game.actors.get(rollData.actorId)
return (!rollData.isReroll && actor.getEclat() > 0 && actor.getAlignement() == "loyal")
}
let canApplyBAChaotique = function (li) {
let message = game.messages.get(li.attr("data-message-id"))
let rollData = message.getFlag("world", "mournblade-roll")
let actor = game.actors.get(rollData.actorId)
return (!rollData.isReroll && actor.getBonneAventure() > 0 && actor.getAlignement() == "chaotique")
}
let canApplyBAChaotique3 = function (li) {
let message = game.messages.get(li.attr("data-message-id"))
let rollData = message.getFlag("world", "mournblade-roll")
let actor = game.actors.get(rollData.actorId)
return (!rollData.isReroll && actor.getBonneAventure() > 2 && actor.getAlignement() == "chaotique")
}
let canApplyPEChaotique = function (li) {
let message = game.messages.get(li.attr("data-message-id"))
let rollData = message.getFlag("world", "mournblade-roll")
let actor = game.actors.get(rollData.actorId)
return (!rollData.isReroll && actor.getEclat() > 0 && actor.getAlignement() == "chaotique")
}
let hasPredilection = function (li) {
let message = game.messages.get(li.attr("data-message-id"))
let rollData = message.getFlag("world", "mournblade-roll")
let actor = game.actors.get(rollData.actorId)
if (rollData.competence) {
let nbPred = rollData.competence.data.predilections.filter(pred => !pred.used).length
return (!rollData.isReroll && rollData.competence && nbPred > 0)
}
return false
}
let canCompetenceDouble = function (li) {
let message = game.messages.get(li.attr("data-message-id"))
let rollData = message.getFlag("world", "mournblade-roll")
let actor = game.actors.get(rollData.actorId)
if (rollData.competence) {
return rollData.competence.data.doublebonus
}
return false
return (!rollData.isReroll && actor.getEclat() > 0 )
}
options.push(
{
name: "Ajouer +3 (1 point de Bonne Aventure)",
icon: "<i class='fas fa-user-plus'></i>",
condition: canApply && canApplyBALoyal,
condition: canApply && canApplyBA,
callback: li => HawkmoonUtility.applyBonneAventureRoll(li, -1, "+3")
}
)
options.push(
{
name: "Ajouer +6 (1 point de Bonne Aventure)",
icon: "<i class='fas fa-user-plus'></i>",
condition: canApply && canApplyBALoyal && canCompetenceDouble,
callback: li => HawkmoonUtility.applyBonneAventureRoll(li, -1, "+6")
}
)
options.push(
{
name: "Ajouer +1d6 (1 point de Bonne Aventure)",
icon: "<i class='fas fa-user-plus'></i>",
condition: canApply && canApplyBAChaotique,
callback: li => HawkmoonUtility.applyBonneAventureRoll(li, -1, "+1d6")
}
)
options.push(
{
name: "Ajouer +2d6 (1 point de Bonne Aventure)",
icon: "<i class='fas fa-user-plus'></i>",
condition: canApply && canApplyBAChaotique && canCompetenceDouble,
callback: li => HawkmoonUtility.applyBonneAventureRoll(li, -1, "+2d6")
}
)
options.push(
{
name: "Relancer le dé (3 points de Bonne Aventure)",
icon: "<i class='fas fa-user-plus'></i>",
condition: canApply && canApplyBAChaotique3,
callback: li => HawkmoonUtility.applyBonneAventureRoll(li, -3, "reroll")
}
)
options.push(
{
name: "Ajouter +10 (1 Point d'Eclat)",
icon: "<i class='fas fa-user-plus'></i>",
condition: canApply && canApplyPELoyal,
condition: canApply && canApplyPE,
callback: li => HawkmoonUtility.applyEclatRoll(li, -1, "+10")
}
)
options.push(
{
name: "Ajouter +20 (1 Point d'Eclat)",
name: "Relancer le dé (1 point d'Eclat)",
icon: "<i class='fas fa-user-plus'></i>",
condition: canApply && canApplyPELoyal && canCompetenceDouble,
callback: li => HawkmoonUtility.applyEclatRoll(li, -1, "+20")
condition: canApply && canApplyPE,
callback: li => HawkmoonUtility.applyEclatRoll(li, -3, "reroll")
}
)
return options

View File

View File

View File

View File

View File

@ -1112,7 +1112,7 @@ ul, li {
text-decoration: none;
text-shadow: 0px 1px 0px #4d3534;
position: relative;
margin:2px;
/*margin:2px;*/
}
.chat-card-button:hover {
@ -1124,9 +1124,10 @@ ul, li {
top:1px;
}
.button-sheet-roll {
box-shadow: inset 0px 1px 0px 0px #a6827e;
background: linear-gradient(to bottom, #21374afc 5%, #152833ab 60%);
background: linear-gradient(to bottom, #41545a 5%, #2e5561 100%);
background-color: #7d5d3b00;
border-radius: 4px;
border: 1px ridge #846109;
@ -1139,13 +1140,15 @@ ul, li {
text-shadow: 0px 1px 0px #4d3534;
position: relative;
max-height:1.8rem;
max-width: 4rem;
margin-left:4px;
flex-grow:1;
max-width: 4rem;
min-width: 4rem;
}
.button-sheet-roll:hover {
background: linear-gradient(to bottom, #800000 5%, #3e0101 100%);
background-color: red;
background-color: rgb(56, 33, 33);
}
.button-sheet-roll:active {
position:relative;
@ -1247,28 +1250,6 @@ ul, li {
flex-grow: 2;
}
/*************************************************************/
.button-roll-competence {
min-width: 64px;
max-width: 64px;
background-color: rgba(211, 221, 187, 100);
padding-top: 7px;
padding-left: 4px;
margin-left: 4px;
margin-right: 4px;
border-radius: 12px;
}
/*************************************************************/
.button-roll-competence-empty {
min-width: 64px;
max-width: 64px;
padding-top: 7px;
padding-left: 4px;
margin-left: 4px;
margin-right: 4px;
border-radius: 12px;
}
/*************************************************************/
.item-name-img {

View File

@ -21,7 +21,16 @@
"type": "Item",
"label": "Compétences",
"name": "skills",
"path": "packs/skills.db",
"path": "packs/competences.db",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
},
{
"type": "Item",
"label": "Historiques",
"name": "historiques",
"path": "packs/historiques.db",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
@ -38,8 +47,8 @@
{
"type": "Item",
"label": "Protections",
"name": "protection",
"path": "packs/protection.db",
"name": "protections",
"path": "packs/protections.db",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
@ -81,8 +90,8 @@
"flags": {}
}
],
"primaryTokenAttribute": "secondary.health",
"secondaryTokenAttribute": "secondary.delirium",
"primaryTokenAttribute": "sante.vigueur",
"secondaryTokenAttribute": "bonneaventure.actuelle",
"socket": true,
"styles": [
"styles/simple.css"

View File

@ -108,6 +108,10 @@
"prixsc": 0,
"rarete": 0,
"equipped": false
},
"automation": {
"isautomated": false,
"automations": []
}
},
"types": [
@ -124,10 +128,10 @@
"talent": {
"utilisation": "",
"prerequis": "",
"isbonus": false,
"bonusformula": "",
"used": false,
"templates": [
"base"
"base",
"automation"
]
},
"historique": {

View File

@ -81,66 +81,23 @@
<h4 class="item-name-label competence-name">Santé</h4>
<ul class="item-list alternate-list">
<li class="item flexrow">
<label class="label-name">Bonus</label>
<input type="text" class="input-numeric-short" name="system.sante.bonus" value="{{system.sante.bonus}}"
data-dtype="Number" />
<label class="label-name">Total</label>
<label class="label-name">{{system.sante.base}}</label>
<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">Non létaux</label>
<input type="text" class="input-numeric-short" name="system.sante.nonletaux"
value="{{system.sante.nonletaux}}" data-dtype="Number" />
<label class="label-name">Létaux</label>
<input type="text" class="input-numeric-short" name="system.sante.letaux" value="{{system.sante.letaux}}"
data-dtype="Number" />
</li>
</ul>
<h4 class="item-name-label competence-name">Ame</h4>
<ul class="item-list alternate-list">
<li class="item flexrow">
<label class="label-name">Max</label>
<input type="text" class="input-numeric-short" name="system.ame.fullmax" value="{{system.ame.fullmax}}"
data-dtype="Number" />
<label class="label-name">Max Actuel</label>
<input type="text" class="input-numeric-short" name="system.ame.currentmax"
value="{{system.ame.currentmax}}" data-dtype="Number" />
<label class="label-name">Courante</label>
<input type="text" class="input-numeric-short" name="system.ame.value" value="{{system.ame.value}}"
data-dtype="Number" />
<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">
<label class="competence-name">Initiative</label>
<label class="competence-name">{{combat.initBase}}</label>
<input type="text" class="input-numeric-short" name="system.combat.initbonus"
value="{{system.combat.initbonus}}" data-dtype="Number" />
<label class="competence-name">{{combat.initTotal}}</label>
</li>
<li class="item flexrow">
<label class="competence-name">B. Dégats</label>
<label class="competence-name">+{{combat.bonusDegats}}</label>
<input type="text" class="input-numeric-short" name="system.combat.bonusdegats"
value="{{system.combat.bonusdegats}}" data-dtype="Number" />
<label class="competence-name">+{{combat.bonusDegatsTotal}}</label>
</li>
<li class="item flexrow">
<label class="competence-name">Vitesse</label>
<label class="competence-name">{{combat.vitesseBase}}</label>
<input type="text" class="input-numeric-short" name="system.combat.vitessebonus"
value="{{system.combat.vitessebonus}}" data-dtype="Number" />
<label class="competence-name">{{combat.vitesseTotal}}</label>
</li>
<li class="item flexrow">
<label class="competence-name">Défense</label>
<label class="competence-name">{{combat.defenseBase}}</label>
<input type="text" class="input-numeric-short" name="system.combat.defensebonus"
value="{{system.combat.defensebonus}}" data-dtype="Number" />
<label class="competence-name">{{combat.defenseTotal}}</label>
<button class="chat-card-button roll-initiative">Lancer l'initiative</button>
</li>
</ul>
</div>
@ -168,32 +125,26 @@
{{#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"
<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}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html}}
{{/select}}
</select>
{{#if (ne skill.system.attribut1 "none")}}
<span class="item-field-label-short">
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut1}}">{{upper
skill.system.attribut1}} : {{skill.system.attribut1total}}</button>
</span>
{{/if}}
{{#if (ne skill.system.attribut2 "none")}}
<span class="item-field-label-short">
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut2}}">{{upper
skill.system.attribut2}} : {{skill.system.attribut2total}}</button>
</span>
{{/if}}
{{#if (ne skill.system.attribut3 "none")}}
<span class="item-field-label-short">
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut3}}">{{upper
skill.system.attribut3}} : {{skill.system.attribut3total}}</button>
</span>
{{/if}}
<div class="item-filler">&nbsp;</div>

View File

@ -18,28 +18,27 @@
<div>
<ul>
<li class="mournblade-roll">Attribut : {{attr.label}}</li>
<li class="hawkmoon-roll">Attribut : {{attr.label}}</li>
{{#if competence}}
<li>Compétence : {{competence.name}}</li>
{{/if}}
{{#if rune}}
<li>Rune : {{rune.name}}</li>
<li>Mode : {{runemode}}</li>
<li>Points d'Ame : {{runeame}}</li>
<li>Durée : {{runeduree}} actions complexes</li>
{{#if selectedMaitrise}}
<li>Maitrise : {{selectedMaitrise.name}}</li>
{{/if}}
{{#if bonusRoll}}
<li>{{textBonus}} : {{bonusRoll.total}}</li>
{{/if}}
{{#if arme}}
<li>Arme : {{arme.name}} (+{{arme.system.bonusmaniementoff}})</li>
{{/if}}
<li>Formule : {{diceFormula}}</li>
{{#if bonusRoll}}
<li>{{textBonus}} : +{{bonusRoll.total}}</li>
{{/if}}
<li>Total : {{finalResult}}</li>
{{#if difficulte}}
@ -62,6 +61,7 @@
<button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">Predilection : {{pred.name}}</button>
</li>
{{/each}}
</ul>
</div>

View File

@ -23,8 +23,8 @@
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Attribut 1 </label>
<select class="status-small-label color-class-common item-field-label-long" type="text" name="system.attribut1"
value="{{system.attribut1}}" data-dtype="string">
<select class="status-small-label color-class-common item-field-label-long" type="text"
name="system.attribut1" value="{{system.attribut1}}" data-dtype="string">
{{#select system.attribut1}}
{{#each attributs as |attrLabel attrKey|}}
<option value="{{attrKey}}">{{attrLabel}}</option>
@ -34,8 +34,8 @@
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Attribut 2 </label>
<select class="status-small-label color-class-common item-field-label-long" type="text" name="system.attribut2"
value="{{system.attribut2}}" data-dtype="string">
<select class="status-small-label color-class-common item-field-label-long" type="text"
name="system.attribut2" value="{{system.attribut2}}" data-dtype="string">
<option value="none">Aucun</option>
{{#select system.attribut2}}
{{#each attributs as |attrLabel attrKey|}}
@ -46,8 +46,8 @@
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Attribut 3 </label>
<select class="status-small-label color-class-common item-field-label-long" type="text" name="system.attribut3"
value="{{system.attribut3}}" data-dtype="string">
<select class="status-small-label color-class-common item-field-label-long" type="text"
name="system.attribut3" value="{{system.attribut3}}" data-dtype="string">
<option value="none">Aucun</option>
{{#select system.attribut3}}
{{#each attributs as |attrLabel attrKey|}}
@ -64,19 +64,22 @@
<ul>
{{#each system.predilections as |predilection key|}}
<li class="prediction-item item flexrow" data-prediction-index="{{key}}">
<input type="text" class="padd-right color-class-common edit-predilection"
value="{{predilection.name}}" data-dtype="String" />
<input type="text" class="padd-right color-class-common edit-predilection" value="{{predilection.name}}"
data-dtype="String" />
</li>
<li class="prediction-item item flexrow" data-prediction-index="{{key}}">
<textarea row="4" type="text" class="padd-right color-class-common edit-predilection-description"
data-dtype="String">{{predilection.description}}</textarea>
</li>
<li class="prediction-item item flexrow" data-prediction-index="{{key}}">
<label class="generic-label">Maitrise ? <input class="predilection-maitrise" type="checkbox"
{{checked predilection.maitrise}} /></label>
<label class="generic-label">Acquise ? <input class="predilection-acquise" type="checkbox" {{checked
predilection.acquise}} /></label>
<label class="generic-label">Utilisée ? <input class="predilection-used" type="checkbox"
{{checked predilection.used}} /></label>
<label class="generic-label">Maitrise ? <input class="predilection-maitrise" type="checkbox" {{checked
predilection.maitrise}} /></label>
<label class="generic-label">Utilisée ? <input class="predilection-used" type="checkbox" {{checked
predilection.used}} /></label>
<a class="item-control delete-prediction" title="Supprimer une predilection"><i
class="fas fa-trash"></i></a>
</li>

View File

@ -18,8 +18,8 @@
<ul class="item-list alternate-list">
<li class="flexrow item">
<label class="generic-label item-field-label-long">Utilisation </label>
<select class="status-small-label color-class-common item-field-label-long" type="text"
<label class="generic-label item-field-label-medium">Utilisation </label>
<select class="status-small-label color-class-common item-field-label-medium" type="text"
name="system.utilisation" value="{{system.utilisation}}" data-dtype="String">
{{#select system.utilisation}}
<option value="permanent">Permanent</option>
@ -32,8 +32,13 @@
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Apporte un bonus ? </label>
<input type="checkbox" name="system.isbonus" {{checked system.isbonus}} />
<label class="generic-label item-field-label-medium">Pré-requis </label>
<input type="text" class="padd-right color-class-common item-field-label-medium" name="system.prerequis" value="{{system.prerequis}}" data-dtype="String" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-medium">Déja utilisé ? </label>
<input class="predilection-maitrise" type="checkbox" name="system.used" {{checked system.used}} />
</li>
{{#if system.isbonus}}

View File

@ -25,37 +25,23 @@
</div>
{{#if competence}}
<div class="flexrow">
<span class="roll-dialog-label">{{competence.name}}</span>
<span class="small-label">{{competence.system.niveau}}</span>
</div>
{{/if}}
{{#if rune}}
<div class="flexrow">
<span class="roll-dialog-label">{{rune.name}}</span>
<span class="small-label">{{rune.system.formule}}</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label">Lancement</span>
<select class="roll-dialog-label" id="runemode" type="text" name="runemode" value="{{runemode}}"
data-dtype="String">
{{#select runemode}}
<option value="prononcer">Prononcer la rune</option>
<option value="inscrire">Inscrire la rune</option>
{{/select}}
</select>
</div>
<div class="flexrow">
<span class="roll-dialog-label">Points d'Ame</span>
<select class="roll-dialog-label" id="runeame" type="text" name="runeame" value="{{runeame}}"
data-dtype="Number">
{{#select runeame}}
{{{pointAmeOptions}}}
{{/select}}
</select>
</div>
<div class="flexrow">
<span class="roll-dialog-label">{{competence.name}}</span>
<span class="small-label">{{competence.system.niveau}}</span>
</div>
{{#if maitrises}}
<div class="flexrow">
<span class="roll-dialog-label">Utiliser une maîtrise</span>
<select class="status-small-label color-class-common" id ="select-maitrise" type="text" name="select-maitrise" value="maitriseId" data-dtype="string" >
{{#select maitriseId}}
<option value="none">Aucune</option>
{{#each maitrises as |maitrise mKey|}}
<option value="{{maitrise.id}}">{{maitrise.name}}</option>
{{/each}}
{{/select}}
</select>
</div>
{{/if}}
{{/if}}
<div class="flexrow">
@ -91,14 +77,6 @@
</div>
{{/if}}
{{#if canEclatDoubleD20}}
<div class="flexrow">
<span class="roll-dialog-label">Doubler le d20 (1 Point d'Eclat)</span>
<input class="" id="doubleD20" type="checkbox" name="doubleD20" value="{{doubleD20}}" {{checked doubleD20}}/>
</div>
{{/if}}
</div>
</form>