diff --git a/TODO b/TODO index 3c6bcf5..b73788f 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,5 @@ -- Add upgrade points count for Crew and Character!!! +- Add upgrade points count for Crew and Character +- Restrict adding improper Items to sheets (like character abilities added to crew) or add a list where they can be removed if added by mistake - Add Custom Notes (item or field) - Add values to classes default attributes - Add friends-and-foes diff --git a/module/blades.js b/module/blades.js index 4960fac..ea7a11a 100644 --- a/module/blades.js +++ b/module/blades.js @@ -114,8 +114,6 @@ Hooks.once("init", async function() { // Enrich the HTML replace /n with
Handlebars.registerHelper('html', (options) => { - let html = ""; - console.log(options); let text = options.hash['text'].replace(/\n/g, "
"); return new Handlebars.SafeString(text);; diff --git a/module/crew-sheet.js b/module/crew-sheet.js index 4cf7cb8..179c075 100644 --- a/module/crew-sheet.js +++ b/module/crew-sheet.js @@ -45,6 +45,12 @@ export class BladesCrewSheet extends ActorSheet { activateListeners(html) { super.activateListeners(html); + // Activate tabs + const tabs = new TabsV2({navSelector: ".tabs", contentSelector: ".section", initial: "turfs"}); + + // @todo Fix the error in TabsV2 + // tabs.bind(html); + // Everything below here is only needed if the sheet is editable if (!this.options.editable) return; diff --git a/packs/crew_abilities.db b/packs/crew_abilities.db new file mode 100644 index 0000000..303c714 --- /dev/null +++ b/packs/crew_abilities.db @@ -0,0 +1,7 @@ +{"_id":"7LimsX68eVz2ECaD","name":"Glory Incarnate","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Your deity sometimes manifests in the physical world. This can be a great boon, but the priorities and values of a god are not those of mortals. You have been warned.","class":"Cult","price":"1"},"folder":null,"sort":500001,"flags":{}} +{"_id":"95RrxTNgM9uYOY1i","name":"Conviction","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Each PC gains an additional Vice: Worship. When you indulge this vice and bring a pleasing sacrifice, you don't overindulge if you clear excess stress. In addition, your deity will assist any one action roll you make - from now until you indulge this vice again.","class":"Cult","price":"1"},"folder":null,"sort":400001,"flags":{}} +{"_id":"9PJwujwKH1ZUXNVp","name":"Sealed in Blood","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Each human sacrifice yields -3 stress cost for any ritual you perform.","class":"Cult","price":"1"},"folder":null,"sort":600001,"flags":{}} +{"_id":"NT9JPbws9bCYPXs7","name":"Zealotry","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Your cohorts have abandoned their reason to devote themselves to the cult. They will undertake any service, no matter how dangerous or strange. They gain +1d to rolls against enemies of the faith.","class":"Cult","price":"1"},"folder":null,"sort":700001,"flags":{}} +{"_id":"XDZdnr7aRd2o1Kwh","name":"Anointed","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"You get +1d to resistance rolls against supernatural threats. You get +1d to healing rolls when you have supernatural harm.","class":"Cult","price":"1"},"folder":null,"sort":200001,"flags":{}} +{"_id":"p6yH9EEOqX2IT9Nz","name":"Bound in Darkness","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"You may use teamwork with any cult member, regardless of the distance separating you. By taking 1 stress, your whispered message is heard by every cultist.","class":"Cult","price":"1"},"folder":null,"sort":300001,"flags":{}} +{"_id":"stEQMMWDe8jBxkZk","name":"Chosen","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_ability","data":{"description":"Each PC may add +1 action rating to Attune, Study, or Sway (up to a max rating of 3).","class":"Cult","price":"1"},"folder":null,"sort":100001,"flags":{}} diff --git a/packs/crew_upgrades.db b/packs/crew_upgrades.db index 23ea0d8..376a322 100644 --- a/packs/crew_upgrades.db +++ b/packs/crew_upgrades.db @@ -1,2 +1,2 @@ {"_id":"EhUz7EZZP0B5IOYn","name":"Vault 1","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_upgrade","data":{"description":"Adds the Vault providing additional 4 Coin space","class":"","price":"1","logic":"{\"attribute\":\"data.vault.max\",\"operator\":\"addition\",\"value\":4,\"requirement\":\"\"}","crew_type":""},"folder":null,"sort":100001,"flags":{}} -{"_id":"RmjU5DHgecia43Cf","name":"Vault 2","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_upgrade","data":{"description":"Extend the Vault to additional +8 coins","class":"","price":"1","logic":"{\"attribute\":\"data.vault.max\",\"operator\":\"addition\",\"value\":8,\"requirement\":\"Vault 1\"}","crew_type":""},"folder":null,"sort":200001,"flags":{}} \ No newline at end of file +{"_id":"RmjU5DHgecia43Cf","name":"Vault 2","permission":{"default":0,"BwbqQh8sHfeKmUax":3},"type":"crew_upgrade","data":{"description":"Extend the Vault to additional +8 coins","class":"","price":"1","logic":"{\"attribute\":\"data.vault.max\",\"operator\":\"addition\",\"value\":8,\"requirement\":\"Vault 1\"}","crew_type":""},"folder":null,"sort":200001,"flags":{}} diff --git a/scss/mixin.scss b/scss/mixin.scss index b595f4c..aa6e20a 100644 --- a/scss/mixin.scss +++ b/scss/mixin.scss @@ -100,7 +100,7 @@ display: flex; $default_color: white; - $accent_color: grey; + $accent_color: gold; $circle_border_color: black; label { diff --git a/scss/style.scss b/scss/style.scss index 4d7ab4f..1bba797 100644 --- a/scss/style.scss +++ b/scss/style.scss @@ -389,16 +389,17 @@ $red: red; #crew-hold { border-top: 3px solid black; @include toothradio_single(17px, 50px, "assets/teeth/stresstooth-halfgrey.png", "assets/teeth/stresstooth-red.png"); - width: 220px; + width: 221px; } #crew-tier { background-color: $gray; - height: 30px; + height: 33px; width: 145px; display: flex; align-items: center; + border-top: 3px solid black; @include custom_radio_round(18px, gray, $lightgray, black); diff --git a/styles/blades.css b/styles/blades.css index 8ee9595..10733de 100644 --- a/styles/blades.css +++ b/styles/blades.css @@ -443,7 +443,7 @@ * .coins label { height: 15px; width: 15px; - background-color: grey; + background-color: gold; vertical-align: middle; border: 1px solid black; } @@ -457,7 +457,7 @@ background-color: white; } * .coins input:checked + label { - background-color: grey; + background-color: gold; } * .coins label { margin-right: 3px; @@ -481,7 +481,7 @@ * .crew-coins label { height: 15px; width: 15px; - background-color: grey; + background-color: gold; vertical-align: middle; border: 1px solid black; } @@ -495,7 +495,7 @@ background-color: white; } * .crew-coins input:checked + label { - background-color: grey; + background-color: gold; } * .crew-coins label { margin-right: 3px; @@ -685,7 +685,7 @@ border-top: 3px solid black; display: flex; /* Hide the browser's default checkbox */ - width: 220px; + width: 221px; } * #crew-hold label { height: 50px; @@ -706,10 +706,11 @@ } * #crew-tier { background-color: #999; - height: 30px; + height: 33px; width: 145px; display: flex; align-items: center; + border-top: 3px solid black; display: flex; /* Hide the browser's default checkbox */ } diff --git a/system.json b/system.json index 0f714a0..d20ae12 100644 --- a/system.json +++ b/system.json @@ -77,6 +77,13 @@ "system": "blades-in-the-dark", "path": "./packs/crew_upgrades.db", "entity": "Item" + }, + { + "name": "Crew Abilities", + "label": "Crew Abilities", + "system": "blades-in-the-dark", + "path": "./packs/crew_abilities.db", + "entity": "Item" } ] } diff --git a/template.json b/template.json index 44ca421..7ce532d 100644 --- a/template.json +++ b/template.json @@ -86,7 +86,7 @@ } }, "Item": { - "types": ["item", "class", "ability", "heritage", "background", "vice", "crew_upgrade", "cohort", "crew_type", "crew_feature", "crew_upgrade"], + "types": ["item", "class", "ability", "heritage", "background", "vice", "crew_upgrade", "cohort", "crew_type", "crew_feature", "crew_upgrade", "crew_ability"], "templates": { "default": { "description": "" @@ -147,6 +147,9 @@ "templates": ["ability", "logic"], "crew_type": "" }, + "crew_ability": { + "templates": ["ability"] + }, "crew_type": { "description": "", "experience_clues": "", diff --git a/templates/crew-sheet.html b/templates/crew-sheet.html index f6e2446..cfd83cf 100644 --- a/templates/crew-sheet.html +++ b/templates/crew-sheet.html @@ -32,20 +32,41 @@ -
- {{#multiboxes data.tier}} - - - - - - - - - - - {{/multiboxes}} + +
+ +
+
Hold
+ {{#multiboxes data.hold}} +
+
Weak
+ + +
+
+
Strong
+ + +
+ {{/multiboxes}} +
+ +
+ {{#multiboxes data.tier}} + + + + + + + + + + + {{/multiboxes}} +
+
@@ -179,22 +200,6 @@
-
-
Hold
- {{#multiboxes data.hold}} -
-
Weak
- - -
-
-
Strong
- - -
- {{/multiboxes}} -
-
{{#each actor.items as |item id|}} {{#eq item.type "crew_type"}} @@ -202,6 +207,11 @@ {{/eq}} {{/each}}
+
@@ -231,7 +241,7 @@ {{!-- Crew Type --}} -
+
{{#each actor.items as |item id|}} {{#eq item.type "crew_type"}}
@@ -241,7 +251,7 @@ {{/each}}
-
+
{{!-- Crew Upgrades --}}
@@ -252,8 +262,30 @@ {{#eq item.type "crew_upgrade"}}
- -
{{item.name}}
+
{{item.name}}
+
{{item.data.description}}
+
+ +
+ {{/eq}} + {{/each}} +
+ +
+ +
+ + {{!-- Crew Upgrades --}} +
+
+

+
+ {{#each actor.items as |item id|}} + {{#eq item.type "crew_ability"}} +
+
+
{{item.name}}
+
{{item.data.description}}
diff --git a/templates/items/ability.html b/templates/items/ability.html index c2d357b..9f6249b 100644 --- a/templates/items/ability.html +++ b/templates/items/ability.html @@ -10,6 +10,8 @@
+ + diff --git a/templates/items/crew_ability.html b/templates/items/crew_ability.html new file mode 100644 index 0000000..9f6249b --- /dev/null +++ b/templates/items/crew_ability.html @@ -0,0 +1,17 @@ +
+
+ +
+

+
+
+ + {{!-- Sheet Body --}} +
+ +
+ + + + +