Skip to content

Commit

Permalink
Version 2.0 (#32)
Browse files Browse the repository at this point in the history
* 31-spellTags

* lint + partial PowerData update

* More PowerData updates

* Sheet Rendering

* Compendium Browser Compatibility

* Implemented basic power point consumption usage

* Improved Psi Point labeling

* Psionic Power Defaults

* Eliminated deprecation warnings from referencing consume

* fixed components

* Added control hints

* Changelog updates

* Added Augmenting field to the new sheet

* PreCreate hook with useful default

* Updated Screenshots
  • Loading branch information
JPMeehan authored Sep 14, 2024
1 parent 8c616d2 commit f9e6f92
Show file tree
Hide file tree
Showing 17 changed files with 2,764 additions and 614 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

## 2.0.0

- Rewrite for dnd5e system 4.0.0
- Major Rewrite for dnd5e system 4.0.0
- Powers now use activities
- Powers now just use the normal Item sheet
- New custom Consumption type available for *all* item types: Power Points!
- New activities on a Power with a level of 1 or more will default to having a Power Point consumption type
- These also have a default consumption max of `"1 + @flags.prime-psionics.manifestLimit - @activity.consumption.targets.0.value"`
- Added compatibility with the Compendium Browser

## 1.2.1

Expand Down
Binary file modified assets/AugmentPowerDetails.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/TalentPowerDetails.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/icons/power.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import globals from "globals";
import path from "node:path";
import {fileURLToPath} from "node:url";
import js from "@eslint/js";
import {FlatCompat} from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["foundry/**/*", "dnd5e/**/*"]
}, ...compat.extends("eslint:recommended"), {
languageOptions: {
globals: {
...globals.browser
},

ecmaVersion: "latest",
sourceType: "module"
},

rules: {
indent: ["error", 2, {
SwitchCase: 1
}],

"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
"quote-props": ["error", "as-needed"],
"array-bracket-newline": ["error", "consistent"],
"no-unused-vars": 0,
"key-spacing": "error",
"comma-dangle": "error",
"space-in-parens": ["error", "never"],
"space-infix-ops": 2,
"keyword-spacing": 2,
"semi-spacing": 2,
"no-multi-spaces": 2,
"no-extra-semi": 2,
"no-whitespace-before-property": 2,
"space-unary-ops": 2,

"no-multiple-empty-lines": ["error", {
max: 1,
maxEOF: 0
}],

"object-curly-spacing": ["error", "never"],
"comma-spacing": ["error"],
"no-undef": "off",
"space-before-blocks": 2,
"arrow-spacing": 2,
"eol-last": ["error", "always"],

"no-mixed-operators": ["error", {
allowSamePrecedence: true,

groups: [[
"==",
"!=",
"===",
"!==",
">",
">=",
"<",
"<=",
"&&",
"||",
"in",
"instanceof"
]]
}]
}
}];
6 changes: 1 addition & 5 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"PrimePsionics.PowerLevel": "Power Level",
"PrimePsionics.Talent": "Talent",
"PrimePsionics.Intensify": "Intensify",
"PrimePsionics.Intensify2": "Intensify (2)",
"PrimePsionics.Intensify3": "Intensify (3)",
"PrimePsionics.ConsumptionHint": "Consume {points} Psi Points. Your Manifest Limit is {limit}.",
"PrimePsionics.PowerNone": "None",
"PrimePsionics.PowerDiscipline": "Power Discipline",
"PrimePsionics.DiscClair": "Clairsentience",
Expand Down Expand Up @@ -40,9 +39,6 @@
"PrimePsionics.FullP": "Full Manifester",
"PrimePsionics.HalfP": "Half Manifester",
"PrimePsionics.ThirdP": "Third Manifester",
"PrimePsionics.PsiLimit": "Psi Limit",
"PrimePsionics.PPManifest": "<p class='psi-manifest'>How many power points would you like to spend?</p>",
"PrimePsionics.ManifestLimit": "Your Manifest Limit is {limit}",
"PrimePsionics.TooManyPP": "You don't have that many Psi Points available!",
"PrimePsionics.Manifest": "Manifest Power",
"PrimePsionics.Sheets.Power": "Default Power Sheet",
Expand Down
149 changes: 77 additions & 72 deletions module/config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { typePower } from './utils.mjs';
import {typePower} from "./utils.mjs";
import PsiPoints from "./psiPoints.mjs";

