Merge pull request #187 from unrealkakeman89/professorbunbury-sw5e

SotG Update #1.1 (Quick Fixes)
This commit is contained in:
CK 2021-04-07 17:58:38 -04:00 committed by GitHub
commit fb0b489c82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 8 deletions

View file

@ -19,7 +19,10 @@
"ITEM.TypeLoot": "Loot",
"ITEM.TypePower": "Power",
"ITEM.TypeSpecies": "Species",
"ITEM.TypeStarshipfeature": "Starship Feature",
"ITEM.TypeStarshipfeaturePl": "Starship Features",
"ITEM.TypeStarshipmod": "Starship Modification",
"ITEM.TypeStarshipmodPl": "Starship Modifications",
"ITEM.TypeTool": "Tool",
"ITEM.TypeVenture": "Venture",
"ITEM.TypeWeapon": "Weapon",
@ -830,6 +833,7 @@
"SW5E.Reaction": "Reaction",
"SW5E.ReactionPl": "Reactions",
"SW5E.Recharge": "Recharge",
"SW5E.Refitting": "Refitting",
"SW5E.RegenerationRateCoefficient": "Regeneration Rate Coefficient",
"SW5E.RequiredMaterials": "Required Materials",
"SW5E.Requirements": "Requirements",
@ -927,6 +931,8 @@
"SW5E.StarshipArmorandShieldProps": "Starship Armor & Shield Properties",
"SW5E.StarshipEquipment": "Starship Equipment",
"SW5E.StarshipEquipmentProps": "Starship Equipment Properties",
"SW5E.StarshipfeaturePl": "Starship Features",
"SW5E.StarshipmodPl": "Starship Modifications",
"SW5E.StarshipSkillAst": "Astrogation",
"SW5E.StarshipSkillBst": "Boost",
"SW5E.StarshipSkillDat": "Data",

View file

@ -317,7 +317,7 @@ export default class Actor5e extends Actor {
const data = actorData.data;
// Proficiency
data.attributes.prof = Math.floor((Math.max(data.details.cr, 1) + 7) / 4);
data.attributes.prof = Math.floor((Math.max(data.details.tier, 1) + 7) / 4);
}
@ -382,7 +382,7 @@ export default class Actor5e extends Actor {
* @private
*/
_computePowercastingProgression (actorData) {
if (actorData.type === 'vehicle') return;
if (actorData.type === 'vehicle' || actorData.type === 'starship') return;
const powers = actorData.data.powers;
const isNPC = actorData.type === 'npc';

View file

@ -38,7 +38,8 @@ export default class ActorSheet5eStarship extends ActorSheet5e {
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"} }
starshipfeatures: { label: game.i18n.localize("SW5E.StarshipfeaturePl"), items: [], hasActions: true, dataset: {type: "starshipfeature"} },
starshipmods: { label: game.i18n.localize("SW5E.StarshipmodPl"), items: [], hasActions: false, dataset: {type: "starshipmod"} }
};
// Start by classifying items into groups for rendering
@ -70,10 +71,13 @@ export default class ActorSheet5eStarship extends ActorSheet5e {
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 === "starshipfeature" ) {
features.starshipfeatures.items.push(item);
}
else if ( item.type === "starshipmod" ) {
features.starshipmods.items.push(item);
}
}
else features.equipment.items.push(item);
}

View file

@ -224,7 +224,9 @@ SW5E.limitedUsePeriods = {
"sr": "SW5E.ShortRest",
"lr": "SW5E.LongRest",
"day": "SW5E.Day",
"charges": "SW5E.Charges"
"charges": "SW5E.Charges",
"recharge": "SW5E.Recharge",
"refitting": "SW5E.Refitting"
};

View file

@ -136,7 +136,7 @@ Hooks.once("init", function() {
});
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("sw5e", ItemSheet5e, {
types: ['weapon', 'equipment', 'consumable', 'tool', 'loot', 'class', 'power', 'feat', 'species', 'backpack', 'archetype', 'classfeature', 'background', 'fightingmastery', 'fightingstyle', 'lightsaberform', 'deployment', 'deploymentfeature', 'starshipmod', 'venture'],
types: ['weapon', 'equipment', 'consumable', 'tool', 'loot', 'class', 'power', 'feat', 'species', 'backpack', 'archetype', 'classfeature', 'background', 'fightingmastery', 'fightingstyle', 'lightsaberform', 'deployment', 'deploymentfeature', 'starshipfeature', 'starshipmod', 'venture'],
makeDefault: true,
label: "SW5E.SheetClassItem"
});

View file

@ -541,7 +541,7 @@
}
},
"Item": {
"types": ["archetype", "background", "backpack", "class", "classfeature", "consumable", "deployment", "deploymentfeature", "equipment", "feat", "fightingmastery", "fightingstyle", "lightsaberform", "loot", "power", "species", "starshipmod", "tool", "venture", "weapon"],
"types": ["archetype", "background", "backpack", "class", "classfeature", "consumable", "deployment", "deploymentfeature", "equipment", "feat", "fightingmastery", "fightingstyle", "lightsaberform", "loot", "power", "species", "starshipfeature", "starshipmod", "tool", "venture", "weapon"],
"templates": {
"archetypeDescription": {
"className": "",
@ -846,6 +846,11 @@
"mode": "none",
"formula": null
}
},
"starshipfeature": {
"templates": ["itemDescription", "activatedEffect", "action"],
"size": "med",
"tier": 0
},
"starshipmod": {
"templates": ["itemDescription"]