diff --git a/CHANGELOG.md b/CHANGELOG.md index 7474a35..96f3f12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- #44: protection effect and other default system effects still had duration + when added by the power effect, instead of maintaining their own effect. + ## [3.1.1] 2024-07-26 - Added: 'Shape Change Ability' power effect diff --git a/src/module/powers/basePowers.js b/src/module/powers/basePowers.js index 3e08907..7ec9898 100644 --- a/src/module/powers/basePowers.js +++ b/src/module/powers/basePowers.js @@ -134,13 +134,12 @@ export class PowerEffect { static async getStatus(label, name, favorite = true) { const effect = foundry.utils.deepClone(CONFIG.statusEffects.find((se) => se.label === label || se.name === label)); effect.name = 'name' in effect ? effect.name : effect.label; + effect.duration = {}; if (!('flags' in effect)) { effect.flags = {}; } + effect.flags.swade = {}; if (favorite) { - if (!('swade' in effect.flags)) { - effect.flags.swade = {}; - } effect.flags.swade.favorite = true; } effect.statuses ??= [];