Manage selective fire
This commit is contained in:
@ -15,6 +15,8 @@ export default class CthulhuEternalSkill extends foundry.abstract.TypeDataModel
|
||||
schema.diceEvolved = new fields.BooleanField({ required: true, initial: true })
|
||||
schema.rollFailed = new fields.BooleanField({ required: true, initial: false })
|
||||
schema.isAdversary = new fields.BooleanField({ required: true, initial: false })
|
||||
schema.isHealing = new fields.BooleanField({ required: true, initial: false })
|
||||
schema.healingFormula = new fields.StringField({ required: true, initial: "1d4" })
|
||||
|
||||
return schema
|
||||
}
|
||||
@ -36,11 +38,11 @@ export default class CthulhuEternalSkill extends foundry.abstract.TypeDataModel
|
||||
return `${this.base} + ${ String(this.bonus)}`;
|
||||
}
|
||||
|
||||
// Split the base value per stat :
|
||||
// Split the base value per stat :
|
||||
let base = this.base.toLowerCase();
|
||||
let char = actor.system.characteristics[base];
|
||||
if (!char) {
|
||||
ui.notifications.error(`The characteristic ${base} is wrong for actor ${actor.name}`);
|
||||
ui.notifications.error(`The characteristic ${base} is wrong for actor ${actor.name}`);
|
||||
return `${this.base } + ${ String(this.bonus)}`;
|
||||
}
|
||||
let charValue = char.value;
|
||||
|
Reference in New Issue
Block a user