v10: pinaillages mineurs #642

Merged
uberwald merged 5 commits from VincentVk/foundryvtt-reve-de-dragon:v10 into v10 2023-04-21 23:08:11 +02:00
2 changed files with 8 additions and 8 deletions
Showing only changes of commit cfbfad27bd - Show all commits

View File

@ -84,7 +84,7 @@ export class RdDActorSheet extends RdDBaseActorSheet {
RdDItemArme.ajoutCorpsACorps(formData.combat, formData.competences, formData.system.carac); RdDItemArme.ajoutCorpsACorps(formData.combat, formData.competences, formData.system.carac);
formData.esquives = this.actor.getCompetences("Esquive"); formData.esquives = this.actor.getCompetences("Esquive");
formData.combat = RdDCombatManager.listActionsArmes(formData.combat, formData.competences, formData.system.carac); formData.combat = RdDCombatManager.listActionsArmes(formData.combat, formData.competences, formData.system.carac);
formData.empoignades = this.actor.getEmpoignades("Esquive"); formData.empoignades = this.actor.getEmpoignades();
this.armesList = formData.combat; this.armesList = formData.combat;

View File

@ -1,10 +1,9 @@
/* -------------------------------------------- */ /* -------------------------------------------- */
import { RdDCombat } from "./rdd-combat.js";
import { RdDResolutionTable } from "./rdd-resolution-table.js"; import { RdDResolutionTable } from "./rdd-resolution-table.js";
import { RdDRoll } from "./rdd-roll.js"; import { RdDRoll } from "./rdd-roll.js";
import { RdDItemCompetenceCreature } from "./item-competencecreature.js"; import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
import { ChatUtility } from "./chat-utility.js"; import { ChatUtility } from "./chat-utility.js";
import { STATUSES, StatusEffects } from "./settings/status-effects.js"; import { STATUSES } from "./settings/status-effects.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -268,16 +267,16 @@ export class RdDEmpoignade {
console.log("Perte d'endurance :!!!", perteMode) console.log("Perte d'endurance :!!!", perteMode)
let endValue = defender.system.sante.endurance.value let endValue = defender.system.sante.endurance.value
if (perteMode == "end0") { if (perteMode == "end0") {
await defender.santeIncDec("endurance", -defender.system.sante.endurance.value); await defender.santeIncDec("endurance", -endValue);
} }
if (perteMode == "end1") { if (perteMode == "end1") {
await defender.santeIncDec("endurance", -(defender.system.sante.endurance.value - 1)); await defender.santeIncDec("endurance", -(endValue - 1));
} }
if (perteMode == "endmoitie") { if (perteMode == "endmoitie") {
await defender.santeIncDec("endurance", -Math.floor(defender.system.sante.endurance.value / 2)); await defender.santeIncDec("endurance", -Math.floor(endValue / 2));
} }
if (perteMode == "endquart") { if (perteMode == "endquart") {
await defender.santeIncDec("endurance", -(3 * Math.floor(defender.system.sante.endurance.value / 4))); await defender.santeIncDec("endurance", -(3 * Math.floor(endValue / 4)));
} }
let msg = await RdDResolutionTable.displayRollData(rollData, attacker, 'chat-empoignade-perte-endurance.html'); let msg = await RdDResolutionTable.displayRollData(rollData, attacker, 'chat-empoignade-perte-endurance.html');
ChatUtility.setMessageData(msg, "empoignade-roll-data", rollData) ChatUtility.setMessageData(msg, "empoignade-roll-data", rollData)
@ -304,7 +303,8 @@ export class RdDEmpoignade {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async createEmpoignade(attacker, defender) { static async createEmpoignade(attacker, defender) {
return await Item.create({ return await Item.create({
name: "Empoignade en cours de " + attacker.name + ' sur ' + defender.name, type: 'empoignade', name: "Empoignade en cours de " + attacker.name + ' sur ' + defender.name,
type: 'empoignade',
img: "systems/foundryvtt-reve-de-dragon/icons/entites/possession2.webp", img: "systems/foundryvtt-reve-de-dragon/icons/entites/possession2.webp",
system: { description: "", empoignadeid: randomID(16), compteempoigne: 0, empoigneurid: attacker.id, empoigneid: defender.id, ptsemp: 0, empoigneurname: attacker.name, empoignename: defender.name } system: { description: "", empoignadeid: randomID(16), compteempoigne: 0, empoigneurid: attacker.id, empoigneid: defender.id, ptsemp: 0, empoigneurname: attacker.name, empoignename: defender.name }
}, },