const PP_CONFIG = {
DND5E: {},
PSIONICS: {},
PSIONICS: {}
};

/**
*
*/
PP_CONFIG.PSIONICS.powerPreparationModes = {
always: 'PrimePsionics.PowerPrepKnown',
innate: 'PrimePsionics.PowerPrepInnate',
always: "PrimePsionics.PowerPrepKnown",
innate: "PrimePsionics.PowerPrepInnate"
};

/**
Expand All @@ -19,13 +20,13 @@ PP_CONFIG.PSIONICS.powerPreparationModes = {
*/
PP_CONFIG.PSIONICS.powerComponents = {
auditory: {
label: 'PrimePsionics.ComponentAuditory',
abbr: 'PrimePsionics.ComponentAuditoryAbbr',
label: "PrimePsionics.ComponentAuditory",
abbreviation: "PrimePsionics.ComponentAuditoryAbbr"
},
observable: {
label: 'PrimePsionics.ComponentObservable',
abbr: 'PrimePsionics.ComponentObservableAbbr',
},
label: "PrimePsionics.ComponentObservable",
abbreviation: "PrimePsionics.ComponentObservableAbbr"
}
};

/**
Expand All @@ -38,47 +39,47 @@ PP_CONFIG.PSIONICS.powerComponents = {
*/
PP_CONFIG.PSIONICS.disciplines = {
cla: {
label: 'PrimePsionics.DiscClair',
icon: 'modules/prime-psionics/assets/icons/clairsentience.svg',
fullKey: 'clairsentience',
label: "PrimePsionics.DiscClair",
icon: "modules/prime-psionics/assets/icons/clairsentience.svg",
fullKey: "clairsentience"
},
mtc: {
label: 'PrimePsionics.DiscMTC',
icon: 'modules/prime-psionics/assets/icons/metacreativity.svg',
fullKey: 'metacreativity',
label: "PrimePsionics.DiscMTC",
icon: "modules/prime-psionics/assets/icons/metacreativity.svg",
fullKey: "metacreativity"
},
psk: {
label: 'PrimePsionics.DiscKinesis',
icon: 'modules/prime-psionics/assets/icons/psychokinesis.svg',
fullKey: 'psychokinesis',
label: "PrimePsionics.DiscKinesis",
icon: "modules/prime-psionics/assets/icons/psychokinesis.svg",
fullKey: "psychokinesis"
},
psm: {
label: 'PrimePsionics.DiscMetabolism',
icon: 'modules/prime-psionics/assets/icons/psychometabolism.svg',
fullKey: 'psychometabolism',
label: "PrimePsionics.DiscMetabolism",
icon: "modules/prime-psionics/assets/icons/psychometabolism.svg",
fullKey: "psychometabolism"
},
pst: {
label: 'PrimePsionics.DiscPort',
icon: 'modules/prime-psionics/assets/icons/psychoportation.svg',
fullKey: 'psychoportation',
label: "PrimePsionics.DiscPort",
icon: "modules/prime-psionics/assets/icons/psychoportation.svg",
fullKey: "psychoportation"
},
tlp: {
label: 'PrimePsionics.DiscTelepathy',
icon: 'modules/prime-psionics/assets/icons/telepathy.svg',
fullKey: 'telepathy',
},
label: "PrimePsionics.DiscTelepathy",
icon: "modules/prime-psionics/assets/icons/telepathy.svg",
fullKey: "telepathy"
}
};

/**
* The available choices for how spell damage scaling may be computed.
* @enum {string}
*/
PP_CONFIG.PSIONICS.powerScalingModes = {
none: 'PrimePsionics.PowerNone',
talent: 'PrimePsionics.Talent',
intensify: 'PrimePsionics.Intensify',
intensify2: 'PrimePsionics.Intensify2',
intensify3: 'PrimePsionics.Intensify3',
none: "PrimePsionics.PowerNone",
talent: "PrimePsionics.Talent",
intensify: "PrimePsionics.Intensify",
intensify2: "PrimePsionics.Intensify2",
intensify3: "PrimePsionics.Intensify3"
};

