forked from GitHub-Mirrors/foundry-sw5e
SotG Update #1
+ Adds compendia for Deployments, Deployment Features, Starship Armor, Starship Equipment, Starship Weapons, and Ventures and associated artwork + Adds Starship actor sheet (very, very rough draft, somewhat unpredictable, not fully functional) + Adds function to Character sheet to collapse/expand Feature tab rows (major assist from Cyr) + Adds function to Character sheet to increment/decrement class levels directly from character sheet (another major assist from Cyr)
This commit is contained in:
parent
3297d9bd8c
commit
c793949b37
57 changed files with 1682 additions and 70 deletions
|
@ -25,6 +25,8 @@ export default class Actor5e extends Actor {
|
|||
return this._prepareCharacterData(this.data);
|
||||
case "npc":
|
||||
return this._prepareNPCData(this.data);
|
||||
case "starship":
|
||||
return this._prepareStarshipData(this.data);
|
||||
case "vehicle":
|
||||
return this._prepareVehicleData(this.data);
|
||||
}
|
||||
|
@ -304,6 +306,23 @@ export default class Actor5e extends Actor {
|
|||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Prepare starship type-specific data
|
||||
* @param actorData
|
||||
* @private
|
||||
*/
|
||||
_prepareStarshipData(actorData) {
|
||||
const data = actorData.data;
|
||||
|
||||
// Proficiency
|
||||
data.attributes.prof = Math.floor((Math.max(data.details.cr, 1) + 7) / 4);
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Prepare skill checks.
|
||||
* @param actorData
|
||||
|
@ -1256,14 +1275,14 @@ export default class Actor5e extends Actor {
|
|||
const dfp = data.attributes.force.points.max - data.attributes.force.points.value;
|
||||
const updateData = {
|
||||
"data.attributes.hp.value": data.attributes.hp.max,
|
||||
"data.attributes.hp.temp": null,
|
||||
"data.attributes.hp.tempmax": null,
|
||||
"data.attributes.hp.temp": 0,
|
||||
"data.attributes.hp.tempmax": 0,
|
||||
"data.attributes.tech.points.value": data.attributes.tech.points.max,
|
||||
"data.attributes.tech.points.temp": null,
|
||||
"data.attributes.tech.points.tempmax": null,
|
||||
"data.attributes.tech.points.temp": 0,
|
||||
"data.attributes.tech.points.tempmax": 0,
|
||||
"data.attributes.force.points.value": data.attributes.force.points.max,
|
||||
"data.attributes.force.points.temp": null,
|
||||
"data.attributes.force.points.tempmax": null
|
||||
"data.attributes.force.points.temp": 0,
|
||||
"data.attributes.force.points.tempmax": 0
|
||||
};
|
||||
|
||||
// Recover character resources
|
||||
|
@ -1597,4 +1616,4 @@ export default class Actor5e extends Actor {
|
|||
if ( item.data.type !== "power" ) throw new Error("Wrong Item type");
|
||||
return item.roll();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -67,6 +67,7 @@ export default class ActorSheet5e extends ActorSheet {
|
|||
cssClass: isOwner ? "editable" : "locked",
|
||||
isCharacter: this.entity.data.type === "character",
|
||||
isNPC: this.entity.data.type === "npc",
|
||||
isStarship: this.entity.data.type === "starship",
|
||||
isVehicle: this.entity.data.type === 'vehicle',
|
||||
config: CONFIG.SW5E,
|
||||
};
|
||||
|
@ -338,6 +339,7 @@ export default class ActorSheet5e extends ActorSheet {
|
|||
if ( filters.has("prepared") ) {
|
||||
if ( data.level === 0 || ["innate", "always"].includes(data.preparation.mode) ) return true;
|
||||
if ( this.actor.data.type === "npc" ) return true;
|
||||
if ( this.actor.data.type === "starship" ) return true;
|
||||
return data.preparation.prepared;
|
||||
}
|
||||
|
||||
|
@ -407,8 +409,11 @@ export default class ActorSheet5e extends ActorSheet {
|
|||
html.find('.item-create').click(this._onItemCreate.bind(this));
|
||||
html.find('.item-edit').click(this._onItemEdit.bind(this));
|
||||
html.find('.item-delete').click(this._onItemDelete.bind(this));
|
||||
html.find('.item-collapse').click(this._onItemCollapse.bind(this));
|
||||
html.find('.item-uses input').click(ev => ev.target.select()).change(this._onUsesChange.bind(this));
|
||||
html.find('.slot-max-override').click(this._onPowerSlotOverride.bind(this));
|
||||
html.find('.increment-class-level').click(this._onIncrementClassLevel.bind(this));
|
||||
html.find('.decrement-class-level').click(this._onDecrementClassLevel.bind(this));
|
||||
|
||||
// Active Effect management
|
||||
html.find(".effect-control").click(ev => onManageActiveEffect(ev, this.entity));
|
||||
|
@ -757,6 +762,75 @@ export default class ActorSheet5e extends ActorSheet {
|
|||
this.actor.deleteOwnedItem(li.dataset.itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle collapsing a Feature row on the actor sheet
|
||||
* @param {Event} event The originating click event
|
||||
* @private
|
||||
*/
|
||||
|
||||
_onItemCollapse(event) {
|
||||
event.preventDefault();
|
||||
|
||||
event.currentTarget.classList.toggle("active");
|
||||
|
||||
const li = event.currentTarget.closest("li");
|
||||
const content = li.querySelector(".content");
|
||||
|
||||
if (content.style.display === "none") {
|
||||
content.style.display = "block";
|
||||
} else {
|
||||
content.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle incrementing class level on the actor sheet
|
||||
* @param {Event} event The originating click event
|
||||
* @private
|
||||
*/
|
||||
|
||||
_onIncrementClassLevel(event) {
|
||||
event.preventDefault();
|
||||
|
||||
const div = event.currentTarget.closest(".character")
|
||||
const li = event.currentTarget.closest("li");
|
||||
|
||||
const actorId = div.id.split("-")[1];
|
||||
const itemId = li.dataset.itemId;
|
||||
|
||||
const actor = game.actors.get(actorId);
|
||||
const item = actor.getOwnedItem(itemId);
|
||||
|
||||
let levels = item.data.data.levels;
|
||||
const update = {_id: item._id, data: {levels: (levels + 1) }};
|
||||
|
||||
actor.updateOwnedItem(update)
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle decrementing class level on the actor sheet
|
||||
* @param {Event} event The originating click event
|
||||
* @private
|
||||
*/
|
||||
|
||||
_onDecrementClassLevel(event) {
|
||||
event.preventDefault();
|
||||
|
||||
const div = event.currentTarget.closest(".character")
|
||||
const li = event.currentTarget.closest("li");
|
||||
|
||||
const actorId = div.id.split("-")[1];
|
||||
const itemId = li.dataset.itemId;
|
||||
|
||||
const actor = game.actors.get(actorId);
|
||||
const item = actor.getOwnedItem(itemId);
|
||||
|
||||
let levels = item.data.data.levels;
|
||||
const update = {_id: item._id, data: {levels: (levels - 1) }};
|
||||
|
||||
actor.updateOwnedItem(update)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
|
|
|
@ -84,7 +84,7 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e {
|
|||
};
|
||||
|
||||
// Partition items by category
|
||||
let [items, forcepowers, techpowers, feats, classes, species, archetypes, classfeatures, backgrounds, fightingstyles, fightingmasteries, lightsaberforms] = data.items.reduce((arr, item) => {
|
||||
let [items, forcepowers, techpowers, feats, classes, deployments, deploymentfeatures, ventures, species, archetypes, classfeatures, backgrounds, fightingstyles, fightingmasteries, lightsaberforms] = data.items.reduce((arr, item) => {
|
||||
|
||||
// Item details
|
||||
item.img = item.img || DEFAULT_TOKEN;
|
||||
|
@ -116,16 +116,19 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e {
|
|||
else if ( item.type === "power" && ["tec"].includes(item.data.school) ) arr[2].push(item);
|
||||
else if ( item.type === "feat" ) arr[3].push(item);
|
||||
else if ( item.type === "class" ) arr[4].push(item);
|
||||
else if ( item.type === "species" ) arr[5].push(item);
|
||||
else if ( item.type === "archetype" ) arr[6].push(item);
|
||||
else if ( item.type === "classfeature" ) arr[7].push(item);
|
||||
else if ( item.type === "background" ) arr[8].push(item);
|
||||
else if ( item.type === "fightingstyle" ) arr[9].push(item);
|
||||
else if ( item.type === "fightingmastery" ) arr[10].push(item);
|
||||
else if ( item.type === "lightsaberform" ) arr[11].push(item);
|
||||
else if ( item.type === "deployment" ) arr[5].push(item);
|
||||
else if ( item.type === "deploymentfeature" ) arr[6].push(item);
|
||||
else if ( item.type === "venture" ) arr[7].push(item);
|
||||
else if ( item.type === "species" ) arr[8].push(item);
|
||||
else if ( item.type === "archetype" ) arr[9].push(item);
|
||||
else if ( item.type === "classfeature" ) arr[10].push(item);
|
||||
else if ( item.type === "background" ) arr[11].push(item);
|
||||
else if ( item.type === "fightingstyle" ) arr[12].push(item);
|
||||
else if ( item.type === "fightingmastery" ) arr[13].push(item);
|
||||
else if ( item.type === "lightsaberform" ) arr[14].push(item);
|
||||
else if ( Object.keys(inventory).includes(item.type ) ) arr[0].push(item);
|
||||
return arr;
|
||||
}, [[], [], [], [], [], [], [], [], [], [], [], []]);
|
||||
}, [[], [], [], [], [], [], [], [], [], [], [], [], [], [], []]);
|
||||
|
||||
// Apply active item filters
|
||||
items = this._filterItems(items, this._filters.inventory);
|
||||
|
@ -150,6 +153,9 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e {
|
|||
classes: { label: "SW5E.ItemTypeClassPl", items: [], hasActions: false, dataset: {type: "class"}, isClass: true },
|
||||
classfeatures: { label: "SW5E.ItemTypeClassFeats", items: [], hasActions: true, dataset: {type: "classfeature"}, isClassfeature: true },
|
||||
archetype: { label: "SW5E.ItemTypeArchetype", items: [], hasActions: false, dataset: {type: "archetype"}, isArchetype: true },
|
||||
deployments: { label: "SW5E.ItemTypeDeploymentPl", items: [], hasActions: false, dataset: {type: "deployment"}, isDeployment: true },
|
||||
deploymentfeatures: { label: "SW5E.ItemTypeDeploymentFeaturePl", items: [], hasActions: true, dataset: {type: "deploymentfeature"}, isDeploymentfeature: true },
|
||||
ventures: { label: "SW5E.ItemTypeVenturePl", items: [], hasActions: false, dataset: {type: "venture"}, isVenture: true },
|
||||
species: { label: "SW5E.ItemTypeSpecies", items: [], hasActions: false, dataset: {type: "species"}, isSpecies: true },
|
||||
background: { label: "SW5E.ItemTypeBackground", items: [], hasActions: false, dataset: {type: "background"}, isBackground: true },
|
||||
fightingstyles: { label: "SW5E.ItemTypeFightingStylePl", items: [], hasActions: false, dataset: {type: "fightingstyle"}, isFightingstyle: true },
|
||||
|
@ -166,6 +172,9 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e {
|
|||
features.classes.items = classes;
|
||||
features.classfeatures.items = classfeatures;
|
||||
features.archetype.items = archetypes;
|
||||
features.deployments.items = deployments;
|
||||
features.deploymentfeatures.items = deploymentfeatures;
|
||||
features.ventures.items = ventures;
|
||||
features.species.items = species;
|
||||
features.background.items = backgrounds;
|
||||
features.fightingstyles.items = fightingstyles;
|
||||
|
@ -354,7 +363,7 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e {
|
|||
/** @override */
|
||||
async _onDropItemCreate(itemData) {
|
||||
|
||||
// Increment the number of class levels a character instead of creating a new item
|
||||
// Increment the number of class levels of a character instead of creating a new item
|
||||
if ( itemData.type === "class" ) {
|
||||
const cls = this.actor.itemTypes.class.find(c => c.name === itemData.name);
|
||||
let priorLevel = cls?.data.data.levels ?? 0;
|
||||
|
@ -367,6 +376,19 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e {
|
|||
}
|
||||
}
|
||||
|
||||
// Increment the number of deployment ranks of a character instead of creating a new item
|
||||
// else if ( itemData.type === "deployment" ) {
|
||||
// const rnk = this.actor.itemTypes.deployment.find(c => c.name === itemData.name);
|
||||
// let priorRank = rnk?.data.data.ranks ?? 0;
|
||||
// if ( !!rnk ) {
|
||||
// const next = Math.min(priorLevel + 1, 5 + priorRank - this.actor.data.data.details.rank);
|
||||
// if ( next > priorRank ) {
|
||||
// itemData.ranks = next;
|
||||
// return rnk.update({"data.ranks": next});
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// Default drop handling if levels were not added
|
||||
super._onDropItemCreate(itemData);
|
||||
}
|
||||
|
|
144
module/actor/sheets/newSheet/starship.js
Normal file
144
module/actor/sheets/newSheet/starship.js
Normal file
|
@ -0,0 +1,144 @@
|
|||
import ActorSheet5e from "./base.js";
|
||||
|
||||
/**
|
||||
* An Actor sheet for starships in the SW5E system.
|
||||
* Extends the base ActorSheet5e class.
|
||||
* @extends {ActorSheet5e}
|
||||
*/
|
||||
export default class ActorSheet5eStarship extends ActorSheet5e {
|
||||
|
||||
/** @override */
|
||||
get template() {
|
||||
if ( !game.user.isGM && this.actor.limited ) return "systems/sw5e/templates/actors/newActor/limited-sheet.html";
|
||||
return `systems/sw5e/templates/actors/newActor/starship.html`;
|
||||
}
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
classes: ["sw5e", "sheet", "actor", "starship"],
|
||||
width: 800,
|
||||
tabs: [{
|
||||
navSelector: ".root-tabs",
|
||||
contentSelector: ".sheet-body",
|
||||
initial: "attributes"
|
||||
}],
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Organize Owned Items for rendering the starship sheet
|
||||
* @private
|
||||
*/
|
||||
_prepareItems(data) {
|
||||
|
||||
// Categorize Items as Features and Powers
|
||||
const features = {
|
||||
weapons: { label: game.i18n.localize("SW5E.ItemTypeWeaponPl"), items: [], hasActions: true, dataset: {type: "weapon", "weapon-type": "natural"} },
|
||||
passive: { label: game.i18n.localize("SW5E.Features"), items: [], dataset: {type: "feat"} },
|
||||
equipment: { label: game.i18n.localize("SW5E.StarshipEquipment"), items: [], dataset: {type: "equipment"}},
|
||||
starshipmods: { label: game.i18n.localize("SW5E.ItemTypeStarshipModPl"), items: [], hasActions: false, dataset: {type: "starshipmod"} }
|
||||
};
|
||||
|
||||
// Start by classifying items into groups for rendering
|
||||
let [forcepowers, techpowers, other] = data.items.reduce((arr, item) => {
|
||||
item.img = item.img || DEFAULT_TOKEN;
|
||||
item.isStack = Number.isNumeric(item.data.quantity) && (item.data.quantity !== 1);
|
||||
item.hasUses = item.data.uses && (item.data.uses.max > 0);
|
||||
item.isOnCooldown = item.data.recharge && !!item.data.recharge.value && (item.data.recharge.charged === false);
|
||||
item.isDepleted = item.isOnCooldown && (item.data.uses.per && (item.data.uses.value > 0));
|
||||
item.hasTarget = !!item.data.target && !(["none",""].includes(item.data.target.type));
|
||||
if ( item.type === "power" && ["lgt", "drk", "uni"].includes(item.data.school) ) arr[0].push(item);
|
||||
else if ( item.type === "power" && ["tec"].includes(item.data.school) ) arr[1].push(item);
|
||||
else arr[2].push(item);
|
||||
return arr;
|
||||
}, [[], [], []]);
|
||||
|
||||
// Apply item filters
|
||||
forcepowers = this._filterItems(forcepowers, this._filters.forcePowerbook);
|
||||
techpowers = this._filterItems(techpowers, this._filters.techPowerbook);
|
||||
other = this._filterItems(other, this._filters.features);
|
||||
|
||||
// Organize Powerbook
|
||||
// const forcePowerbook = this._preparePowerbook(data, forcepowers, "uni");
|
||||
// const techPowerbook = this._preparePowerbook(data, techpowers, "tec");
|
||||
|
||||
// Organize Features
|
||||
for ( let item of other ) {
|
||||
if ( item.type === "weapon" ) features.weapons.items.push(item);
|
||||
else if ( item.type === "feat" ) {
|
||||
if ( item.data.activation.type ) features.actions.items.push(item);
|
||||
else features.passive.items.push(item);
|
||||
}
|
||||
else if ( item.type === "starshipmod" ) {
|
||||
features.starshipmods.items.push(item);
|
||||
}
|
||||
else features.equipment.items.push(item);
|
||||
}
|
||||
|
||||
// Assign and return
|
||||
data.features = Object.values(features);
|
||||
// data.forcePowerbook = forcePowerbook;
|
||||
// data.techPowerbook = techPowerbook;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
getData() {
|
||||
const data = super.getData();
|
||||
|
||||
// Challenge Rating
|
||||
const cr = parseFloat(data.data.details.cr || 0);
|
||||
const crLabels = {0: "0", 0.125: "1/8", 0.25: "1/4", 0.5: "1/2"};
|
||||
data.labels["cr"] = cr >= 1 ? String(cr) : crLabels[cr] || 1;
|
||||
return data;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Object Updates */
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
_updateObject(event, formData) {
|
||||
|
||||
// Format NPC Challenge Rating
|
||||
const crs = {"1/8": 0.125, "1/4": 0.25, "1/2": 0.5};
|
||||
let crv = "data.details.cr";
|
||||
let cr = formData[crv];
|
||||
cr = crs[cr] || parseFloat(cr);
|
||||
if ( cr ) formData[crv] = cr < 1 ? cr : parseInt(cr);
|
||||
|
||||
// Parent ActorSheet update steps
|
||||
super._updateObject(event, formData);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Event Listeners and Handlers */
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
html.find(".health .rollable").click(this._onRollHPFormula.bind(this));
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Handle rolling NPC health values using the provided formula
|
||||
* @param {Event} event The original click event
|
||||
* @private
|
||||
*/
|
||||
_onRollHPFormula(event) {
|
||||
event.preventDefault();
|
||||
const formula = this.actor.data.data.attributes.hp.formula;
|
||||
if ( !formula ) return;
|
||||
const hp = new Roll(formula).roll().total;
|
||||
AudioHelper.play({src: CONFIG.sounds.dice});
|
||||
this.actor.update({"data.attributes.hp.value": hp, "data.attributes.hp.max": hp});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import {ClassFeatures} from "./classFeatures.js"
|
||||
import {ClassFeatures} from "./classFeatures.js"
|
||||
|
||||
// Namespace SW5e Configuration Values
|
||||
export const SW5E = {};
|
||||
|
@ -238,11 +238,16 @@ SW5E.equipmentTypes = {
|
|||
"light": "SW5E.EquipmentLight",
|
||||
"medium": "SW5E.EquipmentMedium",
|
||||
"heavy": "SW5E.EquipmentHeavy",
|
||||
"hyper": "SW5E.EquipmentHyperdrive",
|
||||
"bonus": "SW5E.EquipmentBonus",
|
||||
"natural": "SW5E.EquipmentNatural",
|
||||
"powerc": "SW5E.EquipmentPowerCoupling",
|
||||
"reactor": "SW5E.EquipmentReactor",
|
||||
"shield": "SW5E.EquipmentShield",
|
||||
"clothing": "SW5E.EquipmentClothing",
|
||||
"trinket": "SW5E.EquipmentTrinket",
|
||||
"ssarmor": "SW5E.EquipmentStarshipArmor",
|
||||
"ssshield": "SW5E.EquipmentStarshipShield",
|
||||
"vehicle": "SW5E.EquipmentVehicle"
|
||||
};
|
||||
|
||||
|
@ -423,6 +428,7 @@ SW5E.targetTypes = {
|
|||
"square": "SW5E.TargetSquare",
|
||||
"cube": "SW5E.TargetCube",
|
||||
"line": "SW5E.TargetLine",
|
||||
"starship": "SW5E.TargetStarship",
|
||||
"wall": "SW5E.TargetWall",
|
||||
"weapon": "SW5E.TargetWeapon"
|
||||
};
|
||||
|
@ -507,6 +513,29 @@ SW5E.skills = {
|
|||
"tec": "SW5E.SkillTec"
|
||||
};
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* The set of starship skills which can be trained in SW5e
|
||||
* @type {Object}
|
||||
*/
|
||||
SW5E.starshipSkills = {
|
||||
"ast": "SW5E.StarshipSkillAst",
|
||||
"bst": "SW5E.StarshipSkillBst",
|
||||
"dat": "SW5E.StarshipSkillDat",
|
||||
"hid": "SW5E.StarshipSkillHid",
|
||||
"imp": "SW5E.StarshipSkillImp",
|
||||
"int": "SW5E.StarshipSkillInt",
|
||||
"man": "SW5E.StarshipSkillMan",
|
||||
"men": "SW5E.StarshipSkillMen",
|
||||
"pat": "SW5E.StarshipSkillPat",
|
||||
"prb": "SW5E.StarshipSkillPrb",
|
||||
"ram": "SW5E.StarshipSkillRam",
|
||||
"reg": "SW5E.StarshipSkillReg",
|
||||
"scn": "SW5E.StarshipSkillScn",
|
||||
"swn": "SW5E.StarshipSkillSwn"
|
||||
};
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
|
@ -610,16 +639,21 @@ SW5E.powerScalingModes = {
|
|||
* @type {Object}
|
||||
*/
|
||||
SW5E.weaponTypes = {
|
||||
"simpleVW": "SW5E.WeaponSimpleVW",
|
||||
"simpleB": "SW5E.WeaponSimpleB",
|
||||
"simpleLW": "SW5E.WeaponSimpleLW",
|
||||
|
||||
"ammo": "SW5E.WeaponAmmo",
|
||||
"improv": "SW5E.WeaponImprov",
|
||||
"martialVW": "SW5E.WeaponMartialVW",
|
||||
"martialB": "SW5E.WeaponMartialB",
|
||||
"martialLW": "SW5E.WeaponMartialLW",
|
||||
"natural": "SW5E.WeaponNatural",
|
||||
"improv": "SW5E.WeaponImprov",
|
||||
"ammo": "SW5E.WeaponAmmo",
|
||||
"siege": "SW5E.WeaponSiege"
|
||||
"natural": "SW5E.WeaponNatural",
|
||||
"siege": "SW5E.WeaponSiege",
|
||||
"simpleVW": "SW5E.WeaponSimpleVW",
|
||||
"simpleB": "SW5E.WeaponSimpleB",
|
||||
"simpleLW": "SW5E.WeaponSimpleLW",
|
||||
"primary (starship)": "SW5E.WeaponPrimarySW",
|
||||
"secondary (starship)": "SW5E.WeaponSecondarySW",
|
||||
"tertiary (starship)": "SW5E.WeaponTertiarySW",
|
||||
"quaternary (starship)": "SW5E.WeaponQuaternarySW"
|
||||
};
|
||||
|
||||
|
||||
|
@ -633,6 +667,7 @@ SW5E.weaponProperties = {
|
|||
"amm": "SW5E.WeaponPropertiesAmm",
|
||||
"aut": "SW5E.WeaponPropertiesAut",
|
||||
"bur": "SW5E.WeaponPropertiesBur",
|
||||
"con": "SW5E.WeaponPropertiesCon",
|
||||
"def": "SW5E.WeaponPropertiesDef",
|
||||
"dex": "SW5E.WeaponPropertiesDex",
|
||||
"dir": "SW5E.WeaponPropertiesDir",
|
||||
|
@ -641,20 +676,27 @@ SW5E.weaponProperties = {
|
|||
"dis": "SW5E.WeaponPropertiesDis",
|
||||
"dpt": "SW5E.WeaponPropertiesDpt",
|
||||
"dou": "SW5E.WeaponPropertiesDou",
|
||||
"exp": "SW5E.WeaponPropertiesExp",
|
||||
"fin": "SW5E.WeaponPropertiesFin",
|
||||
"fix": "SW5E.WeaponPropertiesFix",
|
||||
"foc": "SW5E.WeaponPropertiesFoc",
|
||||
"hvy": "SW5E.WeaponPropertiesHvy",
|
||||
"hid": "SW5E.WeaponPropertiesHid",
|
||||
"hom": "SW5E.WeaponPropertiesHom",
|
||||
"ion": "SW5E.WeaponPropertiesIon",
|
||||
"ken": "SW5E.WeaponPropertiesKen",
|
||||
"lgt": "SW5E.WeaponPropertiesLgt",
|
||||
"lum": "SW5E.WeaponPropertiesLum",
|
||||
"mlt": "SW5E.WeaponPropertiesMlt",
|
||||
"mig": "SW5E.WeaponPropertiesMig",
|
||||
"ovr": "SW5E.WeaponPropertiesOvr",
|
||||
"pic": "SW5E.WeaponPropertiesPic",
|
||||
"pow": "SW5E.WeaponPropertiesPow",
|
||||
"rap": "SW5E.WeaponPropertiesRap",
|
||||
"rch": "SW5E.WeaponPropertiesRch",
|
||||
"rel": "SW5E.WeaponPropertiesRel",
|
||||
"ret": "SW5E.WeaponPropertiesRet",
|
||||
"sat": "SW5E.WeaponPropertiesSat",
|
||||
"shk": "SW5E.WeaponPropertiesShk",
|
||||
"sil": "SW5E.WeaponPropertiesSil",
|
||||
"spc": "SW5E.WeaponPropertiesSpc",
|
||||
|
@ -662,9 +704,24 @@ SW5E.weaponProperties = {
|
|||
"thr": "SW5E.WeaponPropertiesThr",
|
||||
"two": "SW5E.WeaponPropertiesTwo",
|
||||
"ver": "SW5E.WeaponPropertiesVer",
|
||||
"vic": "SW5E.WeaponPropertiesVic"
|
||||
"vic": "SW5E.WeaponPropertiesVic",
|
||||
"zon": "SW5E.WeaponPropertiesZon"
|
||||
};
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Define the set of starship weapon size flags which can exist on a weapon
|
||||
* @type {Object}
|
||||
*/
|
||||
SW5E.weaponSizes = {
|
||||
"tiny": "SW5E.SizeTiny",
|
||||
"sm": "SW5E.SizeSmall",
|
||||
"med": "SW5E.SizeMedium",
|
||||
"lg": "SW5E.SizeLarge",
|
||||
"huge": "SW5E.SizeHuge",
|
||||
"grg": "SW5E.SizeGargantuan"
|
||||
};
|
||||
|
||||
// Power Components
|
||||
SW5E.powerComponents = {
|
||||
|
|
|
@ -205,19 +205,27 @@ export default class Item5e extends Item {
|
|||
// Class Feature Items
|
||||
else if ( itemData.type === "classfeature" ) {
|
||||
// labels.classFeature = C.classFeature[data.classFeature];
|
||||
}
|
||||
// Fighting Style Items
|
||||
else if ( itemData.type === "fightingstyle" ) {
|
||||
// labels.fightingstyle = C.fightingstyle[data.fightingstyle];
|
||||
}
|
||||
// Fighting Mastery Items
|
||||
else if ( itemData.type === "fightingmastery" ) {
|
||||
// labels.fightingmastery = C.fightingmastery[data.fightingmastery];
|
||||
}
|
||||
// Lightsaber Form Items
|
||||
else if ( itemData.type === "lightsaberform" ) {
|
||||
// labels.lightsaberform = C.lightsaberform[data.lightsaberform];
|
||||
}
|
||||
}
|
||||
// Deployment Items
|
||||
else if ( itemData.type === "deployment" ) {
|
||||
// labels.deployment = C.deployment[data.deployment];
|
||||
}
|
||||
// Venture Items
|
||||
else if ( itemData.type === "venture" ) {
|
||||
// labels.venture = C.venture[data.venture];
|
||||
}
|
||||
// Fighting Style Items
|
||||
else if ( itemData.type === "fightingstyle" ) {
|
||||
// labels.fightingstyle = C.fightingstyle[data.fightingstyle];
|
||||
}
|
||||
// Fighting Mastery Items
|
||||
else if ( itemData.type === "fightingmastery" ) {
|
||||
// labels.fightingmastery = C.fightingmastery[data.fightingmastery];
|
||||
}
|
||||
// Lightsaber Form Items
|
||||
else if ( itemData.type === "lightsaberform" ) {
|
||||
// labels.lightsaberform = C.lightsaberform[data.lightsaberform];
|
||||
}
|
||||
|
||||
// Equipment Items
|
||||
else if ( itemData.type === "equipment" ) {
|
||||
|
|
|
@ -194,6 +194,10 @@ export default class ItemSheet5e extends ItemSheet {
|
|||
//props.push(labels.background);
|
||||
} else if (item.type === "classfeature") {
|
||||
//props.push(labels.classfeature);
|
||||
} else if (item.type === "deployment") {
|
||||
//props.push(labels.deployment);
|
||||
} else if (item.type === "venture") {
|
||||
//props.push(labels.venture);
|
||||
} else if (item.type === "fightingmastery") {
|
||||
//props.push(labels.fightingmastery);
|
||||
} else if (item.type === "fightingstyle") {
|
||||
|
|
|
@ -14,11 +14,11 @@ export const preloadHandlebarsTemplates = async function() {
|
|||
"systems/sw5e/templates/actors/oldActor/parts/actor-inventory.html",
|
||||
"systems/sw5e/templates/actors/oldActor/parts/actor-features.html",
|
||||
"systems/sw5e/templates/actors/oldActor/parts/actor-powerbook.html",
|
||||
"systems/sw5e/templates/actors/oldActor/parts/actor-notes.html",
|
||||
"systems/sw5e/templates/actors/oldActor/parts/actor-notes.html",
|
||||
|
||||
"systems/sw5e/templates/actors/newActor/parts/swalt-biography.html",
|
||||
"systems/sw5e/templates/actors/newActor/parts/swalt-core.html",
|
||||
"systems/sw5e/templates/actors/newActor/parts/swalt-active-effects.html",
|
||||
"systems/sw5e/templates/actors/newActor/parts/swalt-active-effects.html",
|
||||
"systems/sw5e/templates/actors/newActor/parts/swalt-features.html",
|
||||
"systems/sw5e/templates/actors/newActor/parts/swalt-inventory.html",
|
||||
"systems/sw5e/templates/actors/newActor/parts/swalt-force-powerbook.html",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue