forked from GitHub-Mirrors/foundry-sw5e
Merge pull request #234 from unrealkakeman89/Develop
Various powercasting bugs
This commit is contained in:
commit
7214e3d260
2 changed files with 5 additions and 12 deletions
|
@ -431,13 +431,6 @@ export default class Actor5e extends Actor {
|
|||
const powers = ad.powers;
|
||||
const isNPC = actorData.type === 'npc';
|
||||
|
||||
// Powercasting DC
|
||||
// TODO: Consider an option for using the variant rule of all powers use the same value
|
||||
ad.attributes.powerForceLightDC = 8 + ad.abilities.wis.mod + ad.attributes.prof ?? 10;
|
||||
ad.attributes.powerForceDarkDC = 8 + ad.abilities.cha.mod + ad.attributes.prof ?? 10;
|
||||
ad.attributes.powerForceUnivDC = Math.max(ad.attributes.powerForceLightDC,ad.attributes.powerForceDarkDC) ?? 10
|
||||
ad.attributes.powerTechDC = 8 + ad.abilities.int.mod + ad.attributes.prof ?? 10;
|
||||
|
||||
// Translate the list of classes into force and tech power-casting progression
|
||||
const forceProgression = {
|
||||
classes: 0,
|
||||
|
@ -661,7 +654,7 @@ export default class Actor5e extends Actor {
|
|||
*/
|
||||
_computeDerivedPowercasting (actorData) {
|
||||
|
||||
if ((actorData.type === 'actor') || (actorData.type === 'npc')) return;
|
||||
if (!(actorData.type === 'character' || actorData.type === 'npc')) return;
|
||||
|
||||
const ad = actorData.data;
|
||||
|
||||
|
@ -669,10 +662,10 @@ export default class Actor5e extends Actor {
|
|||
// TODO: Consider an option for using the variant rule of all powers use the same value
|
||||
ad.attributes.powerForceLightDC = 8 + ad.abilities.wis.mod + ad.attributes.prof ?? 10;
|
||||
ad.attributes.powerForceDarkDC = 8 + ad.abilities.cha.mod + ad.attributes.prof ?? 10;
|
||||
ad.attributes.powerForceUnivDC = Math.max(ad.attributes.powerForceLightDC,ad.attributes.powerForceDarkDC) ?? 10
|
||||
ad.attributes.powerForceUnivDC = Math.max(ad.attributes.powerForceLightDC,ad.attributes.powerForceDarkDC) ?? 10;
|
||||
ad.attributes.powerTechDC = 8 + ad.abilities.int.mod + ad.attributes.prof ?? 10;
|
||||
|
||||
if (actorData.type !== 'actor') return;
|
||||
if (actorData.type !== 'character') return;
|
||||
|
||||
// Set Force and tech bonus points for PC Actors
|
||||
if (!!ad.attributes.force.level){
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "sw5e",
|
||||
"title": "SW 5th Edition",
|
||||
"description": "A comprehensive game system for running games of SW 5th Edition in the Foundry VTT environment.",
|
||||
"version": "1.3.5.R1-A6",
|
||||
"version": "1.3.5.R1-A7",
|
||||
"author": "Dev Team",
|
||||
"scripts": [],
|
||||
"esmodules": ["sw5e.js"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue