cleanup Empoignade
This commit is contained in:
parent
f541849306
commit
cfbfad27bd
@ -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;
|
||||||
|
|
||||||
|
@ -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 }
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user