Skip to content

Commit

Permalink
add support for defining titles on class items
Browse files Browse the repository at this point in the history
  • Loading branch information
Muttley committed Sep 22, 2023
1 parent 7805e9f commit dc4b1c1
Show file tree
Hide file tree
Showing 26 changed files with 958 additions and 481 deletions.
37 changes: 37 additions & 0 deletions data/packs/classes.db/bard__112M28Tvi2ju06BE.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,43 @@
"Compendium.shadowdark.talents.Item.j7nfbsMivwfCVkN0",
"Compendium.shadowdark.talents.Item.Om7QWre7U4Tbh84B"
],
"titles": [
{
"chaotic": "Guttersnipe",
"from": 1,
"lawful": "Storyteller",
"neutral": "Seeker",
"to": 2
},
{
"chaotic": "Charlatan",
"from": 3,
"lawful": "Balladeer",
"neutral": "Witness",
"to": 4
},
{
"chaotic": "Satirist",
"from": 5,
"lawful": "Philosopher",
"neutral": "Speaker",
"to": 6
},
{
"chaotic": "Silvertongue",
"from": 7,
"lawful": "Poet",
"neutral": "Voice",
"to": 8
},
{
"chaotic": "Doomspeaker",
"from": 9,
"lawful": "Master Poet",
"neutral": "Trushbearer",
"to": 10
}
],
"weapons": [
"Compendium.shadowdark.gear.Item.9eTpsuEuzL3Vaxge",
"Compendium.shadowdark.gear.Item.brIFMH0sOVmqX02N",
Expand Down
37 changes: 37 additions & 0 deletions data/packs/classes.db/fighter__hO7KrvqDRH6kvftJ.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,43 @@
"Compendium.shadowdark.talents.Item.5bpWuaT0KTNzuzCu",
"Compendium.shadowdark.talents.Item.7JTDRLtHc6FOrIEc"
],
"titles": [
{
"chaotic": "Knave",
"from": 1,
"lawful": "Squire",
"neutral": "Warrior",
"to": 2
},
{
"chaotic": "Bandit",
"from": 3,
"lawful": "Cavalier",
"neutral": "Barbarian",
"to": 4
},
{
"chaotic": "Slayer",
"from": 5,
"lawful": "Knight",
"neutral": "Battlerager",
"to": 6
},
{
"chaotic": "Reaver",
"from": 7,
"lawful": "Thane",
"neutral": "Warchief",
"to": 8
},
{
"chaotic": "Warlord",
"from": 9,
"lawful": "Lord/Lady",
"neutral": "Chieftain",
"to": 10
}
],
"weapons": [
]
},
Expand Down
37 changes: 37 additions & 0 deletions data/packs/classes.db/priest__oZWzXx1WRLg286zD.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,43 @@
"Compendium.shadowdark.talents.Item.LfHTnYW8I65x8Y31",
"Compendium.shadowdark.talents.Item.QxhyKNW4aDQqolMi"
],
"titles": [
{
"chaotic": "Initiate",
"from": 1,
"lawful": "Acolyte",
"neutral": "Seeker",
"to": 2
},
{
"chaotic": "Zealot",
"from": 3,
"lawful": "Crusader",
"neutral": "Invoker",
"to": 4
},
{
"chaotic": "Cultist",
"from": 5,
"lawful": "Templar",
"neutral": "Haruspex",
"to": 6
},
{
"chaotic": "Scourge",
"from": 7,
"lawful": "Champion",
"neutral": "Mystic",
"to": 8
},
{
"chaotic": "Chaos Knight",
"from": 9,
"lawful": "Paladin",
"neutral": "Oracle",
"to": 10
}
],
"weapons": [
"Compendium.shadowdark.gear.Item.9eTpsuEuzL3Vaxge",
"Compendium.shadowdark.gear.Item.C3mc5OlKPSJNMrng",
Expand Down
37 changes: 37 additions & 0 deletions data/packs/classes.db/ranger__SIEizdu3Jv9DHY1m.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,43 @@
"Compendium.shadowdark.talents.Item.cUz7U8n0amQd5QQM",
"Compendium.shadowdark.talents.Item.ZjCvQZ7k4hBa9y2I"
],
"titles": [
{
"chaotic": "Hood",
"from": 1,
"lawful": "Wanderer",
"neutral": "Stranger",
"to": 2
},
{
"chaotic": "Outlaw",
"from": 3,
"lawful": "Strider",
"neutral": "Wayfarer",
"to": 4
},
{
"chaotic": "Fugitive",
"from": 5,
"lawful": "Warden",
"neutral": "Outlander",
"to": 6
},
{
"chaotic": "Exile",
"from": 7,
"lawful": "Guardian",
"neutral": "Recluse",
"to": 8
},
{
"chaotic": "Pariah",
"from": 9,
"lawful": "Sentinel",
"neutral": "Hermit",
"to": 10
}
],
"weapons": [
"Compendium.shadowdark.gear.Item.9eTpsuEuzL3Vaxge",
"Compendium.shadowdark.gear.Item.brIFMH0sOVmqX02N",
Expand Down
37 changes: 37 additions & 0 deletions data/packs/classes.db/thief__C6wkCa2w5dlgSq7f.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,43 @@
"Compendium.shadowdark.talents.Item.KLDZKFY6SrqQKSva",
"Compendium.shadowdark.talents.Item.TiaXUSTLoJpjfyxD"
],
"titles": [
{
"chaotic": "Thug",
"from": 1,
"lawful": "Footpad",
"neutral": "Robber",
"to": 2
},
{
"chaotic": "Cutthroat",
"from": 3,
"lawful": "Burglar",
"neutral": "Outlaw",
"to": 4
},
{
"chaotic": "Shadow",
"from": 5,
"lawful": "Rook",
"neutral": "Rogue",
"to": 6
},
{
"chaotic": "Assassin",
"from": 7,
"lawful": "Underboss",
"neutral": "Renegade",
"to": 8
},
{
"chaotic": "Wraith",
"from": 9,
"lawful": "Boss",
"neutral": "Bandit King/Queen",
"to": 10
}
],
"weapons": [
"Compendium.shadowdark.gear.Item.C3mc5OlKPSJNMrng",
"Compendium.shadowdark.gear.Item.eeVEJexfirwWzOVu",
Expand Down
37 changes: 37 additions & 0 deletions data/packs/classes.db/wizard__035nuVkU9q2wtMPs.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,43 @@
"Compendium.shadowdark.talents.Item.LFMT8qZ6ZL3LvYFM",
"Compendium.shadowdark.talents.Item.Td6iQW4hVJLZLVLi"
],
"titles": [
{
"chaotic": "Adept",
"from": 1,
"lawful": "Apprentice",
"neutral": "Shaman",
"to": 2
},
{
"chaotic": "Channeler",
"from": 3,
"lawful": "Conjurer",
"neutral": "Seer",
"to": 4
},
{
"chaotic": "Witch/Warlock",
"from": 5,
"lawful": "Arcanist",
"neutral": "Warden",
"to": 6
},
{
"chaotic": "Diabolist",
"from": 7,
"lawful": "Mage",
"neutral": "Sage",
"to": 8
},
{
"chaotic": "Sorcerer",
"from": 9,
"lawful": "Archmage",
"neutral": "Druid",
"to": 10
}
],
"weapons": [
"Compendium.shadowdark.gear.Item.9eTpsuEuzL3Vaxge",
"Compendium.shadowdark.gear.Item.C3mc5OlKPSJNMrng"
Expand Down
4 changes: 4 additions & 0 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ SHADOWDARK.class.talents_table.label: Class Talents Table
SHADOWDARK.class.talents.label: Talents
SHADOWDARK.class.talents.prompt: Select Talent...
SHADOWDARK.class.thief: Thief
SHADOWDARK.class.titles.levels.from.label: From
SHADOWDARK.class.titles.levels.label: Levels
SHADOWDARK.class.titles.levels.to.label: To
SHADOWDARK.class.weapons.all.label: All Weapons
SHADOWDARK.class.weapons.label: Weapons
SHADOWDARK.class.weapons.prompt: Select Weapon...
Expand Down Expand Up @@ -488,6 +491,7 @@ SHADOWDARK.sheet.item.tab.details: Details
SHADOWDARK.sheet.item.tab.effects: Effects
SHADOWDARK.sheet.item.tab.light: Light
SHADOWDARK.sheet.item.tab.magic: Magic
SHADOWDARK.sheet.item.tab.titles: Titles
SHADOWDARK.sheet.npc.attacks_label: Attacks
SHADOWDARK.sheet.npc.dark_adapted: Dark-Adapted
SHADOWDARK.sheet.npc.description_label: Description
Expand Down
47 changes: 47 additions & 0 deletions scss/sheets/items/_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -438,4 +438,51 @@
box-shadow: 0 0 5px var(--color-shadow-primary);
}
}

