Various fixes

This commit is contained in:
LeRatierBretonnien 2024-04-29 08:56:44 +02:00
parent 9ee3ba4d79
commit ea3486bc03
4 changed files with 11 additions and 7 deletions

View File

@ -63,7 +63,7 @@ export class VadentisActorSheet extends ActorSheet {
formData.optionsBase = VadentisUtility.createDirectOptionList(0, 50); formData.optionsBase = VadentisUtility.createDirectOptionList(0, 50);
formData.optionsMalus = VadentisUtility.createDirectReverseOptionList(-50, 0); formData.optionsMalus = VadentisUtility.createDirectReverseOptionList(-50, 0);
formData.optionsBonus = VadentisUtility.createDirectOptionList(0, 50); formData.optionsBonus = VadentisUtility.createDirectOptionList(0, 50);
formData.optionsPV = VadentisUtility.createDirectIntegerOptionList(-50, 999); formData.optionsPV = VadentisUtility.createOptionList(-50, 999);
formData.optionsPE = VadentisUtility.createOptionList(-50, 999); formData.optionsPE = VadentisUtility.createOptionList(-50, 999);
formData.optionsPA = VadentisUtility.createOptionList(0, 20); formData.optionsPA = VadentisUtility.createOptionList(0, 20);

View File

@ -31,7 +31,7 @@ export class VadentisActor extends Actor {
return super.create(data, options); return super.create(data, options);
} }
// If the created actor has items (only applicable to duplicated actors) bypass the new actor creation logic // If the created actor has items (only applicable to duplicated actors) bypass the new actor creation logic
if (system.items) { if (data.items) {
let actor = super.create(data, options); let actor = super.create(data, options);
return actor; return actor;
} }
@ -193,7 +193,7 @@ export class VadentisActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollDamage( weapon, damageType ) { async rollDamage( weapon, damageType ) {
let formula = VadentisUtility.processDamageString( weapon.system.data[damageType], this ); let formula = VadentisUtility.processDamageString( weapon.system[damageType], this );
let degatsRoll = await VadentisUtility.processRoll( formula ); let degatsRoll = await VadentisUtility.processRoll( formula );
let msgData = { let msgData = {
alias: this.name, alias: this.name,
@ -209,7 +209,7 @@ export class VadentisActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollSortDevotionDamage( sort, damageType ) { async rollSortDevotionDamage( sort, damageType ) {
let formula = VadentisUtility.processDamageString( sort.system.data[damageType], this ); let formula = VadentisUtility.processDamageString( sort.system[damageType], this );
let degatsRoll = await VadentisUtility.processRoll( formula ); let degatsRoll = await VadentisUtility.processRoll( formula );
let msgData = { let msgData = {
alias: this.name, alias: this.name,
@ -353,7 +353,7 @@ export class VadentisActor extends Actor {
} }
let statValue = competence.system.base + competence.system.malus + competence.system.bonus; let statValue = competence.system.base + competence.system.malus + competence.system.bonus;
let formulaFull = this.buildTexteFormula( competence.data ); let formulaFull = this.buildTexteFormula( competence.system );
let myRoll = await VadentisUtility.processRoll("1d20+"+statValue, msgData.rollMode ); let myRoll = await VadentisUtility.processRoll("1d20+"+statValue, msgData.rollMode );
msgData.msg = `${formulaFull} => <strong>${myRoll.total}</strong>`; msgData.msg = `${formulaFull} => <strong>${myRoll.total}</strong>`;
console.log(formulaFull, myRoll) console.log(formulaFull, myRoll)

View File

@ -2,7 +2,7 @@
"id": "foundryvtt-vadentis", "id": "foundryvtt-vadentis",
"title": "Vadentis", "title": "Vadentis",
"description": "Système Vadentis pour FoundryVTT", "description": "Système Vadentis pour FoundryVTT",
"version": "11.0.0", "version": "11.0.1",
"compatibility": { "compatibility": {
"minimum": "11", "minimum": "11",
"verified": "12" "verified": "12"
@ -223,6 +223,6 @@
"socket": true, "socket": true,
"url": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis", "url": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis",
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis/-/raw/master/system.json", "manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis/-/raw/master/system.json",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis/archive/foundryvtt-vadentis-v11.0.0.zip", "download": "https://www.uberwald.me/gitea/uberwald/fvtt-vadentis/archive/foundryvtt-vadentis-v11.0.1.zip",
"license": "LICENSE.txt" "license": "LICENSE.txt"
} }

View File

@ -266,6 +266,9 @@
<span class="stat-label flexrow">Total</span> <span class="stat-label flexrow">Total</span>
</li> </li>
{{#each data.combat as |mycombat key|}} {{#each data.combat as |mycombat key|}}
{{#if (eq mycombat.label "Esquive")}}
{{else}}
<li class="stat flexrow list-item" data-attribute="{{key}}"> <li class="stat flexrow list-item" data-attribute="{{key}}">
<span class="stat-label combat-label flexrow tooltip tooltip-nobottom" name="system.combat.{{key}}.label"><a name="{{key}}">{{mycombat.label}}</a></span> <span class="stat-label combat-label flexrow tooltip tooltip-nobottom" name="system.combat.{{key}}.label"><a name="{{key}}">{{mycombat.label}}</a></span>
<span class="stat-label combat-label">&nbsp;{{mycombat.base}}</span> <span class="stat-label combat-label">&nbsp;{{mycombat.base}}</span>
@ -273,6 +276,7 @@
<span class="stat-label combat-label">&nbsp;{{mycombat.bonus}}</span> <span class="stat-label combat-label">&nbsp;{{mycombat.bonus}}</span>
<span class="score-label combat-label "><a name="{{key}}">&nbsp;1d20 + {{mycombat.total}}</a></span> <span class="score-label combat-label "><a name="{{key}}">&nbsp;1d20 + {{mycombat.total}}</a></span>
</li> </li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
<div><h4>Armes équipées</h4></div> <div><h4>Armes équipées</h4></div>