A repository for a FoundryVTT plugin for Kingmaker homebrew.

Adding in Kingdom data

+49 -1
+49 -1
src/kingdom.ts
··· 1 + import * as data from "./data"; 2 + 1 3 /** 2 4 * A Kingdom structure. 3 5 * @typedef {Object} Kingdom ··· 20 22 * @property {number} level - The level of the Kingdom 21 23 */ 22 24 export default class Kingdom { 23 - 25 + name: string; 26 + charter: data.Charter; 27 + government: data.Government; 28 + heartland: data.Heartland; 29 + boosts: data.Boost[]; 30 + leaders: object; 31 + feats: string[]; 32 + size: number; 33 + resourceDice: object; 34 + commodities: object; 35 + resourcePoints: object; 36 + unrest: object; 37 + ruin: object; 38 + groups: object[]; 39 + krp: object; 40 + settlements: string[]; 41 + level: number; 42 + 43 + constructor() { 44 + this.name = ""; 45 + this.level = 0; 46 + this.charter = { 47 + id: "", 48 + boosts: [] 49 + }; 50 + this.government = { 51 + id: "", 52 + boosts: [], 53 + feat: "" 54 + }; 55 + this.heartland = { 56 + id: "", 57 + boost: data.Boost.None 58 + }; 59 + this.boosts = []; 60 + this.leaders = {}; 61 + this.feats = []; 62 + this.size = 0; 63 + this.resourceDice = {}; 64 + this.commodities = {}; 65 + this.resourcePoints = {}; 66 + this.unrest = {}; 67 + this.ruin = {}; 68 + this.groups = []; 69 + this.krp = {}; 70 + this.settlements = []; 71 + } 24 72 }