Compare commits

...

4 Commits

Author SHA1 Message Date
cb54f6eda3 Add hotbar 2022-08-04 16:28:30 +02:00
f55fc1d59a Add hotbar 2022-08-04 16:28:10 +02:00
ea06648a67 Add vehicles item 2022-08-04 10:26:24 +02:00
49c3560771 Add shield skills 2022-08-04 10:25:40 +02:00
36 changed files with 270 additions and 32 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -45,6 +45,8 @@ export class CrucibleActorSheet extends ActorSheet {
spells: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getLore())), spells: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getLore())),
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ), equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
equippedWeapons: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquippedWeapons()) ), equippedWeapons: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquippedWeapons()) ),
equippedArmor: this.actor.getEquippedArmor(),
equippedShield: this.actor.getEquippedShield(),
feats: duplicate(this.actor.getFeats()), feats: duplicate(this.actor.getFeats()),
subActors: duplicate(this.actor.getSubActors()), subActors: duplicate(this.actor.getSubActors()),
race: duplicate(this.actor.getRace()), race: duplicate(this.actor.getRace()),
@ -150,6 +152,13 @@ export class CrucibleActorSheet extends ActorSheet {
const skillId = li.data("item-id") const skillId = li.data("item-id")
this.actor.rollWeapon(skillId) this.actor.rollWeapon(skillId)
}); });
html.find('.roll-armor-die').click((event) => {
this.actor.rollArmorDie()
});
html.find('.roll-shield-die').click((event) => {
this.actor.rollShieldDie()
});
html.find('.roll-save').click((event) => { html.find('.roll-save').click((event) => {
const saveKey = $(event.currentTarget).data("save-key") const saveKey = $(event.currentTarget).data("save-key")
this.actor.rollSave(saveKey) this.actor.rollSave(saveKey)

View File

@ -146,12 +146,27 @@ export class CrucibleActor extends Actor {
CrucibleUtility.sortArrayObjectsByName(comp) CrucibleUtility.sortArrayObjectsByName(comp)
return comp; return comp;
} }
getEquippedArmor() {
let comp = this.data.items.find(item => item.type == 'armor' && item.data.data.equipped)
if (comp) {
return duplicate(comp)
}
return undefined
}
/* -------------------------------------------- */ /* -------------------------------------------- */
getShields() { getShields() {
let comp = duplicate(this.data.items.filter(item => item.type == 'shield') || []); let comp = duplicate(this.data.items.filter(item => item.type == 'shield') || []);
CrucibleUtility.sortArrayObjectsByName(comp) CrucibleUtility.sortArrayObjectsByName(comp)
return comp; return comp;
} }
getEquippedShield() {
let comp = this.data.items.find(item => item.type == 'shield' && item.data.data.equipped)
if (comp) {
return duplicate(comp)
}
return undefined
}
/* -------------------------------------------- */
getRace() { getRace() {
let race = this.data.items.filter(item => item.type == 'race') let race = this.data.items.filter(item => item.type == 'race')
return race[0] ?? []; return race[0] ?? [];
@ -205,8 +220,22 @@ export class CrucibleActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async equipItem(itemId) { async equipItem(itemId) {
let item = this.data.items.find(item => item.id == itemId); let item = this.data.items.find(item => item.id == itemId)
if (item && item.data.data) { if (item && item.data.data) {
if (item.type == "armor") {
let armor = this.data.items.find(item => item.id != itemId && item.type == "armor" && item.data.data.equipped)
if (armor) {
ui.notifications.warn("You already have an armor equipped!")
return
}
}
if (item.type == "shield") {
let shield = this.data.items.find(item => item.id != itemId && item.type == "shield" && item.data.data.equipped)
if (shield) {
ui.notifications.warn("You already have a shield equipped!")
return
}
}
let update = { _id: item.id, "data.equipped": !item.data.data.equipped }; let update = { _id: item.id, "data.equipped": !item.data.data.equipped };
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
} }
@ -236,15 +265,18 @@ export class CrucibleActor extends Actor {
getSaveRoll() { getSaveRoll() {
return { return {
reflex: { reflex: {
"label": "Reflex", "label": "Reflex Save",
"img": "systems/fvtt-crucible-rpg/images/icons/saves/reflex_save.webp",
"value": this.data.data.abilities.agi.value + this.data.data.abilities.wit.value "value": this.data.data.abilities.agi.value + this.data.data.abilities.wit.value
}, },
fortitude: { fortitude: {
"label": "Fortitude", "label": "Fortitude Save",
"img": "systems/fvtt-crucible-rpg/images/icons/saves/fortitude_save.webp",
"value": this.data.data.abilities.str.value + this.data.data.abilities.con.value "value": this.data.data.abilities.str.value + this.data.data.abilities.con.value
}, },
willpower: { willpower: {
"label": "Willpower", "label": "Willpower Save",
"img": "systems/fvtt-crucible-rpg/images/icons/saves/will_save.webp",
"value": this.data.data.abilities.int.value + this.data.data.abilities.cha.value "value": this.data.data.abilities.int.value + this.data.data.abilities.cha.value
} }
} }
@ -538,6 +570,30 @@ export class CrucibleActor extends Actor {
} }
} }
} }
/* -------------------------------------------- */
rollShieldDie() {
let shield = this.getEquippedShield()
if (shield) {
shield = duplicate(shield)
let rollData = this.getCommonRollData()
rollData.mode = "shield"
rollData.shield = shield
rollData.img = shield.img
this.startRoll(rollData)
}
}
/* -------------------------------------------- */
rollArmorDie() {
let armor = this.getEquippedArmor()
if (armor) {
armor = duplicate(armor)
let diceValue = armor.data.absorprionroll
}
}
/* -------------------------------------------- */ /* -------------------------------------------- */
rollSave(saveKey) { rollSave(saveKey) {
let saves = this.getSaveRoll() let saves = this.getSaveRoll()

View File

@ -7,11 +7,11 @@ import { CrucibleRollDialog } from "./crucible-roll-dialog.js";
export class CrucibleCommands { export class CrucibleCommands {
static init() { static init() {
if (!game.system.crucible.commands) { if (!game.system.cruciblerpg.commands) {
const crucibleCommands = new CrucibleCommands(); const crucibleCommands = new CrucibleCommands();
//crucibleCommands.registerCommand({ path: ["/char"], func: (content, msg, params) => crucibleCommands.createChar(msg), descr: "Create a new character" }); //crucibleCommands.registerCommand({ path: ["/char"], func: (content, msg, params) => crucibleCommands.createChar(msg), descr: "Create a new character" });
//crucibleCommands.registerCommand({ path: ["/pool"], func: (content, msg, params) => crucibleCommands.poolRoll(msg), descr: "Generic Roll Window" }); //crucibleCommands.registerCommand({ path: ["/pool"], func: (content, msg, params) => crucibleCommands.poolRoll(msg), descr: "Generic Roll Window" });
game.system.crucible.commands = crucibleCommands; game.system.cruciblerpg.commands = crucibleCommands;
} }
} }
constructor() { constructor() {

View File

@ -0,0 +1,86 @@
export class CrucibleHotbar {
/**
* Create a macro when dropping an entity on the hotbar
* Item - open roll dialog for item
* Actor - open actor sheet
* Journal - open journal sheet
*/
static init( ) {
Hooks.on("hotbarDrop", async (bar, documentData, slot) => {
// Create item macro if rollable item - weapon, spell, prayer, trait, or skill
if (documentData.type == "Item") {
console.log("Drop done !!!", bar, documentData, slot)
let item = documentData.data
let command = `game.system.cruciblerpg.CrucibleHotbar.rollMacro("${item.name}", "${item.type}");`
let macro = game.macros.contents.find(m => (m.name === item.name) && (m.command === command))
if (!macro) {
macro = await Macro.create({
name: item.name,
type: "script",
img: item.img,
command: command
}, { displaySheet: false })
}
game.user.assignHotbarMacro(macro, slot);
}
// Create a macro to open the actor sheet of the actor dropped on the hotbar
else if (documentData.type == "Actor") {
let actor = game.actors.get(documentData.id);
let command = `game.actors.get("${documentData.id}").sheet.render(true)`
let macro = game.macros.contents.find(m => (m.name === actor.name) && (m.command === command));
if (!macro) {
macro = await Macro.create({
name: actor.data.name,
type: "script",
img: actor.data.img,
command: command
}, { displaySheet: false })
game.user.assignHotbarMacro(macro, slot);
}
}
// Create a macro to open the journal sheet of the journal dropped on the hotbar
else if (documentData.type == "JournalEntry") {
let journal = game.journal.get(documentData.id);
let command = `game.journal.get("${documentData.id}").sheet.render(true)`
let macro = game.macros.contents.find(m => (m.name === journal.name) && (m.command === command));
if (!macro) {
macro = await Macro.create({
name: journal.data.name,
type: "script",
img: "",
command: command
}, { displaySheet: false })
game.user.assignHotbarMacro(macro, slot);
}
}
return false;
});
}
/** Roll macro */
static rollMacro(itemName, itemType, bypassData) {
const speaker = ChatMessage.getSpeaker()
let actor
if (speaker.token) actor = game.actors.tokens[speaker.token]
if (!actor) actor = game.actors.get(speaker.actor)
if (!actor) {
return ui.notifications.warn(`Select your actor to run the macro`)
}
let item = actor.items.find(it => it.name === itemName && it.type == itemType)
if (!item ) {
return ui.notifications.warn(`Unable to find the item of the macro in the current actor`)
}
// Trigger the item roll
if (item.type === "weapon") {
return actor.rollWeapon( item.id)
}
if (item.type === "skill") {
return actor.rollSkill( item.id)
}
}
}

View File

@ -64,6 +64,7 @@ export class CrucibleItemSheet extends ItemSheet {
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
weaponSkills: CrucibleUtility.getWeaponSkills(), weaponSkills: CrucibleUtility.getWeaponSkills(),
shieldSkills: CrucibleUtility.getShieldSkills(),
data: itemData, data: itemData,
limited: this.object.limited, limited: this.object.limited,
options: this.options, options: this.options,

View File

@ -15,6 +15,7 @@ import { CrucibleNPCSheet } from "./crucible-npc-sheet.js";
import { CrucibleUtility } from "./crucible-utility.js"; import { CrucibleUtility } from "./crucible-utility.js";
import { CrucibleCombat } from "./crucible-combat.js"; import { CrucibleCombat } from "./crucible-combat.js";
import { CrucibleItem } from "./crucible-item.js"; import { CrucibleItem } from "./crucible-item.js";
import { CrucibleHotbar } from "./crucible-hotbar.js"
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Foundry VTT Initialization */ /* Foundry VTT Initialization */
@ -22,8 +23,13 @@ import { CrucibleItem } from "./crucible-item.js";
/************************************************************************************/ /************************************************************************************/
Hooks.once("init", async function () { Hooks.once("init", async function () {
console.log(`Initializing Crucible RPG`); console.log(`Initializing Crucible RPG`);
game.system.cruciblerpg = {
CrucibleHotbar
}
/* -------------------------------------------- */ /* -------------------------------------------- */
// preload handlebars templates // preload handlebars templates
CrucibleUtility.preloadHandlebarsTemplates(); CrucibleUtility.preloadHandlebarsTemplates();
@ -56,7 +62,6 @@ Hooks.once("init", async function () {
CONFIG.Actor.documentClass = CrucibleActor CONFIG.Actor.documentClass = CrucibleActor
CONFIG.Item.documentClass = CrucibleItem CONFIG.Item.documentClass = CrucibleItem
//CONFIG.Token.objectClass = CrucibleToken //CONFIG.Token.objectClass = CrucibleToken
game.system.crucible = { };
/* -------------------------------------------- */ /* -------------------------------------------- */
// Register sheet application classes // Register sheet application classes
@ -67,8 +72,7 @@ Hooks.once("init", async function () {
Items.unregisterSheet("core", ItemSheet); Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("fvtt-crucible", CrucibleItemSheet, { makeDefault: true }); Items.registerSheet("fvtt-crucible", CrucibleItemSheet, { makeDefault: true });
CrucibleUtility.init(); CrucibleUtility.init()
}); });
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -103,6 +107,7 @@ Hooks.once("ready", function () {
welcomeMessage(); welcomeMessage();
CrucibleUtility.ready() CrucibleUtility.ready()
CrucibleHotbar.init()
}) })
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -55,12 +55,17 @@ export class CrucibleUtility {
static getWeaponSkills() { static getWeaponSkills() {
return duplicate(this.weaponSkills) return duplicate(this.weaponSkills)
} }
/*-------------------------------------------- */
static getShieldSkills() {
return duplicate(this.shieldSkills)
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static async ready() { static async ready() {
const skills = await CrucibleUtility.loadCompendium("fvtt-crucible-rpg.skills") const skills = await CrucibleUtility.loadCompendium("fvtt-crucible-rpg.skills")
this.skills = skills.map(i => i.toObject()) this.skills = skills.map(i => i.toObject())
this.weaponSkills = duplicate( this.skills.filter( item => item.data.isweaponskill)) this.weaponSkills = duplicate( this.skills.filter( item => item.data.isweaponskill))
this.shieldSkills = duplicate( this.skills.filter( item => item.data.isshieldskill))
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -280,6 +285,9 @@ export class CrucibleUtility {
if ( rollData.save) { if ( rollData.save) {
startFormula = String(rollData.save.value) + "d6cs>=5" startFormula = String(rollData.save.value) + "d6cs>=5"
} }
if ( rollData.shield) {
startFormula = "1" + String(rollData.shield.data.shielddie) + "cs>=5"
}
diceFormula = startFormula diceFormula = startFormula
// skill => 2 // skill => 2
@ -339,8 +347,10 @@ export class CrucibleUtility {
// armor => 12 // armor => 12
let skillArmorPenalty = 0 let skillArmorPenalty = 0
for (let armor of rollData.armors) { for (let armor of rollData.armors) {
if (armor.data.equipped) {
skillArmorPenalty += armor.data.skillpenalty skillArmorPenalty += armor.data.skillpenalty
} }
}
if (rollData.skill && rollData.skill.data.armorpenalty && skillArmorPenalty > 0 ) { if (rollData.skill && rollData.skill.data.armorpenalty && skillArmorPenalty > 0 ) {
rollData.skillArmorPenalty = skillArmorPenalty rollData.skillArmorPenalty = skillArmorPenalty
diceFormula += `- ${skillArmorPenalty}d8cs>=5` diceFormula += `- ${skillArmorPenalty}d8cs>=5`

0
packs/action-tokens.db Executable file → Normal file
View File

0
packs/armor.db Executable file → Normal file
View File

0
packs/classpowers.db Executable file → Normal file
View File

0
packs/conditions.db Executable file → Normal file
View File

0
packs/equipment.db Executable file → Normal file
View File

0
packs/feats.db Executable file → Normal file
View File

0
packs/lore-air.db Executable file → Normal file
View File

0
packs/lore-earth.db Executable file → Normal file
View File

0
packs/lore-fire.db Executable file → Normal file
View File

0
packs/lore-shadow.db Executable file → Normal file
View File

0
packs/lore-water.db Executable file → Normal file
View File

0
packs/monster-powers.db Executable file → Normal file
View File

0
packs/poisons.db Executable file → Normal file
View File

0
packs/shields.db Executable file → Normal file
View File

2
packs/skills.db Executable file → Normal file
View File

@ -13,7 +13,7 @@
{"_id":"Y4o571K5DQseDaGT","name":"Swim","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Swim.webp","data":{"ability":"str","armorpenalty":true,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Kick you feet and don't forget to breathe!</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}} {"_id":"Y4o571K5DQseDaGT","name":"Swim","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Swim.webp","data":{"ability":"str","armorpenalty":true,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Kick you feet and don't forget to breathe!</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"ZfIwXZwaBKaVoYbG","name":"Athletics","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Athletics.png","data":{"ability":"agi","armorpenalty":true,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Your ability to run, jump, and climb; a measure of your physical coordination.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}} {"_id":"ZfIwXZwaBKaVoYbG","name":"Athletics","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Athletics.png","data":{"ability":"agi","armorpenalty":true,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Your ability to run, jump, and climb; a measure of your physical coordination.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"cc74gHSQK4hRR8Vj","name":"Brawn","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Brawn.png","data":{"ability":"str","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>A combination of your Size and Strength.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}} {"_id":"cc74gHSQK4hRR8Vj","name":"Brawn","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Brawn.png","data":{"ability":"str","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>A combination of your Size and Strength.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"fJjXMpUILcN983XV","name":"Axe","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/icon_skill.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":true,"isweaponskill":true,"isfeatdie":false,"islore":false,"skilltype":"complex","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"","level":2},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.Cnw8keaxD1SI3vun"}}} {"_id":"fJjXMpUILcN983XV","name":"Axe","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/icon_skill.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":true,"isweaponskill":true,"isshieldskill":true,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"complex","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"","isshiedskill":false,"level":2},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.Cnw8keaxD1SI3vun"}}}
{"_id":"fegRI4Vsyr0Us1Ga","name":"Research","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Research.webp","data":{"ability":"int","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Give me a moment to look that up....</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}} {"_id":"fegRI4Vsyr0Us1Ga","name":"Research","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Research.webp","data":{"ability":"int","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Give me a moment to look that up....</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"i8eeE2I9vv2kHwdJ","name":"Shadow Lore","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Shadow%20Lore.webp","data":{"ability":"int","armorpenalty":true,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>You can cast Shadow Lore spells.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}} {"_id":"i8eeE2I9vv2kHwdJ","name":"Shadow Lore","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Shadow%20Lore.webp","data":{"ability":"int","armorpenalty":true,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>You can cast Shadow Lore spells.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"lfB80K2lFSzQH442","name":"Intuition","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Intuition.png","data":{"ability":"wit","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>I see what you did there.&nbsp; I think you're up to something....</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}} {"_id":"lfB80K2lFSzQH442","name":"Intuition","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Intuition.png","data":{"ability":"wit","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>I see what you did there.&nbsp; I think you're up to something....</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}

0
packs/trickstraps.db Executable file → Normal file
View File

0
packs/weapons.db Executable file → Normal file
View File

View File

@ -581,7 +581,9 @@ ul, li {
.sheet-competence-img { .sheet-competence-img {
width: 24px; width: 24px;
max-width: 24px;
height: 24px; height: 24px;
max-height: 24px;
flex-grow: 0; flex-grow: 0;
margin-right: 0.25rem; margin-right: 0.25rem;
} }

View File

@ -202,17 +202,17 @@
] ]
} }
], ],
"primaryTokenAttribute": "secondary.health", "primaryTokenAttribute": "secondary.hp",
"secondaryTokenAttribute": "secondary.delirium", "secondaryTokenAttribute": "secondary.effort",
"socket": true, "socket": true,
"styles": [ "styles": [
"styles/simple.css" "styles/simple.css"
], ],
"templateVersion": 12, "templateVersion": 14,
"title": "Crucible RPG", "title": "Crucible RPG",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json", "manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v0.1.20.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v0.1.23.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg", "url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg",
"version": "0.1.20", "version": "0.1.23",
"background" : "./images/ui/crucible_welcome_page.webp" "background" : "./images/ui/crucible_welcome_page.webp"
} }

View File

@ -4,6 +4,7 @@
"templates": { "templates": {
"biodata": { "biodata": {
"biodata": { "biodata": {
"class": "",
"age": 0, "age": 0,
"size": "", "size": "",
"weight": "", "weight": "",
@ -121,6 +122,7 @@
"armorpenalty": false, "armorpenalty": false,
"isproficient": false, "isproficient": false,
"isweaponskill": false, "isweaponskill": false,
"isshieldskill": false,
"isfeatdie": false, "isfeatdie": false,
"issl2": false, "issl2": false,
"islore": false, "islore": false,
@ -147,6 +149,7 @@
}, },
"shield": { "shield": {
"shielddie": "", "shielddie": "",
"skill": "",
"equipped": false, "equipped": false,
"cost": 0, "cost": 0,
"description":"" "description":""

View File

@ -17,6 +17,22 @@
{{/if}} {{/if}}
{{/each}} {{/each}}
</ul> </ul>
<li class="item flexrow list-item" data-attr-key="class">
<span class="ability-label " name="class">
<h4 class="ability-text-white ability-margin">Class</h4>
</span>
<select class="competence-base flexrow" type="text" name="data.biodata.class" value="{{data.biodata.class}}" data-dtype="String">
{{#select data.biodata.class}}
<option value="chaplain">Chaplain</option>
<option value="magus">Magus</option>
<option value="martial">Martial</option>
<option value="skalawag">Skalawag</option>
<option value="warden">Warden</option>
{{/select}}
</select>
</li>
</div> </div>
<div class="ability-item"> <div class="ability-item">
@ -26,6 +42,24 @@
{{> systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html ability=ability key=key}} {{> systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html ability=ability key=key}}
{{/if}} {{/if}}
{{/each}} {{/each}}
{{#if equippedArmor}}
<li class="item flexrow list-item" data-attr-key="class">
<img class="sheet-competence-img" src="{{equippedArmor.img}}" />
<span class="ability-label " name="class">
<h4 class="ability-text-white ability-margin"><a class="roll-armor-die ability-margin">{{equippedArmor.name}}</a></h4>
</span>
</li>
{{/if}}
{{#if equippedShield}}
<li class="item flexrow list-item" data-attr-key="class">
<img class="sheet-competence-img" src="{{equippedShield.img}}" />
<span class="ability-label " name="equippedShield">
<h4 class="ability-text-white ability-margin"><a class="roll-shield-die ability-margin">{{equippedShield.name}}</a></h4>
</span>
</li>
{{/if}}
</ul> </ul>
</div> </div>
@ -54,7 +88,7 @@
{{!-- Skills Tab --}} {{!-- Skills Tab --}}
<div class="tab skills" data-group="primary" data-tab="skills"> <div class="tab skills" data-group="primary" data-tab="skills">
<ul class="stat-list alternate-list"> <ul class="stat-list alternate-list item-list">
<li class="item flexrow list-item items-title-bg"> <li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header"> <span class="item-name-label-header">
<h3><label class="items-title-text">Skills</label></h3> <h3><label class="items-title-text">Skills</label></h3>

View File

@ -26,6 +26,14 @@
</li> </li>
{{/if}} {{/if}}
{{#if shield}}
<li>Shield : {{shield.name}} - {{shield.data.shieldie}}
({{#each roll.terms.0.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
{{#if ability}} {{#if ability}}
<li>Ability : {{ability.label}} - {{ability.value}}d6 <li>Ability : {{ability.label}} - {{ability.value}}d6
({{#each roll.terms.0.results as |die idx|}} ({{#each roll.terms.0.results as |die idx|}}
@ -35,7 +43,7 @@
{{/if}} {{/if}}
{{#if skill}} {{#if skill}}
<li>Skill : {{skill.name}} - {{skill.data.level}}d8 <li>Skill : {{skill.name}} - {{skill.data.skilldice}}
{{#if featSL}} {{#if featSL}}
- with Feat SL +{{featSL}} - with Feat SL +{{featSL}}
{{/if}} {{/if}}
@ -59,14 +67,14 @@
{{/each}}) {{/each}})
</li> </li>
{{/if}} {{/if}}
{{#if (eq advantage "disadvantage1")}} {{#if (eq disadvantage "disadvantage1")}}
<li>1 Disadvantage Die ! <li>1 Disadvantage Die !
&nbsp;({{#each roll.terms.10.results as |die idx|}} &nbsp;({{#each roll.terms.10.results as |die idx|}}
{{die.result}}&nbsp; {{die.result}}&nbsp;
{{/each}}) {{/each}})
</li> </li>
{{/if}} {{/if}}
{{#if (eq advantage "disadvantage2")}} {{#if (eq disadvantage "disadvantage2")}}
<li>2 Disadvantage Dice ! <li>2 Disadvantage Dice !
&nbsp;({{#each roll.terms.10.results as |die idx|}} &nbsp;({{#each roll.terms.10.results as |die idx|}}
{{die.result}}&nbsp; {{die.result}}&nbsp;
@ -101,7 +109,7 @@
{{/if}} {{/if}}
{{#if hasFeatDie}} {{#if hasFeatDie}}
<li>Feature Die : d10 <li>Feat Die : d10
&nbsp;({{#each roll.terms.4.results as |die idx|}} &nbsp;({{#each roll.terms.4.results as |die idx|}}
{{die.result}}&nbsp; {{die.result}}&nbsp;
{{/each}}) {{/each}})

View File

@ -28,6 +28,17 @@
</select> </select>
</li> </li>
<li class="flexrow"><label class="generic-label">Associated skill</label>
<select class="competence-base flexrow" type="text" name="data.skill" value="{{data.skill}}" data-dtype="String">
{{#select data.skill}}
{{#each shieldSkills as |skill idx|}}
<option value="{{skill.name}}">{{skill.name}}</option>
{{/each}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Equipped ?</label> <li class="flexrow"><label class="generic-label">Equipped ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipped" {{checked data.equipped}}/></label> <label class="attribute-value checkbox"><input type="checkbox" name="data.equipped" {{checked data.equipped}}/></label>
</li> </li>

View File

@ -59,6 +59,10 @@
<label class="attribute-value checkbox"><input type="checkbox" name="data.isweaponskill" {{checked data.isweaponskill}}/></label> <label class="attribute-value checkbox"><input type="checkbox" name="data.isweaponskill" {{checked data.isweaponskill}}/></label>
</li> </li>
<li class="flexrow"><label class="generic-label">Is Shield Skill ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.isshieldskill" {{checked data.isshieldskill}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Bonus dice</label> <li class="flexrow"><label class="generic-label">Bonus dice</label>
<select class="competence-base flexrow" type="text" name="data.bonusdice" value="{{data.bonusdice}}" data-dtype="String"> <select class="competence-base flexrow" type="text" name="data.bonusdice" value="{{data.bonusdice}}" data-dtype="String">
{{#select data.bonusdice}} {{#select data.bonusdice}}

View File

@ -18,8 +18,10 @@
{{#each saveRolls as |save key|}} {{#each saveRolls as |save key|}}
<li class="item flexrow list-item" data-attr-key="{{key}}"> <li class="item flexrow list-item" data-attr-key="{{key}}">
<img class="sheet-competence-img" src="{{save.img}}" />
<span class="ability-label" name="{{key}}"> <span class="ability-label" name="{{key}}">
<h4 class="ability-text-white ability-margin"><a class="roll-save ability-margin" data-save-key="{{key}}">{{save.label}} {{save.value}}</a></h4> <h4 class="ability-text-white ability-margin">
<a class="roll-save ability-margin" data-save-key="{{key}}">{{save.label}} {{save.value}}</a></h4>
</span> </span>
</li> </li>
{{/each}} {{/each}}

View File

@ -8,6 +8,13 @@
<div class="flexcol"> <div class="flexcol">
{{#if shield}}
<div class="flexrow">
<span class="roll-dialog-label">{{shield.name}} : </span>
<span class="roll-dialog-label">{{shield.data.shielddie}}</span>
</div>
{{/if}}
{{#if save}} {{#if save}}
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">{{save.label}} : </span> <span class="roll-dialog-label">{{save.label}} : </span>