All of the changes that have been made to the package, in a somewhat organized list.
Added 'Pride Silk Outfit' as a new type of possible armor
Removed <Armor>#isMetal
Added <Armor>#armorClass
Added <Armor>#scalesWithDex
Added <Armor>#maxDexBonus
- Armor.isMetal + Armor.armorClass + Armor.scalesWithDex + Armor.maxDexBonus
Added the Artificer class
Click here for more details on the class
Updated the code base to use ES6 modules.
This means you can no longer use require(), you must use import instead.
- const NPC = require("dnd-npc") + import NPC from "dnd-npc"
The module itself is now the NPC class.
As such you no longer have to use a dot operator to get to the npc class.
- const npc = new dnd.npc() + const npc = new NPC()
#raceType() was changed to #setRace()
Support was also dropped for using an object or an array to set the race, instead favoring 2 strings.
- npc.raceType({ raceType: "Warforged", subRace: "Juggernaut" }) + npc.setRace("Warforged", "Juggernaut")
#roleType() was changed to #setClass()
Support was also dropped for using an object or an array to set the role, instead favoring a single string.
- npc.roleType({ roleType: "Fighter" }) + npc.setClass("Fighter")
Made #raceType a private property, meaning you can no longer access it directly.
Instead you must use #getRace()
- npc.raceType + npc.getRace()
Made #roleType a private property, meaning you can no longer access it directly.
Instead you must use #getClass()
- npc.roleType + npc.getClass()
#generate() is now an asynchronous method.
As such it returns a promise instead of an object - Use await to resolve the promise.
- const npc = new NPC() - const character = npc.generate() + const npc = new NPC() + const character = await npc.generate()
<character>#role role was changed back to <character>#class
- character.role + character.class
Each stat is no longer a singular number, but instead an object that contains the stat total & the profficancy bonus granted by that total
- character.class.stats.strength = 18 + character.class.stats.strength = { total: 18, prof: 4 }
• damageAmount was changed to damage
• vDamage was changed to versatileDamage
• allowShield was changed to allowsShield
- character.inventory.weapon.damageAmount + character.inventory.weapon.damage - character.inventory.weapon.vDamage + character.inventory.weapon.versatileDamage - character.inventory.weapon.allowShield + character.inventory.weapon.allowsShield
• strength was changed to strengthReq
• metal was changed to isMetal
• stealth was changed to isStealthy
- character.inventory.armor.strength + character.inventory.armor.strengthReq - character.inventory.armor.metal + character.inventory.armor.isMetal - character.inventory.armor.stealth + character.inventory.armor.isStealthy
<NPC>#class was changed to <NPC>#role for better code consistency.
- npc.class
+ npc.role
Added NPC age.
This is based on each race and their lifespans.
TypeOf: Number
Added NPC background.
Based on the role & race to give somewhat logical backgrounds.
TypeOf: String
Added NPC level.
This will always be level 1.
TypeOf: Number
Changed how the NPC Constructor is called.
This is so in the future more classes can be added for various things, such as generating monsters.
const dnd = require('dnd-npc');
- const npc = new dnd({ ..options }).generate();
+ const npc = new dnd.npc({ ..options }).generate();
race#small was removed in favor of race#size
This is a string that contains the size of the npc. (Small, Medium, Large etc)
TypeOf: String
- npc.race.small
+ npc.race.size
Added NPC alignment. This is generated based on race and class chosen.
(No chaotic evil Paladins, though technically not against the rules of D&D 5e)
TypeOf: String
- Initial Release