Compare commits
10 Commits
fvtt-hero-
...
fvtt-hero-
Author | SHA1 | Date | |
---|---|---|---|
2d328659b2 | |||
b9b8fa7c0d | |||
0368be050b | |||
4ca23257cb | |||
e0adf04753 | |||
d399b29d84 | |||
4d3f067bf9 | |||
3489dc6254 | |||
b23d0836fe | |||
0fe4202098 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.history/
|
21
lang/en.json
21
lang/en.json
@ -1,3 +1,18 @@
|
|||||||
{
|
{
|
||||||
|
"ACTOR": {
|
||||||
}
|
"TypeCharacter": "Character"
|
||||||
|
},
|
||||||
|
"ITEM": {
|
||||||
|
"TypeSkill": "Skill",
|
||||||
|
"TypePerk": "Perk",
|
||||||
|
"TypePower": "Power",
|
||||||
|
"TypeTalent": "Talent",
|
||||||
|
"TypeAdvantage": "Advantage",
|
||||||
|
"TypeMartialart": "Martial art",
|
||||||
|
"TypeLimitation": "Limitation",
|
||||||
|
"TypeComplication": "Complication",
|
||||||
|
"TypeEquipment": "Equipment",
|
||||||
|
"TypeCurrency": "Currency",
|
||||||
|
"TypeManeuver": "Maneuver"
|
||||||
|
}
|
||||||
|
}
|
@ -14,8 +14,8 @@ export class Hero6ActorSheet extends ActorSheet {
|
|||||||
return mergeObject(super.defaultOptions, {
|
return mergeObject(super.defaultOptions, {
|
||||||
classes: ["fvtt-hero-system-6", "sheet", "actor"],
|
classes: ["fvtt-hero-system-6", "sheet", "actor"],
|
||||||
template: "systems/fvtt-hero-system-6/templates/actors/actor-sheet.hbs",
|
template: "systems/fvtt-hero-system-6/templates/actors/actor-sheet.hbs",
|
||||||
width: 960,
|
width: 1124,
|
||||||
height: 720,
|
height: 916,
|
||||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "main" }],
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "main" }],
|
||||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||||
editScore: true
|
editScore: true
|
||||||
@ -36,21 +36,34 @@ export class Hero6ActorSheet extends ActorSheet {
|
|||||||
cssClass: this.isEditable ? "editable" : "locked",
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
system: objectData,
|
system: objectData,
|
||||||
characteristics: this.actor.prepareCharac(),
|
characteristics: this.actor.prepareCharac(),
|
||||||
|
defenses: duplicate(this.actor.system.defenses),
|
||||||
|
movements: duplicate(this.actor.system.movements),
|
||||||
limited: this.object.limited,
|
limited: this.object.limited,
|
||||||
skills: this.actor.getSkills( ),
|
skills: this.actor.getSkills( ),
|
||||||
|
perks: this.actor.getPerks( ),
|
||||||
|
powers: await this.actor.getPowers( ),
|
||||||
|
talents: this.actor.getTalents( ),
|
||||||
|
complications: this.actor.getComplications( ),
|
||||||
|
maneuvers: this.actor.getManeuvers( ),
|
||||||
|
nonstockmaneuvers: this.actor.getNonStockManeuvers(),
|
||||||
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
|
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
|
||||||
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
|
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
|
||||||
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())),
|
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())),
|
||||||
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
|
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsMoneys()) ),
|
||||||
equippedWeapons: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquippedWeapons()) ),
|
|
||||||
equippedArmor: this.actor.getEquippedArmor(),
|
|
||||||
equippedShield: this.actor.getEquippedShield(),
|
|
||||||
subActors: duplicate(this.actor.getSubActors()),
|
subActors: duplicate(this.actor.getSubActors()),
|
||||||
race: duplicate(this.actor.getRace()),
|
race: duplicate(this.actor.getRace()),
|
||||||
moneys: duplicate(this.actor.getMoneys()),
|
|
||||||
encCapacity: this.actor.getEncumbranceCapacity(),
|
encCapacity: this.actor.getEncumbranceCapacity(),
|
||||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||||
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}),
|
motivation: await TextEditor.enrichHTML(this.object.system.biodata.motivation, {async: true}),
|
||||||
|
quote: await TextEditor.enrichHTML(this.object.system.biodata.quote, {async: true}),
|
||||||
|
tactics: await TextEditor.enrichHTML(this.object.system.biodata.tactics, {async: true}),
|
||||||
|
campaignuse: await TextEditor.enrichHTML(this.object.system.biodata.campaignuse, {async: true}),
|
||||||
|
appearance: await TextEditor.enrichHTML(this.object.system.biodata.appearance, {async: true}),
|
||||||
|
notes1: await TextEditor.enrichHTML(this.object.system.biodata.notes1, {async: true}),
|
||||||
|
notes2: await TextEditor.enrichHTML(this.object.system.biodata.notes2, {async: true}),
|
||||||
|
notes3: await TextEditor.enrichHTML(this.object.system.biodata.notes3, {async: true}),
|
||||||
|
notes4: await TextEditor.enrichHTML(this.object.system.biodata.notes4, {async: true}),
|
||||||
|
notes5: await TextEditor.enrichHTML(this.object.system.biodata.notes5, {async: true}),
|
||||||
containersTree: this.actor.containersTree,
|
containersTree: this.actor.containersTree,
|
||||||
encCurrent: this.actor.encCurrent,
|
encCurrent: this.actor.encCurrent,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
@ -139,7 +152,18 @@ export class Hero6ActorSheet extends ActorSheet {
|
|||||||
const characKey = $(event.currentTarget).data("charac-key");
|
const characKey = $(event.currentTarget).data("charac-key");
|
||||||
this.actor.rollCharac(characKey);
|
this.actor.rollCharac(characKey);
|
||||||
});
|
});
|
||||||
|
html.find('.roll-direct').click((event) => {
|
||||||
|
const rollFormula = $(event.currentTarget).data("roll-formula")
|
||||||
|
const rollSource = $(event.currentTarget).data("roll-source")
|
||||||
|
Hero6Utility.processDirectRoll( { actorId: this.actor.id, rollFormula: rollFormula, rollSource: rollSource, mode:"directroll"} )
|
||||||
|
});
|
||||||
|
|
||||||
|
html.find('.roll-item').click((event) => {
|
||||||
|
const li = $(event.currentTarget).parents(".item");
|
||||||
|
let itemId = li.data("item-id")
|
||||||
|
this.actor.rollItem(itemId);
|
||||||
|
});
|
||||||
|
|
||||||
html.find('.roll-weapon').click((event) => {
|
html.find('.roll-weapon').click((event) => {
|
||||||
const li = $(event.currentTarget).parents(".item");
|
const li = $(event.currentTarget).parents(".item");
|
||||||
const skillId = li.data("item-id")
|
const skillId = li.data("item-id")
|
||||||
@ -163,7 +187,11 @@ export class Hero6ActorSheet extends ActorSheet {
|
|||||||
|
|
||||||
html.find('.update-field').change(ev => {
|
html.find('.update-field').change(ev => {
|
||||||
const fieldName = $(ev.currentTarget).data("field-name");
|
const fieldName = $(ev.currentTarget).data("field-name");
|
||||||
let value = Number(ev.currentTarget.value);
|
const fieldType = $(ev.currentTarget).data("dtype");
|
||||||
|
let value = ev.currentTarget.value
|
||||||
|
if (fieldType.toLowerCase() == "Number") {
|
||||||
|
value = Number(value)
|
||||||
|
}
|
||||||
this.actor.update( { [`${fieldName}`]: value } );
|
this.actor.update( { [`${fieldName}`]: value } );
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,9 @@ import { Hero6Utility } from "./hero6-utility.js";
|
|||||||
import { Hero6RollDialog } from "./hero6-roll-dialog.js";
|
import { Hero6RollDialog } from "./hero6-roll-dialog.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
const coverBonusTable = { "nocover": 0, "lightcover": 2, "heavycover": 4, "entrenchedcover": 6 };
|
const __speed2Segments = [[0], [7], [6, 12], [4, 8, 12], [3, 6, 9, 12], [3, 5, 8, 10, 12], [2, 4, 6, 8, 10, 12]
|
||||||
const statThreatLevel = ["agi", "str", "phy", "com", "def", "per"]
|
[2, 4, 6, 7, 9, 11, 12], [2, 3, 5, 6, 8, 9, 11, 12], [2, 3, 4, 6, 7, 8, 10, 11, 12], [2, 3, 4, 5, 6, 8, 9, 10, 11, 12],
|
||||||
const __subkey2title = {
|
[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]]
|
||||||
"melee-dmg": "Melee Damage", "melee-atk": "Melee Attack", "ranged-atk": "Ranged Attack",
|
|
||||||
"ranged-dmg": "Ranged Damage", "dmg-res": "Damare Resistance"
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -43,8 +40,8 @@ export class Hero6Actor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (data.type == 'character') {
|
if (data.type == 'character') {
|
||||||
const skills = await Hero6Utility.loadCompendium("fvtt-hero-system-6.skills");
|
//const skills = await Hero6Utility.loadCompendium("fvtt-hero-system-6.skills");
|
||||||
data.items = skills.map(i => i.toObject())
|
//data.items = skills.map(i => i.toObject())
|
||||||
}
|
}
|
||||||
if (data.type == 'npc') {
|
if (data.type == 'npc') {
|
||||||
}
|
}
|
||||||
@ -66,6 +63,10 @@ export class Hero6Actor extends Actor {
|
|||||||
if (this.type == "character") {
|
if (this.type == "character") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
computeDicesValue() {
|
||||||
|
this.system.biodata.presenceattack = Hero6Utility.getDerivatedDiceFormulas(this.system.characteristics.pre.value)
|
||||||
|
this.system.characteristics.str.strdice = Hero6Utility.getDerivatedDiceFormulas(this.system.characteristics.str.value)
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
prepareDerivedData() {
|
prepareDerivedData() {
|
||||||
|
|
||||||
@ -73,6 +74,7 @@ export class Hero6Actor extends Actor {
|
|||||||
this.system.encCapacity = this.getEncumbranceCapacity()
|
this.system.encCapacity = this.getEncumbranceCapacity()
|
||||||
this.buildContainerTree()
|
this.buildContainerTree()
|
||||||
this.computeHitPoints()
|
this.computeHitPoints()
|
||||||
|
this.computeDicesValue()
|
||||||
}
|
}
|
||||||
|
|
||||||
super.prepareDerivedData();
|
super.prepareDerivedData();
|
||||||
@ -91,7 +93,7 @@ export class Hero6Actor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getMoneys() {
|
getMoneys() {
|
||||||
let comp = this.items.filter(item => item.type == 'money');
|
let comp = this.items.filter(item => item.type == 'currency');
|
||||||
Hero6Utility.sortArrayObjectsByName(comp)
|
Hero6Utility.sortArrayObjectsByName(comp)
|
||||||
return comp;
|
return comp;
|
||||||
}
|
}
|
||||||
@ -163,10 +165,75 @@ export class Hero6Actor extends Actor {
|
|||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
prepareSkill(skill) {
|
||||||
|
skill.roll = 0
|
||||||
|
skill.charac = "N/A"
|
||||||
|
if (skill.system.skillfamiliarity) {
|
||||||
|
skill.roll = 8;
|
||||||
|
} else if (skill.system.skillprofiency) {
|
||||||
|
skill.roll = 10;
|
||||||
|
} else if (skill.system.skilltype == "agility") {
|
||||||
|
skill.charac = "DEX"
|
||||||
|
let charac = duplicate(this.system.characteristics.dex)
|
||||||
|
this.prepareCharacValues(charac)
|
||||||
|
skill.roll = charac.roll
|
||||||
|
} else if (skill.system.skilltype == "interaction") {
|
||||||
|
skill.charac = "PRE"
|
||||||
|
let charac = duplicate(this.system.characteristics.pre)
|
||||||
|
this.prepareCharacValues(charac)
|
||||||
|
skill.roll = charac.roll
|
||||||
|
} else if (skill.system.skilltype == "intellect") {
|
||||||
|
skill.charac = "INT"
|
||||||
|
let charac = duplicate(this.system.characteristics.int)
|
||||||
|
this.prepareCharacValues(charac)
|
||||||
|
skill.roll = charac.roll
|
||||||
|
} else if (skill.system.skilltype == "background") {
|
||||||
|
skill.roll = 11
|
||||||
|
} else if (skill.system.skilltype == "custom") {
|
||||||
|
if (skill.system.characteristic == "manual") {
|
||||||
|
skill.roll = skill.system.base
|
||||||
|
} else {
|
||||||
|
skill.charac = skill.system.characteristic
|
||||||
|
let charac = duplicate(this.system.characteristics[skill.system.characteristic])
|
||||||
|
this.prepareCharacValues(charac)
|
||||||
|
skill.roll = charac.roll
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (skill.system.levels > 0) {
|
||||||
|
skill.roll += skill.system.levels
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getSkills() {
|
getSkills() {
|
||||||
let comp = duplicate(this.items.filter(item => item.type == 'skill') || [])
|
let comp = duplicate(this.items.filter(item => item.type == 'skill') || [])
|
||||||
|
for (let skill of comp) {
|
||||||
|
this.prepareSkill(skill)
|
||||||
|
}
|
||||||
|
Hero6Utility.sortArrayObjectsByName(comp)
|
||||||
|
return comp
|
||||||
|
}
|
||||||
|
getPerks() {
|
||||||
|
let comp = duplicate(this.items.filter(item => item.type == 'perk') || [])
|
||||||
|
Hero6Utility.sortArrayObjectsByName(comp)
|
||||||
|
return comp
|
||||||
|
}
|
||||||
|
async getPowers() {
|
||||||
|
let comp = duplicate(this.items.filter(item => item.type == 'power') || [])
|
||||||
|
for (let c of comp) {
|
||||||
|
c.enrichDescription = c.name + "<br>" + await TextEditor.enrichHTML(c.system.description, { async: true })
|
||||||
|
}
|
||||||
|
Hero6Utility.sortArrayObjectsByName(comp)
|
||||||
|
return comp
|
||||||
|
}
|
||||||
|
getTalents() {
|
||||||
|
let comp = duplicate(this.items.filter(item => item.type == 'talent') || [])
|
||||||
|
Hero6Utility.sortArrayObjectsByName(comp)
|
||||||
|
return comp
|
||||||
|
}
|
||||||
|
getComplications() {
|
||||||
|
let comp = duplicate(this.items.filter(item => item.type == 'complication') || [])
|
||||||
Hero6Utility.sortArrayObjectsByName(comp)
|
Hero6Utility.sortArrayObjectsByName(comp)
|
||||||
return comp
|
return comp
|
||||||
}
|
}
|
||||||
@ -204,14 +271,51 @@ export class Hero6Actor extends Actor {
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
getManeuvers() {
|
||||||
/* ------------------------------------------- */
|
let maneuvers = {
|
||||||
getEquipments() {
|
general: this.items.filter(item => item.type == "maneuver" && item.system.maneuvertype == "general"),
|
||||||
return this.items.filter(item => item.type == 'shield' || item.type == 'armor' || item.type == "weapon" || item.type == "equipment");
|
offensive: this.items.filter(item => item.type == "maneuver" && item.system.maneuvertype == "offensive"),
|
||||||
|
defensive: this.items.filter(item => item.type == "maneuver" && item.system.maneuvertype == "defensive")
|
||||||
|
}
|
||||||
|
Hero6Utility.sortArrayObjectsByName(maneuvers.general)
|
||||||
|
Hero6Utility.sortArrayObjectsByName(maneuvers.offensive)
|
||||||
|
Hero6Utility.sortArrayObjectsByName(maneuvers.defensive)
|
||||||
|
return maneuvers
|
||||||
|
}
|
||||||
|
getNonStockManeuvers() {
|
||||||
|
let maneuvers = this.items.filter(item => item.type == "maneuver" && !item.system.isstock)
|
||||||
|
Hero6Utility.sortArrayObjectsByName(maneuvers)
|
||||||
|
return maneuvers
|
||||||
|
}
|
||||||
|
getEquipments() {
|
||||||
|
let list = this.items.filter(item => item.type == "equipment" && item.system.subtype == "equipment");
|
||||||
|
Hero6Utility.sortArrayObjectsByName(list)
|
||||||
|
return list
|
||||||
|
}
|
||||||
|
getWeapons() {
|
||||||
|
let list = this.items.filter(item => item.type == "equipment" && item.system.subtype == "weapon");
|
||||||
|
Hero6Utility.sortArrayObjectsByName(list)
|
||||||
|
return list
|
||||||
|
}
|
||||||
|
getArmors() {
|
||||||
|
let list = this.items.filter(item => item.type == "equipment" && item.system.subtype == "armor");
|
||||||
|
Hero6Utility.sortArrayObjectsByName(list)
|
||||||
|
return list
|
||||||
|
}
|
||||||
|
getShields() {
|
||||||
|
let list = this.items.filter(item => item.type == "equipment" && item.system.subtype == "shield");
|
||||||
|
Hero6Utility.sortArrayObjectsByName(list)
|
||||||
|
return list
|
||||||
|
}
|
||||||
|
getEquipmentsMoneys() {
|
||||||
|
let list = duplicate(this.items.filter(item => item.type == "equipment" && (item.system.subtype == "equipment" || item.system.subtype == "money")) || [])
|
||||||
|
Hero6Utility.sortArrayObjectsByName(list)
|
||||||
|
return list
|
||||||
}
|
}
|
||||||
/* ------------------------------------------- */
|
|
||||||
getEquipmentsOnly() {
|
getEquipmentsOnly() {
|
||||||
return duplicate(this.items.filter(item => item.type == "equipment") || [])
|
let list = duplicate(this.items.filter(item => item.type == "equipment" && item.system.subtype == "equipment") || [])
|
||||||
|
Hero6Utility.sortArrayObjectsByName(list)
|
||||||
|
return list
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------- */
|
/* ------------------------------------------- */
|
||||||
@ -259,7 +363,7 @@ export class Hero6Actor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async incDecHP(formula) {
|
async incDecHP(formula) {
|
||||||
let dmgRoll = new Roll(formula+"[dark-starsorange]").roll({ async: false })
|
let dmgRoll = new Roll(formula + "[dark-starsorange]").roll({ async: false })
|
||||||
await Hero6Utility.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode"))
|
await Hero6Utility.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode"))
|
||||||
let hp = duplicate(this.system.secondary.hp)
|
let hp = duplicate(this.system.secondary.hp)
|
||||||
hp.value = Number(hp.value) + Number(dmgRoll.total)
|
hp.value = Number(hp.value) + Number(dmgRoll.total)
|
||||||
@ -305,13 +409,23 @@ export class Hero6Actor extends Actor {
|
|||||||
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getInitiativeScore(combatId, combatantId) {
|
hasPhase( segmentNumber) {
|
||||||
if (this.type == 'character') {
|
let index = Math.min( Math.max(this.system.characteristics.spd.value, 1), 12) // Security bounds
|
||||||
this.rollMR(true, combatId, combatantId)
|
let phases = __speed2Segments[index]
|
||||||
}
|
return phases.includes(segmentNumber)
|
||||||
console.log("Init required !!!!")
|
}
|
||||||
return -1;
|
/* -------------------------------------------- */
|
||||||
|
getSegments() {
|
||||||
|
let index = Math.min( Math.max(this.system.characteristics.spd.value, 1), 12) // Security bounds
|
||||||
|
return __speed2Segments[index]
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
getBaseInit() {
|
||||||
|
let r = new Roll("1d6").roll({async: false})
|
||||||
|
let base = this.system.characteristics.dex.value + (r.total / 10)
|
||||||
|
return base
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -340,14 +454,14 @@ export class Hero6Actor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
prepareCharacValues( charac) {
|
prepareCharacValues(charac) {
|
||||||
charac.total = charac.base+charac.value
|
charac.total = charac.value
|
||||||
charac.roll = 9 + Math.floor((charac.base+charac.value)/5)
|
charac.roll = 9 + Math.floor((charac.value) / 5)
|
||||||
}
|
}
|
||||||
prepareCharac() {
|
prepareCharac() {
|
||||||
let characs = duplicate(this.system.characteristics)
|
let characs = duplicate(this.system.characteristics)
|
||||||
for(let key in characs) {
|
for (let key in characs) {
|
||||||
this.prepareCharacValues( characs[key])
|
this.prepareCharacValues(characs[key])
|
||||||
}
|
}
|
||||||
return characs
|
return characs
|
||||||
}
|
}
|
||||||
@ -444,6 +558,17 @@ export class Hero6Actor extends Actor {
|
|||||||
}
|
}
|
||||||
this.startRoll(rollData)
|
this.startRoll(rollData)
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
rollItem(itemId) {
|
||||||
|
let item = this.items.get(itemId)
|
||||||
|
let rollData = this.getCommonRollData()
|
||||||
|
rollData.mode = "item"
|
||||||
|
rollData.item = duplicate(item)
|
||||||
|
if (item.type == "skill") {
|
||||||
|
this.prepareSkill(rollData.item)
|
||||||
|
}
|
||||||
|
this.startRoll(rollData)
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
rollSkill(skillId) {
|
rollSkill(skillId) {
|
||||||
|
@ -1,21 +1,141 @@
|
|||||||
import { Hero6Utility } from "./hero6-utility.js";
|
import { Hero6Utility } from "./hero6-utility.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class Hero6Combat extends Combat {
|
export class Hero6CombatTracker extends CombatTracker {
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async rollInitiative(ids, formula = undefined, messageOptions = {} ) {
|
static get defaultOptions() {
|
||||||
|
var path = "systems/fvtt-hero-system-6/templates/apps/combat-tracker.hbs";
|
||||||
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
|
template: path,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
export class Hero6Combat extends Combat {
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static init() {
|
||||||
|
Hooks.on("getCombatTrackerEntryContext", (html, options) => { Hero6Combat.pushMenuOptions(html, options); });
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static pushMenuOptions(html, options) {
|
||||||
|
let newOpt
|
||||||
|
for (let i = 0; i < options.length; i++) {
|
||||||
|
let option = options[i];
|
||||||
|
if (option.name == 'COMBAT.CombatantReroll') { // Replace !
|
||||||
|
option.name = "Hold action";
|
||||||
|
option.condition = true;
|
||||||
|
option.icon = '<i class="far fa-question-circle"></i>';
|
||||||
|
option.callback = target => {
|
||||||
|
Hero6Combat.holdAction(target.data('combatant-id'));
|
||||||
|
}
|
||||||
|
newOpt = duplicate(option)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
newOpt.name = "Abort action"
|
||||||
|
newOpt.callback = target => {
|
||||||
|
Hero6Combat.abortAction(target.data('combatant-id'));
|
||||||
|
}
|
||||||
|
options.push( newOpt)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static holdAction(combatantId) {
|
||||||
|
console.log("Combatant HOLD : ", combatantId)
|
||||||
|
const combatant = game.combat.combatants.get(combatantId)
|
||||||
|
combatant.setFlag("world", "hero6-hold-action", true)
|
||||||
|
combatant.update({name: combatant.name + " (H)"})
|
||||||
|
console.log("HOLD", combatant)
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static abortAction(html, combatantId) {
|
||||||
|
console.log("Combatant ABORT : ", combatantId);
|
||||||
|
const combatant = game.combat.combatants.get(combatantId);
|
||||||
|
combatant.setFlag("world", "hero6-abort-action", true)
|
||||||
|
combatant.update({name: combatant.name + " (A)"})
|
||||||
|
console.log("ABORT", combatant)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
constructor(data, context) {
|
||||||
|
super(data, context);
|
||||||
|
|
||||||
|
this.turnNumber = 1;
|
||||||
|
this.segmentNumber = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async computeInitiative(c) {
|
||||||
|
let id = c._id || c.id
|
||||||
|
if (c.actor.hasPhase(this.segmentNumber)) {
|
||||||
|
let baseInit = c.actor ? c.actor.getBaseInit() : - 1;
|
||||||
|
await this.updateEmbeddedDocuments("Combatant", [{ _id: id, initiative: baseInit }]);
|
||||||
|
} else {
|
||||||
|
await this.updateEmbeddedDocuments("Combatant", [{ _id: id, initiative: -1, visible: false, active: false }]);
|
||||||
|
}
|
||||||
|
console.log("Combatant", c)
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async rollInitiative(ids, formula = undefined, messageOptions = {}) {
|
||||||
ids = typeof ids === "string" ? [ids] : ids;
|
ids = typeof ids === "string" ? [ids] : ids;
|
||||||
for (let cId = 0; cId < ids.length; cId++) {
|
for (let cId = 0; cId < ids.length; cId++) {
|
||||||
const c = this.combatants.get(ids[cId]);
|
const c = this.combatants.get(ids[cId])
|
||||||
let id = c._id || c.id;
|
await this.computeInitiative(c)
|
||||||
let initBonus = c.actor ? c.actor.getInitiativeScore( this.id, id ) : -1;
|
|
||||||
await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: initBonus } ]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
nextRound() {
|
||||||
|
let turn = this.turn === null ? null : 0; // Preserve the fact that it's no-one's turn currently.
|
||||||
|
if (this.settings.skipDefeated && (turn !== null)) {
|
||||||
|
turn = this.turns.findIndex(t => !t.isDefeated);
|
||||||
|
if (turn === -1) {
|
||||||
|
ui.notifications.warn("COMBAT.NoneRemaining", { localize: true });
|
||||||
|
turn = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let advanceTime = Math.max(this.turns.length - this.turn, 0) * CONFIG.time.turnTime;
|
||||||
|
advanceTime += CONFIG.time.roundTime;
|
||||||
|
let nextRound = this.round + 1;
|
||||||
|
|
||||||
|
let turnData = this.getFlag("world", "hero6-turn-data")
|
||||||
|
if (!turnData) {
|
||||||
|
turnData = { turnNumber: 1, segmentNumber: 12 }
|
||||||
|
this.setFlag("world", "hero6-turn-data", turnData)
|
||||||
|
}
|
||||||
|
turnData = duplicate(turnData)
|
||||||
|
turnData.segmentNumber -= 1
|
||||||
|
if (turnData.segmentNumber <= 0) {
|
||||||
|
turnData.segmentNumber = 12
|
||||||
|
turnData.turnNumber++
|
||||||
|
}
|
||||||
|
this.setFlag("world", "hero6-turn-data", turnData)
|
||||||
|
this.turnNumber = turnData.turnNumber;
|
||||||
|
this.segmentNumber = turnData.segmentNumber;
|
||||||
|
|
||||||
|
// Re-compute init of actors
|
||||||
|
for (let c of this.combatants) {
|
||||||
|
this.computeInitiative(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the document, passing data through a hook first
|
||||||
|
const updateData = { round: nextRound, turn, segmentNumber: turnData.segmentNumber, turnNumber: turnData.turnNumber };
|
||||||
|
const updateOptions = { advanceTime, direction: 1 };
|
||||||
|
Hooks.callAll("combatRound", this, updateData, updateOptions);
|
||||||
|
return this.update(updateData, updateOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async _onCreateEmbeddedDocuments(type, documents, result, options, userId) {
|
||||||
|
console.log(">>>>", documents)
|
||||||
|
super._onCreateEmbeddedDocuments(type, documents, result, options, userId)
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
_onUpdate(changed, options, userId) {
|
_onUpdate(changed, options, userId) {
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
|
|
||||||
export const Hero6_CONFIG = {
|
export const Hero6_CONFIG = {
|
||||||
|
equipmentSubType: {
|
||||||
|
equipment: "Equipment",
|
||||||
|
weapon: "Weapon",
|
||||||
|
armor: "Armor",
|
||||||
|
shield: "Shield",
|
||||||
|
money: "Money"
|
||||||
|
},
|
||||||
|
maneuverTypes: {
|
||||||
|
"general": "General",
|
||||||
|
"offensive": "Offensive",
|
||||||
|
"defensive": "Defensive"
|
||||||
|
},
|
||||||
rollCharac : {
|
rollCharac : {
|
||||||
"str": "Strength",
|
"str": "Strength",
|
||||||
"dex": "Dexterity",
|
"dex": "Dexterity",
|
||||||
@ -37,5 +48,11 @@ export const Hero6_CONFIG = {
|
|||||||
powerSenseAffecting: {
|
powerSenseAffecting: {
|
||||||
"none": "None",
|
"none": "None",
|
||||||
"senseaffecting": "Sense-Affecting",
|
"senseaffecting": "Sense-Affecting",
|
||||||
|
},
|
||||||
|
powerEffectRoll: {
|
||||||
|
"standard": "Standard",
|
||||||
|
"normal": "Normal",
|
||||||
|
"killing": "Killing",
|
||||||
|
"countbody": "Killing (Count BODY)"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -145,6 +145,16 @@ export class Hero6ItemSheet extends ItemSheet {
|
|||||||
let itemType = li.data("item-type");
|
let itemType = li.data("item-type");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
html.find('.item-skill-profiency').click(ev => {
|
||||||
|
this.object.update( {'system.levels': 12, 'system.cost': 2} )
|
||||||
|
} )
|
||||||
|
html.find('.item-skill-familiarity').click(ev => {
|
||||||
|
this.object.update( {'system.levels': 10, 'system.cost': 1} )
|
||||||
|
} )
|
||||||
|
html.find('.item-skill-everyman').click(ev => {
|
||||||
|
this.object.update( {'system.levels': 8, 'system.cost': 0} )
|
||||||
|
} )
|
||||||
|
|
||||||
html.find('.view-subitem').click(ev => {
|
html.find('.view-subitem').click(ev => {
|
||||||
this.viewSubitem(ev);
|
this.viewSubitem(ev);
|
||||||
});
|
});
|
||||||
|
@ -13,7 +13,7 @@ import { Hero6ItemSheet } from "./hero6-item-sheet.js";
|
|||||||
import { Hero6ActorSheet } from "./hero6-actor-sheet.js";
|
import { Hero6ActorSheet } from "./hero6-actor-sheet.js";
|
||||||
import { Hero6NPCSheet } from "./hero6-npc-sheet.js";
|
import { Hero6NPCSheet } from "./hero6-npc-sheet.js";
|
||||||
import { Hero6Utility } from "./hero6-utility.js";
|
import { Hero6Utility } from "./hero6-utility.js";
|
||||||
import { Hero6Combat } from "./hero6-combat.js";
|
import { Hero6Combat, Hero6CombatTracker } from "./hero6-combat.js";
|
||||||
import { Hero6Item } from "./hero6-item.js";
|
import { Hero6Item } from "./hero6-item.js";
|
||||||
import { Hero6Hotbar } from "./hero6-hotbar.js"
|
import { Hero6Hotbar } from "./hero6-hotbar.js"
|
||||||
import { Hero6Commands } from "./hero6-commands.js"
|
import { Hero6Commands } from "./hero6-commands.js"
|
||||||
@ -41,7 +41,7 @@ Hooks.once("init", async function () {
|
|||||||
// Set an initiative formula for the system
|
// Set an initiative formula for the system
|
||||||
CONFIG.Combat.initiative = {
|
CONFIG.Combat.initiative = {
|
||||||
formula: "1d6",
|
formula: "1d6",
|
||||||
decimals: 1
|
decimals: 3
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -54,6 +54,8 @@ Hooks.once("init", async function () {
|
|||||||
CONFIG.Combat.documentClass = Hero6Combat
|
CONFIG.Combat.documentClass = Hero6Combat
|
||||||
CONFIG.Actor.documentClass = Hero6Actor
|
CONFIG.Actor.documentClass = Hero6Actor
|
||||||
CONFIG.Item.documentClass = Hero6Item
|
CONFIG.Item.documentClass = Hero6Item
|
||||||
|
CONFIG.ui.combat = Hero6CombatTracker;
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// Register sheet application classes
|
// Register sheet application classes
|
||||||
@ -65,6 +67,7 @@ Hooks.once("init", async function () {
|
|||||||
Items.registerSheet("fvtt-hero-system-6", Hero6ItemSheet, { makeDefault: true });
|
Items.registerSheet("fvtt-hero-system-6", Hero6ItemSheet, { makeDefault: true });
|
||||||
|
|
||||||
Hero6Utility.init()
|
Hero6Utility.init()
|
||||||
|
Hero6Combat.init()
|
||||||
});
|
});
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -91,12 +94,6 @@ Hooks.once("ready", function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// CSS patch for v9
|
|
||||||
if (game.version) {
|
|
||||||
let sidebar = document.getElementById("sidebar");
|
|
||||||
sidebar.style.width = "min-content";
|
|
||||||
}
|
|
||||||
|
|
||||||
welcomeMessage();
|
welcomeMessage();
|
||||||
Hero6Utility.ready()
|
Hero6Utility.ready()
|
||||||
Hero6Commands.init()
|
Hero6Commands.init()
|
||||||
|
@ -20,11 +20,14 @@ export class Hero6Utility {
|
|||||||
Handlebars.registerHelper('count', function (list) {
|
Handlebars.registerHelper('count', function (list) {
|
||||||
return list.length;
|
return list.length;
|
||||||
})
|
})
|
||||||
|
Handlebars.registerHelper('exists', function (val) {
|
||||||
|
return val != null && val != undefined;
|
||||||
|
});
|
||||||
Handlebars.registerHelper('includes', function (array, val) {
|
Handlebars.registerHelper('includes', function (array, val) {
|
||||||
return array.includes(val);
|
return array.includes(val);
|
||||||
})
|
})
|
||||||
Handlebars.registerHelper('upper', function (text) {
|
Handlebars.registerHelper('upper', function (text) {
|
||||||
if (text) {
|
if (text) {
|
||||||
return text.toUpperCase();
|
return text.toUpperCase();
|
||||||
}
|
}
|
||||||
return text
|
return text
|
||||||
@ -43,15 +46,14 @@ export class Hero6Utility {
|
|||||||
return parseInt(a) * parseInt(b);
|
return parseInt(a) * parseInt(b);
|
||||||
})
|
})
|
||||||
Handlebars.registerHelper('locationLabel', function (key) {
|
Handlebars.registerHelper('locationLabel', function (key) {
|
||||||
return __locationNames[key]
|
return __locationNames[key]
|
||||||
})
|
})
|
||||||
Handlebars.registerHelper('isSkillCustom', function (key) {
|
Handlebars.registerHelper('isSkillCustom', function (key) {
|
||||||
if (key == "custom" || key == "background" ) {
|
if (key == "custom") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
this.gameSettings()
|
this.gameSettings()
|
||||||
|
|
||||||
@ -77,6 +79,19 @@ export class Hero6Utility {
|
|||||||
}) */
|
}) */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*-------------------------------------------- */
|
||||||
|
static getDerivatedDiceFormulas(value) {
|
||||||
|
let rollFormula = Math.floor(value / 5) + "d6"
|
||||||
|
let displayFormula = Math.floor(value / 5)
|
||||||
|
if (value % 5 > 2) {
|
||||||
|
rollFormula += "+round(1d6/2)"
|
||||||
|
displayFormula += " 1/2d6"
|
||||||
|
} else {
|
||||||
|
displayFormula += "d6"
|
||||||
|
}
|
||||||
|
return { rollFormula: rollFormula, displayFormula: displayFormula }
|
||||||
|
}
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
static upperFirst(text) {
|
static upperFirst(text) {
|
||||||
if (typeof text !== 'string') return text
|
if (typeof text !== 'string') return text
|
||||||
@ -154,6 +169,7 @@ export class Hero6Utility {
|
|||||||
'systems/fvtt-hero-system-6/templates/partials/editor-notes-gm.hbs',
|
'systems/fvtt-hero-system-6/templates/partials/editor-notes-gm.hbs',
|
||||||
'systems/fvtt-hero-system-6/templates/partials/partial-roll-select.hbs',
|
'systems/fvtt-hero-system-6/templates/partials/partial-roll-select.hbs',
|
||||||
'systems/fvtt-hero-system-6/templates/partials/partial-actor-characteristic-block.hbs',
|
'systems/fvtt-hero-system-6/templates/partials/partial-actor-characteristic-block.hbs',
|
||||||
|
'systems/fvtt-hero-system-6/templates/partials/partial-actor-full-charac.hbs',
|
||||||
'systems/fvtt-hero-system-6/templates/partials/partial-actor-status.hbs',
|
'systems/fvtt-hero-system-6/templates/partials/partial-actor-status.hbs',
|
||||||
'systems/fvtt-hero-system-6/templates/partials/partial-options-abilities.hbs',
|
'systems/fvtt-hero-system-6/templates/partials/partial-options-abilities.hbs',
|
||||||
'systems/fvtt-hero-system-6/templates/partials/partial-item-nav.hbs',
|
'systems/fvtt-hero-system-6/templates/partials/partial-item-nav.hbs',
|
||||||
@ -162,6 +178,9 @@ export class Hero6Utility {
|
|||||||
'systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs',
|
'systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs',
|
||||||
'systems/fvtt-hero-system-6/templates/partials/partial-power-equipment-cost.hbs',
|
'systems/fvtt-hero-system-6/templates/partials/partial-power-equipment-cost.hbs',
|
||||||
'systems/fvtt-hero-system-6/templates/partials/partial-item-hasroll.hbs',
|
'systems/fvtt-hero-system-6/templates/partials/partial-item-hasroll.hbs',
|
||||||
|
'systems/fvtt-hero-system-6/templates/partials/partial-actor-equipment.hbs',
|
||||||
|
'systems/fvtt-hero-system-6/templates/partials/partial-actor-equipment-section.hbs',
|
||||||
|
'systems/fvtt-hero-system-6/templates/partials/partial-power-maneuver-effect.hbs'
|
||||||
]
|
]
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
}
|
}
|
||||||
@ -290,17 +309,48 @@ export class Hero6Utility {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------- ----------------------------- */
|
||||||
|
static computeBodyValue(roll) {
|
||||||
|
let bodyValue = 0
|
||||||
|
for (let term of roll.terms) {
|
||||||
|
if (term.constructor.name == "Die") {
|
||||||
|
for (let value of term.values) {
|
||||||
|
if (value > 1) {
|
||||||
|
bodyValue += 1
|
||||||
|
}
|
||||||
|
if (value == 6) {
|
||||||
|
bodyValue += 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (term.constructor.name == "NumericTerm") {
|
||||||
|
if (term.total > 1) {
|
||||||
|
bodyValue += 1
|
||||||
|
}
|
||||||
|
if (term.total == 6) {
|
||||||
|
bodyValue += 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return bodyValue
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async rollHero6(rollData) {
|
static async rollHero6(rollData) {
|
||||||
|
|
||||||
let actor = game.actors.get(rollData.actorId)
|
let actor = game.actors.get(rollData.actorId)
|
||||||
|
|
||||||
// ability/save/size => 0
|
// ability/save/size => 0
|
||||||
let diceFormula = "3d6+" + rollData.bonusMalus
|
let diceFormula = "3d6"
|
||||||
let target = 10
|
let target = 10
|
||||||
if (rollData.charac) {
|
if (rollData.charac) {
|
||||||
target = rollData.charac.roll
|
target = rollData.charac.roll
|
||||||
}
|
}
|
||||||
|
if (rollData.item) {
|
||||||
|
target = rollData.item.roll || rollData.item.system.roll
|
||||||
|
}
|
||||||
|
target += rollData.bonusMalus
|
||||||
|
|
||||||
// Performs roll
|
// Performs roll
|
||||||
console.log("Roll formula", diceFormula)
|
console.log("Roll formula", diceFormula)
|
||||||
@ -309,6 +359,7 @@ export class Hero6Utility {
|
|||||||
myRoll = new Roll(diceFormula).roll({ async: false })
|
myRoll = new Roll(diceFormula).roll({ async: false })
|
||||||
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||||
}
|
}
|
||||||
|
|
||||||
rollData.roll = myRoll
|
rollData.roll = myRoll
|
||||||
rollData.target = target
|
rollData.target = target
|
||||||
rollData.diceFormula = diceFormula
|
rollData.diceFormula = diceFormula
|
||||||
@ -317,22 +368,42 @@ export class Hero6Utility {
|
|||||||
if (rollData.result <= target) {
|
if (rollData.result <= target) {
|
||||||
rollData.isSuccess = true
|
rollData.isSuccess = true
|
||||||
}
|
}
|
||||||
if ( myRoll.terms[0].total == 3) { // Always a success
|
if (myRoll.terms[0].total == 3) { // Always a success
|
||||||
rollData.isSuccess = true
|
rollData.isSuccess = true
|
||||||
}
|
}
|
||||||
if ( myRoll.terms[0].total == 18) { // Always a failure
|
if (myRoll.terms[0].total == 18) { // Always a failure
|
||||||
rollData.isSuccess = false
|
rollData.isSuccess = false
|
||||||
}
|
}
|
||||||
|
rollData.margin = target - rollData.result
|
||||||
|
|
||||||
|
if (rollData.item && rollData.item.system.computebody) {
|
||||||
|
rollData.bodyValue = this.computeBody(myRoll)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.outputRollMessage(rollData)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------- ----------------------------- */
|
||||||
|
static processDirectRoll(rollData) {
|
||||||
|
let roll = new Roll(rollData.rollFormula).roll({ async: false })
|
||||||
|
rollData.roll = roll
|
||||||
|
|
||||||
|
rollData.result = roll.total
|
||||||
|
rollData.bodyValue = this.computeBody(rollData.roll)
|
||||||
|
|
||||||
|
this.outputRollMessage(rollData)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------- ----------------------------- */
|
||||||
|
static async outputRollMessage(rollData) {
|
||||||
let msg = await this.createChatWithRollMode(rollData.alias, {
|
let msg = await this.createChatWithRollMode(rollData.alias, {
|
||||||
content: await renderTemplate(`systems/fvtt-hero-system-6/templates/chat/chat-generic-result.hbs`, rollData)
|
content: await renderTemplate(`systems/fvtt-hero-system-6/templates/chat/chat-generic-result.hbs`, rollData)
|
||||||
})
|
})
|
||||||
msg.setFlag("world", "rolldata", rollData)
|
msg.setFlag("world", "rolldata", rollData)
|
||||||
console.log("Rolldata result", rollData)
|
console.log("Rolldata result", rollData)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------- ----------------------------- */
|
||||||
static sortArrayObjectsByName(myArray) {
|
static sortArrayObjectsByName(myArray) {
|
||||||
myArray.sort((a, b) => {
|
myArray.sort((a, b) => {
|
||||||
let fa = a.name.toLowerCase();
|
let fa = a.name.toLowerCase();
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
background: rgba(66, 66, 64, 0.95);
|
background: rgba(66, 66, 64, 0.95);
|
||||||
} /* For title, sidebar character and scene */
|
} /* For title, sidebar character and scene */
|
||||||
.sheet nav.sheet-tabs {
|
.sheet nav.sheet-tabs {
|
||||||
font-size: 0.8rem;
|
font-size: 0.7rem;
|
||||||
color: rgba(224, 208, 197, 0.9);
|
color: rgba(224, 208, 197, 0.9);
|
||||||
background: rgba(66, 66, 64, 0.95);
|
background: rgba(66, 66, 64, 0.95);
|
||||||
} /* For nav and title */
|
} /* For nav and title */
|
||||||
@ -173,19 +173,6 @@ table { border: 1px solid #7a7971;}
|
|||||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-group-center,
|
|
||||||
.flex-group-left,
|
|
||||||
.flex-group-right {
|
|
||||||
-webkit-box-pack: center;
|
|
||||||
-ms-flex-pack: center;
|
|
||||||
justify-content: center;
|
|
||||||
-webkit-box-align: center;
|
|
||||||
-ms-flex-align: center;
|
|
||||||
align-items: center;
|
|
||||||
text-align: center;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-group-left {
|
.flex-group-left {
|
||||||
-webkit-box-pack: start;
|
-webkit-box-pack: start;
|
||||||
-ms-flex-pack: start;
|
-ms-flex-pack: start;
|
||||||
@ -447,7 +434,7 @@ form .form-group label {
|
|||||||
|
|
||||||
.window-app .window-content, .window-app.sheet .window-content .sheet-body{
|
.window-app .window-content, .window-app.sheet .window-content .sheet-body{
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
background: url("../images/ui/pc_sheet_bg.webp") repeat left top;
|
/*background: url("../images/ui/pc_sheet_bg.webp") repeat left top;*/
|
||||||
background: rgba(228, 240, 240, 0.75);
|
background: rgba(228, 240, 240, 0.75);
|
||||||
color: rgba(66, 66, 64, 0.95);
|
color: rgba(66, 66, 64, 0.95);
|
||||||
}
|
}
|
||||||
@ -466,7 +453,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
|
|||||||
.sheet nav.sheet-tabs {
|
.sheet nav.sheet-tabs {
|
||||||
font-size: 0.70rem;
|
font-size: 0.70rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
height: 3rem;
|
height: 2.5rem;
|
||||||
flex: 0 0 3rem;
|
flex: 0 0 3rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 0 0 0.25rem;
|
padding: 0 0 0 0.25rem;
|
||||||
@ -483,7 +470,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
|
|||||||
|
|
||||||
nav.sheet-tabs .item {
|
nav.sheet-tabs .item {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 0.25rem;
|
padding: 0 0.15rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav.sheet-tabs .item:after {
|
nav.sheet-tabs .item:after {
|
||||||
@ -546,7 +533,7 @@ ul, li {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sheet li {
|
.sheet li {
|
||||||
margin: 0.010rem;
|
margin: 0.1rem;
|
||||||
padding: 0.25rem;
|
padding: 0.25rem;
|
||||||
}
|
}
|
||||||
.header-fields li {
|
.header-fields li {
|
||||||
@ -574,10 +561,10 @@ ul, li {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list-item {
|
.list-item {
|
||||||
margin: 0.125rem;
|
margin: 0.2rem;
|
||||||
/*box-shadow: inset 0px 0px 1px #00000096;*/
|
/*box-shadow: inset 0px 0px 1px #00000096;*/
|
||||||
/*border-radius: 0.25rem;*/
|
/*border-radius: 0.25rem;*/
|
||||||
padding: 0.125rem;
|
padding: 0.2rem;
|
||||||
flex: 1 1 5rem;
|
flex: 1 1 5rem;
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
}
|
}
|
||||||
@ -952,7 +939,7 @@ ul, li {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#sidebar #sidebar-tabs i{
|
#sidebar #sidebar-tabs i{
|
||||||
width: 25px;
|
/*width: 25px;*/
|
||||||
height: 25px;
|
height: 25px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-position:center;
|
background-position:center;
|
||||||
@ -1420,6 +1407,26 @@ Focus FOC: #ff0084
|
|||||||
max-width: 8rem;
|
max-width: 8rem;
|
||||||
min-width: 8rem;
|
min-width: 8rem;
|
||||||
}
|
}
|
||||||
|
.item-field-label-long-img {
|
||||||
|
flex-grow:1;
|
||||||
|
max-width: 10rem;
|
||||||
|
min-width: 10rem;
|
||||||
|
}
|
||||||
|
.item-field-label-long2 {
|
||||||
|
flex-grow:1;
|
||||||
|
max-width: 16rem;
|
||||||
|
min-width: 16rem;
|
||||||
|
}
|
||||||
|
.item-field-label-long3 {
|
||||||
|
flex-grow:1;
|
||||||
|
max-width: 30rem;
|
||||||
|
min-width: 30rem;
|
||||||
|
}
|
||||||
|
.item-field-label-long4 {
|
||||||
|
flex-grow:1;
|
||||||
|
max-width: 40rem;
|
||||||
|
min-width: 40rem;
|
||||||
|
}
|
||||||
.item-control-end {
|
.item-control-end {
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
}
|
}
|
||||||
@ -1441,3 +1448,11 @@ Focus FOC: #ff0084
|
|||||||
min-width:2rem;
|
min-width:2rem;
|
||||||
max-width: 2rem;
|
max-width: 2rem;
|
||||||
}
|
}
|
||||||
|
.biodata-portrait {
|
||||||
|
min-height: 512px;
|
||||||
|
min-width: 256px;
|
||||||
|
}
|
||||||
|
.textarea-full-height {
|
||||||
|
min-height: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
@ -91,7 +91,7 @@
|
|||||||
"styles": [
|
"styles": [
|
||||||
"styles/simple.css"
|
"styles/simple.css"
|
||||||
],
|
],
|
||||||
"version": "10.0.9",
|
"version": "10.0.34",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10",
|
"verified": "10",
|
||||||
@ -99,7 +99,7 @@
|
|||||||
},
|
},
|
||||||
"title": "Hero System v6 for FoundrtVTT (Official)",
|
"title": "Hero System v6 for FoundrtVTT (Official)",
|
||||||
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/raw/branch/main/system.json",
|
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/raw/branch/main/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/archive/fvtt-hero-system-6-v10.0.9.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/archive/fvtt-hero-system-6-v10.0.34.zip",
|
||||||
"url": "https://www.uberwald.me/gitea/uberwald/",
|
"url": "https://www.uberwald.me/gitea/uberwald/",
|
||||||
"background": "images/ui/hro6_welcome_page.webp",
|
"background": "images/ui/hro6_welcome_page.webp",
|
||||||
"id": "fvtt-hero-system-6"
|
"id": "fvtt-hero-system-6"
|
||||||
|
187
template.json
187
template.json
@ -8,59 +8,87 @@
|
|||||||
"biodata": {
|
"biodata": {
|
||||||
"species": "",
|
"species": "",
|
||||||
"age": 0,
|
"age": 0,
|
||||||
|
"campaign":"",
|
||||||
|
"alternateids":"",
|
||||||
|
"player": "",
|
||||||
|
"gm": "",
|
||||||
"gender": 0,
|
"gender": 0,
|
||||||
"character": "",
|
"character": "",
|
||||||
|
"mass":"",
|
||||||
"religion": "",
|
"religion": "",
|
||||||
"weight": "",
|
"weight": "",
|
||||||
"height": "",
|
"height": "",
|
||||||
"background": "",
|
"background": "",
|
||||||
|
"motivation": "",
|
||||||
|
"quote" : "",
|
||||||
|
"tactics": "",
|
||||||
|
"campaignuse": "",
|
||||||
|
"appearance": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"gmnotes": ""
|
"points": 0,
|
||||||
|
"complications": 0,
|
||||||
|
"xpearned": 0,
|
||||||
|
"xpspent": 0,
|
||||||
|
"combatskills": "",
|
||||||
|
"presenceattack": {},
|
||||||
|
"gmnotes": "",
|
||||||
|
"combatnotes1":""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"characteristics": {
|
"characteristics": {
|
||||||
"characteristics": {
|
"characteristics": {
|
||||||
"str": {
|
"str": {
|
||||||
"label": "Strength",
|
"label": "Strength",
|
||||||
"value": 0,
|
"value": 10,
|
||||||
"base": 10,
|
"base": 10,
|
||||||
"category": "main",
|
"category": "main",
|
||||||
|
"strdice": {},
|
||||||
|
"lift": "",
|
||||||
|
"strend": 0,
|
||||||
|
"hasroll": true,
|
||||||
"realcost": 0,
|
"realcost": 0,
|
||||||
"activecost": 0
|
"activecost": 0
|
||||||
},
|
},
|
||||||
"dex": {
|
"dex": {
|
||||||
"label": "Dexterity",
|
"label": "Dexterity",
|
||||||
"value": 0,
|
"value": 10,
|
||||||
"base": 10,
|
"base": 10,
|
||||||
|
"hasroll": true,
|
||||||
"category": "main"
|
"category": "main"
|
||||||
},
|
},
|
||||||
"con": {
|
"con": {
|
||||||
"label": "Constitution",
|
"label": "Constitution",
|
||||||
|
"hasroll": true,
|
||||||
"category": "main",
|
"category": "main",
|
||||||
"value": 0,
|
"value": 10,
|
||||||
"base": 10
|
"base": 10
|
||||||
},
|
},
|
||||||
"int": {
|
"int": {
|
||||||
"label": "Intelligence",
|
"label": "Intelligence",
|
||||||
|
"hasroll": true,
|
||||||
"category": "main",
|
"category": "main",
|
||||||
"value": 0,
|
"value": 10,
|
||||||
"base": 10
|
"base": 10,
|
||||||
|
"perceptionroll": 10
|
||||||
},
|
},
|
||||||
"ego": {
|
"ego": {
|
||||||
"label": "Ego",
|
"label": "Ego",
|
||||||
|
"hasroll": true,
|
||||||
"category": "main",
|
"category": "main",
|
||||||
"value": 0,
|
"value": 10,
|
||||||
"base": 10
|
"base": 10
|
||||||
},
|
},
|
||||||
"pre": {
|
"pre": {
|
||||||
"label": "Presence",
|
"label": "Presence",
|
||||||
|
"hasroll": true,
|
||||||
"category": "main",
|
"category": "main",
|
||||||
"value": 0,
|
"value": 10,
|
||||||
"base": 10
|
"base": 10
|
||||||
},
|
},
|
||||||
"ocv": {
|
"ocv": {
|
||||||
"label": "OCV",
|
"label": "OCV",
|
||||||
|
"hasroll": false,
|
||||||
"base": 3,
|
"base": 3,
|
||||||
"autoMod": "0",
|
"autoMod": "0",
|
||||||
"userMod": "0",
|
"userMod": "0",
|
||||||
@ -69,6 +97,7 @@
|
|||||||
},
|
},
|
||||||
"dcv": {
|
"dcv": {
|
||||||
"label": "DCV",
|
"label": "DCV",
|
||||||
|
"hasroll": false,
|
||||||
"base": 3,
|
"base": 3,
|
||||||
"autoMod": "0",
|
"autoMod": "0",
|
||||||
"userMod": "0",
|
"userMod": "0",
|
||||||
@ -77,6 +106,7 @@
|
|||||||
},
|
},
|
||||||
"omcv": {
|
"omcv": {
|
||||||
"label": "OMCV",
|
"label": "OMCV",
|
||||||
|
"hasroll": false,
|
||||||
"base": 3,
|
"base": 3,
|
||||||
"autoMod": "0",
|
"autoMod": "0",
|
||||||
"userMod": "0",
|
"userMod": "0",
|
||||||
@ -85,6 +115,7 @@
|
|||||||
},
|
},
|
||||||
"dmcv": {
|
"dmcv": {
|
||||||
"label": "DMCV",
|
"label": "DMCV",
|
||||||
|
"hasroll": false,
|
||||||
"base": 3,
|
"base": 3,
|
||||||
"autoMod": "0",
|
"autoMod": "0",
|
||||||
"userMod": "0",
|
"userMod": "0",
|
||||||
@ -93,11 +124,14 @@
|
|||||||
},
|
},
|
||||||
"spd": {
|
"spd": {
|
||||||
"label": "Speed",
|
"label": "Speed",
|
||||||
|
"hasroll": false,
|
||||||
"value": 2,
|
"value": 2,
|
||||||
"base": 2
|
"base": 2
|
||||||
},
|
},
|
||||||
"pd": {
|
"pd": {
|
||||||
"label": "PD",
|
"label": "PD",
|
||||||
|
"hasroll": false,
|
||||||
|
"isdefense": true,
|
||||||
"value": 2,
|
"value": 2,
|
||||||
"base": 2,
|
"base": 2,
|
||||||
"pd_nonresistant_total": 0,
|
"pd_nonresistant_total": 0,
|
||||||
@ -107,6 +141,8 @@
|
|||||||
},
|
},
|
||||||
"ed": {
|
"ed": {
|
||||||
"label": "ED",
|
"label": "ED",
|
||||||
|
"hasroll": false,
|
||||||
|
"isdefense": true,
|
||||||
"value": 2,
|
"value": 2,
|
||||||
"base": 2,
|
"base": 2,
|
||||||
"ed_nonresistant_total": 0,
|
"ed_nonresistant_total": 0,
|
||||||
@ -116,21 +152,39 @@
|
|||||||
},
|
},
|
||||||
"rec": {
|
"rec": {
|
||||||
"label": "REC",
|
"label": "REC",
|
||||||
|
"hasroll": false,
|
||||||
"value": 4,
|
"value": 4,
|
||||||
"base": 4
|
"base": 4
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
"label": "REC",
|
"label": "END",
|
||||||
|
"hasroll": false,
|
||||||
|
"isvital": true,
|
||||||
|
"damage": 0,
|
||||||
"value": 20,
|
"value": 20,
|
||||||
"max": 20
|
"max": 20
|
||||||
},
|
},
|
||||||
"stun": {
|
"stun": {
|
||||||
"label": "STUN",
|
"label": "STUN",
|
||||||
|
"hasroll": false,
|
||||||
|
"isvital": true,
|
||||||
|
"damage": 0,
|
||||||
|
"value": 20,
|
||||||
|
"max": 20
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"label": "OTHER",
|
||||||
|
"hasroll": false,
|
||||||
|
"isvital": true,
|
||||||
|
"damage": 0,
|
||||||
"value": 20,
|
"value": 20,
|
||||||
"max": 20
|
"max": 20
|
||||||
},
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"label": "Body",
|
"label": "BODY",
|
||||||
|
"hasroll": false,
|
||||||
|
"isvital": true,
|
||||||
|
"damage": 0,
|
||||||
"value": 10,
|
"value": 10,
|
||||||
"max": 10,
|
"max": 10,
|
||||||
"loc": {
|
"loc": {
|
||||||
@ -154,27 +208,91 @@
|
|||||||
},
|
},
|
||||||
"running": {
|
"running": {
|
||||||
"label": "Running",
|
"label": "Running",
|
||||||
|
"ismovement": true,
|
||||||
|
"hasroll": false,
|
||||||
"value": 12,
|
"value": 12,
|
||||||
"base": 12
|
"base": 12
|
||||||
},
|
},
|
||||||
"swimming": {
|
"swimming": {
|
||||||
"label": "Swimming",
|
"label": "Swimming",
|
||||||
|
"ismovement": true,
|
||||||
|
"hasroll": false,
|
||||||
"value": 4,
|
"value": 4,
|
||||||
"base": 4
|
"base": 4
|
||||||
},
|
},
|
||||||
"leaping": {
|
"leaping": {
|
||||||
"label": "Leaping",
|
"label": "Leaping",
|
||||||
|
"ismovement": true,
|
||||||
|
"hasroll": false,
|
||||||
"value": 4,
|
"value": 4,
|
||||||
"base": 4,
|
"base": 4,
|
||||||
"leaping_horizontal_base": 0,
|
"leaping_horizontal_base": 0,
|
||||||
"leaping_horizontal_total": 0,
|
"leaping_horizontal_total": 0,
|
||||||
"leaping_vertical_base": 0,
|
"leaping_vertical_base": 0,
|
||||||
"leaping_vertical_total": 0
|
"leaping_vertical_total": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"movements": {
|
||||||
|
"movements": {
|
||||||
|
"fly": {
|
||||||
|
"label": "Fly",
|
||||||
|
"value": 0
|
||||||
},
|
},
|
||||||
"flying": {
|
"teleport": {
|
||||||
"label": "Flying",
|
"label": "Teleport",
|
||||||
|
"value": 0
|
||||||
|
},
|
||||||
|
"tunnel": {
|
||||||
|
"label": "Tunnel",
|
||||||
|
"value": 0
|
||||||
|
},
|
||||||
|
"move1": {
|
||||||
|
"label": "N/A",
|
||||||
|
"iseditable": true,
|
||||||
|
"value": 0
|
||||||
|
},
|
||||||
|
"move2": {
|
||||||
|
"label": "N/A",
|
||||||
|
"iseditable": true,
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defenses": {
|
||||||
|
"defenses": {
|
||||||
|
"mental": {
|
||||||
|
"label": "Mental",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"base": 0
|
"resistant": ""
|
||||||
|
},
|
||||||
|
"power": {
|
||||||
|
"label": "Power",
|
||||||
|
"value": 0,
|
||||||
|
"resistant": ""
|
||||||
|
},
|
||||||
|
"flash": {
|
||||||
|
"label": "Flash",
|
||||||
|
"value": 0,
|
||||||
|
"resistant": ""
|
||||||
|
},
|
||||||
|
"def1": {
|
||||||
|
"label": "N/A",
|
||||||
|
"value": 0,
|
||||||
|
"iseditable": true,
|
||||||
|
"resistant": ""
|
||||||
|
},
|
||||||
|
"def2": {
|
||||||
|
"label": "N/A",
|
||||||
|
"value": 0,
|
||||||
|
"iseditable": true,
|
||||||
|
"resistant": ""
|
||||||
|
},
|
||||||
|
"def3": {
|
||||||
|
"label": "N/A",
|
||||||
|
"value": 0,
|
||||||
|
"iseditable": true,
|
||||||
|
"resistant": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -183,7 +301,9 @@
|
|||||||
"character": {
|
"character": {
|
||||||
"templates": [
|
"templates": [
|
||||||
"biodata",
|
"biodata",
|
||||||
"characteristics"
|
"characteristics",
|
||||||
|
"defenses",
|
||||||
|
"movements"
|
||||||
],
|
],
|
||||||
"subactors": []
|
"subactors": []
|
||||||
}
|
}
|
||||||
@ -195,6 +315,7 @@
|
|||||||
"talent",
|
"talent",
|
||||||
"power",
|
"power",
|
||||||
"advantage",
|
"advantage",
|
||||||
|
"maneuver",
|
||||||
"limitation",
|
"limitation",
|
||||||
"complication",
|
"complication",
|
||||||
"equipment"
|
"equipment"
|
||||||
@ -224,9 +345,24 @@
|
|||||||
"endurance": 0,
|
"endurance": 0,
|
||||||
"hasroll": false,
|
"hasroll": false,
|
||||||
"roll": 0,
|
"roll": 0,
|
||||||
|
"computebody": false,
|
||||||
|
"haseffectroll": false,
|
||||||
|
"effectroll": "standard",
|
||||||
|
"effectrollformula": "",
|
||||||
"items": {}
|
"items": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"maneuver": {
|
||||||
|
"templates": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
|
"maneuvertype": "general",
|
||||||
|
"pha": "",
|
||||||
|
"ocv": 0,
|
||||||
|
"dcv" : 0,
|
||||||
|
"isstock": false,
|
||||||
|
"active": false
|
||||||
|
},
|
||||||
"advantage": {
|
"advantage": {
|
||||||
"templates": [
|
"templates": [
|
||||||
"common"
|
"common"
|
||||||
@ -243,6 +379,10 @@
|
|||||||
"base": "",
|
"base": "",
|
||||||
"levelscost": 0,
|
"levelscost": 0,
|
||||||
"levels": 0,
|
"levels": 0,
|
||||||
|
"skilllevelonly": false,
|
||||||
|
"skillfamiliarity": false,
|
||||||
|
"skilleveryman": false,
|
||||||
|
"skillprofiency": false,
|
||||||
"templates": [
|
"templates": [
|
||||||
"common"
|
"common"
|
||||||
]
|
]
|
||||||
@ -258,6 +398,7 @@
|
|||||||
"common",
|
"common",
|
||||||
"power"
|
"power"
|
||||||
],
|
],
|
||||||
|
"subtype": "equipment",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"weight": 0,
|
"weight": 0,
|
||||||
"moneycost": 0
|
"moneycost": 0
|
||||||
@ -291,15 +432,6 @@
|
|||||||
"impenetrable": 0,
|
"impenetrable": 0,
|
||||||
"value": 0
|
"value": 0
|
||||||
},
|
},
|
||||||
"maneuver": {
|
|
||||||
"templates": [
|
|
||||||
"common"
|
|
||||||
],
|
|
||||||
"phase": 0,
|
|
||||||
"ocv": "+0",
|
|
||||||
"dcv": "+0",
|
|
||||||
"active": false
|
|
||||||
},
|
|
||||||
"movement": {
|
"movement": {
|
||||||
"templates": [
|
"templates": [
|
||||||
"common"
|
"common"
|
||||||
@ -332,15 +464,6 @@
|
|||||||
"templates": [
|
"templates": [
|
||||||
"common"
|
"common"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"martialart": {
|
|
||||||
"maneuver_phase": 0,
|
|
||||||
"maneuver_ocv": 0,
|
|
||||||
"maneuver_dcv": 0,
|
|
||||||
"maneuver_effect": "",
|
|
||||||
"templates": [
|
|
||||||
"common"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
127
templates/apps/combat-tracker.hbs
Normal file
127
templates/apps/combat-tracker.hbs
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
<section class="{{cssClass}} directory flexcol" id="{{cssId}}" data-tab="{{tabName}}">
|
||||||
|
<header class="combat-tracker-header">
|
||||||
|
{{#if user.isGM}}
|
||||||
|
<nav class="encounters flexrow" aria-label="COMBAT.NavLabel">
|
||||||
|
<a class="combat-button combat-create" data-tooltip="COMBAT.Create">
|
||||||
|
<i class="fas fa-plus"></i>
|
||||||
|
</a>
|
||||||
|
{{#if combatCount}}
|
||||||
|
<a class="combat-button combat-cycle" data-tooltip="COMBAT.EncounterPrevious"
|
||||||
|
{{#if previousId}}data-document-id="{{previousId}}"{{else}}disabled{{/if}}>
|
||||||
|
<i class="fas fa-caret-left"></i>
|
||||||
|
</a>
|
||||||
|
<h4 class="encounter">{{localize "COMBAT.Encounter"}} {{currentIndex}} / {{combatCount}}</h4>
|
||||||
|
<a class="combat-button combat-cycle" data-tooltip="COMBAT.EncounterNext"
|
||||||
|
{{#if nextId}}data-document-id="{{nextId}}"{{else}}disabled{{/if}}>
|
||||||
|
<i class="fas fa-caret-right"></i>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
<a class="combat-button combat-control" data-tooltip="COMBAT.Delete" data-control="endCombat" {{#unless combatCount}}disabled{{/unless}}>
|
||||||
|
<i class="fas fa-trash"></i>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="encounter-controls flexrow {{#if hasCombat}}combat{{/if}}">
|
||||||
|
{{#if user.isGM}}
|
||||||
|
<a class="combat-button combat-control" data-tooltip="COMBAT.RollAll" data-control="rollAll" {{#unless turns}}disabled{{/unless}}>
|
||||||
|
<i class="fas fa-users"></i>
|
||||||
|
</a>
|
||||||
|
<a class="combat-button combat-control" data-tooltip="COMBAT.RollNPC" data-control="rollNPC" {{#unless turns}}disabled{{/unless}}>
|
||||||
|
<i class="fas fa-users-cog"></i>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if combatCount}}
|
||||||
|
{{#if combat.round}}
|
||||||
|
<h3 class="encounter-title noborder">Turn {{combat.turnNumber}} Segment {{combat.segmentNumber}}</h3>
|
||||||
|
{{else}}
|
||||||
|
<h3 class="encounter-title noborder">{{localize 'COMBAT.NotStarted'}}</h3>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<h3 class="encounter-title noborder">{{localize "COMBAT.None"}}</h3>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if user.isGM}}
|
||||||
|
<a class="combat-button combat-control" data-tooltip="COMBAT.InitiativeReset" data-control="resetAll"
|
||||||
|
{{#unless hasCombat}}disabled{{/unless}}>
|
||||||
|
<i class="fas fa-undo"></i>
|
||||||
|
</a>
|
||||||
|
<a class="combat-button combat-control" data-tooltip="{{labels.scope}}"
|
||||||
|
data-control="toggleSceneLink" {{#unless hasCombat}}disabled{{/unless}}>
|
||||||
|
<i class="fas fa-{{#unless linked}}un{{/unless}}link"></i>
|
||||||
|
</a>
|
||||||
|
<a class="combat-button combat-settings" data-tooltip="COMBAT.Settings" data-control="trackerSettings">
|
||||||
|
<i class="fas fa-cog"></i>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<ol id="combat-tracker" class="directory-list">
|
||||||
|
{{#each turns}}
|
||||||
|
{{#if (ne this.initiative "-1")}}
|
||||||
|
<li class="combatant actor directory-item flexrow {{this.css}}" data-combatant-id="{{this.id}}">
|
||||||
|
<img class="token-image" data-src="{{this.img}}" alt="{{this.name}}"/>
|
||||||
|
<div class="token-name flexcol">
|
||||||
|
<h4>{{this.name}} {{log this}} {{#if this.holdAction}}(H){{/if}}</h4>
|
||||||
|
<div class="combatant-controls flexrow">
|
||||||
|
{{#if ../user.isGM}}
|
||||||
|
<a class="combatant-control {{#if this.hidden}}active{{/if}}" data-tooltip="COMBAT.ToggleVis" data-control="toggleHidden">
|
||||||
|
<i class="fas fa-eye-slash"></i>
|
||||||
|
</a>
|
||||||
|
<a class="combatant-control {{#if this.defeated}}active{{/if}}" data-tooltip="COMBAT.ToggleDead" data-control="toggleDefeated">
|
||||||
|
<i class="fas fa-skull"></i>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
{{#if this.canPing}}
|
||||||
|
<a class="combatant-control" data-tooltip="COMBAT.PingCombatant" data-control="pingCombatant">
|
||||||
|
<i class="fa-solid fa-bullseye-arrow"></i>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
<div class="token-effects">
|
||||||
|
{{#each this.effects}}
|
||||||
|
<img class="token-effect" src="{{this}}"/>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#if this.hasResource}}
|
||||||
|
<div class="token-resource">
|
||||||
|
<span class="resource">{{this.resource}}</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="token-initiative">
|
||||||
|
{{#if this.hasRolled}}
|
||||||
|
<span class="initiative">{{this.initiative}}</span>
|
||||||
|
{{else if this.owner}}
|
||||||
|
<a class="combatant-control roll" data-tooltip="COMBAT.InitiativeRoll" data-control="rollInitiative"></a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<nav id="combat-controls" class="directory-footer flexrow" data-tooltip-direction="UP">
|
||||||
|
{{#if hasCombat}}
|
||||||
|
{{#if user.isGM}}
|
||||||
|
{{#if round}}
|
||||||
|
<a class="combat-control" data-tooltip="COMBAT.RoundPrev" data-control="previousRound"><i class="fas fa-step-backward"></i></a>
|
||||||
|
<a class="combat-control" data-tooltip="COMBAT.TurnPrev" data-control="previousTurn"><i class="fas fa-arrow-left"></i></a>
|
||||||
|
<a class="combat-control center" data-control="endCombat">{{localize 'COMBAT.End'}}</a>
|
||||||
|
<a class="combat-control" data-tooltip="COMBAT.TurnNext" data-control="nextTurn"><i class="fas fa-arrow-right"></i></a>
|
||||||
|
<a class="combat-control" data-tooltip="COMBAT.RoundNext" data-control="nextRound"><i class="fas fa-step-forward"></i></a>
|
||||||
|
{{else}}
|
||||||
|
<a class="combat-control center" data-control="startCombat">{{localize 'COMBAT.Begin'}}</a>
|
||||||
|
{{/if}}
|
||||||
|
{{else if control}}
|
||||||
|
<a class="combat-control" data-tooltip="COMBAT.TurnPrev" data-control="previousTurn"><i class="fas fa-arrow-left"></i></a>
|
||||||
|
<a class="combat-control center" data-control="nextTurn">{{localize 'COMBAT.TurnEnd'}}</a>
|
||||||
|
<a class="combat-control" data-tooltip="COMBAT.TurnNext" data-control="nextTurn"><i class="fas fa-arrow-right"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
</nav>
|
||||||
|
</section>
|
@ -15,10 +15,27 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if item}}
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span class="item-field-label-long margin-item-list">Bonus/Malus : </span>
|
<span class="item-field-label-long margin-item-list">{{upperFirst item.type}} - {{upperFirst item.name}}</span>
|
||||||
|
{{#if item.roll}}
|
||||||
|
<span class="item-field-label-medium margin-item-list">{{item.roll}}-</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="item-field-label-medium margin-item-list">{{item.system.roll}}-</span>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="item-field-label-long margin-item-list">Bonus/Penalty : </span>
|
||||||
<select class="item-field-label-medium" type="text" id="bonusMalus" value="{{bonusMalus}}" data-dtype="Number" >
|
<select class="item-field-label-medium" type="text" id="bonusMalus" value="{{bonusMalus}}" data-dtype="Number" >
|
||||||
{{#select bonusMalus}}
|
{{#select bonusMalus}}
|
||||||
|
<option value="-10">-10</option>
|
||||||
|
<option value="-9">-9</option>
|
||||||
|
<option value="-8">-8</option>
|
||||||
|
<option value="-7">-7</option>
|
||||||
|
<option value="-6">-6</option>
|
||||||
|
<option value="-5">-5</option>
|
||||||
<option value="-4">-4</option>
|
<option value="-4">-4</option>
|
||||||
<option value="-3">-3</option>
|
<option value="-3">-3</option>
|
||||||
<option value="-2">-2</option>
|
<option value="-2">-2</option>
|
||||||
@ -28,6 +45,12 @@
|
|||||||
<option value="2">2</option>
|
<option value="2">2</option>
|
||||||
<option value="3">3</option>
|
<option value="3">3</option>
|
||||||
<option value="4">4</option>
|
<option value="4">4</option>
|
||||||
|
<option value="5">5</option>
|
||||||
|
<option value="6">6</option>
|
||||||
|
<option value="7">7</option>
|
||||||
|
<option value="8">8</option>
|
||||||
|
<option value="9">9</option>
|
||||||
|
<option value="10">10</option>
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,17 +18,41 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
|
{{#if target}}
|
||||||
<li>Target Roll : {{target}}-
|
<li>Target Roll : {{target}}-
|
||||||
</li>
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if rollSource}}
|
||||||
|
<li>Roll : {{rollSource}}</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if charac}}
|
{{#if charac}}
|
||||||
<li>Charac : {{charac.label}}
|
<li>CHAR : {{charac.label}}</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if item}}
|
||||||
|
<li>{{item.name}} ({{upperFirst item.type}})</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if (exists bonusMalus)}}
|
||||||
|
<li>Bonus/Penalty : {{bonusMalus}}
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<li>Bonus/Malus : {{bonusMalus}}
|
|
||||||
|
<li><strong>Result : {{result}}</strong>
|
||||||
|
{{#if (exists margin)}}
|
||||||
|
({{#if isSuccess}}Success!!{{else}}Failure!{{/if}})
|
||||||
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li><strong>Result : {{result}}</strong> ({{#if isSuccess}}Success!!{{else}}Failure!{{/if}})</li>
|
{{#if (exists bodyValue)}}
|
||||||
|
<li><strong>BODY : {{bodyValue}}</strong>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if (exists margin)}}
|
||||||
|
<li><strong>Margin : {{margin}}</strong>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
<div class="tab details" data-group="primary" data-tab="details">
|
<div class="tab details" data-group="primary" data-tab="details">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="flexrow"><label class="generic-label">Quantity</label>
|
<li class="flexrow"><label class="generic-label">Quantity</label>
|
||||||
<input type="text" class="input-numeric-short padd-right" name="system.quantity" value="{{data.quantity}}" data-dtype="Number"/>
|
<input type="text" class="input-numeric-short padd-right" name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow"><label class="generic-label">Unit value</label>
|
<li class="flexrow"><label class="generic-label">Unit value</label>
|
||||||
<input type="text" class="input-numeric-short padd-right" name="system.value" value="{{data.value}}" data-dtype="Number"/>
|
<input type="text" class="input-numeric-short padd-right" name="system.value" value="{{system.value}}" data-dtype="Number"/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
@ -16,20 +16,30 @@
|
|||||||
<div class="tab details" data-group="primary" data-tab="details">
|
<div class="tab details" data-group="primary" data-tab="details">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
{{> systems/fvtt-hero-system-6/templates/partials/partial-power-equipment-cost.hbs}}
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-power-equipment-cost.hbs}}
|
||||||
|
|
||||||
<li class="flexrow"><label class="item-field-label-long">Equipped ?</label>
|
<li class="flexrow"><label class="item-field-label-long">Subtype</label>
|
||||||
<label class="item-field-label-medium"><input type="checkbox" name="system.equipped" {{checked system.equipped}}/></label>
|
<select class="item-field-label-long" type="text" name="system.subtype" value="{{system.subtype}}" data-dtype="String">
|
||||||
</li>
|
{{#select system.subtype}}
|
||||||
|
{{#each config.equipmentSubType as |name key|}}
|
||||||
|
<option value="{{key}}">{{name}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="flexrow"><label class="item-field-label-long">Weight</label>
|
<li class="flexrow"><label class="item-field-label-long">Equipped ?</label>
|
||||||
<input type="text" class="item-field-label-medium input-numeric-short padd-right" name="system.weight" value="{{system.weight}}" data-dtype="Number"/>
|
<label class="item-field-label-medium"><input type="checkbox" name="system.equipped" {{checked system.equipped}}/></label>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow"><label class="item-field-label-long">Value</label>
|
|
||||||
<input type="text" class="item-field-label-medium input-numeric-short padd-right" name="system.value" value="{{system.value}}" data-dtype="Number"/>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{{> systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs}}
|
<li class="flexrow"><label class="item-field-label-long">Weight</label>
|
||||||
|
<input type="text" class="item-field-label-medium input-numeric-short padd-right" name="system.weight" value="{{system.weight}}" data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="item-field-label-long">Value</label>
|
||||||
|
<input type="text" class="item-field-label-medium input-numeric-short padd-right" name="system.value" value="{{system.value}}" data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs}}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
57
templates/items/item-maneuver-sheet.hbs
Normal file
57
templates/items/item-maneuver-sheet.hbs
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
|
<div class="header-fields">
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-item-nav.hbs}}
|
||||||
|
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-item-description.hbs}}
|
||||||
|
|
||||||
|
<div class="tab details" data-group="primary" data-tab="details">
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-long">Type</label>
|
||||||
|
<select class="item-field-label-long" type="text" name="system.maneuvertype" value="{{system.maneuvertype}}" data-dtype="String">
|
||||||
|
{{#select system.maneuvertype}}
|
||||||
|
{{#each config.maneuverTypes as |name key|}}
|
||||||
|
<option value="{{key}}">{{name}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-power-maneuver-effect.hbs}}
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-medium">Is stock ?</label>
|
||||||
|
<label class="item-field-label-medium"><input type="checkbox" name="system.isstock" {{checked system.isstock}}/></label>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-medium">PHA</label>
|
||||||
|
<input type="text" class="item-field-label-medium" name="system.pha" value="{{system.pha}}" data-dtype="String"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-medium">OCV</label>
|
||||||
|
<input type="text" class="item-field-label-medium" name="system.ocv" value="{{system.ocv}}" data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-medium">DCV</label>
|
||||||
|
<input type="text" class="item-field-label-medium" name="system.dcv" value="{{system.dcv}}" data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-medium">Effects</label>
|
||||||
|
<input type="text" class="item-field-label-long" name="system.effects" value="{{system.effects}}" data-dtype="String"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs}}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</form>
|
@ -18,6 +18,8 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{{> systems/fvtt-hero-system-6/templates/partials/partial-item-hasroll.hbs}}
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-item-hasroll.hbs}}
|
||||||
|
|
||||||
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-power-maneuver-effect.hbs}}
|
||||||
|
|
||||||
{{> systems/fvtt-hero-system-6/templates/partials/partial-power-equipment-cost.hbs}}
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-power-equipment-cost.hbs}}
|
||||||
|
|
||||||
{{> systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs}}
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs}}
|
||||||
|
@ -46,6 +46,29 @@
|
|||||||
<input type="text" class="item-field-label-medium" name="system.levels" value="{{system.levels}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-medium" name="system.levels" value="{{system.levels}}" data-dtype="Number"/>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-long">Skill levels only</label>
|
||||||
|
<input type="checkbox" class="item-field-label-medium" name="system.skilllevelonly" {{checked system.skilllevelonly}}
|
||||||
|
{{#if (or system.skillfamiliarity system.skillprofiency)}}disabled{{/if}}
|
||||||
|
data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-long">Familiarity only</label>
|
||||||
|
<input type="checkbox" class="item-field-label-medium item-skill-familiarity" name="system.skillfamiliarity" {{checked system.skillfamiliarity}}
|
||||||
|
{{#if (or system.skillprofiency system.skilllevelonly)}}disabled{{/if}}
|
||||||
|
data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
{{#if system.skillfamiliarity}}
|
||||||
|
<li class="flexrow"><label class="item-field-label-long">Everyman skill</label>
|
||||||
|
<input type="checkbox" class="item-field-label-medium item-skill-everyman" name="system.skilleveryman" {{checked system.skilleveryman}} data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-long">Proficency</label>
|
||||||
|
<input type="checkbox" class="item-field-label-medium item-skill-profiency" name="system.skillprofiency" {{checked system.skillprofiency}}
|
||||||
|
{{#if (or system.skillfamiliarity system.skilllevelonly)}}disabled{{/if}}
|
||||||
|
data-dtype="Number"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
{{#if (ne system.skilltype "combat")}}
|
{{#if (ne system.skilltype "combat")}}
|
||||||
<li class="flexrow"><label class="item-field-label-long">Levels Cost</label>
|
<li class="flexrow"><label class="item-field-label-long">Levels Cost</label>
|
||||||
<input type="text" class="item-field-label-medium" name="system.levelscost" value="{{system.levelscost}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-medium" name="system.levelscost" value="{{system.levelscost}}" data-dtype="Number"/>
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<li class="item flexrow list-item" data-attr-key="{{key}}">
|
<li class="item flexrow list-item" data-attr-key="{{key}}">
|
||||||
<span class="item-field-label-medium" name="{{key}}">
|
<span class="item-field-label-medium" name="{{key}}">
|
||||||
<h4 class="item-field-label-medium margin-item-list"><a class="roll-charac" data-charac-key="{{key}}">{{charac.label}}</a></h4>
|
<h4 class="item-field-label-medium margin-item-list">{{charac.label}}</a></h4>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" class="item-field-label-short" name="system.characteristics.{{key}}.value" value="{{charac.value}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-short" name="system.characteristics.{{key}}.value" value="{{charac.value}}" data-dtype="Number"/>
|
||||||
<h4 class="item-field-label-short margin-item-list">{{charac.total}}</h4>
|
|
||||||
<h4 class="item-field-label-short margin-item-list"><a class="roll-charac" data-charac-key="{{key}}">{{charac.roll}}-</a></h4>
|
<!-- <h4 class="item-field-label-short margin-item-list">{{charac.total}}</h4>-->
|
||||||
|
<h4 class="item-field-label-short margin-item-list"><a class="roll-charac" data-charac-key="{{key}}"><i class="fas fa-dice"></i>{{charac.roll}}-</a></h4>
|
||||||
</li>
|
</li>
|
32
templates/partials/partial-actor-equipment-section.hbs
Normal file
32
templates/partials/partial-actor-equipment-section.hbs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<ul class="item-list alternate-list">
|
||||||
|
<li class="item flexrow list-item items-title-bg">
|
||||||
|
<span class="item-field-label-long-img">
|
||||||
|
<label class="">{{title}}</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="item-field-label-medium">Value</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="item-field-label-medium">Mass</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="item-field-label-medium">Quantity</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-short">
|
||||||
|
<label class="item-field-label-short">Roll</label>
|
||||||
|
</span>
|
||||||
|
<span class="item-field-label-medium">
|
||||||
|
<label class="item-field-label-medium">END</label>
|
||||||
|
</span>
|
||||||
|
<div class="item-filler"> </div>
|
||||||
|
<div class="item-controls item-controls-fixed">
|
||||||
|
<a class="item-control item-add" data-type="equipment" title="Create Item"><i class="fas fa-plus"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<ul class="item-list list-item-shadow2">
|
||||||
|
{{#each items as |equip key|}}
|
||||||
|
{{> systems/fvtt-hero-system-6/templates/partials/partial-actor-equipment.hbs equip=equip}}
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</ul>
|
@ -1,37 +1,31 @@
|
|||||||
<li class="item flexrow list-item list-item-shadow" data-item-id="{{equip._id}}">
|
<li class="item flexrow list-item list-item-shadow" data-item-id="{{equip._id}}">
|
||||||
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{equip.img}}" /></a>
|
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{equip.img}}" /></a>
|
||||||
{{#if (eq level 1)}}
|
|
||||||
<span class="item-name-label">{{equip.name}}</span>
|
<span class="item-name-label">{{equip.name}}</span>
|
||||||
{{else}}
|
|
||||||
<span class="item-name-label-level2">{{equip.name}}</span>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<span class="item-field-label-long"><label>
|
<span class="item-field-label-medium"><label>{{equip.system.value}}
|
||||||
{{equip.system.quantity}}
|
|
||||||
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
|
|
||||||
</label>
|
</label>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="item-field-label-medium">
|
<span class="item-field-label-medium"><label>{{equip.system.weight}}
|
||||||
-
|
</label>
|
||||||
</span>
|
</span>
|
||||||
<span class="item-field-label-short">
|
|
||||||
{{#if equip.system.iscontainer}}
|
<span class="item-field-label-medium"><label>{{equip.system.quantity}}
|
||||||
{{equip.system.contentsEnc}}
|
</label>
|
||||||
{{else}}
|
</span>
|
||||||
{{mul equip.system.weight equip.system.quantity}}
|
|
||||||
{{/if}}
|
{{#if equip.system.hasroll}}
|
||||||
</span>
|
<span class="item-field-label-short"><a class="roll-item" data-type="perk"><i class="fas fa-dice"></i>{{equip.system.roll}}-</a></span>
|
||||||
<span class="item-field-label-medium">
|
{{else}}
|
||||||
-
|
<span class="item-field-label-short"> </span>
|
||||||
</span>
|
{{/if}}
|
||||||
|
|
||||||
|
<span class="item-field-label-medium"><label>{{equip.system.endurance}}
|
||||||
|
</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
<div class="item-filler"> </div>
|
<div class="item-filler"> </div>
|
||||||
<div class="item-controls item-controls-fixed">
|
<div class="item-controls item-controls-fixed">
|
||||||
{{#if (eq level 1)}}
|
|
||||||
<a class="item-control item-equip" title="Worn">{{#if equip.system.equipped}}<i
|
|
||||||
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
|
||||||
{{/if}}
|
|
||||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
20
templates/partials/partial-actor-full-charac.hbs
Normal file
20
templates/partials/partial-actor-full-charac.hbs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
<li class="item stat flexrow list-item list-item-shadow" data-attr-key="{{key}}">
|
||||||
|
|
||||||
|
<input type="text" class="item-field-label-medium" name="system.characteristics.{{key}}.value" value="{{charac.value}}" data-dtype="Number"/>
|
||||||
|
|
||||||
|
<span class="item-field-label-medium" name="{{key}}">
|
||||||
|
<h4 class="item-field-label-medium margin-item-list">{{charac.label}}</a></h4>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<h4 class="item-field-label-short margin-item-list">{{charac.base}}</h4>
|
||||||
|
|
||||||
|
{{#if charac.hasroll}}
|
||||||
|
<h4 class="item-field-label-short margin-item-list"><a class="roll-charac" data-charac-key="{{key}}"><i class="fas fa-dice"></i>{{charac.roll}}-</a></h4>
|
||||||
|
{{else}}
|
||||||
|
<h4 class="item-field-label-short margin-item-list"> </h4>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<input type="text" class="item-field-label-long2" name="system.characteristics.{{key}}.notes" value="{{charac.notes}}" data-dtype="String"/>
|
||||||
|
|
||||||
|
</li>
|
@ -6,4 +6,8 @@
|
|||||||
<li class="flexrow"><label class="item-field-label-long">Roll</label>
|
<li class="flexrow"><label class="item-field-label-long">Roll</label>
|
||||||
<input type="text" class="item-field-label-medium" name="system.roll" value="{{system.roll}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-medium" name="system.roll" value="{{system.roll}}" data-dtype="Number"/>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow"><label class="item-field-label-long">Computes BODY ?</label>
|
||||||
|
<label class="item-field-label-medium"><input type="checkbox" name="system.computebody" {{checked system.computebody}}/></label>
|
||||||
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
20
templates/partials/partial-power-maneuver-effect.hbs
Normal file
20
templates/partials/partial-power-maneuver-effect.hbs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<li class="flexrow"><label class="item-field-label-long">Has Effect Roll ?</label>
|
||||||
|
<label class="item-field-label-medium"><input type="checkbox" name="system.haseffectroll" {{checked
|
||||||
|
system.haseffectroll}} /></label>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{#if system.haseffectroll}}
|
||||||
|
<li class="flexrow"><label class="item-field-label-long">Effect Roll</label>
|
||||||
|
<select class="item-field-label-long" type="text" name="system.effectroll" value="{{system.effectroll}}"
|
||||||
|
data-dtype="String">
|
||||||
|
{{#select system.effectroll}}
|
||||||
|
{{#each config.powerEffectRoll as |name key|}}
|
||||||
|
<option value="{{key}}">{{name}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li class="flexrow"><label class="item-field-label-long">Effect roll formula</label>
|
||||||
|
<input type="text" class="item-field-label-long" name="system.effectrollformula" value="{{system.effectrollformula}}" data-dtype="String"/>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
Reference in New Issue
Block a user