This commit is contained in:
sladecraven 2022-11-27 16:06:26 +01:00
parent 56ff013178
commit c5a962936c
13 changed files with 322 additions and 702 deletions

View File

@ -13,7 +13,7 @@ export class Avd12ActorSheet extends ActorSheet {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-avd12", "sheet", "actor"],
template: "systems/fvtt-avd12/templates/actor-sheet.html",
template: "systems/fvtt-avd12/templates/actors/actor-sheet.hbs",
width: 960,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "skills" }],
@ -35,11 +35,12 @@ export class Avd12ActorSheet extends ActorSheet {
cssClass: this.isEditable ? "editable" : "locked",
system: duplicate(this.object.system),
limited: this.object.limited,
skills: this.actor.getSkills( ),
modules: this.actor.getModules(),
traits: this.actor.getTraits(),
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())),
spells: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getLore())),
spells: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getSpells())),
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
equippedWeapons: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquippedWeapons()) ),
equippedArmor: this.actor.getEquippedArmor(),
@ -81,7 +82,7 @@ export class Avd12ActorSheet extends ActorSheet {
// Delete Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item")
CrucibleUtility.confirmDelete(this, li)
Avd12Utility.confirmDelete(this, li)
})
html.find('.item-add').click(ev => {
let dataType = $(ev.currentTarget).data("type")
@ -129,14 +130,10 @@ export class Avd12ActorSheet extends ActorSheet {
this.actor.incDecAmmo( li.data("item-id"), +1 )
} );
html.find('.roll-ability').click((event) => {
const abilityKey = $(event.currentTarget).data("ability-key");
this.actor.rollAbility(abilityKey);
});
html.find('.roll-skill').click((event) => {
const li = $(event.currentTarget).parents(".item")
const skillId = li.data("item-id")
this.actor.rollSkill(skillId)
let attrKey = $(event.currentTarget).data("attr-key")
let skillKey = $(event.currentTarget).data("skill-key")
this.actor.rollSkill(attrKey, skillKey)
});
html.find('.roll-weapon').click((event) => {

View File

@ -49,13 +49,32 @@ export class Avd12Actor extends Actor {
/* -------------------------------------------- */
async prepareData() {
super.prepareData();
super.prepareData()
}
/* -------------------------------------------- */
computeHitPoints() {
if (this.type == "character") {
}
}
/* -------------------------------------------- */
rebuildSkills() {
for (let attrKey in this.system.attributes) {
let attr = this.system.attributes[attrKey]
for (let skillKey in attr.skills) {
let dataPath = attrKey + ".skills." + skillKey + ".modifier"
let skill = attr.skills[skillKey]
skill.modifier = 0
let availableTraits = this.items.filter(t => t.type == "trait" && t.system.computebonus && t.system.bonusdata == dataPath)
for (let trait of availableTraits) {
skill.modifier += Number(trait.system.bonusvalue)
}
skill.finalvalue = skill.modifier + attr.value
}
}
}
/* -------------------------------------------- */
@ -65,7 +84,8 @@ export class Avd12Actor extends Actor {
this.system.encCapacity = this.getEncumbranceCapacity()
this.buildContainerTree()
this.computeHitPoints()
this.computeEffortPoints()
this.rebuildSkills()
}
super.prepareDerivedData();
@ -77,6 +97,11 @@ export class Avd12Actor extends Actor {
super._preUpdate(changed, options, user);
}
/*_onUpdateEmbeddedDocuments( embeddedName, ...args ) {
this.rebuildSkills()
super._onUpdateEmbeddedDocuments(embeddedName, ...args)
}*/
/* -------------------------------------------- */
getEncumbranceCapacity() {
return 1;
@ -106,6 +131,10 @@ export class Avd12Actor extends Actor {
}
return undefined
}
getSpells() {
let comp = duplicate(this.items.filter(item => item.type == 'spell') || []);
return comp
}
/* -------------------------------------------- */
getShields() {
let comp = duplicate(this.items.filter(item => item.type == 'shield') || []);
@ -153,15 +182,14 @@ export class Avd12Actor extends Actor {
}
/* -------------------------------------------- */
getSkills() {
let comp = duplicate(this.items.filter(item => item.type == 'skill') || [])
for (let skill of comp) {
Avd12Utility.updateSkill(skill)
}
Avd12Utility.sortArrayObjectsByName(comp)
getModules() {
let comp = duplicate(this.items.filter(item => item.type == 'module') || [])
return comp
}
getTraits() {
let comp = duplicate(this.items.filter(item => item.type == 'trait') || [])
return comp
}
/* -------------------------------------------- */
getRelevantAttribute(attrKey) {
let comp = duplicate(this.items.filter(item => item.type == 'skill' && item.system.attribute == attrKey) || []);
@ -212,6 +240,31 @@ export class Avd12Actor extends Actor {
return duplicate(this.items.filter(item => item.type == "equipment") || [])
}
/* ------------------------------------------- */
async addModuleLevel(moduleId, levelChoice) {
for (let itemId in levelChoice.features) {
let itemData = duplicate(levelChoice.features[itemId])
itemData.system.moduleId = moduleId
itemData.system.originalId = itemId
//let item = await Item.create(itemData, { temporary: true });
await this.createEmbeddedDocuments('Item', [itemData])
}
}
/* ------------------------------------------- */
async deleteModuleLevel(moduleId, levelChoice) {
let toDelete = []
for (let itemId in levelChoice.features) {
let item = this.items.find(it => Avd12Utility.isModuleItemAllowed(it.type) && it.system.moduleId == moduleId && it.system.originalId == itemId)
if (item) {
toDelete.push(item.id)
}
}
console.log("toele", toDelete, moduleId, levelChoice)
if (toDelete.length > 0) {
await this.deleteEmbeddedDocuments('Item', toDelete)
}
}
/* ------------------------------------------- */
async buildContainerTree() {
let equipments = duplicate(this.items.filter(item => item.type == "equipment") || [])
@ -451,59 +504,13 @@ export class Avd12Actor extends Actor {
}
/* -------------------------------------------- */
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
}
getCommonRollData() {
let rollData = Avd12Utility.getBasicRollData()
rollData.alias = this.name
rollData.actorImg = this.img
rollData.actorId = this.id
rollData.img = this.img
rollData.featsDie = this.getFeatsWithDie()
rollData.featsSL = this.getFeatsWithSL()
rollData.armors = this.getArmors()
rollData.conditions = this.getConditions()
rollData.featDieName = "none"
rollData.featSLName = "none"
rollData.rollAdvantage = "none"
rollData.advantage = "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) {
rollData.ability = this.getAbility(abilityKey)
rollData.selectedKill = undefined
}
console.log("ROLLDATA", rollData)
@ -518,28 +525,22 @@ export class Avd12Actor extends Actor {
ui.notifications.warn("You are targetting a token with a skill : please use a Weapon instead.")
return
}
Avd12Utility.rollCrucible(rollData)
Avd12Utility.rollAvd12(rollData)
}
/* -------------------------------------------- */
rollSkill(skillId) {
let skill = this.items.get(skillId)
rollSkill(attrKey, skillKey) {
let attr = this.system.attributes[attrKey]
let skill = attr.skills[skillKey]
if (skill) {
if (skill.system.islore && skill.system.level == 0) {
ui.notifications.warn("You can't use Lore Skills with a SL of 0.")
return
}
skill = duplicate(skill)
Avd12Utility.updateSkill(skill)
let abilityKey = skill.system.ability
let rollData = this.getCommonRollData(abilityKey)
skill.name = Avd12Utility.upperFirst(skillKey)
skill.attr = duplicate(attr)
let rollData = this.getCommonRollData()
rollData.mode = "skill"
rollData.skill = skill
rollData.title = "Roll Skill " + skill.name
rollData.img = skill.img
if (rollData.target) {
ui.notifications.warn("You are targetting a token with a skill : please use a Weapon instead.")
return
}
this.startRoll(rollData)
}
}
@ -609,7 +610,7 @@ export class Avd12Actor extends Actor {
let rollData = this.getCommonRollData()
rollData.defenderTokenId = undefined // Cleanup
rollData.mode = "rangeddefense"
if ( attackRollData) {
if (attackRollData) {
rollData.attackRollData = duplicate(attackRollData)
rollData.effectiveRange = Avd12Utility.getWeaponRange(attackRollData.weapon)
rollData.tokensDistance = attackRollData.tokensDistance // QoL copy
@ -699,27 +700,10 @@ export class Avd12Actor extends Actor {
return { armorIgnored: true, nbSuccess: 0, messages: ["No armor equipped."] }
}
/* -------------------------------------------- */
rollSave(saveKey) {
let saves = this.getSaveRoll()
let save = saves[saveKey]
if (save) {
save = duplicate(save)
let rollData = this.getCommonRollData()
rollData.mode = "save"
rollData.save = save
if (rollData.target) {
ui.notifications.warn("You are targetting a token with a save roll - Not authorized.")
return
}
this.startRoll(rollData)
}
}
/* -------------------------------------------- */
async startRoll(rollData) {
this.syncRoll(rollData)
let rollDialog = await CrucibleRollDialog.create(this, rollData)
let rollDialog = await Avd12RollDialog.create(this, rollData)
rollDialog.render(true)
}

View File

@ -1,7 +1,5 @@
import { Avd12Utility } from "./avd12-utility.js";
const __ALLOWED_MODULE_TYPES = { "action": 1, "reaction": 1, "freeaction": 1, "trait": 1 }
/**
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
@ -16,11 +14,12 @@ export class Avd12ItemSheet extends ItemSheet {
template: "systems/fvtt-avd12/templates/item-sheet.hbs",
dragDrop: [{ dragSelector: null, dropSelector: null }],
width: 620,
height: 'fit-content',
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }]
});
}
/* -------------------------------------------- */
_getHeaderButtons() {
let buttons = super._getHeaderButtons();
@ -96,7 +95,7 @@ export class Avd12ItemSheet extends ItemSheet {
/* -------------------------------------------- */
postItem() {
let chatData = duplicate(CrucibleUtility.data(this.item));
let chatData = duplicate(this.item)
if (this.actor) {
chatData.actor = { id: this.actor.id };
}
@ -112,7 +111,7 @@ export class Avd12ItemSheet extends ItemSheet {
});
renderTemplate('systems/avd12/templates/post-item.html', chatData).then(html => {
let chatOptions = CrucibleUtility.chatDataSetup(html);
let chatOptions = Avd12Utility.chatDataSetup(html);
ChatMessage.create(chatOptions)
});
}
@ -133,7 +132,7 @@ export class Avd12ItemSheet extends ItemSheet {
ui.notifications.warn("Unable to find relevant item - Aborting drag&drop " + data.uuid)
return
}
if (this.object.type == "module" && __ALLOWED_MODULE_TYPES[item.type]) {
if (this.object.type == "module" && Avd12Utility.isModuleItemAllowed(item.type) ) {
let levels = duplicate(this.object.system.levels)
levels[levelIndex].choices[choiceIndex].features[item.id] = duplicate(item)
this.object.update({ 'system.levels': levels })
@ -144,13 +143,16 @@ export class Avd12ItemSheet extends ItemSheet {
/* -------------------------------------------- */
async viewSubitem(ev) {
let field = $(ev.currentTarget).data('type');
let idx = Number($(ev.currentTarget).data('index'));
let itemData = this.object.system[field][idx];
let levelIndex = Number($(ev.currentTarget).parents(".item").data("level-index"))
let choiceIndex = Number($(ev.currentTarget).parents(".item").data("choice-index"))
let featureId = $(ev.currentTarget).parents(".item").data("feature-id")
let itemData = this.object.system.levels[levelIndex].choices[choiceIndex].features[featureId]
if (itemData.name != 'None') {
let spec = await Item.create(itemData, { temporary: true });
spec.system.origin = "embeddedItem";
new Avd12ItemSheet(spec).render(true);
let item = await Item.create(itemData, { temporary: true });
item.system.origin = "embeddedItem";
new Avd12ItemSheet(item).render(true);
}
}
@ -198,7 +200,7 @@ export class Avd12ItemSheet extends ItemSheet {
let itemType = li.data("item-type");
});
html.find('.view-subitem').click(ev => {
html.find('.module-feature-view').click(ev => {
this.viewSubitem(ev);
});
@ -228,8 +230,15 @@ export class Avd12ItemSheet extends ItemSheet {
for (let choice of levels[levelIndex].choices) {
choice.selected = false // Everybody to false
}
levels[levelIndex].choices[choiceIndex].selected = ev.currentTarget.value
levels[levelIndex].choices[choiceIndex].selected = ev.currentTarget.checked
this.object.update({ 'system.levels': levels })
if ( this.object.actor ) {
if ( ev.currentTarget.checked ) {
this.object.actor.addModuleLevel( this.object.id, levels[levelIndex].choices[choiceIndex] )
} else {
this.object.actor.deleteModuleLevel( this.object.id, levels[levelIndex].choices[choiceIndex] )
}
}
})
}

View File

@ -86,7 +86,7 @@ export class Avd12NPCSheet extends ActorSheet {
// Delete Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item")
CrucibleUtility.confirmDelete(this, li)
Avd12Utility.confirmDelete(this, li)
})
html.find('.item-add').click(ev => {
let dataType = $(ev.currentTarget).data("type")

View File

@ -6,9 +6,9 @@ export class Avd12RollDialog extends Dialog {
static async create(actor, rollData) {
let options = { classes: ["Avd12Dialog"], width: 540, height: 'fit-content', 'z-index': 99999 };
let html = await renderTemplate('systems/fvtt-avd12/templates/dialogs/roll-dialog-generic.html', rollData);
let html = await renderTemplate('systems/fvtt-avd12/templates/dialogs/roll-dialog-generic.hbs', rollData);
return new CrucibleRollDialog(actor, rollData, html, options);
return new Avd12RollDialog(actor, rollData, html, options);
}
/* -------------------------------------------- */
@ -44,7 +44,7 @@ export class Avd12RollDialog extends Dialog {
/* -------------------------------------------- */
async refreshDialog() {
const content = await renderTemplate("systems/fvtt-avd12/templates/dialogs/roll-dialog-generic.html", this.rollData)
const content = await renderTemplate("systems/fvtt-avd12/templates/dialogs/roll-dialog-generic.hbs", this.rollData)
this.data.content = content
this.render(true)
}
@ -58,27 +58,12 @@ export class Avd12RollDialog extends Dialog {
}
$(function () { onLoad(); });
html.find('#advantage').change((event) => {
this.rollData.advantage = event.currentTarget.value
html.find('#bonusMalusRoll').change((event) => {
this.rollData.bonusMalusRoll = event.currentTarget.value
})
html.find('#disadvantage').change((event) => {
this.rollData.disadvantage = event.currentTarget.value
html.find('#targetCheck').change((event) => {
this.rollData.targetCheck = event.currentTarget.value
})
html.find('#rollAdvantage').change((event) => {
this.rollData.rollAdvantage = event.currentTarget.value
})
html.find('#useshield').change((event) => {
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)
})
}
}

View File

@ -2,6 +2,9 @@
import { Avd12Combat } from "./avd12-combat.js";
import { Avd12Commands } from "./avd12-commands.js";
/* -------------------------------------------- */
const __ALLOWED_MODULE_TYPES = { "action": 1, "reaction": 1, "freeaction": 1, "trait": 1 }
/* -------------------------------------------- */
export class Avd12Utility {
@ -65,6 +68,11 @@ export class Avd12Utility {
return duplicate(this.shieldSkills)
}
/* -------------------------------------------- */
static isModuleItemAllowed(type) {
return __ALLOWED_MODULE_TYPES[type]
}
/* -------------------------------------------- */
static buildBonusList() {
let bonusList = []
@ -466,95 +474,17 @@ export class Avd12Utility {
let actor = game.actors.get(rollData.actorId)
// ability/save/size => 0
let diceFormula
let startFormula = "0d6cs>=5"
if (rollData.ability) {
startFormula = String(rollData.ability.value) + "d6cs>=5"
}
if (rollData.save) {
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
// skill => 2
// feat => 4
// bonus => 6
// Build the dice formula
let diceFormula = "1d12"
if (rollData.skill) {
let level = rollData.skill.system.level
if (rollData.skill.system.issl2) {
rollData.hasSLBonus = true
level += 2
if (level > 7) { level = 7 }
}
rollData.skill.system.skilldice = __skillLevel2Dice[level]
diceFormula += "+" + String(rollData.skill.system.skilldice) + "cs>=5"
if (rollData.skill.system.skilltype == "complex" && rollData.skill.system.level == 0) {
rollData.complexSkillDisadvantage = true
rollData.rollAdvantage = "roll-disadvantage"
}
if (rollData.skill.system.isfeatdie) {
rollData.hasFeatDie = true
diceFormula += "+ 1d10cs>=5"
} else {
diceFormula += `+ 0d10cs>=5`
}
if (rollData.skill.system.bonusdice != "none") {
rollData.hasBonusDice = rollData.skill.system.bonusdice
diceFormula += `+ ${rollData.hasBonusDice}cs>=5`
} else {
diceFormula += `+ 0d6cs>=5`
}
} else {
diceFormula += `+ 0d8cs=>5 + 0d10cs>=5 + 0d6cs>=5`
diceFormula += "+"+rollData.skill.finalvalue
}
// advantage => 8
let advFormula = "+ 0d8cs>=5"
if (rollData.advantage == "advantage1" || rollData.forceAdvantage) {
advFormula = "+ 1d8cs>=5"
}
if (rollData.advantage == "advantage2") {
advFormula = "+ 2d8cs>=5"
}
diceFormula += advFormula
// disadvantage => 10
let disFormula = "- 0d8cs>=5"
if (rollData.disadvantage == "disadvantage1" || rollData.forceDisadvantage) {
disFormula = "- 1d8cs>=5"
}
if (rollData.disadvantage == "disadvantage2") {
disFormula = "- 2d8cs>=5"
}
diceFormula += disFormula
// armor => 12
let skillArmorPenalty = 0
for (let armor of rollData.armors) {
if (armor.system.equipped) {
skillArmorPenalty += armor.system.skillpenalty
}
}
if (rollData.skill && rollData.skill.system.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.system.shielddie) + "cs>=5"
} else {
diceFormula += " + 0d6cs>=5"
diceFormula += "+"+rollData.bonusMalusRoll
if (rollData.skill && rollData.skill.good) {
diceFormula += "+1d4"
}
rollData.diceFormula = diceFormula
// Performs roll
console.log("Roll formula", diceFormula)
@ -563,74 +493,21 @@ export class Avd12Utility {
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.forceRollAdvantage) {
rollData.rollAdvantage = "roll-advantage"
}
if (rollData.rollAdvantage == "none" && rollData.forceRollDisadvantage) {
rollData.rollAdvantage = "roll-disadvantage"
}
if (rollData.rollAdvantage != "none") {
rollData.rollOrder = 1
rollData.rollType = (rollData.rollAdvantage == "roll-advantage") ? "Advantage" : "Disadvantage"
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-avd12/templates/chat-generic-result.html`, rollData)
})
rollData.rollOrder = 2
let myRoll2 = new Roll(diceFormula).roll({ async: false })
await this.showDiceSoNice(myRoll2, game.settings.get("core", "rollMode"))
rollData.roll = myRoll2 // Tmp switch to display the proper results
rollData.nbSuccess = myRoll2.total
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-avd12/templates/chat-generic-result.html`, rollData)
})
rollData.roll = myRoll // Revert the tmp switch
rollData.nbSuccess = myRoll.total
if (rollData.rollAdvantage == "roll-advantage") {
if (myRoll2.total > rollData.nbSuccess) {
hasChanged = true
rollData.roll = myRoll2
rollData.nbSuccess = myRoll2.total
}
} else {
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.system.level > 0) {
let nbSkillSuccess = rollData.roll.terms[2].total
if (nbSkillSuccess == 0 || nbSkillSuccess == rollData.skill.system.level) {
actor.incrementSkillExp(rollData.skill.id, 1)
rollData.isSuccess = false
if ( rollData.targetCheck != "none") {
if( myRoll.total >= Number(rollData.targetCheck)) {
rollData.isSuccess = true
}
}
this.saveRollData(rollData)
actor.lastRoll = rollData
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-avd12/templates/chat-generic-result.html`, rollData)
let msg = await this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-avd12/templates/chat/chat-generic-result.hbs`, rollData)
})
msg.setFlag("world", "rolldata", rollData)
console.log("Rolldata result", rollData)
// Message response
this.displayDefenseMessage(rollData)
// Manage defense result
this.processAttackDefense(rollData)
}
/* -------------------------------------------- */
@ -724,15 +601,16 @@ export class Avd12Utility {
break;
}
chatOptions.alias = chatOptions.alias || name;
ChatMessage.create(chatOptions);
return ChatMessage.create(chatOptions);
}
/* -------------------------------------------- */
static getBasicRollData() {
let rollData = {
rollId: randomID(16),
rollMode: game.settings.get("core", "rollMode"),
advantage: "none"
bonusMalusRoll: 0,
targetCheck : "none",
rollMode: game.settings.get("core", "rollMode")
}
Avd12Utility.updateWithTarget(rollData)
return rollData
@ -748,7 +626,7 @@ export class Avd12Utility {
/* -------------------------------------------- */
static createChatWithRollMode(name, chatOptions) {
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions)
return this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions)
}
/* -------------------------------------------- */

View File

@ -800,6 +800,10 @@ ul, li {
text-align: center;
}
.skill-good-checkbox {
height: 14px;
width: 14px;
}
.flex-actions-bar {
flex-grow: 2;

View File

@ -35,7 +35,7 @@
],
"title": "AnyVenture D12 RPG",
"url": "https://www.uberwald.me/gitea/public/fvtt-avd12",
"version": "10.0.9",
"download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.9.zip",
"version": "10.0.10",
"download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.10.zip",
"background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp"
}

View File

@ -30,14 +30,17 @@
"skills": {
"athletics": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"block": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"strength": {
"modifier": 0,
"finalvalue": 0,
"good": false
}
}
@ -52,14 +55,17 @@
"skills": {
"acrobatics": {
"modifier": 0 ,
"finalvalue": 0,
"good": false
},
"stealth": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"dodge": {
"modifier": 0,
"finalvalue": 0,
"good": false
}
}
@ -74,14 +80,17 @@
"skills": {
"concentration": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"endurance": {
"modifier": 0 ,
"finalvalue": 0,
"good": false
},
"resistance": {
"modifier": 0,
"finalvalue": 0,
"good": false
}
}
@ -96,22 +105,27 @@
"skills": {
"wilderness": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"academic": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"arcanum": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"medicine": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"thievery": {
"modifier": 0,
"finalvalue": 0,
"good": false
}
}
@ -126,18 +140,22 @@
"skills": {
"persuasion": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"insight": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"performance": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"animals": {
"modifier": 0,
"finalvalue": 0,
"good": false
}
}
@ -147,10 +165,12 @@
"skills": {
"search": {
"modifier": 0,
"finalvalue": 0,
"good": false
},
"initiative": {
"modifier": 0,
"finalvalue": 0,
"good": false
}
}

View File

@ -9,68 +9,26 @@
<div class="flexcol">
<div class="flexrow">
<div class="ability-item">
<ul>
{{#each system.attributes as |attribute key|}}
{{#if (eq attribute.col 1)}}
{{> systems/fvtt-crucible-rpg/templates/actors/partial-actor-attribute-block.html attribute=attribute key=key}}
{{/if}}
{{/each}}
</ul>
<li class="item flexrow list-item" data-attr-key="class">
<span class="ability-label " name="class">
<h4 class="ability-text-white ability-margin">Class</h4>
</span>
<select class="competence-base flexrow" type="text" name="system.biodata.class" value="{{data.biodata.class}}" data-dtype="String">
{{#select data.biodata.class}}
<option value="chaplain">Chaplain</option>
<option value="magus">Magus</option>
<option value="martial">Martial</option>
<option value="skalawag">Skalawag</option>
<option value="warden">Warden</option>
{{/select}}
</select>
</li>
</div>
{{#each system.attributes as |attr attrKey|}}
<div class="flexcol">
<div class="flerow">
<span>{{attr.label}}</span>
<input type="text" class="item-field-label-short" name="system.attributes.{{attrKey}}.value" value="{{attr.value}}" data-dtype="Number"/>
</div>
{{#each attr.skills as |skill skillKey|}}
<div class="flexrow">
<span class="item-field-label-medium"><a class="roll-skill" data-attr-key="{{attrKey}}" data-skill-key="{{skillKey}}">{{upperFirst skillKey}} : {{skill.finalvalue}}</a></span>
<input type="checkbox" class="skill-good-checkbox" name="system.attributes.{{attrKey}}.skills.{{skillKey}}.good" {{checked skill.good}} />
</div>
{{/each}}
</div>
{{/each}}
</div>
<div class="ability-item">
<ul>
{{#each data.abilities as |ability key|}}
{{#if (eq ability.col 2)}}
{{> systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html ability=ability key=key}}
{{/if}}
{{/each}}
{{#if equippedArmor}}
<li class="item flexrow list-item" data-attr-key="class">
<img class="sheet-competence-img" src="{{equippedArmor.img}}" />
<span class="ability-label " name="class">
<h4 class="ability-text-white ability-margin"><a class="roll-armor-die ability-margin">{{equippedArmor.name}}</a></h4>
</span>
</li>
{{/if}}
{{#if equippedShield}}
<li class="item flexrow list-item" data-attr-key="class">
<img class="sheet-competence-img" src="{{equippedShield.img}}" />
<span class="ability-label " name="equippedShield">
<h4 class="ability-text-white ability-margin"><a class="roll-shield-die ability-margin">{{equippedShield.name}}</a></h4>
</span>
</li>
{{/if}}
<li class="item flexrow list-item" data-attr-key="class">
<img class="sheet-competence-img" src="systems/fvtt-crucible-rpg/images/icons/feats/Marksman (Ballistic).webp" />
<span class="ability-label " name="rollTarget">
<h4 class="ability-text-white ability-margin"><a class="roll-target-die ability-margin">Target Roll</a></h4>
</span>
</li>
</ul>
</div>
<div class="ability-item status-block">
{{> systems/fvtt-crucible-rpg/templates/partial-actor-status.html}}
</div>
</div>
@ -81,10 +39,13 @@
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="skills">Skills</a>
<a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="lore">Lore</a>
<a class="item" data-tab="main">Main</a>
<a class="item" data-tab="modules">Modules</a>
<a class="item" data-tab="spells">Spells</a>
<a class="item" data-tab="moves">Moves</a>
<a class="item" data-tab="traits">Traits</a>
<a class="item" data-tab="equipment">Equipment</a>
<a class="item" data-tab="crafting">Crafting</a>
<a class="item" data-tab="biodata">Biography</a>
</nav>
@ -92,7 +53,7 @@
<section class="sheet-body">
{{!-- Skills Tab --}}
<div class="tab skills" data-group="primary" data-tab="skills">
<div class="tab main" data-group="primary" data-tab="main">
<ul class="stat-list alternate-list item-list">
<li class="item flexrow list-item items-title-bg">
@ -127,31 +88,20 @@
</div>
{{!-- Combat Tab --}}
<div class="tab combat" data-group="primary" data-tab="combat">
<div class="tab modules" data-group="primary" data-tab="modules">
<div class="flexcol">
<div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Weapons</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Ability</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Range</label>
<h3><label class="items-title-text">Modules</label></h3>
</span>
</li>
{{#each equippedWeapons as |weapon key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
{{#each modules as |module key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{module._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{weapon.img}}" /></a>
<span class="item-name-label-long"><a class ="roll-weapon">{{weapon.name}}</a></span>
<span class="item-field-label-short">{{weapon.system.ability}}</span>
<span class="item-field-label-medium">{{perk.system.range}}</span>
src="{{module.img}}" /></a>
<span class="item-name-label-long"><a class ="item-edit">{{module.name}}</a></span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
@ -162,84 +112,24 @@
</ul>
</div>
<div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">Feats</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Feature Die?</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">SL?</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">SL</label>
</span>
</li>
{{#each feats as |feat key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{feat._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{feat.img}}" /></a>
<span class="item-name-label-long">{{feat.name}}</span>
<span class="item-field-label-medium">{{upperFirst feat.system.isfeatdie}}</span>
<span class="item-field-label-medium">{{upperFirst feat.system.issl}}</span>
<span class="item-field-label-medium">{{feat.system.sl}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<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-long">
<h3><label class="items-title-text">Conditions</label></h3>
</span>
</li>
{{#each conditions as |condition key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{condition._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{condition.img}}" /></a>
<span class="item-name-label-long">{{condition.name}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Lore Tab --}}
<div class="tab lore" data-group="primary" data-tab="lore">
{{!-- Spells Tab --}}
<div class="tab spells" data-group="primary" data-tab="spells">
<div class="flexcol">
<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">Lore</label></h3>
<h3><label class="items-title-text">Name</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Lore</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Circle</label>
<label class="short-label">Type</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Range</label>
<label class="short-label">Level</label>
</span>
</li>
@ -248,11 +138,88 @@
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{spell.img}}" /></a>
<span class="item-name-label">
<a class="power-roll">{{spell.name}}</a>
<a class="spell-roll">{{spell.name}}</a>
</span>
<span class="item-field-label-medium">{{upperFirst spell.system.lore}}</span>
<span class="item-field-label-short">{{upperFirst spell.system.circle}}</span>
<span class="item-field-label-medium">{{upperFirst spell.system.range}}</span>
<span class="item-field-label-medium">{{upperFirst spell.system.spelltype}}</span>
<span class="item-field-label-medium">{{upperFirst spell.system.level}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- moves Tab --}}
<div class="tab moves" data-group="primary" data-tab="moves">
<div class="flexcol">
<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">Name</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Level</label>
</span>
</li>
{{#each spells as |spell key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{spell._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{spell.img}}" /></a>
<span class="item-name-label">
<a class="spell-roll">{{spell.name}}</a>
</span>
<span class="item-field-label-medium">{{upperFirst spell.system.spelltype}}</span>
<span class="item-field-label-medium">{{upperFirst spell.system.level}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- traits Tab --}}
<div class="tab traits" data-group="primary" data-tab="traits">
<div class="flexcol">
<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">Name</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Type</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Level</label>
</span>
</li>
{{#each traits as |trait key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{trait._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{trait.img}}" /></a>
<span class="item-name-label">
<a class="spell-roll">{{trait.name}}</a>
</span>
<span class="item-field-label-medium">{{upperFirst trait.system.spelltype}}</span>
<span class="item-field-label-medium">{{upperFirst trait.system.level}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>

View File

@ -18,131 +18,22 @@
<div>
<ul>
{{#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 {{rollType}} - Final result !</strong></li>
{{/if}}
{{#if save}}
<li>Save : {{save.label}} - {{save.value}}d6
({{#each roll.terms.0.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
{{#if sizeDice}}
<li>Size/Range/Cover/Situational dices
({{#each roll.terms.0.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
{{#if ability}}
<li>Ability : {{ability.label}} - {{ability.value}}d6
({{#each roll.terms.0.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
{{#if skill}}
<li>Skill : {{skill.name}} - {{skill.data.skilldice}}
{{#if featSL}}
- with Feat SL +{{featSL}}
{{/if}}
&nbsp;({{#each roll.terms.2.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
<li>Skill : {{skill.name}} ({{skill.finalvalue}})
</li>
{{/if}}
{{#if noAdvantage}}
<li>No advantage due to condition : {{noAdvantage.name}}</li>
{{else}}
{{#if (or (eq advantage "advantage1") forceAdvantage)}}
<li>1 Advantage Die !
&nbsp;({{#each roll.terms.8.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
{{#if (eq advantage "advantage2") }}
<li>2 Advantage Dice !
&nbsp;({{#each roll.terms.8.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
<li>Dice Formula {{diceFormula}} </li>
<li>Result {{roll.total}} </li>
{{#if (ne targetCheck "none")}}
{{#if isSuccess}}
<li><strong>Success !</strong></li>
{{else}}
<li><strong>Failure !</strong></li>
{{/if}}
{{/if}}
{{#if (or (eq disadvantage "disadvantage1") forceDisadvantage)}}
<li>1 Disadvantage Die !
&nbsp;({{#each roll.terms.10.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
{{#if (eq disadvantage "disadvantage2")}}
<li>2 Disadvantage Dice !
&nbsp;({{#each roll.terms.10.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
{{#if (eq rollAdvantage "roll-advantage")}}
<li>Roll with Advantage !</li>
{{/if}}
{{#if (eq rollAdvantage "roll-disadvantage")}}
<li>Roll with Disadvantage !</li>
{{/if}}
{{#if skillArmorPenalty}}
<li>Armor Penalty : {{skillArmorPenalty}} Disadvantage Dice
&nbsp;({{#each roll.terms.12.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
{{#if hasBonusDice}}
<li>Skill bonus dice : {{hasBonusDice}}
&nbsp;({{#each roll.terms.6.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</li>
{{/if}}
{{#if complexSkillDisadvantage}}
<li>Roll with Disadvantage because of Complex Skill at SL 0 !</li>
{{/if}}
{{#if hasFeatDie}}
<li>Feat Die : d10
&nbsp;({{#each roll.terms.4.results as |die idx|}}
{{die.result}}&nbsp;
{{/each}})
</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> -->
</ul>
</div>

View File

@ -8,160 +8,44 @@
<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}}
<div class="flexrow">
<span class="roll-dialog-label">{{save.label}} : </span>
<span class="roll-dialog-label">{{save.value}}d6</span>
</div>
{{/if}}
{{#if ability}}
<div class="flexrow">
<span class="roll-dialog-label">Ability : </span>
<span class="roll-dialog-label">{{ability.value}}d6</span>
</div>
{{/if}}
{{#if weapon}}
<div class="flexrow">
<span class="roll-dialog-label">Weapon : </span>
<span class="roll-dialog-label">{{weapon.name}}</span>
</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>
<span class="roll-dialog-label">{{skill.name}} - {{skill.data.skilldice}}</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label">Feature die or SL+2? : </span>
<span class="roll-dialog-label">{{#if skill.data.isfeatdie}} Yes {{else}} No {{/if}}</span>
<span class="roll-dialog-label">{{skill.name}} ({{skill.finalvalue}})</span>
</div>
{{/if}}
{{#if noAdvantage}}
<div>
<span class="roll-dialog-label">No advantage due to condition : {{noAdvantage.name}}</span>
</div>
{{else}}
<div class="flexrow">
<span class="roll-dialog-label">Advantage : </span>
<select class="status-small-label color-class-common" type="text" id="advantage" value="{{advantage}}" data-dtype="String" >
{{#select advantage}}
<div class="flexrow">
<span class="roll-dialog-label">Bonus/Malus : </span>
<select id="bonusMalusRoll" name="bonusMalusRoll">
{{#select bonusMalusRoll}}
<option value="-4">-4</option>
<option value="-3">-3</option>
<option value="-2">-2</option>
<option value="-1">-1</option>
<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>
<div class="flexrow">
<span class="roll-dialog-label">Target check : </span>
<select id="targetCheck" name="targetCheck">
{{#select targetCheck}}
<option value="none">None</option>
<option value="advantage1">1 Advantage</option>
<option value="advantage2">2 Advantages</option>
{{/select}}
</select>
</div>
{{/if}}
<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 disadvantage}}
<option value="none">None</option>
<option value="disadvantage1">1 Disadvantage</option>
<option value="disadvantage2">2 Disadvantages</option>
<option value="5">5 (Trivial)</option>
<option value="7">7 (Easy)</option>
<option value="10">10 (Regular)</option>
<option value="14">14 (Difficult)</option>
<option value="20">20 (Heroic)</option>
{{/select}}
</select>
</select>
</div>
<div class="flexrow">
<span class="roll-dialog-label">Roll with Advantage/Disadvantage : </span>
<select class="status-small-label color-class-common" type="text" id="rollAdvantage" value="{{rollAdvantage}}" data-dtype="String" >
{{#select rollAdvantage}}
<option value="none">None</option>
<option value="roll-advantage">Roll with Advantage</option>
<option value="roll-disadvantage">Roll with Disadvantage</option>
{{/select}}
</select>
</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>
</form>

View File

@ -46,6 +46,7 @@
<li class="flexrow item" data-level-index="{{@../../index}}" data-choice-index="{{choiceIndex}}" data-feature-id="{{feature._id}}" >
<label class="item-field-label-long2">{{feature.name}}</label>
<div class="item-controls item-controls-fixed">
<a class="item-control module-feature-view" title="Edit Feature"><i class="fas fa-edit"></i></a>
<a class="item-control module-feature-delete" title="Delete Feature"><i class="fas fa-trash"></i></a>
</div>
</li>