Add customizable rolls to items
This commit is contained in:
parent
58ed9d7d74
commit
b3e2771e91
16
lang/de.json
16
lang/de.json
|
|
@ -9,9 +9,10 @@
|
||||||
"ITEM.TypeArmor": "Rüstung",
|
"ITEM.TypeArmor": "Rüstung",
|
||||||
"ITEM.TypeSpell": "Zauber",
|
"ITEM.TypeSpell": "Zauber",
|
||||||
|
|
||||||
"midgard5.roll": "Würfeln",
|
"midgard5.doRoll": "Würfeln",
|
||||||
"midgard5.learn": "Lernen",
|
"midgard5.learn": "Lernen",
|
||||||
|
|
||||||
|
"midgard5.label": "Bezeichnung",
|
||||||
"midgard5.description": "Beschreibung",
|
"midgard5.description": "Beschreibung",
|
||||||
"midgard5.attribute": "Leiteigenschaft",
|
"midgard5.attribute": "Leiteigenschaft",
|
||||||
"midgard5.skill": "Fertigkeit",
|
"midgard5.skill": "Fertigkeit",
|
||||||
|
|
@ -158,6 +159,7 @@
|
||||||
"midgard5.no-skill": "Keine Fertigkeit",
|
"midgard5.no-skill": "Keine Fertigkeit",
|
||||||
"midgard5.magic": "magisch",
|
"midgard5.magic": "magisch",
|
||||||
"midgard5.rangedWeapon": "Schusswaffe",
|
"midgard5.rangedWeapon": "Schusswaffe",
|
||||||
|
"midgard5.assignItemToCharacter": "Füge Gegenstand einem Charakter hinzu, um Fähigkeit auwählen zu können",
|
||||||
|
|
||||||
"midgard5.pw": "Prüfwurf",
|
"midgard5.pw": "Prüfwurf",
|
||||||
"midgard5.attack": "Angriff",
|
"midgard5.attack": "Angriff",
|
||||||
|
|
@ -204,9 +206,9 @@
|
||||||
"midgard5.mod-operation-set": "Basiswert",
|
"midgard5.mod-operation-set": "Basiswert",
|
||||||
"midgard5.mod-operation-fixed": "Fester Wert",
|
"midgard5.mod-operation-fixed": "Fester Wert",
|
||||||
|
|
||||||
"midgard5.mod-stat-defense": "Abwehr",
|
"midgard5.mod-stat-defenseBonus": "Abwehrbonus",
|
||||||
"midgard5.mod-stat-attack": "Angriff",
|
"midgard5.mod-stat-attackBonus": "Angriffsbonus",
|
||||||
"midgard5.mod-stat-damage": "Schaden",
|
"midgard5.mod-stat-damageBonus": "Schadensbonus",
|
||||||
"midgard5.mod-stat-movement": "Bewegung",
|
"midgard5.mod-stat-movement": "Bewegung",
|
||||||
"midgard5.mod-stat-resistanceMind": "Resistenz Geist",
|
"midgard5.mod-stat-resistanceMind": "Resistenz Geist",
|
||||||
"midgard5.mod-stat-resistanceBody": "Resistenz Körper",
|
"midgard5.mod-stat-resistanceBody": "Resistenz Körper",
|
||||||
|
|
@ -219,5 +221,9 @@
|
||||||
"midgard5.mod-type": "Typ der Modifikation",
|
"midgard5.mod-type": "Typ der Modifikation",
|
||||||
"midgard5.mod-id": "Was soll modifiziert werden",
|
"midgard5.mod-id": "Was soll modifiziert werden",
|
||||||
"midgard5.mod-operation": "Wie soll modifiziert werden",
|
"midgard5.mod-operation": "Wie soll modifiziert werden",
|
||||||
"midgard5.mod-value": "Wert"
|
"midgard5.mod-value": "Wert",
|
||||||
|
|
||||||
|
"midgard5.type": "Typ",
|
||||||
|
"midgard5.formula": "Formel",
|
||||||
|
"midgard5.roll": "Wurf"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
{
|
||||||
|
"name": "Fernkampfwaffe",
|
||||||
|
"type": "weapon",
|
||||||
|
"img": "icons/svg/item-bag.svg",
|
||||||
|
"data": {
|
||||||
|
"description": "",
|
||||||
|
"stats": {
|
||||||
|
"damageBonus": 0,
|
||||||
|
"attackBonus": 0,
|
||||||
|
"defenseBonus": 0,
|
||||||
|
"movementBonus": 0,
|
||||||
|
"resistanceMind": 0,
|
||||||
|
"resistanceBody": 0,
|
||||||
|
"spellBonus": 0
|
||||||
|
},
|
||||||
|
"equippable": false,
|
||||||
|
"equipped": true,
|
||||||
|
"value": 0,
|
||||||
|
"magic": false,
|
||||||
|
"special": false,
|
||||||
|
"ranged": true,
|
||||||
|
"skillId": "",
|
||||||
|
"damageBase": "1d6",
|
||||||
|
"rolls": {
|
||||||
|
"formulas": {
|
||||||
|
"0": {
|
||||||
|
"formula": "1d20 + @i.calc.fw + @i.calc.bonus + @i.calc.special + @c.calc.stats.attackBonus.value + @i.stats.attackBonus",
|
||||||
|
"label": "Angriff",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"formula": "@i.damageBase + @i.stats.damageBonus",
|
||||||
|
"label": "Schaden",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"output": ""
|
||||||
|
},
|
||||||
|
"calc": {}
|
||||||
|
},
|
||||||
|
"effects": [],
|
||||||
|
"folder": null,
|
||||||
|
"sort": 0,
|
||||||
|
"permission": {
|
||||||
|
"default": 0,
|
||||||
|
"XD0IpWT6bN4AJiYQ": 3
|
||||||
|
},
|
||||||
|
"_id": "h1inVuRJQI42JTCs"
|
||||||
|
}
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @i.fw + @i.calc.bonus",
|
"formula": "1d20 + @i.fw + @i.calc.bonus",
|
||||||
"type": "ew",
|
"enabled": true,
|
||||||
"label": "EW"
|
"label": "EW"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,8 @@
|
||||||
"rolls": {
|
"rolls": {
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @i.fw + @i.calc.bonus",
|
"formula": "1d20 + @i.calc.fw + @i.calc.bonus",
|
||||||
"type": "ew",
|
"enabled": true,
|
||||||
"label": "EW"
|
"label": "EW"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@
|
||||||
"rolls": {
|
"rolls": {
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @i.calc.fw + @i.calc.bonus + @i.calc.special + @c.calc.stats.defense + @c.calc.stats.defenseBonus + @i.stats.defenseBonus",
|
"formula": "1d20 + @i.calc.fw + @i.calc.bonus + @i.calc.special + @c.calc.stats.defense.value + @c.calc.stats.defenseBonus.value + @i.stats.defenseBonus",
|
||||||
"type": "ew",
|
"enabled": true,
|
||||||
"label": "Abwehr"
|
"label": "Abwehr"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,13 @@
|
||||||
"rolls": {
|
"rolls": {
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @i.calc.fw + @i.calc.bonus + @i.calc.special + @c.calc.stats.attackBonus + @i.stats.attackBonus",
|
"formula": "1d20 + @i.calc.fw + @i.calc.bonus + @i.calc.special + @c.calc.stats.attackBonus.value + @i.stats.attackBonus",
|
||||||
"type": "ew",
|
"enabled": true,
|
||||||
"label": "Angriff"
|
"label": "Angriff"
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
"formula": "@i.damageBase + @i.stats.damageBonus + @c.calc.stats.damageBonus",
|
"formula": "@i.damageBase + @i.stats.damageBonus + @c.calc.stats.damageBonus.value",
|
||||||
"type": "dmg",
|
"enabled": true,
|
||||||
"label": "Schaden"
|
"label": "Schaden"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,8 @@
|
||||||
"rolls": {
|
"rolls": {
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @i.fw + @i.calc.bonus",
|
"formula": "1d20 + @i.calc.fw + @i.calc.bonus",
|
||||||
"type": "ew",
|
"enabled": true,
|
||||||
"label": "EW"
|
"label": "EW"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@
|
||||||
"rolls": {
|
"rolls": {
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @c.calc.stats.spellCasting + @i.bonus",
|
"formula": "1d20 + @c.calc.stats.spellCasting.value + @i.bonus",
|
||||||
"type": "ew",
|
"enabled": true,
|
||||||
"label": "Zaubern"
|
"label": "Zaubern"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ const preloadTemplates = async (): Promise<Handlebars.TemplateDelegate<any>[]> =
|
||||||
"sheets/character/skills.hbs",
|
"sheets/character/skills.hbs",
|
||||||
"sheets/character/gear.hbs",
|
"sheets/character/gear.hbs",
|
||||||
"sheets/character/spells.hbs",
|
"sheets/character/spells.hbs",
|
||||||
|
"sheets/item/rolls.hbs",
|
||||||
"chat/roll-m5.hbs"
|
"chat/roll-m5.hbs"
|
||||||
]
|
]
|
||||||
return loadTemplates(templates.map(s => rootPath + s))
|
return loadTemplates(templates.map(s => rootPath + s))
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { BooleanField } from "@league-of-foundry-developers/foundry-vtt-types/src/foundry/common/data/fields.mjs"
|
||||||
|
|
||||||
export interface M5Skill {
|
export interface M5Skill {
|
||||||
fw: number
|
fw: number
|
||||||
|
|
@ -33,11 +34,13 @@ export interface M5RollData {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface M5RollResult {
|
export interface M5RollTemplate {
|
||||||
formula: string
|
formula: string
|
||||||
label: string
|
label: string
|
||||||
type: string
|
enabled: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface M5RollResult extends M5RollTemplate {
|
||||||
total: number
|
total: number
|
||||||
totalStr: string
|
totalStr: string
|
||||||
result: string
|
result: string
|
||||||
|
|
@ -67,9 +70,9 @@ export enum M5Attributes {
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum M5Stats {
|
export enum M5Stats {
|
||||||
DEFENSE = "defense",
|
DEFENSE = "defenseBonus",
|
||||||
ATTACK = "attack",
|
ATTACK = "attackBonus",
|
||||||
DAMAGE = "damage",
|
DAMAGE = "damageBonus",
|
||||||
MOVEMENT = "movement",
|
MOVEMENT = "movement",
|
||||||
RESISTANCE_MIND = "resistanceMind",
|
RESISTANCE_MIND = "resistanceMind",
|
||||||
RESISTANCE_BODY = "resistanceBody",
|
RESISTANCE_BODY = "resistanceBody",
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ export default class M5ModAggregate {
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.PA, operation: M5ModOperation.ADD_100, value: data.attributes.pa.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.PA, operation: M5ModOperation.ADD_100, value: data.attributes.pa.bonus }, characterString)
|
||||||
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.WK, operation: M5ModOperation.ADD_100, value: data.attributes.wk.bonus }, characterString)
|
this.push({ type: M5ModType.ATTRIBUTE, id: M5Attributes.WK, operation: M5ModOperation.ADD_100, value: data.attributes.wk.bonus }, characterString)
|
||||||
|
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.DEFENSE, operation: M5ModOperation.SET, value: calc.stats.defense.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.DEFENSE, operation: M5ModOperation.SET, value: calc.stats.defenseBonus.value }, characterString)
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.ATTACK, operation: M5ModOperation.SET, value: calc.stats.attackBonus.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.ATTACK, operation: M5ModOperation.SET, value: calc.stats.attackBonus.value }, characterString)
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.DAMAGE, operation: M5ModOperation.SET, value: calc.stats.damageBonus.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.DAMAGE, operation: M5ModOperation.SET, value: calc.stats.damageBonus.value }, characterString)
|
||||||
this.push({ type: M5ModType.STAT, id: M5Stats.MOVEMENT, operation: M5ModOperation.SET, value: calc.stats.movementBonus.value }, characterString)
|
this.push({ type: M5ModType.STAT, id: M5Stats.MOVEMENT, operation: M5ModOperation.SET, value: calc.stats.movementBonus.value }, characterString)
|
||||||
|
|
@ -59,19 +59,10 @@ export default class M5ModAggregate {
|
||||||
source: source
|
source: source
|
||||||
}
|
}
|
||||||
|
|
||||||
let key = mod.id
|
if (map.has(mod.id))
|
||||||
// if (mod.type === M5ModType.ATTRIBUTE) {
|
map.get(mod.id).push(pair)
|
||||||
// key = M5Attributes[mod.id] as string
|
|
||||||
// console.log("M5ModType.ATTRIBUTE", mod.id, key)
|
|
||||||
// } else if (mod.type === M5ModType.STAT) {
|
|
||||||
// key = M5Stats[mod.id] as string
|
|
||||||
// console.log("M5ModType.STAT", mod.id, key)
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (map.has(key))
|
|
||||||
map.get(key).push(pair)
|
|
||||||
else
|
else
|
||||||
map.set(key, [pair])
|
map.set(mod.id, [pair])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export class M5Item extends Item {
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true })
|
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true })
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
calc.ew += actorCalc.stats.attackBonus
|
calc.ew += actorCalc.stats.attackBonus.value
|
||||||
calc.combatSkills = actorCalc.skills.combat
|
calc.combatSkills = actorCalc.skills.combat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,7 +108,7 @@ export class M5Item extends Item {
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true })
|
const actorCalc = character.derivedData({ weapons: true, defensiveWeapons: true, armor: true, items: true, spells: true })
|
||||||
if (actorCalc) {
|
if (actorCalc) {
|
||||||
calc.ew += actorCalc.stats.spellCasting
|
calc.ew += actorCalc.stats.spellCasting.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (context.type === "item") {
|
} else if (context.type === "item") {
|
||||||
|
|
@ -204,15 +204,17 @@ export class M5Item extends Item {
|
||||||
const rollData = this.getRollData()
|
const rollData = this.getRollData()
|
||||||
formulaNames.forEach(formulaName => {
|
formulaNames.forEach(formulaName => {
|
||||||
const formula = item.data.rolls.formulas[formulaName]
|
const formula = item.data.rolls.formulas[formulaName]
|
||||||
rollData.rolls[formulaName] = {
|
if (formula) {
|
||||||
formula: formula.formula,
|
rollData.rolls[formulaName] = {
|
||||||
label: formula.label,
|
formula: formula.formula,
|
||||||
type: formula.type,
|
label: formula.label,
|
||||||
result: "",
|
enabled: formula.enabled,
|
||||||
total: 0,
|
result: "",
|
||||||
totalStr: "",
|
total: 0,
|
||||||
dice: {}
|
totalStr: "",
|
||||||
} as M5RollResult
|
dice: {}
|
||||||
|
} as M5RollResult
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const roll = new M5Roll(rollData, this.actor, item.name)
|
const roll = new M5Roll(rollData, this.actor, item.name)
|
||||||
|
|
|
||||||
|
|
@ -17,19 +17,24 @@ export class M5Roll { // extends Roll<M5RollData>
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
//override evaluate(options?: InexactPartial<RollTerm.EvaluationOptions>): Evaluated<Roll<M5RollData>> | Promise<Evaluated<Roll<M5RollData>>> {
|
//override evaluate(options?: InexactPartial<RollTerm.EvaluationOptions>): Evaluated<Roll<M5RollData>> | Promise<Evaluated<Roll<M5RollData>>> {
|
||||||
evaluate() {
|
evaluate() {
|
||||||
|
const indexMap = new Map<number, string>()
|
||||||
const rollNames = Object.keys(this.data.rolls)
|
const rollNames = Object.keys(this.data.rolls)
|
||||||
const rolls = rollNames.map(rollName => {
|
const rolls = rollNames.filter(rollName => this.data.rolls[rollName].enabled).map((rollName, index) => {
|
||||||
|
indexMap.set(index, rollName)
|
||||||
const formula = this.data.rolls[rollName]
|
const formula = this.data.rolls[rollName]
|
||||||
const roll = new Roll(formula.formula, this.data)
|
const roll = new Roll(formula.formula, this.data)
|
||||||
return roll
|
return roll
|
||||||
})
|
})
|
||||||
|
|
||||||
this.pool = PoolTerm.fromRolls(rolls)
|
this.pool = PoolTerm.fromRolls(rolls)
|
||||||
|
console.log("evaluate", this._evaluated, this.pool)
|
||||||
return this.pool.evaluate({ async: true }).then(results => {
|
return this.pool.evaluate({ async: true }).then(results => {
|
||||||
this._total = 0
|
this._total = 0
|
||||||
|
|
||||||
results.rolls.forEach((roll, index) => {
|
results.rolls.forEach((roll, index) => {
|
||||||
const rollResult = this.data.rolls[index.toString()] as M5RollResult
|
const rollIndex = indexMap.get(index)
|
||||||
|
const rollResult = this.data.rolls[rollIndex] as M5RollResult
|
||||||
|
|
||||||
rollResult.result = roll.result
|
rollResult.result = roll.result
|
||||||
rollResult.total = roll.total
|
rollResult.total = roll.total
|
||||||
rollResult.totalStr = roll.total.toString()
|
rollResult.totalStr = roll.total.toString()
|
||||||
|
|
@ -37,27 +42,29 @@ export class M5Roll { // extends Roll<M5RollData>
|
||||||
this._total += roll.total
|
this._total += roll.total
|
||||||
|
|
||||||
let rowRes = M5EwResult.TBD
|
let rowRes = M5EwResult.TBD
|
||||||
|
let face100 = -1
|
||||||
|
|
||||||
roll.dice.forEach((d, dIndex) => {
|
roll.dice.forEach((d, dIndex) => {
|
||||||
rollResult.dice[dIndex.toString()] = d.total
|
rollResult.dice[dIndex.toString()] = d.total
|
||||||
|
|
||||||
if (rowRes === M5EwResult.TBD && dIndex === 0) {
|
if (rowRes === M5EwResult.TBD && dIndex === 0) {
|
||||||
if (rollResult.type === "ew") {
|
if (d.faces === 20) {
|
||||||
|
//if (rollResult.type === "ew") {
|
||||||
if (d.total === 1)
|
if (d.total === 1)
|
||||||
rowRes = M5EwResult.FUMBLE
|
rowRes = M5EwResult.FUMBLE
|
||||||
else if (d.total === 20)
|
else if (d.total === 20)
|
||||||
rowRes = M5EwResult.CRITICAL
|
rowRes = M5EwResult.CRITICAL
|
||||||
else if (d.total >= 16)
|
else if (d.total >= 16)
|
||||||
rowRes = M5EwResult.HIGH
|
rowRes = M5EwResult.HIGH
|
||||||
} else if (rollResult.type === "pw") {
|
} else if (d.faces === 100) {
|
||||||
if (d.total === 1)
|
face100 = d.total as number
|
||||||
rowRes = M5EwResult.FUMBLE
|
|
||||||
else if (d.total === 20)
|
|
||||||
rowRes = M5EwResult.CRITICAL
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (rollResult.type === "ew") {
|
const parseResult = M5Roll.parseDiceSides(rollResult.formula)
|
||||||
|
//console.log("evaluate roll", parseResult)
|
||||||
|
if (parseResult?.sides === 20) {
|
||||||
if (roll.total < 20) {
|
if (roll.total < 20) {
|
||||||
if (rowRes === M5EwResult.TBD || rowRes === M5EwResult.HIGH)
|
if (rowRes === M5EwResult.TBD || rowRes === M5EwResult.HIGH)
|
||||||
rowRes = M5EwResult.FAIL
|
rowRes = M5EwResult.FAIL
|
||||||
|
|
@ -65,10 +72,18 @@ export class M5Roll { // extends Roll<M5RollData>
|
||||||
if (rowRes === M5EwResult.TBD)
|
if (rowRes === M5EwResult.TBD)
|
||||||
rowRes = M5EwResult.PASS
|
rowRes = M5EwResult.PASS
|
||||||
}
|
}
|
||||||
} else if (rollResult.type === "pw") {
|
} else if (face100 >= 0) {
|
||||||
if (roll.total < 0) {
|
const threshold100 = roll.total + face100
|
||||||
|
const threshold = Math.floor(threshold100 / 10)
|
||||||
|
if (face100 === 100) {
|
||||||
|
if (rowRes === M5EwResult.TBD)
|
||||||
|
rowRes = M5EwResult.FUMBLE
|
||||||
|
} else if (roll.total < 0) {
|
||||||
if (rowRes === M5EwResult.TBD)
|
if (rowRes === M5EwResult.TBD)
|
||||||
rowRes = M5EwResult.FAIL
|
rowRes = M5EwResult.FAIL
|
||||||
|
} else if (face100 <= threshold) {
|
||||||
|
if (rowRes === M5EwResult.TBD)
|
||||||
|
rowRes = M5EwResult.CRITICAL
|
||||||
} else {
|
} else {
|
||||||
if (rowRes === M5EwResult.TBD)
|
if (rowRes === M5EwResult.TBD)
|
||||||
rowRes = M5EwResult.PASS
|
rowRes = M5EwResult.PASS
|
||||||
|
|
@ -114,7 +129,7 @@ export class M5Roll { // extends Roll<M5RollData>
|
||||||
rollData.i = attribute.value + attribute.bonus
|
rollData.i = attribute.value + attribute.bonus
|
||||||
rollData.rolls["0"] = {
|
rollData.rolls["0"] = {
|
||||||
formula: "@i - 1d100",
|
formula: "@i - 1d100",
|
||||||
type: "pw",
|
enabled: true,
|
||||||
label: (game as Game).i18n.localize("midgard5.pw"),
|
label: (game as Game).i18n.localize("midgard5.pw"),
|
||||||
result: "",
|
result: "",
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|
@ -135,7 +150,7 @@ export class M5Roll { // extends Roll<M5RollData>
|
||||||
|
|
||||||
rollData.rolls["0"] = {
|
rollData.rolls["0"] = {
|
||||||
formula: "1d20 + @c.calc.stats.brawl + @c.calc.stats.attackBonus + @i.attackBonus",
|
formula: "1d20 + @c.calc.stats.brawl + @c.calc.stats.attackBonus + @i.attackBonus",
|
||||||
type: "ew",
|
enabled: true,
|
||||||
label: (game as Game).i18n.localize("midgard5.attack"),
|
label: (game as Game).i18n.localize("midgard5.attack"),
|
||||||
result: "",
|
result: "",
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|
@ -146,7 +161,7 @@ export class M5Roll { // extends Roll<M5RollData>
|
||||||
|
|
||||||
rollData.rolls["1"] = {
|
rollData.rolls["1"] = {
|
||||||
formula: "1d6 - 4 + @c.calc.stats.damageBonus + @i.damageBonus",
|
formula: "1d6 - 4 + @c.calc.stats.damageBonus + @i.damageBonus",
|
||||||
type: "dmg",
|
enabled: true,
|
||||||
label: (game as Game).i18n.localize("midgard5.damage"),
|
label: (game as Game).i18n.localize("midgard5.damage"),
|
||||||
result: "",
|
result: "",
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|
@ -157,4 +172,35 @@ export class M5Roll { // extends Roll<M5RollData>
|
||||||
|
|
||||||
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.brawl"))
|
return new M5Roll(rollData, actor, (game as Game).i18n.localize("midgard5.brawl"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static parseDiceSides(formula: string): FormulaParseResult {
|
||||||
|
const ewMatcher: RegExp = /\d*[dD]20/g
|
||||||
|
const pwMatcher: RegExp = /(\d+)\s*\-\s*\d*[dD]100/g
|
||||||
|
|
||||||
|
let res = formula.match(ewMatcher)
|
||||||
|
if (res && !!res[0]) {
|
||||||
|
return {
|
||||||
|
sides: 20,
|
||||||
|
type: "ew",
|
||||||
|
threshold: null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
res = formula.match(pwMatcher)
|
||||||
|
if (res && !!res[1]) {
|
||||||
|
return {
|
||||||
|
sides: 100,
|
||||||
|
type: "pw",
|
||||||
|
threshold: parseInt(res[1])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FormulaParseResult {
|
||||||
|
sides: number,
|
||||||
|
type: string,
|
||||||
|
threshold: number
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { M5Item } from "../items/M5Item"
|
import { M5Item } from "../items/M5Item"
|
||||||
import { M5Attributes, M5ItemMod, M5ModOperation, M5ModType } from "../M5Base"
|
import { M5Attributes, M5ItemMod, M5ModOperation, M5ModType, M5RollTemplate } from "../M5Base"
|
||||||
|
|
||||||
export class M5ItemSheet extends ItemSheet {
|
export class M5ItemSheet extends ItemSheet {
|
||||||
|
|
||||||
|
|
@ -78,6 +78,54 @@ export class M5ItemSheet extends ItemSheet {
|
||||||
this.render(false)
|
this.render(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
html.find(".roll-delete").on("click", async (event) => {
|
||||||
|
//console.log("roll-delete", this.item.data.data.rolls.formulas)
|
||||||
|
|
||||||
|
let row = event.target.parentElement
|
||||||
|
let rollIndex = row.dataset["roll"]
|
||||||
|
while (!rollIndex) {
|
||||||
|
row = row.parentElement
|
||||||
|
if (!row)
|
||||||
|
return
|
||||||
|
rollIndex = row.dataset["roll"]
|
||||||
|
}
|
||||||
|
|
||||||
|
const rolls = this.item.data.data.rolls.formulas
|
||||||
|
rolls[rollIndex] = null
|
||||||
|
|
||||||
|
this.item.update({
|
||||||
|
data: {
|
||||||
|
rolls: {
|
||||||
|
formulas: rolls
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.render(false)
|
||||||
|
})
|
||||||
|
|
||||||
|
html.find(".roll-create").on("click", async (event) => {
|
||||||
|
const rolls = this.item.data.data.rolls.formulas
|
||||||
|
|
||||||
|
const indeces = Object.keys(rolls).map(index => parseInt(index)).sort().reverse()
|
||||||
|
const index = (indeces.find(index => !!rolls[index.toString()]) ?? -1) + 1
|
||||||
|
console.log("roll-create", rolls, indeces, index)
|
||||||
|
|
||||||
|
rolls[index.toString()] = {
|
||||||
|
formula: "1d6",
|
||||||
|
label: (game as Game).i18n.localize("midgard5.roll"),
|
||||||
|
enabled: true
|
||||||
|
} as M5RollTemplate
|
||||||
|
|
||||||
|
this.item.update({
|
||||||
|
data: {
|
||||||
|
rolls: {
|
||||||
|
formulas: rolls
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.render(false)
|
||||||
|
})
|
||||||
|
|
||||||
// Drag & Drop
|
// Drag & Drop
|
||||||
if (["item"].includes(this.object.data?.type)) {
|
if (["item"].includes(this.object.data?.type)) {
|
||||||
const itemToItemAssociation = new DragDrop({
|
const itemToItemAssociation = new DragDrop({
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td, th {
|
||||||
padding: 0 0.5rem 0 0.5rem;
|
padding: 0 0.5rem 0 0.5rem;
|
||||||
|
|
||||||
&.center {
|
&.center {
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,58 @@
|
||||||
// main: midgard5.less
|
// main: midgard5.less
|
||||||
|
|
||||||
.midgard5.sheet.item {
|
.midgard5.sheet.item {
|
||||||
form {
|
form {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.sheet-content {
|
.sheet-content {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.editor {
|
.editor {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item-img {
|
.item-img {
|
||||||
height: 64px;
|
height: 64px;
|
||||||
width: 64px;
|
width: 64px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td, th {
|
||||||
|
padding: 0 0.5rem 0 0.5rem;
|
||||||
|
|
||||||
|
&.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.fixed-value {
|
||||||
|
width: 3rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table.rolls-table {
|
||||||
|
.col-enabled {
|
||||||
|
width: 3rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-create {
|
||||||
|
width: 3rem;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
button {
|
||||||
|
background: rgba(255, 255, 255, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-delete {
|
||||||
|
width: 3rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-label {
|
||||||
|
width: 6rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,9 +112,6 @@
|
||||||
"character": {
|
"character": {
|
||||||
"templates": ["characterBars", "attributes", "characterDescription", "characterHeader", "skills"],
|
"templates": ["characterBars", "attributes", "characterDescription", "characterHeader", "skills"],
|
||||||
"calc": {}
|
"calc": {}
|
||||||
},
|
|
||||||
"vehicle": {
|
|
||||||
"templates": ["characterBars", "attributes"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
|
|
@ -217,7 +214,6 @@
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @i.calc.fw + @i.calc.bonus",
|
"formula": "1d20 + @i.calc.fw + @i.calc.bonus",
|
||||||
"type": "ew",
|
|
||||||
"label": "EW",
|
"label": "EW",
|
||||||
"enabled": true
|
"enabled": true
|
||||||
}
|
}
|
||||||
|
|
@ -226,13 +222,6 @@
|
||||||
},
|
},
|
||||||
"calc": {}
|
"calc": {}
|
||||||
},
|
},
|
||||||
"mod": {
|
|
||||||
"type": "",
|
|
||||||
"id": "",
|
|
||||||
"operation": "",
|
|
||||||
"value": 0,
|
|
||||||
"calc": {}
|
|
||||||
},
|
|
||||||
"item": {
|
"item": {
|
||||||
"templates": ["itemDescription", "equippable", "physical"],
|
"templates": ["itemDescription", "equippable", "physical"],
|
||||||
"rolls": {
|
"rolls": {
|
||||||
|
|
@ -251,14 +240,12 @@
|
||||||
"rolls": {
|
"rolls": {
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @i.calc.fw + @i.calc.bonus + @i.calc.special + @c.calc.stats.attackBonus + @i.stats.attackBonus",
|
"formula": "1d20 + @i.calc.fw + @i.calc.bonus + @i.calc.special + @c.calc.stats.attackBonus.value + @i.stats.attackBonus",
|
||||||
"type": "ew",
|
|
||||||
"label": "Angriff",
|
"label": "Angriff",
|
||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
"formula": "@i.damageBase + @i.stats.damageBonus + @c.calc.stats.damageBonus",
|
"formula": "@i.damageBase + @i.stats.damageBonus + @c.calc.stats.damageBonus.value",
|
||||||
"type": "dmg",
|
|
||||||
"label": "Schaden",
|
"label": "Schaden",
|
||||||
"enabled": true
|
"enabled": true
|
||||||
}
|
}
|
||||||
|
|
@ -274,8 +261,7 @@
|
||||||
"rolls": {
|
"rolls": {
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @i.calc.fw + @i.calc.bonus + @i.calc.special + @c.calc.stats.defense + @c.calc.stats.defenseBonus + @i.stats.defenseBonus",
|
"formula": "1d20 + @i.calc.fw + @i.calc.bonus + @i.calc.special + @c.calc.stats.defense.value + @c.calc.stats.defenseBonus.value + @i.stats.defenseBonus",
|
||||||
"type": "ew",
|
|
||||||
"label": "Abwehr",
|
"label": "Abwehr",
|
||||||
"enabled": true
|
"enabled": true
|
||||||
}
|
}
|
||||||
|
|
@ -309,8 +295,7 @@
|
||||||
"rolls": {
|
"rolls": {
|
||||||
"formulas": {
|
"formulas": {
|
||||||
"0": {
|
"0": {
|
||||||
"formula": "1d20 + @c.calc.stats.spellCasting + @i.bonus",
|
"formula": "1d20 + @c.calc.stats.spellCasting.value + @i.bonus",
|
||||||
"type": "ew",
|
|
||||||
"label": "Zaubern",
|
"label": "Zaubern",
|
||||||
"enabled": true
|
"enabled": true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,52 +5,54 @@
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#if (eq iType "spell")}}
|
{{#if (eq iType "spell")}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.actor-ap"}}</td>
|
<td>{{localize "midgard5.actor-ap"}}</td>
|
||||||
<td class="roll-spell-details">{{i.ap}}</td>
|
<td class="roll-spell-details">{{i.ap}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.spell-castDuration"}}</td>
|
<td>{{localize "midgard5.spell-castDuration"}}</td>
|
||||||
<td class="roll-spell-details">{{i.castDuration}}</td>
|
<td class="roll-spell-details">{{i.castDuration}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.spell-range"}}</td>
|
<td>{{localize "midgard5.spell-range"}}</td>
|
||||||
<td class="roll-spell-details">{{i.range}}</td>
|
<td class="roll-spell-details">{{i.range}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.spell-effectTarget"}}</td>
|
<td>{{localize "midgard5.spell-effectTarget"}}</td>
|
||||||
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-target-" i.effectTarget)}}</td>
|
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-target-" i.effectTarget)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.spell-effectArea"}}</td>
|
<td>{{localize "midgard5.spell-effectArea"}}</td>
|
||||||
<td class="roll-spell-details">{{i.effectArea}}</td>
|
<td class="roll-spell-details">{{i.effectArea}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.spell-effectDuration"}}</td>
|
<td>{{localize "midgard5.spell-effectDuration"}}</td>
|
||||||
<td class="roll-spell-details">{{i.effectDuration}}</td>
|
<td class="roll-spell-details">{{i.effectDuration}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.spell-origin"}}</td>
|
<td>{{localize "midgard5.spell-origin"}}</td>
|
||||||
<td class="roll-spell-details">{{i.origin}}</td>
|
<td class="roll-spell-details">{{i.origin}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.spell-type"}}</td>
|
<td>{{localize "midgard5.spell-type"}}</td>
|
||||||
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-type-" i.type)}}</td>
|
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-type-" i.type)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{localize "midgard5.spell-process"}}</td>
|
<td>{{localize "midgard5.spell-process"}}</td>
|
||||||
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-process-" i.process)}}</td>
|
<td class="roll-spell-details">{{localize (m5concat "midgard5.spell-process-" i.process)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#each rolls as |roll index|}}
|
{{#each rolls as |roll index|}}
|
||||||
<tr class="roll-row {{roll.css}}">
|
{{#if roll.enabled}}
|
||||||
<td>{{roll.label}}</td>
|
<tr class="roll-row {{roll.css}}">
|
||||||
<td class="roll-result">
|
<td>{{roll.label}}</td>
|
||||||
<span class="roll-total">{{roll.totalStr}}</span>
|
<td class="roll-result">
|
||||||
<span class="roll-detail">{{roll.result}}</span>
|
<span class="roll-total">{{roll.totalStr}}</span>
|
||||||
</td>
|
<span class="roll-detail">{{roll.result}}</span>
|
||||||
</tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{localize "ITEM.TypeWeapon"}}</th>
|
<th>{{localize "ITEM.TypeWeapon"}}</th>
|
||||||
<th>{{localize "midgard5.ew"}}</th>
|
<th class="fixed-value">{{localize "midgard5.ew"}}</th>
|
||||||
<th></th>
|
<th class="fixed-value"></th>
|
||||||
<th></th>
|
<th class="fixed-value"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -30,9 +30,9 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{localize "ITEM.TypeDefensiveWeapon"}}</th>
|
<th>{{localize "ITEM.TypeDefensiveWeapon"}}</th>
|
||||||
<th>{{localize "midgard5.ew"}}</th>
|
<th class="fixed-value">{{localize "midgard5.ew"}}</th>
|
||||||
<th></th>
|
<th class="fixed-value"></th>
|
||||||
<th></th>
|
<th class="fixed-value"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -51,13 +51,13 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{localize "ITEM.TypeArmor"}}</th>
|
<th>{{localize "ITEM.TypeArmor"}}</th>
|
||||||
<th>{{localize "midgard5.actor-lp-short"}}</th>
|
<th class="fixed-value">{{localize "midgard5.actor-lp-short"}}</th>
|
||||||
<th>{{localize "midgard5.actor-ap-short"}}</th>
|
<th class="fixed-value">{{localize "midgard5.actor-ap-short"}}</th>
|
||||||
<th>{{localize "midgard5.attackBonus-short"}}</th>
|
<th class="fixed-value">{{localize "midgard5.attackBonus-short"}}</th>
|
||||||
<th>{{localize "midgard5.defenseBonus-short"}}</th>
|
<th class="fixed-value">{{localize "midgard5.defenseBonus-short"}}</th>
|
||||||
<th>B</th>
|
<th class="fixed-value">B</th>
|
||||||
<th>Gw</th>
|
<th class="fixed-value">Gw</th>
|
||||||
<th></th>
|
<th class="fixed-value"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -80,12 +80,14 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{localize "ITEM.TypeItem"}}</th>
|
<th>{{localize "ITEM.TypeItem"}}</th>
|
||||||
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#each data.calc.gear.items as |item itemId|}}
|
{{#each data.calc.gear.items as |item itemId|}}
|
||||||
<tr data-item="{{itemId}}">
|
<tr data-item="{{itemId}}">
|
||||||
<td class="padding edit-item">{{item.label}}</td>
|
<td class="padding edit-item">{{item.label}}</td>
|
||||||
|
<td class="fixed-value"><a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
|
||||||
|
|
||||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<table class="rolls-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="col-enabled"></th>
|
||||||
|
<th class="col-label">{{localize "midgard5.label"}}</th>
|
||||||
|
<th class="col-formula">{{localize "midgard5.formula"}}</th>
|
||||||
|
<th class="col-delete"><button class="roll-create">+</button></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{#each data.rolls.formulas as |roll rollIndex|}}
|
||||||
|
{{#if roll}}
|
||||||
|
<tr data-roll="{{rollIndex}}">
|
||||||
|
<td><input type="checkbox" name="data.rolls.formulas.{{rollIndex}}.enabled" {{checked roll.enabled}} /></td>
|
||||||
|
<td><input type="text" name="data.rolls.formulas.{{rollIndex}}.label" value="{{roll.label}}" data-dtype="String" /></td>
|
||||||
|
<td><input type="text" name="data.rolls.formulas.{{rollIndex}}.formula" value="{{roll.formula}}" data-dtype="String" /></td>
|
||||||
|
<td class="fixed-value"><a class="roll-delete" title="Delete Roll"><i class="fas fa-trash"></i></a></td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
@ -29,6 +29,8 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
|
||||||
|
|
||||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -62,6 +62,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
|
||||||
|
|
||||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span>Assign item to character to select weapon skill</span>
|
<span>{{localize "midgard5.assignItemToCharacter"}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -60,6 +60,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
{{> "systems/midgard5/templates/sheets/item/rolls.hbs"}}
|
||||||
|
|
||||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
Loading…
Reference in New Issue