Add shield skills

This commit is contained in:
sladecraven 2022-08-04 10:25:40 +02:00
parent dfadc5e1ca
commit 49c3560771
32 changed files with 128 additions and 21 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,15 @@ 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) => {
//TODO
ui.notifications.warn("Not implemented")
});
html.find('.roll-shield-die').click((event) => {
//TODO
ui.notifications.warn("Not implemented")
});
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

@ -62,23 +62,23 @@ export class CrucibleActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
computeHitPoints( ) { computeHitPoints() {
let hp = duplicate(this.data.data.secondary.hp) let hp = duplicate(this.data.data.secondary.hp)
let max = (this.data.data.abilities.str.value + this.data.data.abilities.con.value) * 6 let max = (this.data.data.abilities.str.value + this.data.data.abilities.con.value) * 6
if ( max != hp.max || hp.value > max) { if (max != hp.max || hp.value > max) {
hp.max = max hp.max = max
hp.value = max // Init case hp.value = max // Init case
this.update({ 'data.secondary.hp': hp}) this.update({ 'data.secondary.hp': hp })
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
computeEffortPoints( ) { computeEffortPoints() {
let effort = duplicate(this.data.data.secondary.effort) let effort = duplicate(this.data.data.secondary.effort)
let max = (this.data.data.abilities.con.value + this.data.data.abilities.int.value) * 6 let max = (this.data.data.abilities.con.value + this.data.data.abilities.int.value) * 6
if ( max != effort.max || effort.value > max) { if (max != effort.max || effort.value > max) {
effort.max = max effort.max = max
effort.value = max // Init case effort.value = max // Init case
this.update({ 'data.secondary.effort': effort}) this.update({ 'data.secondary.effort': effort })
} }
} }
@ -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
} }
} }
@ -521,7 +553,7 @@ export class CrucibleActor extends Actor {
let weapon = this.data.items.get(weaponId) let weapon = this.data.items.get(weaponId)
if (weapon) { if (weapon) {
weapon = duplicate(weapon) weapon = duplicate(weapon)
let skill = this.data.items.find( item => item.name.toLowerCase() == weapon.data.skill.toLowerCase()) let skill = this.data.items.find(item => item.name.toLowerCase() == weapon.data.skill.toLowerCase())
if (skill) { if (skill) {
skill = duplicate(skill) skill = duplicate(skill)
CrucibleUtility.updateSkill(skill) CrucibleUtility.updateSkill(skill)
@ -539,7 +571,7 @@ export class CrucibleActor extends Actor {
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
rollSave( saveKey) { rollSave(saveKey) {
let saves = this.getSaveRoll() let saves = this.getSaveRoll()
let save = saves[saveKey] let save = saves[saveKey]
if (save) { if (save) {

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

@ -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))
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

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

4
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,"isshiedskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"complex","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"","level":2,"isshieldskill":true},"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":{}}
@ -23,3 +23,5 @@
{"_id":"s2AAQviLttcHul3X","name":"Charm","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Charm.png","data":{"ability":"cha","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Getting someone to do what you want because they want to do it.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}} {"_id":"s2AAQviLttcHul3X","name":"Charm","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Charm.png","data":{"ability":"cha","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Getting someone to do what you want because they want to do it.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"xlYUHAUSfQrsjQoi","name":"Survival","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Survival.webp","data":{"ability":"wit","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Help me set this snare and we'll eat like kings in the morning.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}} {"_id":"xlYUHAUSfQrsjQoi","name":"Survival","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Survival.webp","data":{"ability":"wit","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Help me set this snare and we'll eat like kings in the morning.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"yAhtkgqf7pKyjJTA","name":"Poison Use","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Poison%20Use.webp","data":{"ability":"dex","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Let me apply this to my blade.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}} {"_id":"yAhtkgqf7pKyjJTA","name":"Poison Use","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Poison%20Use.webp","data":{"ability":"dex","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Let me apply this to my blade.</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,"isshieldskill":false,"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":"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"}}}

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

@ -208,11 +208,11 @@
"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.20.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.22",
"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">{{ability-margin.name}}</a></h4>
</span>
</li>
{{/if}}
</ul> </ul>
</div> </div>

View File

@ -59,14 +59,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 +101,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}}">
<span class="ability-label " name="{{key}}"> <img class="sheet-competence-img" src="{{save.img}}" />
<h4 class="ability-text-white ability-margin"><a class="roll-save ability-margin" data-save-key="{{key}}">{{save.label}} {{save.value}}</a></h4> <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>
</span> </span>
</li> </li>
{{/each}} {{/each}}