Compare commits

...

3 Commits

Author SHA1 Message Date
e73931d032 Melee fight 2022-08-14 10:10:26 +02:00
ab755aac22 Better roll with advantage 2022-08-10 14:41:40 +02:00
99c0b26f78 Add exchangee stuff 2022-08-06 17:06:05 +02:00
14 changed files with 602 additions and 257 deletions

View File

@ -325,6 +325,25 @@ export class CrucibleActor extends Actor {
}
/* -------------------------------------------- */
async rollArmor( rollData) {
let armor = this.getEquippedArmor()
if (armor) {
}
return { armor: "none"}
}
/* -------------------------------------------- */
async incDecHP( formula ) {
let dmgRoll = new Roll(formula).roll( {async: false})
await CrucibleUtility.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode"))
let hp = duplicate(this.data.data.secondary.hp)
hp.value = Number(hp.value) + Number(dmgRoll.total)
this.update( {'data.secondary.hp': hp })
return Number(dmgRoll.total)
}
/* -------------------------------------------- */
getAbility(abilKey) {
return this.data.data.abilities[abilKey];
@ -554,6 +573,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()
@ -562,20 +609,71 @@ export class CrucibleActor extends Actor {
let rollData = this.getCommonRollData()
rollData.mode = "shield"
rollData.shield = shield
rollData.useshield = true
rollData.img = shield.img
this.startRoll(rollData)
}
}
/* -------------------------------------------- */
rollArmorDie() {
async rollArmorDie(rollData = undefined) {
let armor = this.getEquippedArmor()
if (armor) {
armor = duplicate(armor)
let reduce = 0
let multiply = 1
let disadvantage = false
let advantage = false
let messages = ["Armor applied"]
if (rollData) {
if (CrucibleUtility.isArmorLight(armor) && CrucibleUtility.isWeaponPenetrating(rollData.attackRollData.weapon) ) {
return { armorIgnored: true, nbSuccess: 0, messages: ["Armor ignored : Penetrating weapons ignore Light Armors."] }
}
if (CrucibleUtility.isWeaponPenetrating(rollData.attackRollData.weapon) ) {
messages.push("Armor reduced by 1 (Penetrating weapon)")
reduce = 1
}
if (CrucibleUtility.isWeaponLight(rollData.attackRollData.weapon) ) {
messages.push("Armor with advantage (Light weapon)")
advantage = true
}
if (CrucibleUtility.isWeaponHeavy(rollData.attackRollData.weapon) ) {
messages.push("Armor with disadvantage (Heavy weapon)")
disadvantage = true
}
if (CrucibleUtility.isWeaponHack(rollData.attackRollData.weapon) ) {
messages.push("Armor reduced by 1 (Hack weapon)")
reduce = 1
}
if (CrucibleUtility.isWeaponUndamaging(rollData.attackRollData.weapon) ) {
messages.push("Armor multiplied by 2 (Undamaging weapon)")
multiply = 2
}
}
let diceColor = armor.data.absorprionroll
let rollTable = CrucibleUtility.getRollTableFromDiceColor( diceColor)
let armorResult = await CrucibleUtility.getRollTableFromDiceColor( diceColor, false )
let armorValue = (Number(armorResult.data.text) - reduce) * multiply
if ( advantage || disadvantage) {
let armorResult2 = await CrucibleUtility.getRollTableFromDiceColor( diceColor, false )
let armorValue2 = (Number(armorResult2.data.text) - reduce) * multiply
if ( advantage) {
armorValue = (armorValue2 > armorValue) ? armorValue2 : armorValue
messages.push(`Armor advantage - Roll 1 = ${armorValue} - Roll 2 = ${armorValue2}`)
}
if ( disadvantage) {
armorValue = (armorValue2 < armorValue) ? armorValue2 : armorValue
messages.push(`Armor disadvantage - Roll 1 = ${armorValue} - Roll 2 = ${armorValue2}`)
}
}
armorResult.armorValue = armorValue
if ( !rollData) {
ChatMessage.create( { content: "Armor result : " + armorValue } )
}
messages.push( "Armor result : " + armorValue)
return { armorIgnored: false, nbSuccess: armorValue, messages: messages }
}
return { armorIgnored: true, nbSuccess: 0, messages: ["No armor equipped."] }
}
/* -------------------------------------------- */

View File

@ -67,12 +67,9 @@ export class CrucibleRollDialog extends Dialog {
html.find('#rollAdvantage').change((event) => {
this.rollData.rollAdvantage = event.currentTarget.value
})
/*html.find('#featDieName').change((event) => {
this.rollData.featDieName = event.currentTarget.value
html.find('#useshield').change((event) => {
this.rollData.useshield = event.currentTarget.checked
})
html.find('#featDieSL').change((event) => {
this.rollData.featDieSL = event.currentTarget.value
})*/
}
}

