Add exchangee stuff

This commit is contained in:
sladecraven 2022-08-06 17:06:05 +02:00
parent 2517149ab4
commit 99c0b26f78
9 changed files with 202 additions and 62 deletions

View File

@ -554,6 +554,34 @@ export class CrucibleActor extends Actor {
}
}
/* -------------------------------------------- */
rollDefenseMelee(attackRollData) {
let weapon = this.data.items.get(attackRollData.defenseWeaponId)
if (weapon) {
weapon = duplicate(weapon)
let skill = this.data.items.find(item => item.name.toLowerCase() == weapon.data.skill.toLowerCase())
if (skill) {
skill = duplicate(skill)
CrucibleUtility.updateSkill(skill)
let abilityKey = skill.data.ability
let rollData = this.getCommonRollData(abilityKey)
rollData.defenderTokenId = undefined // Cleanup
rollData.mode = "weapondefense"
rollData.shield = this.getEquippedShield()
rollData.attackRollData = duplicate(attackRollData)
rollData.skill = skill
rollData.weapon = weapon
rollData.img = weapon.img
this.startRoll(rollData)
} else {
ui.notifications.warn("Unable to find the relevant skill for weapon " + weapon.name)
}
} else {
ui.notifications.warn("Weapon not found ! ")
}
}
/* -------------------------------------------- */
rollShieldDie() {
let shield = this.getEquippedShield()

View File

@ -6,8 +6,10 @@ import { CrucibleCommands } from "./crucible-commands.js";
const __level2Dice = ["d0", "d4", "d6", "d8", "d10", "d12"];
const __name2DiceValue = { "0": 0, "d0": 0, "d4": 4, "d6": 6, "d8": 8, "d10": 10, "d12": 12 }
const __skillLevel2Dice = ["0d8", "1d8", "2d8", "3d8", "4d8", '6d8', "8d8", "10d8"]
const __color2RollTable = { blue: "Blue Armor Die", black: "Black Armor Die", green: "Green Armor Die", purple: "Purple Armor Die",
white: "White Armor Die", red: "Red Armor Die", blackgreen: "Black & Green Armor Dice"}
const __color2RollTable = {
blue: "Blue Armor Die", black: "Black Armor Die", green: "Green Armor Die", purple: "Purple Armor Die",
white: "White Armor Die", red: "Red Armor Die", blackgreen: "Black & Green Armor Dice"
}
/* -------------------------------------------- */
export class CrucibleUtility {
@ -21,6 +23,7 @@ export class CrucibleUtility {
});
this.rollDataStore = {}
this.defenderStore = {}
CrucibleCommands.init();
@ -105,6 +108,15 @@ export class CrucibleUtility {
html.on("click", '.view-item-from-chat', event => {
game.system.crucible.creator.openItemView(event)
})
html.on("click", '.roll-defense-melee', event => {
let rollId = $(event.currentTarget).data("roll-id")
let rollData = CrucibleUtility.getRollData( rollId )
rollData.defenseWeaponId = $(event.currentTarget).data("defense-weapon-id")
let actor = game.canvas.tokens.get(rollData.defenderTokenId).actor
if (actor && (game.user.isGM || actor.isOwner) ) {
actor.rollDefenseMelee(rollData )
}
})
}
/* -------------------------------------------- */
@ -214,12 +226,27 @@ export class CrucibleUtility {
return this.rollDataStore[id]
}
/* -------------------------------------------- */
static async displayDefenseMessage(rollData) {
if (rollData.defenderTokenId) {
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
if (game.user.isGM || (game.user.character && game.user.character.id == defender.id)) {
rollData.defender = defender
rollData.defenderWeapons = defender.getEquippedWeapons()
rollData.isRollTarget = rollData.weapon?.data.isranged
this.createChatWithRollMode(defender.name, {
alias: defender.name,
user: defender.id,
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-request-defense.html`, rollData),
whisper: [defender.id].concat(ChatMessage.getWhisperRecipients('GM')),
})
}
}
}
/* -------------------------------------------- */
static async onSocketMesssage(msg) {
console.log("SOCKET MESSAGE", msg.name)
if (msg.name == "msg_update_defense_state") {
this.updateDefenseState(msg.data.defenderId, msg.data.rollId)
}
if (msg.name == "msg_update_roll") {
this.updateRollData(msg.data)
}
@ -233,9 +260,6 @@ export class CrucibleUtility {
}
this.addItemDropToActor(actor, item)
}
if (msg.name == "msg_reroll_hero") {
this.rerollHeroRemaining(msg.data.userId, msg.data.rollId)
}
}
/* -------------------------------------------- */
@ -409,14 +433,18 @@ export class CrucibleUtility {
}
}
this.saveRollData(rollData)
actor.lastRoll = rollData
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
})
console.log("Rolldata result", rollData)
// Message response
this.displayDefenseMessage(rollData)
// And save the roll
this.saveRollData(rollData)
actor.lastRoll = rollData
}
/* -------------------------------------------- */
@ -526,22 +554,15 @@ export class CrucibleUtility {
/* -------------------------------------------- */
static updateWithTarget(rollData) {
let objectDefender
let target = CrucibleUtility.getTarget();
let target = CrucibleUtility.getTarget()
if (target) {
let defenderActor = game.actors.get(target.data.actorId)
objectDefender = CrucibleUtility.data(defenderActor)
objectDefender = mergeObject(objectDefender, target.data.actorData)
rollData.defender = objectDefender
rollData.attackerId = this.id
rollData.defenderId = objectDefender._id
defenderActor.addHindrancesList(rollData.effectsList)
rollData.defenderTokenId = target.id
}
}
/* -------------------------------------------- */
static createChatWithRollMode(name, chatOptions) {
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions)
}
/* -------------------------------------------- */

View File

@ -1,25 +1,57 @@
{"_id":"0EsFFhDpU4U1qfbr","name":"First Aid","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/First%20Aid.webp","data":{"ability":"int","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Stop the bleeding; save a life.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"name":"Weapon - Dagger (Thrown)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Dagger.webp","data":{"ability":"dex","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Dagger (Thrown)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.7cPkH6PHAUt3Rb6P"}},"_id":"0rWkbtidDH1K6ITt"}
{"name":"Weapon - Javelin","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Javelin.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"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":"<p>Javelin</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.i6PWAx9ltJU8E1Rh"}},"_id":"21t5PTOa2jnzaOYa"}
{"name":"Weapon - Improvised (Thrown)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Improvised.webp","data":{"ability":"dex","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Improvised (Thrown)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.VTHoe7dg9tYbUUyj"}},"_id":"3yFefS2kH9BvsnKn"}
{"_id":"4UYwQiRMi6b9Voif","name":"Ride Mount","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Ride%20Mount.png","data":{"ability":"str","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Help me back up. I know I can tame him.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"6C4CHsYkDBY05f4W","name":"Stealth","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Stealth.webp","data":{"ability":"agi","armorpenalty":true,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Stay on your toes and don't breath so loud.....</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"name":"Weapon - Staff (2-H)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Staff.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Staff (2-H)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.iAtfHjejCVAwxEYo"}},"_id":"6Waaz1ZFUNXUeXyh"}
{"_id":"6b9cpqdptAKFwy16","name":"Locks & Pockets","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Locks%20and%20Pockets.webp","data":{"ability":"dex","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>...and every lock that ain't locked when no one's around.....</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"6jzbwKOKvNUbXYxN","name":"Perception","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Perception.webp","data":{"ability":"wit","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>I think I heard a noise. Would you go check?</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"8o812uFRJbtKrbvc","name":"Blessings Lore","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Blessing%20Lore.png","data":{"ability":"cha","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Chaplain Class Only</p>\n<p>&nbsp;</p>\n<p>You can use the Chaplain Blessings Class Power</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"BKRHCd3kMfmQ7tcI","name":"Water Lore","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Water%20Lore.webp","data":{"ability":"int","armorpenalty":true,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>You can cast Water Lore spells.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"name":"Weapon - Sling","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Sling.webp","data":{"ability":"dex","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Sling</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.vy6naa893l5Aymob"}},"_id":"EZe1zQpE9HRzT4af"}
{"name":"Weapon - Dagger (Melee)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Dagger.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Dagger (Melee)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.Tx4P13eAWKL0BIkW"}},"_id":"Eh9SVpPr67aoTQsN"}
{"name":"Weapon - Hand Axe (Thrown)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Hand%20Axe.webp","data":{"ability":"dex","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Hand Axe (Thrown)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.U9Xw60VzASxnjVMU"}},"_id":"FbhQrbQyrqV79Oxo"}
{"name":"Weapon - Pick","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Pick.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Pick</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.7uUMjdxMtDUlpWpa"}},"_id":"GALESupI5E30akg0"}
{"name":"Weapon - Bite","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Bite.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Bite</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.SGNfVsHXxyAJP7wr"}},"_id":"KBF3iDyTtJP07xye"}
{"_id":"KR9JDNO8QkeNPa8W","name":"Haggle","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Haggle.png","data":{"ability":"wit","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>I'll give you half of your asking price and make you like it.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"name":"Weapon - Improvised (Melee)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Improvised.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Improvised (Melee)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.DC1NNVuYqTvzmQXE"}},"_id":"NlWc5EL5nkKDBUvk"}
{"name":"Weapon - Hammer (Melee)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Hammer.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Hammer (Melee)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.VLI9GowNHKnLOVwQ"}},"_id":"PoTWGYCwpR0RhN33"}
{"name":"Weapon - Flail","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Flail.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"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":"<p>Flail</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.tYHPGbI889W9Du4c"}},"_id":"QzuChpDhqpo6Ohtp"}
{"name":"Weapon - Claw","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Claw.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Claw</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.Iu2Rl4DVjIN9HjFg"}},"_id":"Rr4QvLeHr1Ncz1yb"}
{"name":"Weapon - 2-H Axe","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/2-H%20Axe.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>2-H Axe Skill</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.tlkHANCqXC6kAeiL"}},"_id":"S9Ncgj01q9OeZDL3"}
{"name":"Weapon - Club","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Club.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Club</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.fy88HBHUxVqyhJNP"}},"_id":"SGRK1VDSJdzQZhnn"}
{"_id":"SyaqDmAk6PEG2wZI","name":"Air Lore","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Air%20Lore.webp","data":{"ability":"int","armorpenalty":true,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>You can cast Air Lore Spells.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"T4YzMBGXyDrzEaBA","name":"Earth Lore","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Earth%20Lore.webp","data":{"ability":"int","armorpenalty":true,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>You can cast Earth Lore spells.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"name":"Weapon - 2-H Flail","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/2-H%20Flail.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"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":"<p>2-H Flail</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.W6vO8BJIvF0nCxnV"}},"_id":"TUrqTyqWvbEYconB"}
{"name":"Weapon - Hand Axe (Melee)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Hand%20Axe.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Hand Axe (Melee)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.xflr49mcYQeRBIxy"}},"_id":"WgWDvVHrUqfxAoWu"}
{"_id":"XenGlvxetLv0A92F","name":"Acrobatics","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Acrobatics.webp","data":{"ability":"agi","armorpenalty":true,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Handy for swinging from Chandaliers, sliding down stair rails, rolling between the legs of a Giant, and other feats of astonishing balance and agility.</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"XurQCYDVwEA0yxcv","name":"Fire Lore","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Fire%20Lore.webp","data":{"ability":"int","armorpenalty":true,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>You can cast Fire Lore spells.</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":{}}
{"name":"Weapon - Spear (2-H)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Spear.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"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":"<p>Spear (2-H)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.qLngjNAnvcXd3tPM"}},"_id":"YwKCavta5WywBRJX"}
{"_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":{}}
{"name":"Weapon - 2-H Pick","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/2-H%20Pick.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>2-H Pick</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.qSMQv1DjDxw7Vd2C"}},"_id":"a8qGglAc1HvfKnGI"}
{"name":"Weapon - Spear (1-H)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Spear.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"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":"<p>Spear (1-H)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.UuErSkE8ZazgIB9P"}},"_id":"aKjpVHrl9ElworLE"}
{"name":"Weapon - 2-H Hammer","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/2-H%20Hammer.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.YvMOONergKAsFykG"}},"_id":"cZ4s6yFOXhXWHJlw"}
{"_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,"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":{}}
{"name":"Weapon - Mace","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Mace.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Mace</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.339HJIWywPl0qSn5"}},"_id":"gfytCFPUYbstfKe8"}
{"name":"Weapon - Hammer (Thrown)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Hammer.webp","data":{"ability":"dex","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Hammer (Thrown)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.dHQrYqolZ01IOgzv"}},"_id":"gyo68qDFHgH2qWvz"}
{"name":"Weapon - Spear (Thrown)","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Spear.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"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":"<p>Spear (Thrown)</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.6rblok4g1WxoKrLs"}},"_id":"hgUwebJwwSd73lVz"}
{"name":"Weapon - Sting","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Sting.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Sting</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.uT9FTZj8Snh7MEsI"}},"_id":"i7YP54Xto6d8bEdt"}
{"_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":{}}
{"name":"Weapon - 2-H Club","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/2-H%20Club.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>2-H Club</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.hnKcAnoDCwFWq7tN"}},"_id":"iXNVpHBqwrOEeoK0"}
{"name":"Weapon - 2-H Sword","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/2-H%20Sword.webp","data":{"ability":"str","armorpenalty":false,"isproficient":false,"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":"<p>2-H Sword</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.D7qVkw7L76GZXp20"}},"_id":"ledzUQVgUoqEBB8b"}
{"_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":"mVIFRdqNRfAItR8f","name":"Persuade","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Persuade.webp","data":{"ability":"int","armorpenalty":false,"bonusdice":"","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>I'm sure you'll see it my way....</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"name":"Weapon - Unarmed","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Unarmed.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"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":"<p>Unarmed</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.GXMNTHOjPuR3VNfT"}},"_id":"mnK0xBbU27xFFDR5"}
{"_id":"obASqfQt8xUsbTmB","name":"Intimidate","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Intimidate.webp","data":{"ability":"cha","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Because I said so; that's why!</p>"},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{}}
{"_id":"qoAzYlPOHVKBd77S","name":"Miracles Lore","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/skills/Miracle%20Lore.png","data":{"ability":"cha","armorpenalty":false,"bonusdice":"none","level":0,"background":0,"basic":0,"class":0,"exp":0,"description":"<p>Chaplain Class Only</p>\n<p>&nbsp;</p>\n<p>You can use the Chaplain Miracles Class Power.</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":{}}
{"name":"Weapon - Crossbow","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Crossbow.webp","data":{"ability":"dex","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Crossbow</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.xSjJZ1Tpn9YpAxcu"}},"_id":"tK4kShJlVbab8ZXK"}
{"name":"Weapon - Bow","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Bow.webp","data":{"ability":"dex","armorpenalty":false,"isproficient":false,"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":"<p>Bow</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.gg26YIMHy7tvPLlA"}},"_id":"tKFIJQ8iQctSeBAi"}
{"name":"Weapon - Sword","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Sword.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"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":"<p>Sword</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.zQ1a0p0pZmctlMQA"}},"_id":"um3wZAmgXQEoRCp9"}
{"_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":{}}
{"name":"Weapon - Gore","type":"skill","img":"systems/fvtt-crucible-rpg/images/icons/weapons/Gore.webp","data":{"ability":"agi","armorpenalty":false,"isproficient":false,"isweaponskill":true,"isshieldskill":false,"isfeatdie":false,"issl2":false,"islore":false,"skilltype":"simple","isinnate":false,"bonusdice":"none","background":0,"basic":0,"class":0,"exp":0,"explevel":0,"description":"<p>Gore</p>","level":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"Up3b6rNa3VKAFQC3":3},"flags":{"core":{"sourceId":"Item.eQjP8IlzcdTr3ca7"}},"_id":"yWSVh4SOTFRbplwN"}

View File

@ -221,8 +221,8 @@
"templateVersion": 14,
"title": "Crucible RPG",
"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.24.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v0.1.25.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg",
"version": "0.1.24",
"version": "0.1.25",
"background" : "./images/ui/crucible_welcome_page.webp"
}

View File

@ -175,6 +175,7 @@
"qualities": "",
"flaws": "",
"damage": "",
"isranged": false,
"range": "",
"maxrange": "",
"minstr": 0,

View File

@ -0,0 +1,47 @@
<div class="chat-message-header">
{{#if actorImg}}
<img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
{{/if}}
<h4 class=chat-actor-name>{{alias}}</h4>
</div>
<hr>
{{#if img}}
<div>
<img class="chat-icon" src="{{img}}" alt="{{name}}" />
</div>
{{/if}}
<div class="flexcol">
</div>
<div>
{{#if isRollTarget}}
<div>{{defender.name}} is under Ranged attack. He must roll a Target Roll to defend himself.</div>
{{else}}
<div>{{defender.name}} is under Melee attack. He must roll a Defense Roll to defend himself.</div>
{{/if}}
<ul>
{{#if isRollTarget}}
<li>
<button class="chat-card-button roll-defense-ranged" data-defense-weapon-id="{{weapon._id}}"
data-roll-id="{{@root.rollId}}">Roll Target !</button>
</li>
{{else}}
<li>
{{#each defenderWeapons as |weapon idx|}}
<button class="chat-card-button roll-defense-melee" data-defense-weapon-id="{{weapon._id}}"
data-roll-id="{{@root.rollId}}">{{weapon.name}}</button>
{{/each}}
</li>
{{/if}}
</ul>
<!-- <button class="chat-card-button reroll-level-remaining" data-roll-id="{{rollId}}">Reroll</button> -->
</ul>
</div>
</div>

View File

@ -59,9 +59,9 @@
<label class="attribute-value checkbox"><input type="checkbox" name="data.isweaponskill" {{checked data.isweaponskill}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Is Shield Skill ?</label>
<!-- <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> -->
<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">

View File

@ -51,12 +51,19 @@
<li class="flexrow"><label class="generic-label">Damage</label>
<input type="text" class="right" name="data.damage" value="{{data.damage}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">Is ranged weapon ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.isranged" {{checked data.isranged}}/></label>
</li>
{{#if data.isranged}}
<li class="flexrow"><label class="generic-label">Range</label>
<input type="text" class="right" name="data.range" value="{{data.range}}" data-dtype="String"/>
</li>
<li class="flexrow"><label class="generic-label">Max range</label>
<input type="text" class="right" name="data.maxrange" value="{{data.maxrange}}" data-dtype="String"/>
</li>
{{/if}}
<li class="flexrow"><label class="generic-label">Minimum strength</label>
<input type="text" class="input-numeric-short padd-right" name="data.minstr" value="{{data.minstr}}" data-dtype="Number"/>
</li>

View File

@ -8,13 +8,6 @@
<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}}
<div class="flexrow">
<span class="roll-dialog-label">{{save.label}} : </span>
@ -36,6 +29,17 @@
</div>
{{/if}}
{{#if shield}}
<div class="flexrow">
<span class="roll-dialog-label">Use shield ? : </span>
<span class="roll-dialog-label"><input type="checkbox" id="useshield" name="useshield" {{checked useshield}}/></span>
</div>
<div class="flexrow">
<span class="roll-dialog-label">{{shield.name}} : </span>
<span class="roll-dialog-label">{{shield.data.shielddie}}</span>
</div>
{{/if}}
{{#if skill}}
<div class="flexrow">
<span class="roll-dialog-label">Skill : </span>