mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
Marking up the places that need changing for bug #1160
This commit is contained in:
parent
05dec9fcea
commit
12d6b7fa4c
3 changed files with 3 additions and 0 deletions
|
|
@ -94,6 +94,7 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
|
||||||
|
|
||||||
getRefreshables() {
|
getRefreshables() {
|
||||||
const actionItems = this.actor.items.reduce((acc, x) => {
|
const actionItems = this.actor.items.reduce((acc, x) => {
|
||||||
|
// TODO(nsalyzyn): Eliminate items that the are part of the subclass the actor doesn't have access to.
|
||||||
if (x.system.actions) {
|
if (x.system.actions) {
|
||||||
const recoverable = x.system.actions.reduce((acc, action) => {
|
const recoverable = x.system.actions.reduce((acc, action) => {
|
||||||
if (refreshIsAllowed([this.shortrest ? 'shortRest' : 'longRest'], action.uses.recovery)) {
|
if (refreshIsAllowed([this.shortrest ? 'shortRest' : 'longRest'], action.uses.recovery)) {
|
||||||
|
|
|
||||||
|
|
@ -451,6 +451,7 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
} else if (item.system.originItemType === CONFIG.DH.ITEM.featureTypes.class.id) {
|
} else if (item.system.originItemType === CONFIG.DH.ITEM.featureTypes.class.id) {
|
||||||
classFeatures.push(item);
|
classFeatures.push(item);
|
||||||
} else if (item.system.originItemType === CONFIG.DH.ITEM.featureTypes.subclass.id) {
|
} else if (item.system.originItemType === CONFIG.DH.ITEM.featureTypes.subclass.id) {
|
||||||
|
// TODO(nsalyzyn): Reuse this code for elsewhere
|
||||||
if (this.class.subclass) {
|
if (this.class.subclass) {
|
||||||
const prop = item.system.multiclassOrigin ? 'multiclass' : 'class';
|
const prop = item.system.multiclassOrigin ? 'multiclass' : 'class';
|
||||||
const subclassState = this[prop].subclass?.system?.featureState;
|
const subclassState = this[prop].subclass?.system?.featureState;
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,7 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
|
||||||
prepareDerivedData() {
|
prepareDerivedData() {
|
||||||
/* Preventing subclass features from transferring to actor if they do not have the right subclass advancement */
|
/* Preventing subclass features from transferring to actor if they do not have the right subclass advancement */
|
||||||
if (this.parent?.type === 'feature') {
|
if (this.parent?.type === 'feature') {
|
||||||
|
// TODO(nsalyzyn): Reuse this code for elsewhere
|
||||||
const origSubclassParent = this.parent.system.originItemType === 'subclass';
|
const origSubclassParent = this.parent.system.originItemType === 'subclass';
|
||||||
if (origSubclassParent) {
|
if (origSubclassParent) {
|
||||||
const subclass = this.parent.parent.items.find(
|
const subclass = this.parent.parent.items.find(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue