diff --git a/changelog.md b/changelog.md index 06202f8a..499ee903 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## 11.2.21 - Le questionnement d'Akarlikarlikar - Une confirmation spécifique est demandée pour monter dans les terres médianes en cas de rencontre en attente - L'expérience en caractéristique sur les jets de chance et rêve actuels est mise dans la caractéristique correspondante +- Les effets s'appliquent correctement sur les créatures ## 11.2.20 - Le soulagement d'Akarlikarlikar - L'option "ajout de la difficulté d'attaque à l'encaissement" est affichée comme un modificateur d'encaissement diff --git a/module/actor-sheet.js b/module/actor-sheet.js index d69bdadc..8b042f4c 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -16,7 +16,6 @@ import { RdDItem } from "./item.js"; import { RdDItemBlessure } from "./item/blessure.js"; import { RdDEmpoignade } from "./rdd-empoignade.js"; import { RdDBaseActorSangSheet } from "./actor/base-actor-sang-sheet.js"; -import { ChatUtility } from "./chat-utility.js"; import { RdDCoeur } from "./coeur/rdd-coeur.js"; /* -------------------------------------------- */ @@ -43,7 +42,6 @@ export class RdDActorSheet extends RdDBaseActorSangSheet { { editable: this.isEditable, cssClass: this.isEditable ? "editable" : "locked", - effects: this.actor.effects.map(e => foundry.utils.deepClone(e)), limited: this.actor.limited, owner: this.actor.isOwner, biographie: await TextEditor.enrichHTML(this.actor.system.biographie, { async: true }), diff --git a/module/actor.js b/module/actor.js index 969ed075..e9429298 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2984,9 +2984,6 @@ export class RdDActor extends RdDBaseActorSang { } } - /* -------------------------------------------- */ - isEffectAllowed(effectId) { return true } - /* -------------------------------------------- */ async onPreUpdateItem(item, change, options, id) { if (item.isCompetencePersonnage() && item.system.defaut_carac && item.system.xp) { diff --git a/module/actor/base-actor-reve.js b/module/actor/base-actor-reve.js index cd9640c3..38155403 100644 --- a/module/actor/base-actor-reve.js +++ b/module/actor/base-actor-reve.js @@ -180,7 +180,7 @@ export class RdDBaseActorReve extends RdDBaseActor { } /* -------------------------------------------- */ - isEffectAllowed(effectId) { return true } + isEffectAllowed(effectId) { return false } getEffects(filter = e => true) { return this.getEmbeddedCollection("ActiveEffect").filter(filter); diff --git a/module/actor/base-actor-sang.js b/module/actor/base-actor-sang.js index 693a57f2..2131666f 100644 --- a/module/actor/base-actor-sang.js +++ b/module/actor/base-actor-sang.js @@ -269,6 +269,8 @@ export class RdDBaseActorSang extends RdDBaseActorReve { return this.getEffect(STATUSES.StatusStunned); } + isEffectAllowed(effectId) { return true } + /* -------------------------------------------- */ async computeEtatGeneral() { this.system.compteurs.etat.value = this.malusVie() + this.malusFatigue() + this.malusEthylisme() } getEtatGeneral(options = { ethylisme: false }) { return this.system.compteurs.etat.value } diff --git a/module/actor/base-actor-sheet.js b/module/actor/base-actor-sheet.js index c8085789..eef49787 100644 --- a/module/actor/base-actor-sheet.js +++ b/module/actor/base-actor-sheet.js @@ -37,7 +37,8 @@ export class RdDBaseActorSheet extends ActorSheet { system: this.actor.system, description: await TextEditor.enrichHTML(this.actor.system.description, { async: true }), notesmj: await TextEditor.enrichHTML(this.actor.system.notesmj, { async: true }), - options: RdDSheetUtility.mergeDocumentRights(this.options, this.actor, this.isEditable) + options: RdDSheetUtility.mergeDocumentRights(this.options, this.actor, this.isEditable), + effects: this.actor.effects } RdDBaseActorSheet.filterItemsPerTypeForSheet(formData, this.actor.itemTypes); diff --git a/module/actor/creature.js b/module/actor/creature.js index e60be24b..b50c1e43 100644 --- a/module/actor/creature.js +++ b/module/actor/creature.js @@ -33,10 +33,6 @@ export class RdDCreature extends RdDBaseActorSang { } } - isEffectAllowed(effectId) { - return [STATUSES.StatusComma].includes(effectId); - } - isEntiteAccordee(attacker) { if (this.isEntite([ENTITE_INCARNE])) { let resonnance = this.system.sante.resonnance diff --git a/module/settings/status-effects.js b/module/settings/status-effects.js index 5323694d..b8d4592a 100644 --- a/module/settings/status-effects.js +++ b/module/settings/status-effects.js @@ -18,8 +18,8 @@ const rddStatusEffects = [ { rdd: true, id: STATUSES.StatusStunned, label: 'EFFECT.StatusStunned', icon: 'icons/svg/stoned.svg', "duration.rounds": 1 }, { rdd: true, id: STATUSES.StatusBleeding, label: 'EFFECT.StatusBleeding', icon: 'icons/svg/blood.svg' }, { rdd: true, id: STATUSES.StatusProne, label: 'EFFECT.StatusProne', icon: 'icons/svg/falling.svg' }, - { rdd: true, id: STATUSES.StatusGrappling, tint: '#33cc33', label: 'EFFECT.StatusGrappling', icon: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.svg' }, - { rdd: true, id: STATUSES.StatusGrappled, tint: '#ff9900', label: 'EFFECT.StatusGrappled', icon: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.svg' }, + { rdd: true, id: STATUSES.StatusGrappling, tint: '#33cc33', label: 'EFFECT.StatusGrappling', icon: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.webp' }, + { rdd: true, id: STATUSES.StatusGrappled, tint: '#ff9900', label: 'EFFECT.StatusGrappled', icon: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.webp' }, { rdd: true, id: STATUSES.StatusRestrained, label: 'EFFECT.StatusRestrained', icon: 'icons/svg/net.svg' }, { rdd: true, id: STATUSES.StatusUnconscious, label: 'EFFECT.StatusUnconscious', icon: 'icons/svg/unconscious.svg' }, { rdd: true, id: STATUSES.StatusBlind, label: 'EFFECT.StatusBlind', icon: 'icons/svg/blind.svg' },