.titles-list {
input {
font-size: 13px;
}

table {
@include p-reset;
font-family: "Montserrat-Medium";
font-size: 16px;
text-align: center;
border: none;

& td:first-child {
padding-left: 8px;
text-align: left;
}

& tr {
vertical-align: top;
}

& tr:first-child,
& tr:nth-child(2) {
background-color: #00000020;

& td {
@include p-reset;
}
}

// Only highlight on hover rows that have actual items in them,
// not the section headers or header/footer rows
//
& tr:not(:first-child,
:nth-child(2),
:nth-last-child(1)
) {
font-size: 13px;

&:hover {
background-color: var(--background-highlight)
}
}

}
}
}
10 changes: 10 additions & 0 deletions system/src/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ SHADOWDARK.RANGES_SHORT = {
self: "SHADOWDARK.range.self_short",
};

SHADOWDARK.OFFICIAL_SOURCES = {
"cursed-scroll-1": "Cursed Scroll Vol.1, Diablerie!",
"cursed-scroll-2": "Cursed Scroll Vol.2, Red Sands",
"cursed-scroll-3": "Cursed Scroll Vol.3, Midnight Sun",
"quickstart-game-master-guide": "Quickstart: Game Master Guide",
"quickstart-player-guide": "Quickstart: Player Guide",
"bard-and-ranger": "Shadowdark RPG: Bard and Ranger",
"core-rules": "Shadowdark RPG: Core Rules",
};

SHADOWDARK.SPELLCASTING_ABILITY = {
priest: "wis",
wizard: "int",
Expand Down
11 changes: 6 additions & 5 deletions system/src/documents/ActorSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -894,12 +894,13 @@ export default class ActorSD extends Actor {
}

// Add AC from effects
newArmorClass += parseInt(this.system.bonuses.acBonus, 10);
this.system.attributes.ac.value =
newArmorClass + parseInt(this.system.bonuses.acBonus, 10);

await Actor.updateDocuments([{
_id: this._id,
"system.attributes.ac.value": newArmorClass,
}]);
// await Actor.updateDocuments([{
// _id: this._id,
// "system.attributes.ac.value": newArmorClass,
// }]);

return this.system.attributes.ac.value;
}
Expand Down
Loading

0 comments on commit dc4b1c1

Please sign in to comment.