forked from GitHub-Mirrors/foundry-sw5e
Updated to DND5e 1.3.2
Things unfinished: - Migration - The update adds new sections to the class sheet to allow some light customisation, this hasn't been included, but could be extended for the sake of dynamic classes with automatic class features and more - The French - The packs have not yet been updated, meaning due to the addition of a progression field to the class item, classes now don't set force or tech points - I updated the function calls in starships, but I didn't update it very thoroughly, it'll need checking - I only did a little testing - There has since been updates to DND5e that hasn't made it to release that patch bugs, those should be implemented Things changed from base 5e: - Short rests and long rests were merged into one function, this needed some rewrites to account for force and tech points, and for printing the correct message Extra Comments: - Unfinished code exists for automatic spell scrolls, this could be extended for single use force or tech powers - Weapon proficiencies probably need revising - Elven accuracy, halfling lucky, and reliable talent are present in the roll logic, this probably needs revising for sw5e - SW5e has a variant rule that permits force powers of any alignment to use either charisma or wisdom, that could be implemented - SW5e's version of gritty realism, [Longer Rests](https://sw5e.com/rules/variantRules/Longer%20Rests) differs from base dnd, this could be implemented - Extra ideas I've had while looking through the code can be found in Todos next to the ideas relevant context
This commit is contained in:
parent
aa07380c57
commit
2a7e1c419e
72 changed files with 3107 additions and 1359 deletions
172
module/config.js
172
module/config.js
|
@ -63,7 +63,7 @@ SW5E.attunementTypes = {
|
|||
NONE: 0,
|
||||
REQUIRED: 1,
|
||||
ATTUNED: 2,
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* An enumeration of item attunement states
|
||||
|
@ -77,7 +77,6 @@ SW5E.attunements = {
|
|||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
|
||||
SW5E.weaponProficiencies = {
|
||||
"blp": "SW5E.WeaponBlasterPistolProficiency",
|
||||
"chk": "SW5E.WeaponChakramProficiency",
|
||||
|
@ -89,13 +88,13 @@ SW5E.weaponProficiencies = {
|
|||
"imp": "SW5E.WeaponImprovisedProficiency",
|
||||
"lfl": "SW5E.WeaponLightFoilProficiency",
|
||||
"lrg": "SW5E.WeaponLightRingProficiency",
|
||||
"mar": "SW5E.WeaponMartialProficiency",
|
||||
"mar": "SW5E.WeaponMartialProficiency",
|
||||
"mrb": "SW5E.WeaponMartialBlasterProficiency",
|
||||
"mlw": "SW5E.WeaponMartialLightweaponProficiency",
|
||||
"mvb": "SW5E.WeaponMartialVibroweaponProficiency",
|
||||
"ntl": "SW5E.WeaponNaturalProficiency",
|
||||
"swh": "SW5E.WeaponSaberWhipProficiency",
|
||||
"sim": "SW5E.WeaponSimpleProficiency",
|
||||
"sim": "SW5E.WeaponSimpleProficiency",
|
||||
"smb": "SW5E.WeaponSimpleBlasterProficiency",
|
||||
"slw": "SW5E.WeaponSimpleLightweaponProficiency",
|
||||
"svb": "SW5E.WeaponSimpleVibroweaponProficiency",
|
||||
|
@ -104,6 +103,59 @@ SW5E.weaponProficiencies = {
|
|||
"vbw": "SW5E.WeaponVibrowhipProficiency"
|
||||
};
|
||||
|
||||
// TODO: Check to see if this can be used
|
||||
// It's not actually been used anywhere in DND5e 1.3.2
|
||||
// Note name mapped to ID in compendium
|
||||
/**
|
||||
* The basic weapon types in 5e. This enables specific weapon proficiencies or
|
||||
* starting equipment provided by classes and backgrounds.
|
||||
*
|
||||
* @enum {string}
|
||||
|
||||
SW5E.weaponIds = {
|
||||
"battleaxe": "I0WocDSuNpGJayPb",
|
||||
"blowgun": "wNWK6yJMHG9ANqQV",
|
||||
"club": "nfIRTECQIG81CvM4",
|
||||
"dagger": "0E565kQUBmndJ1a2",
|
||||
"dart": "3rCO8MTIdPGSW6IJ",
|
||||
"flail": "UrH3sMdnUDckIHJ6",
|
||||
"glaive": "rOG1OM2ihgPjOvFW",
|
||||
"greataxe": "1Lxk6kmoRhG8qQ0u",
|
||||
"greatclub": "QRCsxkCwWNwswL9o",
|
||||
"greatsword": "xMkP8BmFzElcsMaR",
|
||||
"halberd": "DMejWAc8r8YvDPP1",
|
||||
"handaxe": "eO7Fbv5WBk5zvGOc",
|
||||
"handcrossbow": "qaSro7kFhxD6INbZ",
|
||||
"heavycrossbow": "RmP0mYRn2J7K26rX",
|
||||
"javelin": "DWLMnODrnHn8IbAG",
|
||||
"lance": "RnuxdHUAIgxccVwj",
|
||||
"lightcrossbow": "ddWvQRLmnnIS0eLF",
|
||||
"lighthammer": "XVK6TOL4sGItssAE",
|
||||
"longbow": "3cymOVja8jXbzrdT",
|
||||
"longsword": "10ZP2Bu3vnCuYMIB",
|
||||
"mace": "Ajyq6nGwF7FtLhDQ",
|
||||
"maul": "DizirD7eqjh8n95A",
|
||||
"morningstar": "dX8AxCh9o0A9CkT3",
|
||||
"net": "aEiM49V8vWpWw7rU",
|
||||
"pike": "tC0kcqZT9HHAO0PD",
|
||||
"quarterstaff": "g2dWN7PQiMRYWzyk",
|
||||
"rapier": "Tobce1hexTnDk4sV",
|
||||
"scimitar": "fbC0Mg1a73wdFbqO",
|
||||
"shortsword": "osLzOwQdPtrK3rQH",
|
||||
"sickle": "i4NeNZ30ycwPDHMx",
|
||||
"spear": "OG4nBBydvmfWYXIk",
|
||||
"shortbow": "GJv6WkD7D2J6rP6M",
|
||||
"sling": "3gynWO9sN4OLGMWD",
|
||||
"trident": "F65ANO66ckP8FDMa",
|
||||
"warpick": "2YdfjN1PIIrSHZii",
|
||||
"warhammer": "F0Df164Xv1gWcYt0",
|
||||
"whip": "QKTyxoO0YDnAsbYe"
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
SW5E.toolProficiencies = {
|
||||
"armor": "SW5E.ToolArmormech",
|
||||
"arms": "SW5E.ToolArmstech",
|
||||
|
@ -137,6 +189,51 @@ SW5E.toolProficiencies = {
|
|||
"vehicle": "SW5E.ToolVehicle"
|
||||
};
|
||||
|
||||
// TODO: Same as weapon IDs
|
||||
// Also unused, and SW5E.toolProficiencies is already pretty verbose anyway
|
||||
/**
|
||||
* The basic tool types in 5e. This enables specific tool proficiencies or
|
||||
* starting equipment provided by classes and backgrounds.
|
||||
*
|
||||
* @enum {string}
|
||||
SW5E.toolIds = {
|
||||
"alchemist": "SztwZhbhZeCqyAes",
|
||||
"bagpipes": "yxHi57T5mmVt0oDr",
|
||||
"brewer": "Y9S75go1hLMXUD48",
|
||||
"calligrapher": "jhjo20QoiD5exf09",
|
||||
"card": "YwlHI3BVJapz4a3E",
|
||||
"carpenter": "8NS6MSOdXtUqD7Ib",
|
||||
"cartographer": "fC0lFK8P4RuhpfaU",
|
||||
"cobbler": "hM84pZnpCqKfi8XH",
|
||||
"cook": "Gflnp29aEv5Lc1ZM",
|
||||
"dice": "iBuTM09KD9IoM5L8",
|
||||
"disg": "IBhDAr7WkhWPYLVn",
|
||||
"drum": "69Dpr25pf4BjkHKb",
|
||||
"dulcimer": "NtdDkjmpdIMiX7I2",
|
||||
"flute": "eJOrPcAz9EcquyRQ",
|
||||
"forg": "cG3m4YlHfbQlLEOx",
|
||||
"glassblower": "rTbVrNcwApnuTz5E",
|
||||
"herb": "i89okN7GFTWHsvPy",
|
||||
"horn": "aa9KuBy4dst7WIW9",
|
||||
"jeweler": "YfBwELTgPFHmQdHh",
|
||||
"leatherworker": "PUMfwyVUbtyxgYbD",
|
||||
"lute": "qBydtUUIkv520DT7",
|
||||
"lyre": "EwG1EtmbgR3bM68U",
|
||||
"mason": "skUih6tBvcBbORzA",
|
||||
"navg": "YHCmjsiXxZ9UdUhU",
|
||||
"painter": "ccm5xlWhx74d6lsK",
|
||||
"panflute": "G5m5gYIx9VAUWC3J",
|
||||
"pois": "il2GNi8C0DvGLL9P",
|
||||
"potter": "hJS8yEVkqgJjwfWa",
|
||||
"shawm": "G3cqbejJpfB91VhP",
|
||||
"smith": "KndVe2insuctjIaj",
|
||||
"thief": "woWZ1sO5IUVGzo58",
|
||||
"tinker": "0d08g1i5WXnNrCNA",
|
||||
"viol": "baoe3U5BfMMMxhCU",
|
||||
"weaver": "ap9prThUB2y9lDyj",
|
||||
"woodcarver": "xKErqkLo4ASYr5EP",
|
||||
};
|
||||
*/
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
|
@ -210,6 +307,35 @@ SW5E.tokenSizes = {
|
|||
"grg": 4
|
||||
};
|
||||
|
||||
/**
|
||||
* Colors used to visualize temporary and temporary maximum HP in token health bars
|
||||
* @enum {number}
|
||||
*/
|
||||
SW5E.tokenHPColors = {
|
||||
temp: 0x66CCFF,
|
||||
tempmax: 0x440066,
|
||||
negmax: 0x550000
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Creature types
|
||||
* @type {Object}
|
||||
*/
|
||||
SW5E.creatureTypes = {
|
||||
"Aberration": "SW5E.CreatureAberration",
|
||||
"Beast": "SW5E.CreatureBeast",
|
||||
"Construct": "SW5E.CreatureConstruct",
|
||||
"Droid": "SW5E.CreatureDroid",
|
||||
"Elemental": "SW5E.CreatureElemental",
|
||||
"Human": "SW5E.CreatureHuman",
|
||||
"Humanoid": "SW5E.CreatureHumanoid",
|
||||
"Plant": "SW5E.CreaturePlant",
|
||||
"Undead": "SW5E.CreatureUndead"
|
||||
};
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
|
@ -254,7 +380,7 @@ SW5E.limitedUsePeriods = {
|
|||
/* -------------------------------------------- */
|
||||
|
||||
/**
|
||||
* The set of equipment types for armor, clothing, and other objects which can ber worn by the character
|
||||
* The set of equipment types for armor, clothing, and other objects which can be worn by the character
|
||||
* @type {Object}
|
||||
*/
|
||||
SW5E.equipmentTypes = {
|
||||
|
@ -338,7 +464,7 @@ SW5E.damageTypes = {
|
|||
};
|
||||
|
||||
// Damage Resistance Types
|
||||
SW5E.damageResistanceTypes = duplicate(SW5E.damageTypes);
|
||||
SW5E.damageResistanceTypes = foundry.utils.deepClone(SW5E.damageTypes);
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
|
@ -392,7 +518,7 @@ SW5E.movementTypes = {
|
|||
"swim": "SW5E.MovementSwim",
|
||||
"turn": "SW5E.MovementTurn",
|
||||
"walk": "SW5E.MovementWalk",
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The valid units of measure for movement distances in the game system.
|
||||
|
@ -402,7 +528,7 @@ SW5E.movementTypes = {
|
|||
SW5E.movementUnits = {
|
||||
"ft": "SW5E.DistFt",
|
||||
"mi": "SW5E.DistMi"
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The valid units of measure for the range of an action or effect.
|
||||
|
@ -495,7 +621,7 @@ SW5E.healingTypes = {
|
|||
|
||||
/**
|
||||
* Enumerate the denominations of hit dice which can apply to classes in the SW5E system
|
||||
* @type {Array.<string>}
|
||||
* @type {string[]}
|
||||
*/
|
||||
SW5E.hitDieTypes = ["d4", "d6", "d8", "d10", "d12", "d20"];
|
||||
|
||||
|
@ -504,7 +630,7 @@ SW5E.hitDieTypes = ["d4", "d6", "d8", "d10", "d12", "d20"];
|
|||
|
||||
/**
|
||||
* Enumerate the denominations of power dice which can apply to starships in the SW5E system
|
||||
* @type {Array.<string>}
|
||||
* @enum {string}
|
||||
*/
|
||||
SW5E.powerDieTypes = [1, "d4", "d6", "d8", "d10", "d12"];
|
||||
|
||||
|
@ -896,6 +1022,32 @@ SW5E.powerLevels = {
|
|||
9: "SW5E.PowerLevel9"
|
||||
};
|
||||
|
||||
// TODO: This is used for spell scrolls, it maps the level to the compendium ID of the item the spell would be bound to
|
||||
// We could use this wit, say, holocrons to produce scrolls
|
||||
/*
|
||||
// Power Scroll Compendium UUIDs
|
||||
SW5E.powerScrollIds = {
|
||||
0: "rQ6sO7HDWzqMhSI3",
|
||||
1: "9GSfMg0VOA2b4uFN",
|
||||
2: "XdDp6CKh9qEvPTuS",
|
||||
3: "hqVKZie7x9w3Kqds",
|
||||
4: "DM7hzgL836ZyUFB1",
|
||||
5: "wa1VF8TXHmkrrR35",
|
||||
6: "tI3rWx4bxefNCexS",
|
||||
7: "mtyw4NS1s7j2EJaD",
|
||||
8: "aOrinPg7yuDZEuWr",
|
||||
9: "O4YbkJkLlnsgUszZ"
|
||||
};
|
||||
*/
|
||||
|
||||
/**
|
||||
* Compendium packs used for localized items.
|
||||
* @enum {string}
|
||||
*/
|
||||
SW5E.sourcePacks = {
|
||||
ITEMS: "sw5e.items"
|
||||
}
|
||||
|
||||
// Polymorph options.
|
||||
SW5E.polymorphSettings = {
|
||||
keepPhysical: 'SW5E.PolymorphKeepPhysical',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue