This commit is contained in:
Kakeman89 2020-09-01 11:53:08 -04:00
commit b40f5f62f8
5 changed files with 520 additions and 509 deletions

View file

@ -1,9 +1,27 @@
# sw5e
SW5E Foundry VTT System
# Foundry Virtual Tabletop - SW5e Game System
For easy install
This game system for [Foundry Virtual Tabletop](http://foundryvtt.com) provides character sheet and game system
support for the SW5E roleplaying game.
In the Foundry Configuration and Setup window go to the Game Systems tab, click on the "Install System" button, and
place the following link into the Manifest URL at the bottom
This system provides character sheet support for Actors and Items, mechanical support for dice and rules necessary to
play games of SW5E, and compendium content for Monsters, Heroes, Items, Powers, Class Features, Monster
Features, and more!
The software component of this system is distributed under the GNUv3 license.
## Installation Instructions
To install and use the SW5e system for Foundry Virtual Tabletop, simply paste the following URL into the
**Install System** dialog on the Setup menu of the application.
https://raw.githubusercontent.com/unrealkakeman89/sw5e/master/system.json
If you wish to manually install the system, you must clone or extract it into the ``Data/systems/sw5e`` folder. You
may do this by cloning the repository or downloading a zip archive from the
[Releases Page](https://github.com/unrealkakeman89/sw5e).
## Community Contribution
Code and content contributions are accepted. Please feel free to submit issues to the issue tracker or submit merge
requests for code changes. Approval for such requests involves code and (if necessary) design review by The Dev Team.
Please reach out on the SW5E Foundry Dev Discord with any questions.

View file

@ -341,6 +341,7 @@ SW5E.targetTypes = {
"cube": "SW5E.TargetCube",
"line": "SW5E.TargetLine",
"wall": "SW5E.TargetWall",
"weapon": "SW5E.TargetWeapon"
};
@ -482,7 +483,7 @@ SW5E.weaponProperties = {
"bur": "SW5E.WeaponPropertiesBur",
"def": "SW5E.WeaponPropertiesDef",
"dex": "SW5E.WeaponPropertiesDex",
"drm": "SW5E.WeaponPropertiesBur",
"drm": "SW5E.WeaponPropertiesDrm",
"dgd": "SW5E.WeaponPropertiesDgd",
"dis": "SW5E.WeaponPropertiesDis",
"dpt": "SW5E.WeaponPropertiesDpt",

View file

@ -41,7 +41,7 @@ export class Item5e extends Item {
* @type {boolean}
*/
get hasAttack() {
return ["mwak", "rwak", "msak", "rsak"].includes(this.data.data.actionType);
return ["mwak", "rwak", "mpak", "rpak"].includes(this.data.data.actionType);
}
/* -------------------------------------------- */
@ -553,9 +553,9 @@ export class Item5e extends Item {
const parts = itemData.damage.parts.map(d => d[0]);
if ( versatile && itemData.damage.versatile ) parts[0] = itemData.damage.versatile;
if ( (this.data.type === "power") ) {
if ( (itemData.scaling.mode === "cantrip") ) {
if ( (itemData.scaling.mode === "atwill") ) {
const lvl = this.actor.data.type === "character" ? actorData.details.level : actorData.details.powerLevel;
this._scaleCantripDamage(parts, lvl, itemData.scaling.formula );
this._scaleAtWillDamage(parts, lvl, itemData.scaling.formula );
} else if ( powerLevel && (itemData.scaling.mode === "level") && itemData.scaling.formula ) {
this._scalePowerDamage(parts, itemData.level, powerLevel, itemData.scaling.formula );
}
@ -590,10 +590,10 @@ export class Item5e extends Item {
/* -------------------------------------------- */
/**
* Adjust a cantrip damage formula to scale it for higher level characters and monsters
* Adjust an at-will damage formula to scale it for higher level characters and monsters
* @private
*/
_scaleCantripDamage(parts, level, scale) {
_scaleAtWillDamage(parts, level, scale) {
const add = Math.floor((level + 1) / 6);
if ( add === 0 ) return;
if ( scale && (scale !== parts[0]) ) {

File diff suppressed because one or more lines are too long

View file

@ -3,17 +3,11 @@
"title": "Star Wars 5th Edition",
"description": "A comprehensive game system for running games of Star wars 5th Edition in the Foundry VTT environment.",
"version": 0.89,
"author": "Kakeman89",
"author": "Dev Team",
"scripts": [],
"esmodules": ["sw5e.js"],
"styles": ["sw5e.css"],
"packs": [
{
"name": "weapons",
"label": "Weapons",
"path": "./packs/packs/weapons.db",
"entity": "Item"
},
{
"name": "adventuringgear",
"label": "Adventuring Gear",
@ -26,12 +20,30 @@
"path": "./packs/packs/armor.db",
"entity": "Item"
},
{
"name": "classes",
"label": "Classes",
"path": "./packs/packs/classes.db",
"entity": "Item"
},
{
"name": "enhanceditems",
"label": "Enhanced Items",
"path": "./packs/packs/enhanceditems.db",
"entity": "Item"
},
{
"name": "feats",
"label": "Feats",
"path": "./packs/packs/featss.db",
"entity": "Item"
},
{
"name": "forcepowers",
"label": "Force Powers",
"path": "./packs/packs/forcepowers.db",
"entity": "Item"
},
{
"name": "gamingset",
"label": "Gaming Sets",
@ -39,11 +51,17 @@
"entity": "Item"
},
{
"name": "classes",
"label": "Classes",
"path": "./packs/packs/classes.db",
"entity": "Item"
},
"name": "journal",
"label": "Journal Entries",
"path": "./packs/packs/journal.db",
"entity": "JournalEntry"
},
{
"name": "monsters",
"label": "Monsters",
"path": "./packs/packs/monsters.db",
"entity": "Actor"
},
{
"name": "species",
"label": "Species",
@ -57,29 +75,17 @@
"entity": "Item"
},
{
"name": "forcepowers",
"label": "Force Powers",
"path": "./packs/packs/forcepowers.db",
"name": "tables",
"label": "Tables",
"path": "./packs/packs/tables.db",
"entity": "RollTable"
},
{
"name": "weapons",
"label": "Weapons",
"path": "./packs/packs/weapons.db",
"entity": "Item"
},
{
"name": "monsters",
"label": "Monsters",
"path": "./packs/packs/monsters.db",
"entity": "Actor"
},
{
"name": "journal",
"label": "Journal Entries",
"path": "./packs/packs/journal.db",
"entity": "JournalEntry"
},
{
"name": "tables",
"label": "Tables",
"path": "./packs/packs/tables.db",
"entity": "RollTable"
}
}
],
"languages": [
{