View File

@ -5,9 +5,11 @@ 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 __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"
}
/* -------------------------------------------- */
export class CrucibleUtility {
@ -16,11 +18,12 @@ export class CrucibleUtility {
/* -------------------------------------------- */
static async init() {
Hooks.on('renderChatLog', (log, html, data) => CrucibleUtility.chatListeners(html));
Hooks.on("dropCanvasData", (canvas, data) => {
/*Hooks.on("dropCanvasData", (canvas, data) => {
CrucibleUtility.dropItemOnToken(canvas, data)
});
});*/
this.rollDataStore = {}
this.rollDataStore = {}
this.defenderStore = {}
CrucibleCommands.init();
@ -48,7 +51,12 @@ export class CrucibleUtility {
})
}
/*-------------------------------------------- */
static upperFirst(text) {
if (typeof text !== 'string') return text
return text.charAt(0).toUpperCase() + text.slice(1)
}
/*-------------------------------------------- */
static getSkills() {
return duplicate(this.skills)
@ -61,13 +69,13 @@ export class CrucibleUtility {
static getShieldSkills() {
return duplicate(this.shieldSkills)
}
/* -------------------------------------------- */
static async ready() {
const skills = await CrucibleUtility.loadCompendium("fvtt-crucible-rpg.skills")
this.skills = skills.map(i => i.toObject())
this.weaponSkills = duplicate( this.skills.filter( item => item.data.isweaponskill))
this.shieldSkills = duplicate( this.skills.filter( item => item.data.isshieldskill))
this.weaponSkills = duplicate(this.skills.filter(item => item.data.isweaponskill))
this.shieldSkills = duplicate(this.skills.filter(item => item.data.isshieldskill))
const rollTables = await CrucibleUtility.loadCompendium("fvtt-crucible-rpg.rolltables")
this.rollTables = rollTables.map(i => i.toObject())
@ -87,16 +95,85 @@ export class CrucibleUtility {
}
/* -------------------------------------------- */
static async getRollTableFromDiceColor( diceColor) {
static isArmorLight(armor) {
if (armor && (armor.data.armortype.includes("light") || armor.data.armortype.includes("clothes"))) {
return true
}
return false
}
/* -------------------------------------------- */
static isWeaponPenetrating(weapon) {
if (weapon && weapon.data.qualities.toLowerCase().includes("penetrating")) {
return true
}
return false
}
/* -------------------------------------------- */
static isWeaponLight(weapon) {
if (weapon && weapon.data.qualities.toLowerCase().includes("light")) {
return true
}
return false
}
/* -------------------------------------------- */
static isWeaponHeavy(weapon) {
if (weapon && weapon.data.qualities.toLowerCase().includes("heavy")) {
return true
}
return false
}
/* -------------------------------------------- */
static isWeaponHack(weapon) {
if (weapon && weapon.data.qualities.toLowerCase().includes("hack")) {
return true
}
return false
}
/* -------------------------------------------- */
static isWeaponUndamaging(weapon) {
if (weapon && weapon.data.qualities.toLowerCase().includes("undamaging")) {
return true
}
return false
}
/* -------------------------------------------- */
static isWeaponDangerous(weapon) {
if (weapon && weapon.data.qualities.toLowerCase().includes("dangerous")) {
return true
}
return false
}
/* -------------------------------------------- */
static isWeaponDeadly(weapon) {
if (weapon && weapon.data.qualities.toLowerCase().includes("deadly")) {
return true
}
return false
}
/* -------------------------------------------- */
static async getRollTableFromDiceColor(diceColor, displayChat = true) {
let rollTableName = __color2RollTable[diceColor]
if (rollTableName) {
const pack = game.packs.get("fvtt-crucible-rpg.rolltables")
const index = await pack.getIndex()
const entry = index.find(e => e.name === rollTableName)
let table = await pack.getDocument(entry._id)
const draw = await table.draw({ displayChat: true, rollMode: "gmroll"})
const draw = await table.draw({ displayChat: displayChat, rollMode: "gmroll" })
return draw.results.length > 0 ? draw.results[0] : undefined
}
}
}
/* -------------------------------------------- */
static async getCritical(level, weapon) {
const pack = game.packs.get("fvtt-crucible-rpg.rolltables")
let tableName = "Crit " + level + " (" + this.upperFirst(weapon.data.damage) + ")"
const index = await pack.getIndex()
const entry = index.find(e => e.name === tableName)
let table = await pack.getDocument(entry._id)
const draw = await table.draw({ displayChat: false, rollMode: "gmroll" })
return draw.results.length > 0 ? draw.results[0] : undefined
}
/* -------------------------------------------- */
@ -105,6 +182,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)
}
})
}
/* -------------------------------------------- */
@ -185,12 +271,12 @@ export class CrucibleUtility {
/* -------------------------------------------- */
static getTarget() {
if (game.user.targets && game.user.targets.size == 1) {
if (game.user.targets) {
for (let target of game.user.targets) {
return target;
return target
}
}
return undefined;
return undefined
}
/* -------------------------------------------- */
@ -214,15 +300,133 @@ 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 getSuccessResult(rollData) {
if (rollData.sumSuccess <= -3) {
return { result: "miss", fumble: true, attackerHPLoss: "2d3", hpLossType: "melee" }
}
if (rollData.sumSuccess == -2) {
return { result: "miss", dangerous_fumble: true, attackerHPLoss: "1d3", hpLossType: "melee" }
}
if (rollData.sumSuccess == -1) {
return { result: "miss" }
}
if (rollData.sumSuccess == 0) {
if (rollData.attackRollData.weapon.data.isranged) {
return { result: "target_space", aoe: true }
} else {
return { result: "clash", hack_vs_shields: true }
}
}
if (rollData.sumSuccess == 1) {
return { result: "hit", defenderDamage: "1", entangle: true, knockback: true }
}
if (rollData.sumSuccess == 2) {
return { result: "hit", defenderDamage: "2", critical_1: true, entangle: true, knockback: true, penetrating_impale: true, hack_armors: true }
}
if (rollData.sumSuccess >= 3) {
return { result: "hit", defenderDamage: "3", critical_2: true, entangle: true, knockback: true, penetrating_impale: true, hack_armors: true }
}
}
/* -------------------------------------------- */
static async getFumble(weapon) {
const pack = game.packs.get("fvtt-crucible-rpg.rolltables")
const index = await pack.getIndex()
let entry
if (weapon.isranged) {
entry = index.find(e => e.name === "Fumble! (ranged)")
}
if (!weapon.isranged) {
entry = index.find(e => e.name === "Fumble! (melee)")
}
let table = await pack.getDocument(entry._id)
const draw = await table.draw({ displayChat: false, rollMode: "gmroll" })
return draw.results.length > 0 ? draw.results[0] : undefined
}
/* -------------------------------------------- */
static async processSuccessResult(rollData) {
if (game.user.isGM) { // Only GM process this
let result = rollData.successDetails
let attacker = game.actors.get(rollData.actorId)
let defender = game.canvas.tokens.get(rollData.attackRollData.defenderTokenId).actor
if (attacker && result.attackerHPLoss) {
result.attackerHPLossValue = await attacker.incDecHP("-" + result.attackerHPLoss)
}
if (attacker && defender && result.defenderDamage) {
let dmgDice = (rollData.attackRollData.weapon.data.isranged) ? "d6" : "d8"
result.damageWeaponFormula = result.defenderDamage + dmgDice
result.defenderHPLossValue = await defender.incDecHP("-" + result.damageWeaponFormula)
}
if (result.fumble || (result.dangerous_fumble && CrucibleUtility.isWeaponDangerous(rollData.attackRollData.weapon))) {
result.fumbleDetails = await this.getFumble(rollData.weapon)
}
if (result.critical_1 || result.critical_2) {
let isDeadly = CrucibleUtility.isWeaponDeadly(rollData.attackRollData.weapon)
result.critical = await this.getCritical((result.critical_1) ? "I" : "II", rollData.attackRollData.weapon )
result.criticalText = result.critical.data.text
}
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-attack-defense-result.html`, rollData)
})
console.log("Results processed", rollData)
}
}
/* -------------------------------------------- */
static async processAttackDefense(rollData) {
if (rollData.attackRollData) {
//console.log("Defender token, ", rollData, rollData.defenderTokenId)
let defender = game.canvas.tokens.get(rollData.attackRollData.defenderTokenId).actor
let sumSuccess = rollData.attackRollData.nbSuccess - rollData.nbSuccess
if (sumSuccess > 0) {
let armorResult = await defender.rollArmorDie(rollData)
rollData.armorResult = armorResult
sumSuccess += rollData.armorResult.nbSuccess
if (sumSuccess < 0) { // Never below 0
sumSuccess = 0
}
}
rollData.sumSuccess = sumSuccess
rollData.successDetails = this.getSuccessResult(rollData)
if (game.user.isGM) {
this.processSuccessResult(rollData)
} else {
game.socket.emit("system.fvtt-crucible-rpg", { msg: "msg_gm_process_attack_defense", data: rollData });
}
}
}
/* -------------------------------------------- */
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)
}
if (msg.name == "msg_gm_process_attack_defense") {
this.processSuccessResult(msg.data)
}
if (msg.name == "msg_gm_item_drop" && game.user.isGM) {
let actor = game.actors.get(msg.data.actorId)
let item
@ -233,9 +437,6 @@ export class CrucibleUtility {
}
this.addItemDropToActor(actor, item)
}
if (msg.name == "msg_reroll_hero") {
this.rerollHeroRemaining(msg.data.userId, msg.data.rollId)
}
}
/* -------------------------------------------- */
@ -284,9 +485,9 @@ export class CrucibleUtility {
}
/* -------------------------------------------- */
static updateSkill( skill) {
static updateSkill(skill) {
skill.data.level = skill.data.background + skill.data.basic + skill.data.class + skill.data.explevel
if (skill.data.level > 7) { skill.data.level = 7}
if (skill.data.level > 7) { skill.data.level = 7 }
skill.data.skilldice = __skillLevel2Dice[skill.data.level]
}
@ -298,15 +499,12 @@ export class CrucibleUtility {
// ability/save => 0
let diceFormula
let startFormula = "0d6cs>=5"
if ( rollData.ability) {
if (rollData.ability) {
startFormula = String(rollData.ability.value) + "d6cs>=5"
}
if ( rollData.save) {
if (rollData.save) {
startFormula = String(rollData.save.value) + "d6cs>=5"
}
if ( rollData.shield) {
startFormula = "1" + String(rollData.shield.data.shielddie) + "cs>=5"
}
diceFormula = startFormula
// skill => 2
@ -314,10 +512,10 @@ export class CrucibleUtility {
// bonus => 6
if (rollData.skill) {
let level = rollData.skill.data.level
if (rollData.skill.data.issl2 ) {
if (rollData.skill.data.issl2) {
rollData.hasSLBonus = true
level += 2
if (level > 7) { level = 7}
if (level > 7) { level = 7 }
}
rollData.skill.data.skilldice = __skillLevel2Dice[level]
diceFormula += "+" + String(rollData.skill.data.skilldice) + "cs>=5"
@ -339,26 +537,26 @@ export class CrucibleUtility {
} else {
diceFormula += `+ 0d6cs>=5`
}
} else {
} else {
diceFormula += `+ 0d8cs=>5 + 0d10cs>=5 + 0d6cs>=5`
}
// advantage => 8
let advFormula = "+ 0d8cs>=5"
if(rollData.advantage == "advantage1") {
if (rollData.advantage == "advantage1") {
advFormula = "+ 1d8cs>=5"
}
if(rollData.advantage == "advantage2") {
if (rollData.advantage == "advantage2") {
advFormula = "+ 2d8cs>=5"
}
diceFormula += advFormula
// disadvantage => 10
let disFormula = "- 0d8cs>=5"
if(rollData.disadvantage == "disadvantage1") {
if (rollData.disadvantage == "disadvantage1") {
disFormula = "- 1d8cs>=5"
}
if(rollData.disadvantage == "disadvantage2") {
if (rollData.disadvantage == "disadvantage2") {
disFormula = "- 2d8cs>=5"
}
diceFormula += disFormula
@ -370,13 +568,20 @@ export class CrucibleUtility {
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
diceFormula += `- ${skillArmorPenalty}d8cs>=5`
} else {
diceFormula += `- 0d8cs>=5`
}
// shield => 14
if (rollData.useshield && rollData.shield) {
diceFormula += "+ 1" + String(rollData.shield.data.shielddie) + "cs>=5"
} else {
diceFormula += " + 0d6cs>=5"
}
// Performs roll
console.log("Roll formula", diceFormula)
let myRoll = rollData.roll
@ -384,43 +589,67 @@ export class CrucibleUtility {
myRoll = new Roll(diceFormula).roll({ async: false })
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
}
rollData.rollOrder = 0
rollData.roll = myRoll
rollData.nbSuccess = myRoll.total
if (rollData.rollAdvantage != "none") {
rollData.rollOrder = 1
rollData.rollType = (rollData.rollAdvantage == "roll-advantage") ? "Advantage": "Disadvantage"
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
})
rollData.rollOrder = 2
let myRoll2 = new Roll(diceFormula).roll({ async: false })
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
await this.showDiceSoNice(myRoll2, game.settings.get("core", "rollMode"))
rollData.roll = myRoll2 // Tmp switch to display the proper results
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
})
rollData.roll = myRoll // Revert the tmp switch
if (rollData.rollAdvantage == "roll-advantage") {
if ( myRoll2.total > rollData.nbSuccess) {
if (myRoll2.total > rollData.nbSuccess) {
hasChanged = true
rollData.roll = myRoll2
rollData.nbSuccess = myRoll2.total
}
} else {
if ( myRoll2.total < rollData.nbSuccess) {
if (myRoll2.total < rollData.nbSuccess) {
rollData.roll = myRoll2
rollData.nbSuccess = myRoll2.total
}
}
rollData.rollOrder = 3
}
rollData.nbSuccess = Math.max(0, rollData.nbSuccess)
rollData.isFirstRollAdvantage = false
// Manage exp
if (rollData.skill && rollData.skill.data.level > 0) {
let nbSkillSuccess = rollData.roll.terms[2].total
if ( nbSkillSuccess == 0 || nbSkillSuccess == rollData.skill.data.level) {
if (nbSkillSuccess == 0 || nbSkillSuccess == rollData.skill.data.level) {
actor.incrementSkillExp(rollData.skill._id, 1)
}
}
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)
// And save the roll
this.saveRollData(rollData)
actor.lastRoll = rollData
// Message response
this.displayDefenseMessage(rollData)
// Manage defense result
this.processAttackDefense(rollData)
}
/* -------------------------------------------- */
static sortArrayObjectsByName( myArray) {
static sortArrayObjectsByName(myArray) {
myArray.sort((a, b) => {
let fa = a.name.toLowerCase();
let fb = b.name.toLowerCase();
@ -459,7 +688,7 @@ export class CrucibleUtility {
chatGM.whisper = this.getUsers(user => user.isGM);
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content;
console.log("blindMessageToGM", chatGM);
game.socket.emit("system.fvtt-crucible-rgp", { msg: "msg_gm_chat_message", data: chatGM });
game.socket.emit("system.fvtt-crucible-rpg", { msg: "msg_gm_chat_message", data: chatGM });
}
@ -526,22 +755,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)
}
/* -------------------------------------------- */

File diff suppressed because one or more lines are too long

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

@ -218,11 +218,11 @@
"styles": [
"styles/simple.css"
],
"templateVersion": 14,
"templateVersion": 16,
"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.26.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg",
"version": "0.1.24",
"version": "0.1.29",
"background" : "./images/ui/crucible_welcome_page.webp"
}

View File

@ -6,7 +6,7 @@
"biodata": {
"class": "",
"age": 0,
"size": "",
"size": 0,
"weight": "",
"hair": "",
"sex": "",
@ -175,6 +175,7 @@
"qualities": "",
"flaws": "",
"damage": "",
"isranged": false,
"range": "",
"maxrange": "",
"minstr": 0,

View File

@ -453,9 +453,17 @@
<div>
<ul>
<li class="flexrow item">
<label class="generic-label">Weight</label>
<input type="text" class="" name="data.biodata.weight" value="{{data.biodata.weight}}"
data-dtype="String" />
<label class="generic-label">Size</label>
<select class="competence-base flexrow" type="text" name="data.biodata.size" value="{{data.biodata.size}}" data-dtype="Number">
{{#select data.biodata.size}}
<option value="1">Tiny</option>
<option value="2">Small</option>
<option value="3">Medium</option>
<option value="4">Large</option>
<option value="5">Huge</option>
<option value="6">Gargantuan</option>
{{/select}}
</select>
</li>
<li class="flexrow item">
<label class="generic-label">Sex</label>
@ -469,166 +477,12 @@
<li class="flexrow item" data-item-id="{{race._id}}">
<label class="generic-label">Race</label>
<a class="item-edit"><img class="stat-icon" src="{{race.img}}"></a>
<input type="text" class="" name="data.biodata.racename" value="{{race.name}}" disabled
data-dtype="String" />
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
<li class="flexrow item" data-item-id="{{role._id}}">
<label class="generic-label">Role</label>
<a class="item-edit"><img class="stat-icon" src="{{role.img}}"></a>
<input type="text" class="" name="data.biodata.rolename" value="{{role.name}}" disabled
data-dtype="String" />
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
<input type="text" class="" name="data.biodata.racename" value="{{data.biodata.racename}}" data-dtype="String" />
</li>
</ul>
</div>
</div>
<div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Virtues</label></h3>
</span>
<span class="item-field-label-short">Status</label></span>
</li>
{{#each virtues as |virtue key|}}
<li class="item stat flexrow list-item list-item-shadow" data-arme-id="{{virtue.id}}"
data-item-id="{{virtue._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{virtue.img}}" /></a>
<span class="item-name-label">{{virtue.name}}</span>
<span class="item-field-label-short"><label class="short-label">
{{#if virtue.data.activated}}
Activated
{{else}}
&nbsp;-&nbsp;
{{/if}}
</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control vice-virtue-activate" title="Activated">{{#if virtue.data.activated}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Vices</label></h3>
</span>
<span class="item-field-label-short">Status</label></span>
</li>
{{#each vices as |vice key|}}
<li class="item stat flexrow list-item list-item-shadow" data-arme-id="{{vice.id}}"
data-item-id="{{vice._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{vice.img}}" /></a>
<span class="item-name-label">{{vice.name}}</span>
<span class="item-field-label-short"><label class="short-label">
{{#if vice.data.activated}}
Activated
{{else}}
&nbsp;-&nbsp;
{{/if}}
</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control vice-virtue-activate" title="Activated">{{#if vice.data.activated}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<ul>
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Psychology</label></h3>
</span>
</li>
<li class="flexrow">
<label class="short-label">Worst Fear </label>
<input type="text" class="" name="data.biodata.worstfear" value="{{data.biodata.worstfear}}"
data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-worstfear"
name="data.biodata.worstfearactive" {{checked data.biodata.worstfearactive}} /> Active ?</label>
</li>
<li class="flexrow">
<label class="short-label">Desires </label>
<input type="text" class="" name="data.biodata.desires" value="{{data.biodata.desires}}"
data-dtype="String" />
<label class="attribute-value checkbox"><input type="checkbox" class="change-desires"
name="data.biodata.desiresactive" {{checked data.biodata.desiresactive}} /> Active ?</label>
</li>
</ul>
<h3>Catchphrase : </h3>
<ul>
<li class="flexrow">
<label class="short-label">Catchphrase </label>
<input type="text" class="" name="data.biodata.catchphrase" value="{{data.biodata.catchphrase}}"
data-dtype="String" />
</li>
<li class="flexrow">
<label class="short-label">Catchphrase Trigger : </label>
<input type="text" class="" name="data.biodata.catchphrasetrigger" value="{{data.biodata.catchphrasetrigger}}"
data-dtype="String" />
</li>
<li class="flexrow">
<label class="short-label">Catchphrase used </label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.biodata.catchphraseused" {{checked
data.biodata.catchphraseused}} /></label>
</li>
</ul>
<ul>
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Development</label></h3>
</span>
</li>
<li class="flexrow">
<label class="short-label">Character Value : </label>
<input type="text" class="" name="data.biodata.charactervalue" value="{{data.biodata.charactervalue}}"
data-dtype="String" />
</li>
<li class="flexrow">
<label class="short-label">Character Development Points Total (CDP total) : </label>
<input type="text" class="" name="data.biodata.cdp" value="{{data.biodata.cdp}}" data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Hero Level (max) : </label>
<input type="text" class="" name="data.biodata.maxlevelremaining" value="{{data.biodata.maxlevelremaining}}" data-dtype="Number" />
</li>
<li class="flexrow">
<label class="short-label">Hero Levels Remaining : </label>
<select class="status-small-label color-class-common" type="text" name="data.biodata.currentlevelremaining" value="{{data.biodata.currentlevelremaining}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.biodata.currentlevelremaining}}
{{{@root.levelRemainingList}}}
{{/select}}
</select>
</li>
<li class="flexrow">
<label class="short-label">Threat Level : </label>
<input type="text" class="" name="data.biodata.threatlevel" value="{{data.biodata.threatlevel}}"
data-dtype="Number" />
</li>
</ul>
<hr>
<h3>Background : </h3>

View File

@ -0,0 +1,73 @@
<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>
<ul>
<li><strong>Fight result !</strong></li>
{{#if successDetails.fumbleDetails}}
<li>Fumble ! : {{successDetails.fumbleDetails}} </li>
{{/if}}
{{#if armorResult}}
{{#each armorResult.messages as |message idx|}}
<li>{{message}}</li>
{{/each}}
{{/if}}
{{#if successDetails.hack_vs_shields}}
<li>Hack weapon : check shield !</li>
{{/if}}
{{#if successDetails.entangle}}
<li>Entangle weapon : attacker can entangle !</li>
{{/if}}
{{#if successDetails.knockback}}
<li>Knockback weapon : check knockback !</li>
{{/if}}
{{#if successDetails.hack_armors}}
<li>Hack weapon : check armor damage !</li>
{{/if}}
{{#if successDetails.penetrating_impale}}
<li>Penetrating weapon : apply the Impale condition !</li>
{{/if}}
{{#if (or successDetails.critical_1 successDetails.critical_2)}}
<li>Critical {{#if successDetails.critical_1}} 1 {{else}} 2 {{/if}} : {{successDetails.criticalText}} </li>
{{/if}}
{{#if successDetails.attackerHPLossValue}}
<li>Attacker has lost HP : {{successDetails.attackerHPLossValue}} HP </li>
{{/if}}
{{#if successDetails.defenderHPLossValue}}
<li>Defender has lost HP : {{successDetails.defenderHPLossValue}} HP </li>
{{/if}}
<li>Success details : {{successDetails.result}} </li>
<li><strong>Final successes</strong> {{sumSuccess}} </li>
<!-- <button class="chat-card-button reroll-level-remaining" data-roll-id="{{rollId}}">Reroll</button> -->
</ul>
</div>
</div>

View File

@ -18,16 +18,18 @@
<div>
<ul>
{{#if save}}
<li>Save : {{save.label}} - {{save.value}}d6
({{#each roll.terms.0.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{#if (eq rollOrder 1)}}
<li><strong>Roll with {{rollType}} - Roll 1</strong></li>
{{/if}}
{{#if (eq rollOrder 2)}}
<li><strong>Roll with {{rollType}} - Roll 2</strong></li>
{{/if}}
{{#if (eq rollOrder 3)}}
<li><strong>Roll with advantage - Final result !</strong></li>
{{/if}}
{{#if shield}}
<li>Shield : {{shield.name}} - {{shield.data.shieldie}}
{{#if save}}
<li>Save : {{save.label}} - {{save.value}}d6
({{#each roll.terms.0.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
@ -116,6 +118,14 @@
</li>
{{/if}}
{{#if useshield}}
<li>Shield : {{shield.name}} - {{shield.data.shielddie}}
({{#each roll.terms.14.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
<li><strong>Number of successes</strong> {{nbSuccess}} </li>
<!-- <button class="chat-card-button reroll-level-remaining" data-roll-id="{{rollId}}">Reroll</button> -->

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">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 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>
@ -61,7 +65,7 @@
<div class="flexrow">
<span class="roll-dialog-label">Disadvantage : </span>
<select class="status-small-label color-class-common" type="text" id="disadvantage" value="{{disadvantage}}" data-dtype="String" >
{{#select isadvantage}}
{{#select disadvantage}}
<option value="none">None</option>
<option value="disadvantage1">1 Disadvantage</option>
<option value="disadvantage2">2 Disadvantages</option>