Skip to content

Commit

Permalink
fix(rules): remove system.rules usage outside of migration
Browse files Browse the repository at this point in the history
  • Loading branch information
phBalance authored and phBalance committed Dec 27, 2023
1 parent 4e86f47 commit fed25a9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion module/item/item-attack.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export async function AttackOptions(item) {

// Uses Tk
let tkItems = item.actor.items.filter(
(o) => o.system.rules == "TELEKINESIS",
(o) => o.system.XMLID == "TELEKINESIS",
);
let tkStr = 0;
for (const item of tkItems) {
Expand Down
2 changes: 1 addition & 1 deletion module/item/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -3010,7 +3010,7 @@ export class HeroSystem6eItem extends Item {
}

const configPowerInfo = getPowerInfo({
xmlid: skillData.XMLID || skillData.rules,
xmlid: skillData.XMLID,
actor: this.actor,
});

Expand Down
6 changes: 3 additions & 3 deletions module/utility/damage.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function convertToDC(item, formula) {
return parseInt(3 * d6Count + 2 * d3Count + pip || 0);
}

// Determine DC soley from item/attack
// Determine DC solely from item/attack
export function convertToDcFromItem(item, options) {
let actor = item.actor;
let dc = 0;
Expand Down Expand Up @@ -189,7 +189,7 @@ export function convertToDcFromItem(item, options) {
// Simple +1 DC for now (checking on discord to found out rules for use AP ratio)
dc += csl.dc;

// Each DC should roughtly be 5 active points
// Each DC should roughly be 5 active points
// let dcPerAp = ((dc * 5) / (item.system.activePointsDc || item.system.activePoints)) || 1;
// let ratio = (dcPerAp || 5) / 5; // Typically 1 to 1 radio
// dc += (csl.dc * dcPerAp);
Expand Down Expand Up @@ -257,7 +257,7 @@ export function convertToDcFromItem(item, options) {
// Add in TK
if (item.system.usesTk) {
let tkItems = actor.items.filter(
(o) => o.system.rules == "TELEKINESIS",
(o) => o.system.XMLID === "TELEKINESIS",
);
let str = 0;
for (const item of tkItems) {
Expand Down
9 changes: 1 addition & 8 deletions template.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@
"templates": {
"base": {
"description": "",
"rules": "",
"effect": "",
"cost": 0,
"modifiers": [],
Expand All @@ -215,14 +214,12 @@
},
"power": {
"templates": ["power"],
"rules": "Power Description",
"active": "false"
},
"equipment": {
"templates": ["power"],
"quantity": 1,
"weight": 0,
"rules": "Equipment Description"
"weight": 0
},
"attack": {
"templates": ["base"],
Expand Down Expand Up @@ -274,19 +271,16 @@
"perk": {
"templates": ["base"],
"id": "",
"rules": "Perk Description",
"other": {}
},
"talent": {
"templates": ["base"],
"id": "",
"rules": "Talent Description",
"other": {}
},
"complication": {
"templates": ["base"],
"id": "",
"rules": "Complication Description",
"other": {
"levels": 0,
"option_alias": ""
Expand All @@ -295,7 +289,6 @@
"martialart": {
"templates": ["base"],
"id": "",
"rules": "Martial Art Description",
"other": {}
}
}
Expand Down

0 comments on commit fed25a9

Please sign in to comment.