/**
Expand All @@ -88,7 +89,7 @@ PP_CONFIG.PSIONICS.powerScalingModes = {
PP_CONFIG.PSIONICS.scaling = {
intensify: 1,
intensify2: 2,
intensify3: 3,
intensify3: 3
};

/**
Expand All @@ -98,79 +99,83 @@ PP_CONFIG.PSIONICS.scaling = {

PP_CONFIG.PSIONICS.ppProgression = [
0, 4, 6, 16, 20, 32, 38, 46, 54, 72, 82, 94, 94, 108, 108, 124, 124, 142, 152,
164, 178,
164, 178
];

/**
* Valid spell levels.
* @enum {string}
*/
PP_CONFIG.PSIONICS.powerLevels = {
0: 'PrimePsionics.Talent',
1: 'DND5E.SpellLevel1',
2: 'DND5E.SpellLevel2',
3: 'DND5E.SpellLevel3',
4: 'DND5E.SpellLevel4',
5: 'DND5E.SpellLevel5',
6: 'DND5E.SpellLevel6',
7: 'DND5E.SpellLevel7',
8: 'DND5E.SpellLevel8',
9: 'DND5E.SpellLevel9',
0: "PrimePsionics.Talent",
1: "DND5E.SpellLevel1",
2: "DND5E.SpellLevel2",
3: "DND5E.SpellLevel3",
4: "DND5E.SpellLevel4",
5: "DND5E.SpellLevel5",
6: "DND5E.SpellLevel6",
7: "DND5E.SpellLevel7",
8: "DND5E.SpellLevel8",
9: "DND5E.SpellLevel9"
};

PP_CONFIG.DND5E = {
itemProperties: {
auditory: {
label: 'PrimePsionics.ComponentAuditory',
abbr: 'PrimePsionics.ComponentAuditoryAbbr',
label: "PrimePsionics.ComponentAuditory",
abbr: "PrimePsionics.ComponentAuditoryAbbr"
},
observable: {
label: 'PrimePsionics.ComponentObservable',
abbr: 'PrimePsionics.ComponentObservableAbbr',
},
label: "PrimePsionics.ComponentObservable",
abbr: "PrimePsionics.ComponentObservableAbbr"
}
},
validProperties: {
[typePower]: new Set(['auditory', 'observable', 'concentration', 'ritual']),
[typePower]: new Set(["auditory", "observable", "concentration", "ritual"])
},
specialTimePeriods: {
foc: 'PrimePsionics.Focus',
foc: "PrimePsionics.Focus"
},
spellProgression: {
fullp: 'PrimePsionics.FullP',
halfp: 'PrimePsionics.HalfP',
thirdp: 'PrimePsionics.ThirdP',
fullp: "PrimePsionics.FullP",
halfp: "PrimePsionics.HalfP",
thirdp: "PrimePsionics.ThirdP"
},
spellcastingTypes: {
psionics: {
label: 'PrimePsionics.Psionics',
label: "PrimePsionics.Psionics",
progression: {
fullp: {
label: 'PrimePsionics.FullP',
divisor: 1,
label: "PrimePsionics.FullP",
divisor: 1
},
halfp: {
label: 'PrimePsionics.HalfP',
divisor: 2,
label: "PrimePsionics.HalfP",
divisor: 2
},
thirdp: {
label: 'PrimePsionics.ThirdP',
divisor: 3,
},
},
},
},
abilityConsumptionTypes: {
flags: 'PrimePsionics.Flags',
label: "PrimePsionics.ThirdP",
divisor: 3
}
}
}
},
activityConsumptionTypes: {
psiPoints: {
label: PsiPoints.label,
consume: PsiPoints.consume,
consumptionLabels: PsiPoints.consumptionLabels
}
},
defaultArtwork: {
Item: {
[typePower]: 'modules/prime-psionics/assets/icons/power.svg',
},
[typePower]: "modules/prime-psionics/assets/icons/power.svg"
}
},
sourceBooks: {
"Psion's Primer":
"The Korranberg Chronicle: Psion's Primer - A Complete Psionics System",
},
"The Korranberg Chronicle: Psion's Primer - A Complete Psionics System"
}
};

export default PP_CONFIG;
Loading

0 comments on commit f9e6f92

Please sign in to comment.