Compare commits
5 Commits
fvtt-cruci
...
fvtt-cruci
Author | SHA1 | Date | |
---|---|---|---|
fa501abbd5 | |||
b84f34d560 | |||
08157116e8 | |||
68b8d42925 | |||
aab562bed9 |
@ -499,8 +499,43 @@ export class CrucibleActor extends Actor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
isForcedAdvantage() {
|
||||||
|
return this.items.find(cond => cond.type =="condition" && cond.system.advantage)
|
||||||
|
}
|
||||||
|
isForcedDisadvantage() {
|
||||||
|
return this.items.find(cond => cond.type =="condition" && cond.system.disadvantage)
|
||||||
|
}
|
||||||
|
isForcedRollAdvantage() {
|
||||||
|
return this.items.find(cond => cond.type =="condition" && cond.system.rolladvantage)
|
||||||
|
}
|
||||||
|
isForcedRollDisadvantage() {
|
||||||
|
return this.items.find(cond => cond.type =="condition" && cond.system.rolldisadvantage)
|
||||||
|
}
|
||||||
|
isNoAdvantage() {
|
||||||
|
return this.items.find(cond => cond.type =="condition" && cond.system.noadvantage)
|
||||||
|
}
|
||||||
|
isNoAction() {
|
||||||
|
return this.items.find(cond => cond.type =="condition" && cond.system.noaction)
|
||||||
|
}
|
||||||
|
isAttackDisadvantage() {
|
||||||
|
return this.items.find(cond => cond.type =="condition" && cond.system.attackdisadvantage)
|
||||||
|
}
|
||||||
|
isDefenseDisadvantage() {
|
||||||
|
return this.items.find(cond => cond.type =="condition" && cond.system.defensedisadvantage)
|
||||||
|
}
|
||||||
|
isAttackerAdvantage() {
|
||||||
|
return this.items.find(cond => cond.type =="condition" && cond.system.targetadvantage)
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getCommonRollData(abilityKey = undefined) {
|
getCommonRollData(abilityKey = undefined) {
|
||||||
|
let noAction = this.isNoAction()
|
||||||
|
if ( noAction) {
|
||||||
|
ui.notifications.warn("You can't do any actions du to the condition : " + noAction.name )
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let rollData = CrucibleUtility.getBasicRollData()
|
let rollData = CrucibleUtility.getBasicRollData()
|
||||||
rollData.alias = this.name
|
rollData.alias = this.name
|
||||||
rollData.actorImg = this.img
|
rollData.actorImg = this.img
|
||||||
@ -509,15 +544,42 @@ export class CrucibleActor extends Actor {
|
|||||||
rollData.featsDie = this.getFeatsWithDie()
|
rollData.featsDie = this.getFeatsWithDie()
|
||||||
rollData.featsSL = this.getFeatsWithSL()
|
rollData.featsSL = this.getFeatsWithSL()
|
||||||
rollData.armors = this.getArmors()
|
rollData.armors = this.getArmors()
|
||||||
|
rollData.conditions = this.getConditions()
|
||||||
rollData.featDieName = "none"
|
rollData.featDieName = "none"
|
||||||
rollData.featSLName = "none"
|
rollData.featSLName = "none"
|
||||||
rollData.rollAdvantage = "none"
|
rollData.rollAdvantage = "none"
|
||||||
rollData.advantage = "none"
|
rollData.advantage = "none"
|
||||||
rollData.disadvantage = "none"
|
rollData.disadvantage = "none"
|
||||||
|
rollData.forceAdvantage = this.isForcedAdvantage()
|
||||||
|
rollData.forceDisadvantage = this.isForcedDisadvantage()
|
||||||
|
rollData.forceRollAdvantage = this.isForcedRollAdvantage()
|
||||||
|
rollData.forceRollDisadvantage = this.isForcedRollDisadvantage()
|
||||||
|
rollData.noAdvantage = this.isNoAdvantage()
|
||||||
|
if ( rollData.defenderTokenId) {
|
||||||
|
let defenderToken = game.canvas.tokens.get(rollData.defenderTokenId)
|
||||||
|
let defender = defenderToken.actor
|
||||||
|
|
||||||
|
// Distance management
|
||||||
|
let token = this.token
|
||||||
|
if ( !token) {
|
||||||
|
let tokens =this.getActiveTokens()
|
||||||
|
token = tokens[0]
|
||||||
|
}
|
||||||
|
if ( token ) {
|
||||||
|
const ray = new Ray(token.object?.center || token.center, defenderToken.center)
|
||||||
|
rollData.tokensDistance = canvas.grid.measureDistances([{ray}], {gridSpaces:false})[0] / canvas.grid.grid.options.dimensions.distance
|
||||||
|
} else {
|
||||||
|
ui.notifications.info("No token connected to this actor, unable to compute distance.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (defender ) {
|
||||||
|
rollData.forceAdvantage = defender.isAttackerAdvantage()
|
||||||
|
rollData.advantageFromTarget = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (abilityKey) {
|
if (abilityKey) {
|
||||||
rollData.ability = this.getAbility(abilityKey)
|
rollData.ability = this.getAbility(abilityKey)
|
||||||
//rollData.skillList = this.getRelevantSkill(abilityKey)
|
|
||||||
rollData.selectedKill = undefined
|
rollData.selectedKill = undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -575,7 +637,13 @@ export class CrucibleActor extends Actor {
|
|||||||
rollData.skill = skill
|
rollData.skill = skill
|
||||||
rollData.weapon = weapon
|
rollData.weapon = weapon
|
||||||
rollData.img = weapon.img
|
rollData.img = weapon.img
|
||||||
|
if ( !rollData.forceDisadvantage) { // This is an attack, check if disadvantaged
|
||||||
|
rollData.forceDisadvantage = this.isAttackDisadvantage()
|
||||||
|
}
|
||||||
|
/*if (rollData.weapon.system.isranged && rollData.tokensDistance > CrucibleUtility.getWeaponMaxRange(rollData.weapon) ) {
|
||||||
|
ui.notifications.warn(`Your target is out of range of your weapon (max: ${CrucibleUtility.getWeaponMaxRange(rollData.weapon)} - current : ${rollData.tokensDistance})` )
|
||||||
|
return
|
||||||
|
}*/
|
||||||
this.startRoll(rollData)
|
this.startRoll(rollData)
|
||||||
} else {
|
} else {
|
||||||
ui.notifications.warn("Unable to find the relevant skill for weapon " + weapon.name)
|
ui.notifications.warn("Unable to find the relevant skill for weapon " + weapon.name)
|
||||||
@ -601,6 +669,9 @@ export class CrucibleActor extends Actor {
|
|||||||
rollData.skill = skill
|
rollData.skill = skill
|
||||||
rollData.weapon = weapon
|
rollData.weapon = weapon
|
||||||
rollData.img = weapon.img
|
rollData.img = weapon.img
|
||||||
|
if ( !rollData.forceDisadvantage) { // This is an attack, check if disadvantaged
|
||||||
|
rollData.forceDisadvantage = this.isDefenseDisadvantage()
|
||||||
|
}
|
||||||
|
|
||||||
this.startRoll(rollData)
|
this.startRoll(rollData)
|
||||||
} else {
|
} else {
|
||||||
@ -611,6 +682,23 @@ export class CrucibleActor extends Actor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
rollDefenseRanged(attackRollData) {
|
||||||
|
let rollData = this.getCommonRollData()
|
||||||
|
rollData.defenderTokenId = undefined // Cleanup
|
||||||
|
rollData.mode = "rangeddefense"
|
||||||
|
rollData.attackRollData = duplicate(attackRollData)
|
||||||
|
rollData.sizeDice = CrucibleUtility.getSizeDice( this.system.biodata.size )
|
||||||
|
rollData.effectiveRange = CrucibleUtility.getWeaponRange(attackRollData.weapon)
|
||||||
|
rollData.tokensDistance = attackRollData.tokensDistance // QoL copy
|
||||||
|
rollData.distanceBonusDice = 0 //Math.max(0, Math.floor((rollData.tokensDistance - rollData.effectiveRange) + 0.5))
|
||||||
|
rollData.hasCover = "none"
|
||||||
|
rollData.situational = "none"
|
||||||
|
rollData.useshield = false
|
||||||
|
rollData.shield = this.getEquippedShield()
|
||||||
|
this.startRoll(rollData)
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
rollShieldDie() {
|
rollShieldDie() {
|
||||||
let shield = this.getEquippedShield()
|
let shield = this.getEquippedShield()
|
||||||
@ -682,7 +770,7 @@ export class CrucibleActor extends Actor {
|
|||||||
ChatMessage.create( { content: "Armor result : " + armorValue } )
|
ChatMessage.create( { content: "Armor result : " + armorValue } )
|
||||||
}
|
}
|
||||||
messages.push( "Armor result : " + armorValue)
|
messages.push( "Armor result : " + armorValue)
|
||||||
return { armorIgnored: false, nbSuccess: armorValue, messages: messages }
|
return { armorIgnored: false, nbSuccess: armorValue, rawArmor: armorResult.text, messages: messages }
|
||||||
}
|
}
|
||||||
return { armorIgnored: true, nbSuccess: 0, messages: ["No armor equipped."] }
|
return { armorIgnored: true, nbSuccess: 0, messages: ["No armor equipped."] }
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,15 @@ export class CrucibleRollDialog extends Dialog {
|
|||||||
html.find('#useshield').change((event) => {
|
html.find('#useshield').change((event) => {
|
||||||
this.rollData.useshield = event.currentTarget.checked
|
this.rollData.useshield = event.currentTarget.checked
|
||||||
})
|
})
|
||||||
|
html.find('#hasCover').change((event) => {
|
||||||
|
this.rollData.hasCover = event.currentTarget.value
|
||||||
|
})
|
||||||
|
html.find('#situational').change((event) => {
|
||||||
|
this.rollData.situational = event.currentTarget.value
|
||||||
|
})
|
||||||
|
html.find('#distanceBonusDice').change((event) => {
|
||||||
|
this.rollData.distanceBonusDice = Number(event.currentTarget.value)
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,6 +10,7 @@ const __color2RollTable = {
|
|||||||
blue: "Blue Armor Die", black: "Black Armor Die", green: "Green Armor Die", purple: "Purple Armor Die",
|
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"
|
white: "White Armor Die", red: "Red Armor Die", blackgreen: "Black & Green Armor Dice"
|
||||||
}
|
}
|
||||||
|
const __size2Dice = [ { nb: 0, dice: "d0" }, { nb: 5, dice: "d8" }, { nb: 3, dice: "d8" }, { nb: 2, dice: "d8" }, { nb: 1, dice: "d8" }, { nb: 1, dice: "d6" }, { nb: 1, noAddFirst: true, dice: "d6" }]
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class CrucibleUtility {
|
export class CrucibleUtility {
|
||||||
@ -56,7 +57,7 @@ export class CrucibleUtility {
|
|||||||
if (typeof text !== 'string') return text
|
if (typeof text !== 'string') return text
|
||||||
return text.charAt(0).toUpperCase() + text.slice(1)
|
return text.charAt(0).toUpperCase() + text.slice(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
static getSkills() {
|
static getSkills() {
|
||||||
return duplicate(this.skills)
|
return duplicate(this.skills)
|
||||||
@ -150,6 +151,20 @@ export class CrucibleUtility {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
static getWeaponRange(weapon) {
|
||||||
|
if (weapon && weapon.system.isranged) {
|
||||||
|
let rangeValue = weapon.system.range.replace(/[^0-9]/g, '')
|
||||||
|
return Number(rangeValue)
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
static getWeaponMaxRange(weapon) {
|
||||||
|
if (weapon && weapon.system.isranged) {
|
||||||
|
let rangeValue = weapon.system.maxrange.replace(/[^0-9]/g, '')
|
||||||
|
return Number(rangeValue)
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async getRollTableFromDiceColor(diceColor, displayChat = true) {
|
static async getRollTableFromDiceColor(diceColor, displayChat = true) {
|
||||||
@ -163,6 +178,10 @@ export class CrucibleUtility {
|
|||||||
return draw.results.length > 0 ? draw.results[0] : undefined
|
return draw.results.length > 0 ? draw.results[0] : undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static getSizeDice(sizeValue) {
|
||||||
|
return __size2Dice[sizeValue]
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async getCritical(level, weapon) {
|
static async getCritical(level, weapon) {
|
||||||
@ -191,6 +210,15 @@ export class CrucibleUtility {
|
|||||||
actor.rollDefenseMelee(rollData)
|
actor.rollDefenseMelee(rollData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
html.on("click", '.roll-defense-ranged', event => {
|
||||||
|
let rollId = $(event.currentTarget).data("roll-id")
|
||||||
|
let rollData = CrucibleUtility.getRollData(rollId)
|
||||||
|
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||||
|
if (defender && (game.user.isGM || defender.isOwner)) {
|
||||||
|
defender.rollDefenseRanged(rollData)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -290,12 +318,12 @@ export class CrucibleUtility {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async displayDefenseMessage(rollData) {
|
static async displayDefenseMessage(rollData) {
|
||||||
if (rollData.mode == "weapon" && rollData.defenderTokenId) {
|
if (rollData.mode == "weapon" && rollData.defenderTokenId) {
|
||||||
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||||
if (game.user.isGM || (game.user.character && game.user.character.id == defender.id)) {
|
if (game.user.isGM || (game.user.character && game.user.character.id == defender.id)) {
|
||||||
rollData.defender = defender
|
rollData.defender = defender
|
||||||
rollData.defenderWeapons = defender.getEquippedWeapons()
|
rollData.defenderWeapons = defender.getEquippedWeapons()
|
||||||
rollData.isRollTarget = rollData.weapon?.system.isranged
|
rollData.isRangedAttack = rollData.weapon?.system.isranged
|
||||||
this.createChatWithRollMode(defender.name, {
|
this.createChatWithRollMode(defender.name, {
|
||||||
name: defender.name,
|
name: defender.name,
|
||||||
alias: defender.name,
|
alias: defender.name,
|
||||||
@ -310,10 +338,18 @@ export class CrucibleUtility {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static getSuccessResult(rollData) {
|
static getSuccessResult(rollData) {
|
||||||
if (rollData.sumSuccess <= -3) {
|
if (rollData.sumSuccess <= -3) {
|
||||||
return { result: "miss", fumble: true, attackerHPLoss: "2d3", hpLossType: "melee" }
|
if (rollData.attackRollData.weapon.system.isranged ) {
|
||||||
|
return { result: "miss", fumble: true, hpLossType: "melee" }
|
||||||
|
} else {
|
||||||
|
return { result: "miss", fumble: true, attackerHPLoss: "2d3", hpLossType: "melee" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rollData.sumSuccess == -2) {
|
if (rollData.sumSuccess == -2) {
|
||||||
return { result: "miss", dangerous_fumble: true, attackerHPLoss: "1d3", hpLossType: "melee" }
|
if (rollData.attackRollData.weapon.system.isranged ) {
|
||||||
|
return { result: "miss", dangerous_fumble: true }
|
||||||
|
} else {
|
||||||
|
return { result: "miss", dangerous_fumble: true, attackerHPLoss: "1d3", hpLossType: "melee" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rollData.sumSuccess == -1) {
|
if (rollData.sumSuccess == -1) {
|
||||||
return { result: "miss" }
|
return { result: "miss" }
|
||||||
@ -373,7 +409,7 @@ export class CrucibleUtility {
|
|||||||
}
|
}
|
||||||
if (result.critical_1 || result.critical_2) {
|
if (result.critical_1 || result.critical_2) {
|
||||||
let isDeadly = CrucibleUtility.isWeaponDeadly(rollData.attackRollData.weapon)
|
let isDeadly = CrucibleUtility.isWeaponDeadly(rollData.attackRollData.weapon)
|
||||||
result.critical = await this.getCritical((result.critical_1) ? "I" : "II", rollData.attackRollData.weapon )
|
result.critical = await this.getCritical((result.critical_1) ? "I" : "II", rollData.attackRollData.weapon)
|
||||||
result.criticalText = result.critical.text
|
result.criticalText = result.critical.text
|
||||||
}
|
}
|
||||||
this.createChatWithRollMode(rollData.alias, {
|
this.createChatWithRollMode(rollData.alias, {
|
||||||
@ -480,12 +516,26 @@ export class CrucibleUtility {
|
|||||||
skill.system.skilldice = __skillLevel2Dice[skill.system.level]
|
skill.system.skilldice = __skillLevel2Dice[skill.system.level]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static getDiceFromCover(cover) {
|
||||||
|
if (cover == "cover50") return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static getDiceFromSituational(cover) {
|
||||||
|
if (cover == "prone") return 1
|
||||||
|
if (cover == "dodge") return 1
|
||||||
|
if (cover == "moving") return 1
|
||||||
|
if (cover == "engaged") return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async rollCrucible(rollData) {
|
static async rollCrucible(rollData) {
|
||||||
|
|
||||||
let actor = game.actors.get(rollData.actorId)
|
let actor = game.actors.get(rollData.actorId)
|
||||||
|
|
||||||
// ability/save => 0
|
// ability/save/size => 0
|
||||||
let diceFormula
|
let diceFormula
|
||||||
let startFormula = "0d6cs>=5"
|
let startFormula = "0d6cs>=5"
|
||||||
if (rollData.ability) {
|
if (rollData.ability) {
|
||||||
@ -494,6 +544,10 @@ export class CrucibleUtility {
|
|||||||
if (rollData.save) {
|
if (rollData.save) {
|
||||||
startFormula = String(rollData.save.value) + "d6cs>=5"
|
startFormula = String(rollData.save.value) + "d6cs>=5"
|
||||||
}
|
}
|
||||||
|
if (rollData.sizeDice) {
|
||||||
|
let nb = rollData.sizeDice.nb + rollData.distanceBonusDice + this.getDiceFromCover(rollData.hasCover) + this.getDiceFromSituational(rollData.situational)
|
||||||
|
startFormula = String(nb) + String(rollData.sizeDice.dice) + "cs>=5"
|
||||||
|
}
|
||||||
diceFormula = startFormula
|
diceFormula = startFormula
|
||||||
|
|
||||||
// skill => 2
|
// skill => 2
|
||||||
@ -532,7 +586,7 @@ export class CrucibleUtility {
|
|||||||
|
|
||||||
// advantage => 8
|
// advantage => 8
|
||||||
let advFormula = "+ 0d8cs>=5"
|
let advFormula = "+ 0d8cs>=5"
|
||||||
if (rollData.advantage == "advantage1") {
|
if (rollData.advantage == "advantage1" || rollData.forceAdvantage) {
|
||||||
advFormula = "+ 1d8cs>=5"
|
advFormula = "+ 1d8cs>=5"
|
||||||
}
|
}
|
||||||
if (rollData.advantage == "advantage2") {
|
if (rollData.advantage == "advantage2") {
|
||||||
@ -542,7 +596,7 @@ export class CrucibleUtility {
|
|||||||
|
|
||||||
// disadvantage => 10
|
// disadvantage => 10
|
||||||
let disFormula = "- 0d8cs>=5"
|
let disFormula = "- 0d8cs>=5"
|
||||||
if (rollData.disadvantage == "disadvantage1") {
|
if (rollData.disadvantage == "disadvantage1" || rollData.forceDisadvantage) {
|
||||||
disFormula = "- 1d8cs>=5"
|
disFormula = "- 1d8cs>=5"
|
||||||
}
|
}
|
||||||
if (rollData.disadvantage == "disadvantage2") {
|
if (rollData.disadvantage == "disadvantage2") {
|
||||||
@ -581,10 +635,17 @@ export class CrucibleUtility {
|
|||||||
rollData.rollOrder = 0
|
rollData.rollOrder = 0
|
||||||
rollData.roll = myRoll
|
rollData.roll = myRoll
|
||||||
rollData.nbSuccess = myRoll.total
|
rollData.nbSuccess = myRoll.total
|
||||||
|
|
||||||
|
if (rollData.rollAdvantage == "none" && rollData.forceRollAdvantage) {
|
||||||
|
rollData.rollAdvantage = "roll-advantage"
|
||||||
|
}
|
||||||
|
if (rollData.rollAdvantage == "none" && rollData.forceRollDisadvantage) {
|
||||||
|
rollData.rollAdvantage = "roll-disadvantage"
|
||||||
|
}
|
||||||
if (rollData.rollAdvantage != "none") {
|
if (rollData.rollAdvantage != "none") {
|
||||||
|
|
||||||
rollData.rollOrder = 1
|
rollData.rollOrder = 1
|
||||||
rollData.rollType = (rollData.rollAdvantage == "roll-advantage") ? "Advantage": "Disadvantage"
|
rollData.rollType = (rollData.rollAdvantage == "roll-advantage") ? "Advantage" : "Disadvantage"
|
||||||
this.createChatWithRollMode(rollData.alias, {
|
this.createChatWithRollMode(rollData.alias, {
|
||||||
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
|
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
|
||||||
})
|
})
|
||||||
@ -592,7 +653,7 @@ export class CrucibleUtility {
|
|||||||
rollData.rollOrder = 2
|
rollData.rollOrder = 2
|
||||||
let myRoll2 = new Roll(diceFormula).roll({ async: false })
|
let myRoll2 = new Roll(diceFormula).roll({ async: false })
|
||||||
await this.showDiceSoNice(myRoll2, game.settings.get("core", "rollMode"))
|
await this.showDiceSoNice(myRoll2, game.settings.get("core", "rollMode"))
|
||||||
|
|
||||||
rollData.roll = myRoll2 // Tmp switch to display the proper results
|
rollData.roll = myRoll2 // Tmp switch to display the proper results
|
||||||
rollData.nbSuccess = myRoll2.total
|
rollData.nbSuccess = myRoll2.total
|
||||||
this.createChatWithRollMode(rollData.alias, {
|
this.createChatWithRollMode(rollData.alias, {
|
||||||
|
156
system.json
156
system.json
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"authors": [
|
"authors": [
|
||||||
{"name": "Uberwald"}
|
{
|
||||||
|
"name": "Uberwald",
|
||||||
|
"flags": {}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"description": "Crucible RPG system for FoundryVTT",
|
"description": "Crucible RPG system for FoundryVTT",
|
||||||
"esmodules": [
|
"esmodules": [
|
||||||
@ -12,203 +15,182 @@
|
|||||||
{
|
{
|
||||||
"lang": "en",
|
"lang": "en",
|
||||||
"name": "English",
|
"name": "English",
|
||||||
"path": "lang/en.json"
|
"path": "lang/en.json",
|
||||||
|
"flags": {}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"library": false,
|
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"media": [],
|
|
||||||
"name": "fvtt-crucible-rpg",
|
|
||||||
"packs": [
|
"packs": [
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Armors",
|
"label": "Armors",
|
||||||
"name": "armor",
|
"name": "armor",
|
||||||
"path": "./packs/armor.db",
|
"path": "packs/armor.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"armour"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Equipments",
|
"label": "Equipments",
|
||||||
"name": "equipment",
|
"name": "equipment",
|
||||||
"path": "./packs/equipment.db",
|
"path": "packs/equipment.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"equipment"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Shields",
|
"label": "Shields",
|
||||||
"name": "shields",
|
"name": "shields",
|
||||||
"path": "./packs/shields.db",
|
"path": "packs/shields.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"shield"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Weapons",
|
"label": "Weapons",
|
||||||
"name": "weapons",
|
"name": "weapons",
|
||||||
"path": "./packs/weapons.db",
|
"path": "packs/weapons.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"weapon", "melee", "ranged"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Conditions",
|
"label": "Conditions",
|
||||||
"name": "conditions",
|
"name": "conditions",
|
||||||
"path": "./packs/conditions.db",
|
"path": "packs/conditions.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"condition"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Currency",
|
"label": "Currency",
|
||||||
"name": "currency",
|
"name": "currency",
|
||||||
"path": "./packs/currency.db",
|
"path": "packs/currency.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"currency", "money"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Lore - Air",
|
"label": "Lore - Air",
|
||||||
"name": "lore-air",
|
"name": "lore-air",
|
||||||
"path": "./packs/lore-air.db",
|
"path": "packs/lore-air.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"lore", "air"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Lore - Earth",
|
"label": "Lore - Earth",
|
||||||
"name": "lore-earth",
|
"name": "lore-earth",
|
||||||
"path": "./packs/lore-earth.db",
|
"path": "packs/lore-earth.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"lore", "earth"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Lore - Fire",
|
"label": "Lore - Fire",
|
||||||
"name": "lore-fire",
|
"name": "lore-fire",
|
||||||
"path": "./packs/lore-fire.db",
|
"path": "packs/lore-fire.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"lore", "fire"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Lore - Water",
|
"label": "Lore - Water",
|
||||||
"name": "lore-water",
|
"name": "lore-water",
|
||||||
"path": "./packs/lore-water.db",
|
"path": "packs/lore-water.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"lore", "water"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Lore - Shadow",
|
"label": "Lore - Shadow",
|
||||||
"name": "lore-shadow",
|
"name": "lore-shadow",
|
||||||
"path": "./packs/lore-shadow.db",
|
"path": "packs/lore-shadow.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"lore", "shadow"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Skills",
|
"label": "Skills",
|
||||||
"name": "skills",
|
"name": "skills",
|
||||||
"path": "./packs/skills.db",
|
"path": "packs/skills.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"skill"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Feats",
|
"label": "Feats",
|
||||||
"name": "feats",
|
"name": "feats",
|
||||||
"path": "./packs/feats.db",
|
"path": "packs/feats.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"feat"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Poisons",
|
"label": "Poisons",
|
||||||
"name": "poisons",
|
"name": "poisons",
|
||||||
"path": "./packs/poisons.db",
|
"path": "packs/poisons.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"poison"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Powers - Class",
|
"label": "Powers - Class",
|
||||||
"name": "classpowers",
|
"name": "classpowers",
|
||||||
"path": "./packs/classpowers.db",
|
"path": "packs/classpowers.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"powers"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Tricks & Traps",
|
"label": "Tricks & Traps",
|
||||||
"name": "trickstraps",
|
"name": "trickstraps",
|
||||||
"path": "./packs/trickstraps.db",
|
"path": "packs/trickstraps.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"tricks", "traps"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Action Tokens",
|
"label": "Action Tokens",
|
||||||
"name": "action-tokens",
|
"name": "action-tokens",
|
||||||
"path": "./packs/action-tokens.db",
|
"path": "packs/action-tokens.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"action"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Powers - Monsters",
|
"label": "Powers - Monsters",
|
||||||
"name": "monster-powers",
|
"name": "monster-powers",
|
||||||
"path": "./packs/monster-powers.db",
|
"path": "packs/monster-powers.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"power"
|
"flags": {}
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "RollTable",
|
"type": "RollTable",
|
||||||
"label": "Rolltables",
|
"label": "Rolltables",
|
||||||
"name": "rolltables",
|
"name": "rolltables",
|
||||||
"path": "./packs/rolltables.db",
|
"path": "packs/rolltables.db",
|
||||||
"system": "fvtt-crucible-rpg",
|
"system": "fvtt-crucible-rpg",
|
||||||
"tags": [
|
"private": false,
|
||||||
"rolltable"
|
"flags": {}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryTokenAttribute": "secondary.hp",
|
"primaryTokenAttribute": "secondary.hp",
|
||||||
@ -217,16 +199,16 @@
|
|||||||
"styles": [
|
"styles": [
|
||||||
"styles/simple.css"
|
"styles/simple.css"
|
||||||
],
|
],
|
||||||
"version": "10.0.2",
|
"version": "10.0.6",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10.276",
|
"verified": "10.278",
|
||||||
"maximum": "10"
|
"maximum": "10"
|
||||||
},
|
},
|
||||||
"templateVersion": 20,
|
|
||||||
"title": "Crucible RPG",
|
"title": "Crucible RPG",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v10.0.2.zip",
|
"download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v10.0.6.zip",
|
||||||
"url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg",
|
||||||
"background" : "./images/ui/crucible_welcome_page.webp"
|
"background": "images/ui/crucible_welcome_page.webp",
|
||||||
}
|
"id": "fvtt-crucible-rpg"
|
||||||
|
}
|
@ -23,7 +23,9 @@
|
|||||||
<li>Fumble ! : {{successDetails.fumbleDetails.data.text}} </li>
|
<li>Fumble ! : {{successDetails.fumbleDetails.data.text}} </li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
||||||
{{#if armorResult}}
|
{{#if armorResult}}
|
||||||
|
<li>Armor initial result : {{armorResult.rawArmor}}</li>
|
||||||
{{#each armorResult.messages as |message idx|}}
|
{{#each armorResult.messages as |message idx|}}
|
||||||
<li>{{message}}</li>
|
<li>{{message}}</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<li><strong>Roll with {{rollType}} - Roll 2</strong></li>
|
<li><strong>Roll with {{rollType}} - Roll 2</strong></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq rollOrder 3)}}
|
{{#if (eq rollOrder 3)}}
|
||||||
<li><strong>Roll with advantage - Final result !</strong></li>
|
<li><strong>Roll with {{rollType}} - Final result !</strong></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if save}}
|
{{#if save}}
|
||||||
@ -36,6 +36,14 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if sizeDice}}
|
||||||
|
<li>Size/Range/Cover/Situational dices
|
||||||
|
({{#each roll.terms.0.results as |die idx|}}
|
||||||
|
{{die.result}}
|
||||||
|
{{/each}})
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if ability}}
|
{{#if ability}}
|
||||||
<li>Ability : {{ability.label}} - {{ability.value}}d6
|
<li>Ability : {{ability.label}} - {{ability.value}}d6
|
||||||
({{#each roll.terms.0.results as |die idx|}}
|
({{#each roll.terms.0.results as |die idx|}}
|
||||||
@ -55,21 +63,26 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if (eq advantage "advantage1")}}
|
{{#if noAdvantage}}
|
||||||
<li>1 Advantage Die !
|
<li>No advantage due to condition : {{noAdvantage.name}}</li>
|
||||||
({{#each roll.terms.8.results as |die idx|}}
|
{{else}}
|
||||||
{{die.result}}
|
{{#if (or (eq advantage "advantage1") forceAdvantage)}}
|
||||||
{{/each}})
|
<li>1 Advantage Die !
|
||||||
</li>
|
({{#each roll.terms.8.results as |die idx|}}
|
||||||
|
{{die.result}}
|
||||||
|
{{/each}})
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
{{#if (eq advantage "advantage2") }}
|
||||||
|
<li>2 Advantage Dice !
|
||||||
|
({{#each roll.terms.8.results as |die idx|}}
|
||||||
|
{{die.result}}
|
||||||
|
{{/each}})
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq advantage "advantage2")}}
|
|
||||||
<li>2 Advantage Dice !
|
{{#if (or (eq disadvantage "disadvantage1") forceDisadvantage)}}
|
||||||
({{#each roll.terms.8.results as |die idx|}}
|
|
||||||
{{die.result}}
|
|
||||||
{{/each}})
|
|
||||||
</li>
|
|
||||||
{{/if}}
|
|
||||||
{{#if (eq disadvantage "disadvantage1")}}
|
|
||||||
<li>1 Disadvantage Die !
|
<li>1 Disadvantage Die !
|
||||||
({{#each roll.terms.10.results as |die idx|}}
|
({{#each roll.terms.10.results as |die idx|}}
|
||||||
{{die.result}}
|
{{die.result}}
|
||||||
|
@ -18,17 +18,16 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
{{#if isRollTarget}}
|
{{#if isRangedAttack}}
|
||||||
<div>{{defender.name}} is under Ranged attack. He must roll a Target Roll to defend himself.</div>
|
<div>{{defender.name}} is under Ranged attack. He must roll a Target Roll to defend himself.</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div>{{defender.name}} is under Melee attack. He must roll a Defense Roll to defend himself.</div>
|
<div>{{defender.name}} is under Melee attack. He must roll a Defense Roll to defend himself.</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{{#if isRollTarget}}
|
{{#if isRangedAttack}}
|
||||||
<li>
|
<li>
|
||||||
<button class="chat-card-button roll-defense-ranged" data-defense-weapon-id="{{weapon._id}}"
|
<button class="chat-card-button roll-defense-ranged" data-roll-id="{{@root.rollId}}">Roll Target !</button>
|
||||||
data-roll-id="{{@root.rollId}}">Roll Target !</button>
|
|
||||||
</li>
|
</li>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li>
|
<li>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.loosehpround" {{checked data.loosehpround}}/></label>
|
<label class="attribute-value checkbox"><input type="checkbox" name="system.loosehpround" {{checked data.loosehpround}}/></label>
|
||||||
</li>
|
</li>
|
||||||
{{#if data.loosehpround}}
|
{{#if data.loosehpround}}
|
||||||
<li class="flexrow"><label class="generic-label">Quantity</label>
|
<li class="flexrow"><label class="generic-label">Number of HP : </label>
|
||||||
<input type="text" class="input-numeric-short padd-right" name="system.loohproundvalue" value="{{data.loohproundvalue}}" data-dtype="Number"/>
|
<input type="text" class="input-numeric-short padd-right" name="system.loohproundvalue" value="{{data.loohproundvalue}}" data-dtype="Number"/>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<label class="attribute-value checkbox"><input type="checkbox" name="system.isranged" {{checked data.isranged}}/></label>
|
<label class="attribute-value checkbox"><input type="checkbox" name="system.isranged" {{checked data.isranged}}/></label>
|
||||||
</li>
|
</li>
|
||||||
{{#if data.isranged}}
|
{{#if data.isranged}}
|
||||||
<li class="flexrow"><label class="generic-label">Range</label>
|
<li class="flexrow"><label class="generic-label">Effective Range</label>
|
||||||
<input type="text" class="right" name="system.range" value="{{data.range}}" data-dtype="String"/>
|
<input type="text" class="right" name="system.range" value="{{data.range}}" data-dtype="String"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow"><label class="generic-label">Max range</label>
|
<li class="flexrow"><label class="generic-label">Max range</label>
|
||||||
|
@ -7,6 +7,54 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
|
|
||||||
|
{{#if sizeDice}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Size basic dices : </span>
|
||||||
|
<span class="roll-dialog-label">{{sizeDice.nb}}{{sizeDice.dice}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Distance bonus dice(s) : </span>
|
||||||
|
<select class="status-small-label color-class-common" type="text" id="distanceBonusDice" value="{{distanceBonusDice}}" data-dtype="String" >
|
||||||
|
{{#select distanceBonusDice}}
|
||||||
|
<option value="0">0</option>
|
||||||
|
<option value="1">1</option>
|
||||||
|
<option value="2">2</option>
|
||||||
|
<option value="3">3</option>
|
||||||
|
<option value="4">4</option>
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if hasCover}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Cover : </span>
|
||||||
|
<select class="status-small-label color-class-common" type="text" id="hasCover" value="{{hasCover}}" data-dtype="String" >
|
||||||
|
{{#select hasCover}}
|
||||||
|
<option value="none">None</option>
|
||||||
|
<option value="cover50">Cover at 50% (+1 dice)</option>
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if situational}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Situational : </span>
|
||||||
|
<select class="status-small-label color-class-common" type="text" id="situational" value="{{situational}}" data-dtype="String" >
|
||||||
|
{{#select situational}}
|
||||||
|
<option value="none">None</option>
|
||||||
|
<option value="dodge">Dodge (+1 dice)</option>
|
||||||
|
<option value="prone">Prone (+1 dice)</option>
|
||||||
|
<option value="moving">Moving (+1 dice)</option>
|
||||||
|
<option value="Engaged">Engaged (+1 dice)</option>
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
|
||||||
{{#if save}}
|
{{#if save}}
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
@ -51,17 +99,23 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="flexrow">
|
{{#if noAdvantage}}
|
||||||
<span class="roll-dialog-label">Advantage : </span>
|
<div>
|
||||||
<select class="status-small-label color-class-common" type="text" id="advantage" value="{{advantage}}" data-dtype="String" >
|
<span class="roll-dialog-label">No advantage due to condition : {{noAdvantage.name}}</span>
|
||||||
{{#select advantage}}
|
</div>
|
||||||
<option value="none">None</option>
|
{{else}}
|
||||||
<option value="advantage1">1 Advantage</option>
|
<div class="flexrow">
|
||||||
<option value="advantage2">2 Advantages</option>
|
<span class="roll-dialog-label">Advantage : </span>
|
||||||
{{/select}}
|
<select class="status-small-label color-class-common" type="text" id="advantage" value="{{advantage}}" data-dtype="String" >
|
||||||
</select>
|
{{#select advantage}}
|
||||||
</div>
|
<option value="none">None</option>
|
||||||
|
<option value="advantage1">1 Advantage</option>
|
||||||
|
<option value="advantage2">2 Advantages</option>
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span class="roll-dialog-label">Disadvantage : </span>
|
<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 class="status-small-label color-class-common" type="text" id="disadvantage" value="{{disadvantage}}" data-dtype="String" >
|
||||||
@ -84,6 +138,30 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#if forceAdvantage}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">1 Advantage from condition : {{forceAdvantage.name}}
|
||||||
|
{{#if advantageFromTarget}} (Provided by targetted actor) {{/if}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if forceDisadvantage}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">1 Disadvantage from condition : {{forceDisadvantage.name}} </span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if forceRollAdvantage}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Roll Advantage from condition : {{forceRollAdvantage.name}} </span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if forceRollDisadvantage}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Roll Disadvantage from condition : {{forceRollDisadvantage.name}} </span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
Reference in New Issue
Block a user