Competence pour creature

This commit is contained in:
sladecraven 2020-09-20 19:55:10 +02:00
parent ca1a93f9d7
commit 43c5f6570c
3 changed files with 4 additions and 3 deletions

View File

@ -727,12 +727,12 @@ export class RdDActor extends Actor {
if ( compItem.data.iscombat ) { if ( compItem.data.iscombat ) {
armeItem = { name: compName, data: { dommages: compItem.data.dommages} }; armeItem = { name: compName, data: { dommages: compItem.data.dommages} };
} }
compItem.data.defaut_carac = compName; // Fake default competence compItem.data.defaut_carac = "carac_creature"; // Fake default competence
console.log("V:", compItem.data.carac_value, compItem) console.log("V:", compItem.data.carac_value, compItem)
let rollData = { let rollData = {
"competence": compItem, "competence": compItem,
"arme": armeItem, "arme": armeItem,
"carac": { compName: { label: compName, value: compItem.data.carac_value } }, "carac": { carac_creature: { label: compName, value: compItem.data.carac_value } },
"bonusmalusTable": CONFIG.RDD.bonusmalus, "bonusmalusTable": CONFIG.RDD.bonusmalus,
"etat": this.data.data.compteurs.etat.value, "etat": this.data.data.compteurs.etat.value,
"bmValue": (attackerRoll) ? attackerRoll.bmValue : 0, "bmValue": (attackerRoll) ? attackerRoll.bmValue : 0,

View File

@ -95,6 +95,7 @@ export class RdDRollDialog extends Dialog {
// Update html, according to data // Update html, according to data
if (rollData.competence) { if (rollData.competence) {
// Set the default carac from the competence item // Set the default carac from the competence item
console.log(rollData.competence.data.defaut_carac, rollData.carac);
rollData.selectedCarac = rollData.carac[rollData.competence.data.defaut_carac]; rollData.selectedCarac = rollData.carac[rollData.competence.data.defaut_carac];
$("#carac").val( rollData.competence.data.defaut_carac ); $("#carac").val( rollData.competence.data.defaut_carac );
} }

View File

@ -2,7 +2,7 @@
"name": "foundryvtt-reve-de-dragon", "name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon", "title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT", "description": "Rêve de Dragon RPG for FoundryVTT",
"version": "0.9.8", "version": "0.9.9",
"minimumCoreVersion": "0.6.0", "minimumCoreVersion": "0.6.0",
"compatibleCoreVersion": "0.6.6", "compatibleCoreVersion": "0.6.6",
"templateVersion": 34, "templateVersion": 34,