Foundry v10 version
This commit is contained in:
parent
d27b78d1d2
commit
cc1964093d
@ -66,10 +66,9 @@ export class BoLActorSheet extends ActorSheet {
|
|||||||
const incr = parseInt(dataset.incr)
|
const incr = parseInt(dataset.incr)
|
||||||
const min = parseInt(dataset.min)
|
const min = parseInt(dataset.min)
|
||||||
const max = parseInt(dataset.max) || 10000
|
const max = parseInt(dataset.max) || 10000
|
||||||
const itemData = item.data;
|
let value = eval("item." + target)
|
||||||
let value = eval("itemData." + target)
|
|
||||||
value = value || 0
|
value = value || 0
|
||||||
console.log("IncDec", item, target, value, operator, min, max)
|
//console.log("IncDec", item, target, value, operator, min, max)
|
||||||
if (operator === "minus") {
|
if (operator === "minus") {
|
||||||
if (value >= min + incr) value -= incr;
|
if (value >= min + incr) value -= incr;
|
||||||
else value = min;
|
else value = min;
|
||||||
@ -109,12 +108,12 @@ export class BoLActorSheet extends ActorSheet {
|
|||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
getData(options) {
|
getData(options) {
|
||||||
const data = super.getData(options);
|
const data = super.getData(options)
|
||||||
const actorData = duplicate(data.data);
|
const actorData = duplicate(data)
|
||||||
let formData = duplicate(data)
|
let formData = duplicate(data)
|
||||||
|
|
||||||
formData.config = game.bol.config
|
formData.config = game.bol.config
|
||||||
formData.data = actorData.data
|
formData.data = actorData
|
||||||
formData.details = this.actor.details
|
formData.details = this.actor.details
|
||||||
formData.attributes = this.actor.attributes
|
formData.attributes = this.actor.attributes
|
||||||
formData.aptitudes = this.actor.aptitudes
|
formData.aptitudes = this.actor.aptitudes
|
||||||
|
@ -9,15 +9,14 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
prepareData() {
|
prepareData() {
|
||||||
const actorData = this.data;
|
|
||||||
|
|
||||||
if (actorData.type === 'character') {
|
if (this.type === 'character') {
|
||||||
actorData.type = 'player';
|
this.chartype = 'player';
|
||||||
actorData.villainy = false;
|
this.villainy = false;
|
||||||
}
|
}
|
||||||
if (actorData.type === 'encounter') {
|
if (this.type === 'encounter') {
|
||||||
actorData.type = 'tough';
|
this.chartype = 'tough';
|
||||||
actorData.villainy = true;
|
this.villainy = true;
|
||||||
}
|
}
|
||||||
super.prepareData();
|
super.prepareData();
|
||||||
}
|
}
|
||||||
@ -25,13 +24,13 @@ export class BoLActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
updateResourcesData() {
|
updateResourcesData() {
|
||||||
if (this.type == 'character') {
|
if (this.type == 'character') {
|
||||||
let newVitality = 10 + this.data.data.attributes.vigor.value + this.data.data.resources.hp.bonus
|
let newVitality = 10 + this.system.attributes.vigor.value + this.system.resources.hp.bonus
|
||||||
if (this.data.data.resources.hp.max != newVitality) {
|
if (this.system.resources.hp.max != newVitality) {
|
||||||
this.update({ 'data.resources.hp.max': newVitality })
|
this.update({ 'system.resources.hp.max': newVitality })
|
||||||
}
|
}
|
||||||
let newPower = 10 + this.data.data.attributes.mind.value + this.data.data.resources.power.bonus
|
let newPower = 10 + this.system.attributes.mind.value + this.system.resources.power.bonus
|
||||||
if (this.data.data.resources.power.max != newPower) {
|
if (this.system.resources.power.max != newPower) {
|
||||||
this.update({ 'data.resources.power.max': newPower })
|
this.update({ 'system.resources.power.max': newPower })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -44,25 +43,22 @@ export class BoLActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
get itemData() {
|
|
||||||
return Array.from(this.data.items.values()).map(i => i.data)
|
|
||||||
}
|
|
||||||
get details() {
|
get details() {
|
||||||
return this.data.data.details
|
return this.system.details
|
||||||
}
|
}
|
||||||
get attributes() {
|
get attributes() {
|
||||||
return Object.values(this.data.data.attributes)
|
return Object.values(this.system.attributes)
|
||||||
}
|
}
|
||||||
get aptitudes() {
|
get aptitudes() {
|
||||||
return Object.values(this.data.data.aptitudes)
|
return Object.values(this.system.aptitudes)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
clearRoundModifiers() { // Process data/items that are finished at end of a round
|
clearRoundModifiers() { // Process data/items that are finished at end of a round
|
||||||
let foList = this.fightoptions
|
let foList = this.fightoptions
|
||||||
for (let fo of foList) {
|
for (let fo of foList) {
|
||||||
if (fo.data.properties.used) {
|
if (fo.system.properties.used) {
|
||||||
this.updateEmbeddedDocuments("Item", [{ _id: fo._id, 'data.properties.used': false }])
|
this.updateEmbeddedDocuments("Item", [{ _id: fo._id, 'system.properties.used': false }])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,28 +67,28 @@ export class BoLActor extends Actor {
|
|||||||
get defenseValue() {
|
get defenseValue() {
|
||||||
let defMod = 0
|
let defMod = 0
|
||||||
let fo = this.getActiveFightOption()
|
let fo = this.getActiveFightOption()
|
||||||
if (fo && fo.data.properties.fightoptiontype == "intrepid") {
|
if (fo && fo.system.properties.fightoptiontype == "intrepid") {
|
||||||
defMod += -2
|
defMod += -2
|
||||||
}
|
}
|
||||||
if (fo && fo.data.properties.fightoptiontype == "fulldefense") {
|
if (fo && fo.system.properties.fightoptiontype == "fulldefense") {
|
||||||
defMod += 2
|
defMod += 2
|
||||||
}
|
}
|
||||||
if (fo && fo.data.properties.fightoptiontype == "twoweaponsdef" && !fo.data.properties.used) {
|
if (fo && fo.system.properties.fightoptiontype == "twoweaponsdef" && !fo.system.properties.used) {
|
||||||
defMod += 1
|
defMod += 1
|
||||||
this.updateEmbeddedDocuments("Item", [{ _id: fo._id, 'data.properties.used': true }])
|
this.updateEmbeddedDocuments("Item", [{ _id: fo._id, 'system.properties.used': true }])
|
||||||
}
|
}
|
||||||
if (fo && fo.data.properties.fightoptiontype == "defense") {
|
if (fo && fo.system.properties.fightoptiontype == "defense") {
|
||||||
defMod += 1
|
defMod += 1
|
||||||
}
|
}
|
||||||
if (fo && fo.data.properties.fightoptiontype == "attack") {
|
if (fo && fo.system.properties.fightoptiontype == "attack") {
|
||||||
defMod += -1
|
defMod += -1
|
||||||
}
|
}
|
||||||
return this.data.data.aptitudes.def.value + defMod
|
return this.system.aptitudes.def.value + defMod
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getActiveFightOption() {
|
getActiveFightOption() {
|
||||||
let it = this.itemData.find(i => i.type === "feature" && i.data.subtype === "fightoption" && i.data.properties.activated)
|
let it = this.items.find(i => i.type === "feature" && i.system.subtype === "fightoption" && i.system.properties.activated)
|
||||||
if (it) {
|
if (it) {
|
||||||
return duplicate(it)
|
return duplicate(it)
|
||||||
}
|
}
|
||||||
@ -101,14 +97,14 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
incAttributeXP(key) {
|
incAttributeXP(key) {
|
||||||
let attr = duplicate(this.data.data.attributes[key])
|
let attr = duplicate(this.system.attributes[key])
|
||||||
if (attr) {
|
if (attr) {
|
||||||
let nextXP = (attr.value == -1) ? 2 : attr.value + (attr.value + 1)
|
let nextXP = (attr.value == -1) ? 2 : attr.value + (attr.value + 1)
|
||||||
let xp = duplicate(this.data.data.xp)
|
let xp = duplicate(this.system.xp)
|
||||||
if (xp.total - xp.spent >= nextXP) {
|
if (xp.total - xp.spent >= nextXP) {
|
||||||
attr.value += 1
|
attr.value += 1
|
||||||
xp.spent += nextXP
|
xp.spent += nextXP
|
||||||
this.update({ [`data.attributes.${key}`]: attr, [`data.xp`]: xp })
|
this.update({ [`system.attributes.${key}`]: attr, [`system.xp`]: xp })
|
||||||
} else {
|
} else {
|
||||||
ui.notifications.warn("Pas assez de points d'expérience !")
|
ui.notifications.warn("Pas assez de points d'expérience !")
|
||||||
}
|
}
|
||||||
@ -117,14 +113,14 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
incAptitudeXP(key) {
|
incAptitudeXP(key) {
|
||||||
let apt = duplicate(this.data.data.aptitudes[key])
|
let apt = duplicate(this.system.aptitudes[key])
|
||||||
if (apt) {
|
if (apt) {
|
||||||
let nextXP = (apt.value == -1) ? 1 : apt.value + 2
|
let nextXP = (apt.value == -1) ? 1 : apt.value + 2
|
||||||
let xp = duplicate(this.data.data.xp)
|
let xp = duplicate(this.system.xp)
|
||||||
if (xp.total - xp.spent >= nextXP) {
|
if (xp.total - xp.spent >= nextXP) {
|
||||||
apt.value += 1
|
apt.value += 1
|
||||||
xp.spent += nextXP
|
xp.spent += nextXP
|
||||||
this.update({ [`data.aptitudes.${key}`]: apt, [`data.xp`]: xp })
|
this.update({ [`system.aptitudes.${key}`]: apt, [`system.xp`]: xp })
|
||||||
} else {
|
} else {
|
||||||
ui.notifications.warn("Pas assez de points d'expérience !")
|
ui.notifications.warn("Pas assez de points d'expérience !")
|
||||||
}
|
}
|
||||||
@ -132,15 +128,15 @@ export class BoLActor extends Actor {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
incCareerXP(itemId) {
|
incCareerXP(itemId) {
|
||||||
let career = this.data.items.get(itemId)
|
let career = this.items.get(itemId)
|
||||||
if (career) {
|
if (career) {
|
||||||
career = duplicate(career)
|
career = duplicate(career)
|
||||||
let nextXP = career.data.rank + 1
|
let nextXP = career.system.rank + 1
|
||||||
let xp = duplicate(this.data.data.xp)
|
let xp = duplicate(this.system.xp)
|
||||||
if (xp.total - xp.spent >= nextXP) {
|
if (xp.total - xp.spent >= nextXP) {
|
||||||
xp.spent += nextXP
|
xp.spent += nextXP
|
||||||
this.update({ [`data.xp`]: xp })
|
this.update({ [`system.xp`]: xp })
|
||||||
this.updateEmbeddedDocuments('Item', [{ _id: career._id, 'data.rank': career.data.rank + 1 }])
|
this.updateEmbeddedDocuments('Item', [{ _id: career._id, 'system.rank': career.system.rank + 1 }])
|
||||||
} else {
|
} else {
|
||||||
ui.notifications.warn("Pas assez de points d'expérience !")
|
ui.notifications.warn("Pas assez de points d'expérience !")
|
||||||
}
|
}
|
||||||
@ -149,18 +145,18 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async toggleFightOption(itemId) {
|
async toggleFightOption(itemId) {
|
||||||
let fightOption = this.data.items.get(itemId)
|
let fightOption = this.items.get(itemId)
|
||||||
let state
|
let state
|
||||||
let updates = []
|
let updates = []
|
||||||
|
|
||||||
if (fightOption) {
|
if (fightOption) {
|
||||||
fightOption = duplicate(fightOption)
|
fightOption = duplicate(fightOption)
|
||||||
if (fightOption.data.properties.activated) {
|
if (fightOption.system.properties.activated) {
|
||||||
state = false
|
state = false
|
||||||
} else {
|
} else {
|
||||||
state = true
|
state = true
|
||||||
}
|
}
|
||||||
updates.push({ _id: fightOption._id, 'data.properties.activated': state }) // Update the selected one
|
updates.push({ _id: fightOption._id, 'system.properties.activated': state }) // Update the selected one
|
||||||
await this.updateEmbeddedDocuments("Item", updates) // Apply all changes
|
await this.updateEmbeddedDocuments("Item", updates) // Apply all changes
|
||||||
// Then notify
|
// Then notify
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
@ -175,13 +171,13 @@ export class BoLActor extends Actor {
|
|||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
get armorMalusValue() { // used for Fight Options
|
get armorMalusValue() { // used for Fight Options
|
||||||
for (let armor of this.armors) {
|
for (let armor of this.armors) {
|
||||||
if (armor.data.properties.armorQuality.includes("light")) {
|
if (armor.system.properties.armorQuality.includes("light")) {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
if (armor.data.properties.armorQuality.includes("medium")) {
|
if (armor.system.properties.armorQuality.includes("medium")) {
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
if (armor.data.properties.armorQuality.includes("heavy")) {
|
if (armor.system.properties.armorQuality.includes("heavy")) {
|
||||||
return 3
|
return 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -189,112 +185,112 @@ export class BoLActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get resources() {
|
get resources() {
|
||||||
return Object.values(this.data.data.resources)
|
return Object.values(this.system.resources)
|
||||||
}
|
}
|
||||||
get boons() {
|
get boons() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "boon");
|
return this.items.filter(i => i.type === "feature" && i.system.subtype === "boon");
|
||||||
}
|
}
|
||||||
get flaws() {
|
get flaws() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "flaw");
|
return this.items.filter(i => i.type === "feature" && i.system.subtype === "flaw");
|
||||||
}
|
}
|
||||||
get careers() {
|
get careers() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "career");
|
return duplicate( this.items.filter(i => i.type === "feature" && i.system.subtype === "career") || [])
|
||||||
}
|
}
|
||||||
get origins() {
|
get origins() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "origin");
|
return this.items.filter(i => i.type === "feature" && i.system.subtype === "origin");
|
||||||
}
|
}
|
||||||
get races() {
|
get races() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "race");
|
return this.items.filter(i => i.type === "feature" && i.system.subtype === "race");
|
||||||
}
|
}
|
||||||
get languages() {
|
get languages() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "language")
|
return this.items.filter(i => i.type === "feature" && i.system.subtype === "language")
|
||||||
}
|
}
|
||||||
get fightoptions() {
|
get fightoptions() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "fightoption")
|
return this.items.filter(i => i.type === "feature" && i.system.subtype === "fightoption")
|
||||||
}
|
}
|
||||||
get godsfaith() {
|
get godsfaith() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "godsfaith")
|
return this.items.filter(i => i.type === "feature" && i.system.subtype === "godsfaith")
|
||||||
}
|
}
|
||||||
get features() {
|
get features() {
|
||||||
return this.itemData.filter(i => i.type === "feature")
|
return this.items.filter(i => i.type === "feature")
|
||||||
}
|
}
|
||||||
get equipment() {
|
get equipment() {
|
||||||
return this.itemData.filter(i => i.type === "item")
|
return this.items.filter(i => i.type === "item")
|
||||||
}
|
}
|
||||||
get equipmentCreature() {
|
get equipmentCreature() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && (( i.data.subtype === "weapon" && i.data.properties.natural === true) || (i.data.subtype === "armor")) )
|
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && (( i.system.subtype === "weapon" && i.system.properties.natural === true) || (i.system.subtype === "armor")) )
|
||||||
}
|
}
|
||||||
get armors() {
|
get armors() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && i.data.subtype === "armor");
|
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "armor");
|
||||||
}
|
}
|
||||||
get helms() {
|
get helms() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && i.data.subtype === "helm");
|
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "helm");
|
||||||
}
|
}
|
||||||
get shields() {
|
get shields() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && i.data.subtype === "shield");
|
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "shield");
|
||||||
}
|
}
|
||||||
|
|
||||||
get weapons() {
|
get weapons() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && i.data.subtype === "weapon");
|
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "weapon");
|
||||||
}
|
}
|
||||||
get protections() {
|
get protections() {
|
||||||
return this.armors.concat(this.helms).concat(this.shields)
|
return this.armors.concat(this.helms).concat(this.shields)
|
||||||
}
|
}
|
||||||
get spells() {
|
get spells() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "spell");
|
return this.items.filter(i => i.type === "item" && i.system.category === "spell");
|
||||||
}
|
}
|
||||||
get alchemy() {
|
get alchemy() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "alchemy");
|
return this.items.filter(i => i.type === "item" && i.system.category === "alchemy");
|
||||||
}
|
}
|
||||||
get melee() {
|
get melee() {
|
||||||
return this.weapons.filter(i => i.data.properties.melee === true);
|
return this.weapons.filter(i => i.system.properties.melee === true);
|
||||||
}
|
}
|
||||||
get natural() {
|
get natural() {
|
||||||
return this.weapons.filter(i => i.data.properties.natural === true);
|
return this.weapons.filter(i => i.system.properties.natural === true);
|
||||||
}
|
}
|
||||||
get ranged() {
|
get ranged() {
|
||||||
return this.weapons.filter(i => i.data.properties.ranged === true);
|
return this.weapons.filter(i => i.system.properties.ranged === true);
|
||||||
}
|
}
|
||||||
|
|
||||||
get containers() {
|
get containers() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && i.data.subtype === "container");
|
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "container");
|
||||||
}
|
}
|
||||||
|
|
||||||
get treasure() {
|
get treasure() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && i.data.subtype === "currency");
|
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "currency");
|
||||||
}
|
}
|
||||||
|
|
||||||
get vehicles() {
|
get vehicles() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "vehicle");
|
return this.items.filter(i => i.type === "item" && i.system.category === "vehicle");
|
||||||
}
|
}
|
||||||
|
|
||||||
get ammos() {
|
get ammos() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && i.data.subtype === "ammunition");
|
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "ammunition");
|
||||||
}
|
}
|
||||||
|
|
||||||
get misc() {
|
get misc() {
|
||||||
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && (i.data.subtype === "other" || i.data.subtype === "container" || i.data.subtype === "scroll" || i.data.subtype === "jewel"));
|
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && (i.system.subtype === "other" || i.system.subtype === "container" || i.system.subtype === "scroll" || i.system.subtype === "jewel"));
|
||||||
}
|
}
|
||||||
|
|
||||||
get bonusBoons() {
|
get bonusBoons() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "boon" && i.data.properties.isbonusdice);
|
return this.items.filter(i => i.type === "feature" && i.system.subtype === "boon" && i.system.properties.isbonusdice);
|
||||||
}
|
}
|
||||||
get malusFlaws() {
|
get malusFlaws() {
|
||||||
return this.itemData.filter(i => i.type === "feature" && i.data.subtype === "flaw" && i.data.properties.ismalusdice);
|
return this.items.filter(i => i.type === "feature" && i.system.subtype === "flaw" && i.system.properties.ismalusdice);
|
||||||
}
|
}
|
||||||
|
|
||||||
isSorcerer() {
|
isSorcerer() {
|
||||||
if (this.careers.find(item => item.data.properties.sorcerer == true))
|
if (this.careers.find(item => item.system.properties.sorcerer == true))
|
||||||
return true
|
return true
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
isAlchemist() {
|
isAlchemist() {
|
||||||
if (this.careers.find(item => item.data.properties.alchemist == true))
|
if (this.careers.find(item => item.system.properties.alchemist == true))
|
||||||
return true
|
return true
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
isPriest() {
|
isPriest() {
|
||||||
if (this.careers.find(item => item.data.properties.priest == true))
|
if (this.careers.find(item => item.system.properties.priest == true))
|
||||||
return true
|
return true
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -304,8 +300,8 @@ export class BoLActor extends Actor {
|
|||||||
let armors = this.armors
|
let armors = this.armors
|
||||||
let ppCostArmor = 0
|
let ppCostArmor = 0
|
||||||
for (let armor of armors) {
|
for (let armor of armors) {
|
||||||
if (armor.data.worn) {
|
if (armor.system.worn) {
|
||||||
ppCostArmor += Number(armor.data.properties.modifiers.powercost) || 0
|
ppCostArmor += Number(armor.system.properties.modifiers.powercost) || 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ppCostArmor
|
return ppCostArmor
|
||||||
@ -314,8 +310,8 @@ export class BoLActor extends Actor {
|
|||||||
getArmorAgiMalus() {
|
getArmorAgiMalus() {
|
||||||
let malusAgi = 0
|
let malusAgi = 0
|
||||||
for (let armor of this.protections) {
|
for (let armor of this.protections) {
|
||||||
if (armor.data.worn) {
|
if (armor.system.worn) {
|
||||||
malusAgi += Number(armor.data.properties.modifiers.agility) || 0
|
malusAgi += Number(armor.system.properties.modifiers.agility) || 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return malusAgi
|
return malusAgi
|
||||||
@ -324,8 +320,8 @@ export class BoLActor extends Actor {
|
|||||||
getArmorInitMalus() {
|
getArmorInitMalus() {
|
||||||
let malusInit = 0
|
let malusInit = 0
|
||||||
for (let armor of this.protections) {
|
for (let armor of this.protections) {
|
||||||
if (armor.data.worn) {
|
if (armor.system.worn) {
|
||||||
malusInit += Number(armor.data.properties.modifiers.init) || 0
|
malusInit += Number(armor.system.properties.modifiers.init) || 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return malusInit
|
return malusInit
|
||||||
@ -333,7 +329,7 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
spendPowerPoint(ppCost) {
|
spendPowerPoint(ppCost) {
|
||||||
let newPP = this.data.data.resources.power.value - ppCost
|
let newPP = this.system.resources.power.value - ppCost
|
||||||
newPP = (newPP < 0) ? 0 : newPP
|
newPP = (newPP < 0) ? 0 : newPP
|
||||||
this.update({ 'data.resources.power.value': newPP })
|
this.update({ 'data.resources.power.value': newPP })
|
||||||
return newPP
|
return newPP
|
||||||
@ -341,7 +337,7 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
resetAlchemyStatus(alchemyId) {
|
resetAlchemyStatus(alchemyId) {
|
||||||
let alchemy = this.data.items.get(alchemyId)
|
let alchemy = this.items.get(alchemyId)
|
||||||
if (alchemy) {
|
if (alchemy) {
|
||||||
this.updateEmbeddedDocuments('Item', [{ _id: alchemy.id, 'data.properties.pccurrent': 0 }])
|
this.updateEmbeddedDocuments('Item', [{ _id: alchemy.id, 'data.properties.pccurrent': 0 }])
|
||||||
}
|
}
|
||||||
@ -349,14 +345,14 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
async spendAlchemyPoint(alchemyId, pcCost) {
|
async spendAlchemyPoint(alchemyId, pcCost) {
|
||||||
let alchemy = this.data.items.get(alchemyId)
|
let alchemy = this.items.get(alchemyId)
|
||||||
if (alchemy) {
|
if (alchemy) {
|
||||||
pcCost = Number(pcCost) ?? 0
|
pcCost = Number(pcCost) ?? 0
|
||||||
if (this.data.data.resources.alchemypoints.value >= pcCost) {
|
if (this.system.resources.alchemypoints.value >= pcCost) {
|
||||||
let newPC = this.data.data.resources.alchemypoints.value - pcCost
|
let newPC = this.system.resources.alchemypoints.value - pcCost
|
||||||
newPC = (newPC < 0) ? 0 : newPC
|
newPC = (newPC < 0) ? 0 : newPC
|
||||||
this.update({ 'data.resources.alchemypoints.value': newPC })
|
this.update({ 'data.resources.alchemypoints.value': newPC })
|
||||||
newPC = alchemy.data.data.properties.pccurrent + pcCost
|
newPC = alchemy.system.properties.pccurrent + pcCost
|
||||||
await this.updateEmbeddedDocuments('Item', [{ _id: alchemy.id, 'data.properties.pccurrent': newPC }])
|
await this.updateEmbeddedDocuments('Item', [{ _id: alchemy.id, 'data.properties.pccurrent': newPC }])
|
||||||
} else {
|
} else {
|
||||||
ui.notifications.warn("Plus assez de Points de Création !")
|
ui.notifications.warn("Plus assez de Points de Création !")
|
||||||
@ -366,17 +362,17 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
getAlchemistBonus() {
|
getAlchemistBonus() {
|
||||||
let sorcerer = this.careers.find(item => item.data.properties.alchemist == true)
|
let sorcerer = this.careers.find(item => item.system.properties.alchemist == true)
|
||||||
if (sorcerer) {
|
if (sorcerer) {
|
||||||
return sorcerer.data.rank
|
return sorcerer.system.rank
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
getSorcererBonus() {
|
getSorcererBonus() {
|
||||||
let sorcerer = this.careers.find(item => item.data.properties.sorcerer == true)
|
let sorcerer = this.careers.find(item => item.system.properties.sorcerer == true)
|
||||||
if (sorcerer) {
|
if (sorcerer) {
|
||||||
return sorcerer.data.rank
|
return sorcerer.system.rank
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -384,10 +380,10 @@ export class BoLActor extends Actor {
|
|||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
heroReroll() {
|
heroReroll() {
|
||||||
if (this.type == 'character') {
|
if (this.type == 'character') {
|
||||||
return this.data.data.resources.hero.value > 0;
|
return this.system.resources.hero.value > 0;
|
||||||
} else {
|
} else {
|
||||||
if (this.data.data.type == 'adversary') {
|
if (this.system.type == 'adversary') {
|
||||||
return this.data.data.resources.hero.value > 0;
|
return this.system.resources.hero.value > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@ -396,17 +392,17 @@ export class BoLActor extends Actor {
|
|||||||
getResourcesFromType() {
|
getResourcesFromType() {
|
||||||
let resources = {};
|
let resources = {};
|
||||||
if (this.type == 'encounter') {
|
if (this.type == 'encounter') {
|
||||||
resources['hp'] = this.data.data.resources.hp;
|
resources['hp'] = this.system.resources.hp;
|
||||||
if (this.data.data.type != 'base') {
|
if (this.system.type != 'base') {
|
||||||
resources['faith'] = this.data.data.resources.faith
|
resources['faith'] = this.system.resources.faith
|
||||||
resources['power'] = this.data.data.resources.power
|
resources['power'] = this.system.resources.power
|
||||||
}
|
}
|
||||||
if (this.data.data.type == 'adversary') {
|
if (this.system.type == 'adversary') {
|
||||||
resources['hero'] = duplicate(this.data.data.resources.hero)
|
resources['hero'] = duplicate(this.system.resources.hero)
|
||||||
resources['hero'].label = "BOL.resources.villainy"
|
resources['hero'].label = "BOL.resources.villainy"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
resources = this.data.data.resources;
|
resources = this.system.resources;
|
||||||
}
|
}
|
||||||
return resources
|
return resources
|
||||||
}
|
}
|
||||||
@ -532,13 +528,13 @@ export class BoLActor extends Actor {
|
|||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
buildRollList() {
|
buildRollList() {
|
||||||
let rolls = []
|
let rolls = []
|
||||||
for (let key in this.data.data.attributes) {
|
for (let key in this.system.attributes) {
|
||||||
let attr = this.data.data.attributes[key]
|
let attr = this.system.attributes[key]
|
||||||
rolls.push({ key: key, value: attr.value, name: attr.label, type: "attribute" })
|
rolls.push({ key: key, value: attr.value, name: attr.label, type: "attribute" })
|
||||||
}
|
}
|
||||||
for (let key in this.data.data.aptitudes) {
|
for (let key in this.system.aptitudes) {
|
||||||
if (key != "def") {
|
if (key != "def") {
|
||||||
let apt = this.data.data.aptitudes[key]
|
let apt = this.system.aptitudes[key]
|
||||||
rolls.push({ key: key, value: apt.value, name: apt.label, type: "aptitude" })
|
rolls.push({ key: key, value: apt.value, name: apt.label, type: "aptitude" })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -554,13 +550,13 @@ export class BoLActor extends Actor {
|
|||||||
async manageHealthState() {
|
async manageHealthState() {
|
||||||
let hpID = "lastHP" + this.id
|
let hpID = "lastHP" + this.id
|
||||||
let lastHP = await this.getFlag("world", hpID)
|
let lastHP = await this.getFlag("world", hpID)
|
||||||
if (lastHP != this.data.data.resources.hp.value && game.user.isGM ) { // Only GM sends this
|
if (lastHP != this.system.resources.hp.value && game.user.isGM ) { // Only GM sends this
|
||||||
await this.setFlag("world", hpID, this.data.data.resources.hp.value)
|
await this.setFlag("world", hpID, this.system.resources.hp.value)
|
||||||
if (this.data.data.resources.hp.value <= 0) {
|
if (this.system.resources.hp.value <= 0) {
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
alias: this.name,
|
alias: this.name,
|
||||||
whisper: BoLUtility.getWhisperRecipientsAndGMs(this.name),
|
whisper: BoLUtility.getWhisperRecipientsAndGMs(this.name),
|
||||||
content: await renderTemplate('systems/bol/templates/chat/chat-vitality-zero.hbs', { name: this.name, img: this.img, hp: this.data.data.resources.hp.value })
|
content: await renderTemplate('systems/bol/templates/chat/chat-vitality-zero.hbs', { name: this.name, img: this.img, hp: this.system.resources.hp.value })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -568,46 +564,46 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
registerInit(initScore, isCritical, isFumble) {
|
registerInit(initScore, isCritical, isFumble) {
|
||||||
this.update({ 'data.combat.lastinit': initScore, 'data.combat.iscritical': isCritical, 'data.combat.isfumble': isFumble })
|
this.update({ 'system.combat.lastinit': initScore, 'system.combat.iscritical': isCritical, 'system.combat.isfumble': isFumble })
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
getLastInitData() {
|
getLastInitData() {
|
||||||
return this.data.data.combat
|
return this.system.combat
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
async subHeroPoints(nb) {
|
async subHeroPoints(nb) {
|
||||||
let newHeroP = this.data.data.resources.hero.value - nb;
|
let newHeroP = this.system.resources.hero.value - nb;
|
||||||
newHeroP = (newHeroP < 0) ? 0 : newHeroP;
|
newHeroP = (newHeroP < 0) ? 0 : newHeroP;
|
||||||
await this.update({ 'data.resources.hero.value': newHeroP });
|
await this.update({ 'system.resources.hero.value': newHeroP });
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------- */
|
/*-------------------------------------------- */
|
||||||
async sufferDamage(damage) {
|
async sufferDamage(damage) {
|
||||||
let newHP = this.data.data.resources.hp.value - damage
|
let newHP = this.system.resources.hp.value - damage
|
||||||
await this.update({ 'data.resources.hp.value': newHP })
|
await this.update({ 'system.resources.hp.value': newHP })
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getArmorFormula() {
|
getArmorFormula() {
|
||||||
let protectWorn = this.protections.filter(item => item.data.worn)
|
let protectWorn = this.protections.filter(item => item.system.worn)
|
||||||
let formula = ""
|
let formula = ""
|
||||||
for (let protect of protectWorn) {
|
for (let protect of protectWorn) {
|
||||||
if (protect.data.subtype == 'helm') {
|
if (protect.system.subtype == 'helm') {
|
||||||
formula += "+1"
|
formula += "+1"
|
||||||
} else if (protect.data.subtype == 'armor') {
|
} else if (protect.system.subtype == 'armor') {
|
||||||
if (BoLUtility.getRollArmor()) {
|
if (BoLUtility.getRollArmor()) {
|
||||||
if (!protect.data.properties.soak.formula || protect.data.properties.soak.formula == "") {
|
if (!protect.system.properties.soak.formula || protect.system.properties.soak.formula == "") {
|
||||||
ui.notifications.warn(`L'armure ${protect.name} n'a pas de formule pour la protection !`)
|
ui.notifications.warn(`L'armure ${protect.name} n'a pas de formule pour la protection !`)
|
||||||
} else {
|
} else {
|
||||||
formula += "+" + " max(" + protect.data.properties.soak.formula +",0)"
|
formula += "+" + " max(" + protect.system.properties.soak.formula +",0)"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (protect.data.properties.soak.value == undefined) {
|
if (protect.system.properties.soak.value == undefined) {
|
||||||
ui.notifications.warn(`L'armure ${protect.name} n'a pas de valeur fixe pour la protection !`)
|
ui.notifications.warn(`L'armure ${protect.name} n'a pas de valeur fixe pour la protection !`)
|
||||||
} else {
|
} else {
|
||||||
formula += "+ " + protect.data.properties.soak.value
|
formula += "+ " + protect.system.properties.soak.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -618,9 +614,9 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
rollProtection(itemId) {
|
rollProtection(itemId) {
|
||||||
let armor = duplicate(this.data.items.get(itemId))
|
let armor = duplicate(this.items.get(itemId))
|
||||||
if (armor) {
|
if (armor) {
|
||||||
let armorFormula = "max("+armor.data.properties.soak.formula + ", 0)"
|
let armorFormula = "max("+armor.system.properties.soak.formula + ", 0)"
|
||||||
let rollArmor = new Roll(armorFormula)
|
let rollArmor = new Roll(armorFormula)
|
||||||
rollArmor.roll({ async: false }).toMessage()
|
rollArmor.roll({ async: false }).toMessage()
|
||||||
}
|
}
|
||||||
@ -628,7 +624,7 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
rollWeaponDamage(itemId) {
|
rollWeaponDamage(itemId) {
|
||||||
let weapon = duplicate(this.data.items.get(itemId))
|
let weapon = duplicate(this.system.items.get(itemId))
|
||||||
if (weapon) {
|
if (weapon) {
|
||||||
let r = new BoLDefaultRoll({ id: randomID(16), isSuccess: true, mode: "weapon", weapon: weapon, actorId: this.id, actor: this })
|
let r = new BoLDefaultRoll({ id: randomID(16), isSuccess: true, mode: "weapon", weapon: weapon, actorId: this.id, actor: this })
|
||||||
r.setSuccess(true)
|
r.setSuccess(true)
|
||||||
@ -638,10 +634,10 @@ export class BoLActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
toggleEquipItem(item) {
|
toggleEquipItem(item) {
|
||||||
const equipable = item.data.data.properties.equipable;
|
const equipable = item.system.properties.equipable;
|
||||||
if (equipable) {
|
if (equipable) {
|
||||||
let itemData = duplicate(item.data);
|
let itemData = duplicate(item);
|
||||||
itemData.data.worn = !itemData.data.worn;
|
itemData.system.worn = !itemData.system.worn;
|
||||||
return item.update(itemData);
|
return item.update(itemData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,7 @@ function registerUsageCount( registerKey ) {
|
|||||||
name: "Unique world key",
|
name: "Unique world key",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
|
default: "",
|
||||||
type: String
|
type: String
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -88,7 +89,7 @@ function registerUsageCount( registerKey ) {
|
|||||||
game.settings.set(registerKey, "world-key", worldKey )
|
game.settings.set(registerKey, "world-key", worldKey )
|
||||||
}
|
}
|
||||||
// Simple API counter
|
// Simple API counter
|
||||||
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.data.version}"`
|
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"`
|
||||||
$.ajax(regURL)
|
$.ajax(regURL)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ export class BoLRoll {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static attributeCheck(actor, key) {
|
static attributeCheck(actor, key) {
|
||||||
|
|
||||||
let attribute = eval(`actor.data.data.attributes.${key}`)
|
let attribute = eval(`actor.system.attributes.${key}`)
|
||||||
let label = (attribute.label) ? game.i18n.localize(attribute.label) : null
|
let label = (attribute.label) ? game.i18n.localize(attribute.label) : null
|
||||||
let description = game.i18n.localize('BOL.ui.attributeCheck') + " - " + game.i18n.localize(attribute.label)
|
let description = game.i18n.localize('BOL.ui.attributeCheck') + " - " + game.i18n.localize(attribute.label)
|
||||||
|
|
||||||
@ -43,9 +43,9 @@ export class BoLRoll {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static aptitudeCheck(actor, key) {
|
static aptitudeCheck(actor, key) {
|
||||||
|
|
||||||
let aptitude = eval(`actor.data.data.aptitudes.${key}`)
|
let aptitude = eval(`actor.system.aptitudes.${key}`)
|
||||||
let attrKey = this.getDefaultAttribute(key)
|
let attrKey = this.getDefaultAttribute(key)
|
||||||
let attribute = eval(`actor.data.data.attributes.${attrKey}`)
|
let attribute = eval(`actor.system.attributes.${attrKey}`)
|
||||||
|
|
||||||
let label = (aptitude.label) ? game.i18n.localize(aptitude.label) : null;
|
let label = (aptitude.label) ? game.i18n.localize(aptitude.label) : null;
|
||||||
let description = game.i18n.localize('BOL.ui.aptitudeCheck') + " - " + game.i18n.localize(aptitude.label);
|
let description = game.i18n.localize('BOL.ui.aptitudeCheck') + " - " + game.i18n.localize(aptitude.label);
|
||||||
@ -72,13 +72,13 @@ export class BoLRoll {
|
|||||||
|
|
||||||
let target = BoLUtility.getTarget()
|
let target = BoLUtility.getTarget()
|
||||||
|
|
||||||
let weaponData = weapon.data
|
let weaponData = weapon.system
|
||||||
let attribute = eval(`actor.data.data.attributes.${weaponData.properties.attackAttribute}`)
|
let attribute = eval(`actor.system.attributes.${weaponData.properties.attackAttribute}`)
|
||||||
let aptitude = eval(`actor.data.data.aptitudes.${weaponData.properties.attackAptitude}`)
|
let aptitude = eval(`actor.system.aptitudes.${weaponData.properties.attackAptitude}`)
|
||||||
|
|
||||||
// Manage specific case
|
// Manage specific case
|
||||||
let fightOption = actor.getActiveFightOption()
|
let fightOption = actor.getActiveFightOption()
|
||||||
if (fightOption && fightOption.data.fightoptiontype == "fulldefense") {
|
if (fightOption && fightOption.system.fightoptiontype == "fulldefense") {
|
||||||
ui.notifications.warn(`{{actor.name}} est en Défense Totale ! Il ne peut pas attaquer ce round.`)
|
ui.notifications.warn(`{{actor.name}} est en Défense Totale ! Il ne peut pas attaquer ce round.`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -138,8 +138,8 @@ export class BoLRoll {
|
|||||||
actorId: actor.id,
|
actorId: actor.id,
|
||||||
img: actor.img,
|
img: actor.img,
|
||||||
alchemy: alchemy,
|
alchemy: alchemy,
|
||||||
attribute: actor.data.data.attributes.mind,
|
attribute: actor.system.attributes.mind,
|
||||||
attrValue: actor.data.data.attributes.mind.value,
|
attrValue: actor.system.attributes.mind.value,
|
||||||
aptValue: 0,
|
aptValue: 0,
|
||||||
careerBonus: actor.getAlchemistBonus(),
|
careerBonus: actor.getAlchemistBonus(),
|
||||||
pcCost: Number(alchemyData.properties.pccost),
|
pcCost: Number(alchemyData.properties.pccost),
|
||||||
@ -161,14 +161,14 @@ export class BoLRoll {
|
|||||||
actorId: actor.id,
|
actorId: actor.id,
|
||||||
img: actor.img,
|
img: actor.img,
|
||||||
spell: spell,
|
spell: spell,
|
||||||
attribute: actor.data.data.attributes.mind,
|
attribute: actor.system.attributes.mind,
|
||||||
attrValue: actor.data.data.attributes.mind.value,
|
attrValue: actor.system.attributes.mind.value,
|
||||||
aptValue: 0,
|
aptValue: 0,
|
||||||
ppCurrent: Number(actor.data.data.resources.power.value),
|
ppCurrent: Number(actor.system.resources.power.value),
|
||||||
careerBonus: actor.getSorcererBonus(),
|
careerBonus: actor.getSorcererBonus(),
|
||||||
ppCostArmor: actor.getPPCostArmor(),
|
ppCostArmor: actor.getPPCostArmor(),
|
||||||
ppCost: Number(spell.data.properties.ppcost),
|
ppCost: Number(spell.system.properties.ppcost),
|
||||||
mod: Number(spell.data.properties.difficulty),
|
mod: Number(spell.system.properties.difficulty),
|
||||||
armorAgiMalus: actor.getArmorAgiMalus(),
|
armorAgiMalus: actor.getArmorAgiMalus(),
|
||||||
armorInitMalus: actor.getArmorInitMalus(),
|
armorInitMalus: actor.getArmorInitMalus(),
|
||||||
label: spell.name,
|
label: spell.name,
|
||||||
@ -180,7 +180,7 @@ export class BoLRoll {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static spellCheck(actor, event) {
|
static spellCheck(actor, event) {
|
||||||
if (actor.data.data.resources.power.value <= 0) {
|
if (actor.system.resources.power.value <= 0) {
|
||||||
ui.notifications.warn("Plus assez de points de Pouvoir !")
|
ui.notifications.warn("Plus assez de points de Pouvoir !")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -209,7 +209,7 @@ export class BoLRoll {
|
|||||||
$('#roll-nbdice').val("2 + " + String(Math.abs(this.rollData.bmDice)) + letter)
|
$('#roll-nbdice').val("2 + " + String(Math.abs(this.rollData.bmDice)) + letter)
|
||||||
}
|
}
|
||||||
let rollbase = this.rollData.attrValue + "+" + this.rollData.aptValue
|
let rollbase = this.rollData.attrValue + "+" + this.rollData.aptValue
|
||||||
if ( this.rollData.weapon && this.rollData.weapon.data.properties.onlymodifier ) {
|
if ( this.rollData.weapon && this.rollData.weapon.system.properties.onlymodifier ) {
|
||||||
rollbase = ""
|
rollbase = ""
|
||||||
}
|
}
|
||||||
$('#roll-modifier').val(rollbase + "+" + this.rollData.careerBonus + "+" + this.rollData.mod + "+" +
|
$('#roll-modifier').val(rollbase + "+" + this.rollData.careerBonus + "+" + this.rollData.mod + "+" +
|
||||||
@ -226,20 +226,20 @@ export class BoLRoll {
|
|||||||
let fgItem = rollData.fightOption
|
let fgItem = rollData.fightOption
|
||||||
if (fgItem) {
|
if (fgItem) {
|
||||||
console.log(fgItem)
|
console.log(fgItem)
|
||||||
if (fgItem.data.properties.fightoptiontype == "armordefault") {
|
if (fgItem.system.properties.fightoptiontype == "armordefault") {
|
||||||
rollData.modArmorMalus = rollData.armorMalus // Activate the armor malus
|
rollData.modArmorMalus = rollData.armorMalus // Activate the armor malus
|
||||||
rollData.damagesIgnoresArmor = true
|
rollData.damagesIgnoresArmor = true
|
||||||
}
|
}
|
||||||
if (fgItem.data.properties.fightoptiontype == "intrepid") {
|
if (fgItem.system.properties.fightoptiontype == "intrepid") {
|
||||||
rollData.attackModifier += 2
|
rollData.attackModifier += 2
|
||||||
}
|
}
|
||||||
if (fgItem.data.properties.fightoptiontype == "defense") {
|
if (fgItem.system.properties.fightoptiontype == "defense") {
|
||||||
rollData.attackModifier += -1
|
rollData.attackModifier += -1
|
||||||
}
|
}
|
||||||
if (fgItem.data.properties.fightoptiontype == "attack") {
|
if (fgItem.system.properties.fightoptiontype == "attack") {
|
||||||
rollData.attackModifier += 1
|
rollData.attackModifier += 1
|
||||||
}
|
}
|
||||||
if (fgItem.data.properties.fightoptiontype == "twoweaponsdef" || fgItem.data.properties.fightoptiontype == "twoweaponsatt") {
|
if (fgItem.system.properties.fightoptiontype == "twoweaponsdef" || fgItem.system.properties.fightoptiontype == "twoweaponsatt") {
|
||||||
rollData.attackModifier += -1
|
rollData.attackModifier += -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -289,15 +289,15 @@ export class BoLRoll {
|
|||||||
html.find('#attr').change((event) => {
|
html.find('#attr').change((event) => {
|
||||||
let attrKey = event.currentTarget.value
|
let attrKey = event.currentTarget.value
|
||||||
let actor = game.actors.get( this.rollData.actorId)
|
let actor = game.actors.get( this.rollData.actorId)
|
||||||
this.rollData.attribute = duplicate(actor.data.data.attributes[attrKey])
|
this.rollData.attribute = duplicate(actor.system.attributes[attrKey])
|
||||||
this.rollData.attrValue = actor.data.data.attributes[attrKey].value
|
this.rollData.attrValue = actor.system.attributes[attrKey].value
|
||||||
this.updateTotalDice()
|
this.updateTotalDice()
|
||||||
})
|
})
|
||||||
html.find('#apt').change((event) => {
|
html.find('#apt').change((event) => {
|
||||||
let aptKey = event.currentTarget.value
|
let aptKey = event.currentTarget.value
|
||||||
let actor = game.actors.get( this.rollData.actorId)
|
let actor = game.actors.get( this.rollData.actorId)
|
||||||
this.rollData.aptitude = duplicate(actor.data.data.aptitudes[aptKey])
|
this.rollData.aptitude = duplicate(actor.system.aptitudes[aptKey])
|
||||||
this.rollData.aptValue = actor.data.data.aptitudes[aptKey].value
|
this.rollData.aptValue = actor.system.aptitudes[aptKey].value
|
||||||
this.updateTotalDice()
|
this.updateTotalDice()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -339,16 +339,16 @@ export class BoLRoll {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static preProcessWeapon(rollData, defender) {
|
static preProcessWeapon(rollData, defender) {
|
||||||
if (rollData.mode == "weapon") {
|
if (rollData.mode == "weapon") {
|
||||||
rollData.weaponModifier = rollData.weapon.data.properties.attackModifiers ?? 0;
|
rollData.weaponModifier = rollData.weapon.system.properties.attackModifiers ?? 0;
|
||||||
rollData.attackBonusDice = rollData.weapon.data.properties.attackBonusDice
|
rollData.attackBonusDice = rollData.weapon.system.properties.attackBonusDice
|
||||||
if (defender) { // If target is selected
|
if (defender) { // If target is selected
|
||||||
rollData.defence = defender.defenseValue
|
rollData.defence = defender.defenseValue
|
||||||
rollData.armorMalus = defender.armorMalusValue
|
rollData.armorMalus = defender.armorMalusValue
|
||||||
rollData.shieldBlock = 'none'
|
rollData.shieldBlock = 'none'
|
||||||
let shields = defender.shields
|
let shields = defender.shields
|
||||||
for (let shield of shields) {
|
for (let shield of shields) {
|
||||||
rollData.shieldBlock = (shield.data.properties.blocking.blockingAll) ? 'blockall' : 'blockone';
|
rollData.shieldBlock = (shield.system.properties.blocking.blockingAll) ? 'blockall' : 'blockone';
|
||||||
rollData.shieldAttackMalus = (shield.data.properties.blocking.malus) ? shield.data.properties.blocking.malus : 1;
|
rollData.shieldAttackMalus = (shield.system.properties.blocking.malus) ? shield.system.properties.blocking.malus : 1;
|
||||||
rollData.applyShieldMalus = false
|
rollData.applyShieldMalus = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -431,7 +431,7 @@ export class BoLRoll {
|
|||||||
rollData.nbDice += (rollData.attackBonusDice) ? 1 : 0
|
rollData.nbDice += (rollData.attackBonusDice) ? 1 : 0
|
||||||
|
|
||||||
let rollbase = rollData.attrValue + rollData.aptValue
|
let rollbase = rollData.attrValue + rollData.aptValue
|
||||||
if ( rollData.weapon && rollData.weapon.data.properties.onlymodifier ) {
|
if ( rollData.weapon && rollData.weapon.system.properties.onlymodifier ) {
|
||||||
rollbase = 0
|
rollbase = 0
|
||||||
}
|
}
|
||||||
const modifiers = rollbase + rollData.careerBonus + rollData.mod + rollData.weaponModifier - rollData.defence - rollData.modArmorMalus + rollData.shieldMalus + rollData.attackModifier + rollData.appliedArmorMalus
|
const modifiers = rollbase + rollData.careerBonus + rollData.mod + rollData.weaponModifier - rollData.defence - rollData.modArmorMalus + rollData.shieldMalus + rollData.attackModifier + rollData.appliedArmorMalus
|
||||||
@ -597,8 +597,8 @@ export class BoLDefaultRoll {
|
|||||||
if (this.rollData.damageMode == 'damage-plus-12') {
|
if (this.rollData.damageMode == 'damage-plus-12') {
|
||||||
bonusDmg = 12
|
bonusDmg = 12
|
||||||
}
|
}
|
||||||
let attrDamageValue = this.getDamageAttributeValue(this.rollData.weapon.data.properties.damageAttribute)
|
let attrDamageValue = this.getDamageAttributeValue(this.rollData.weapon.system.properties.damageAttribute)
|
||||||
let weaponFormula = BoLUtility.getDamageFormula(this.rollData.weapon.data, this.rollData.fightOption)
|
let weaponFormula = BoLUtility.getDamageFormula(this.rollData.weapon.system, this.rollData.fightOption)
|
||||||
|
|
||||||
let damageFormula = weaponFormula + "+" + bonusDmg + "+" + attrDamageValue
|
let damageFormula = weaponFormula + "+" + bonusDmg + "+" + attrDamageValue
|
||||||
console.log("DAMAGE !!!", damageFormula, attrDamageValue, this.rollData)
|
console.log("DAMAGE !!!", damageFormula, attrDamageValue, this.rollData)
|
||||||
|
@ -20,42 +20,40 @@ export class BoLItemSheet extends ItemSheet {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/** @override */
|
/** @override */
|
||||||
getData(options) {
|
getData(options) {
|
||||||
const data = super.getData(options);
|
const data = super.getData(options)
|
||||||
const itemData = data.data;
|
let itemData = duplicate(data.document)
|
||||||
data.config = game.bol.config;
|
data.config = game.bol.config
|
||||||
data.item = itemData;
|
data.item = itemData
|
||||||
data.data = itemData.data;
|
data.category = itemData.system.category
|
||||||
data.category = itemData.category;
|
|
||||||
data.itemProperties = this.item.itemProperties;
|
|
||||||
data.isGM = game.user.isGM;
|
data.isGM = game.user.isGM;
|
||||||
|
|
||||||
// Dynamic default data fix/adapt
|
// Dynamic default data fix/adapt
|
||||||
if (itemData.type == "item") {
|
if (itemData.type == "item") {
|
||||||
if (!itemData.data.category) {
|
if (!itemData.system.category) {
|
||||||
itemData.data.category = "equipment"
|
itemData.system.category = "equipment"
|
||||||
}
|
}
|
||||||
if ( itemData.data.category == "equipment" && itemData.data.properties.equipable) {
|
if ( itemData.system.category == "equipment" && itemData.system.properties.equipable) {
|
||||||
if (!itemData.data.properties.slot) {
|
if (!itemData.system.properties.slot) {
|
||||||
itemData.data.properties.slot = "-"
|
itemData.system.properties.slot = "-"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (itemData.data.category == 'spell') {
|
if (itemData.system.category == 'spell') {
|
||||||
if(!itemData.data.properties.mandatoryconditions) {
|
if(!itemData.system.properties.mandatoryconditions) {
|
||||||
itemData.data.properties.mandatoryconditions = []
|
itemData.system.properties.mandatoryconditions = []
|
||||||
}
|
}
|
||||||
if(!itemData.data.properties.optionnalconditions) {
|
if(!itemData.system.properties.optionnalconditions) {
|
||||||
itemData.data.properties.optionnalconditions = []
|
itemData.system.properties.optionnalconditions = []
|
||||||
}
|
}
|
||||||
for (let i = 0; i < 4; i++) {
|
for (let i = 0; i < 4; i++) {
|
||||||
itemData.data.properties.mandatoryconditions[i] = itemData.data.properties.mandatoryconditions[i] ?? ""
|
itemData.system.properties.mandatoryconditions[i] = itemData.system.properties.mandatoryconditions[i] ?? ""
|
||||||
}
|
}
|
||||||
for (let i = 0; i < 8; i++) {
|
for (let i = 0; i < 8; i++) {
|
||||||
itemData.data.properties.optionnalconditions[i] = itemData.data.properties.optionnalconditions[i] ?? ""
|
itemData.system.properties.optionnalconditions[i] = itemData.system.properties.optionnalconditions[i] ?? ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!itemData.data.subtype) {
|
if (!itemData.system.subtype) {
|
||||||
itemData.data.category = "origin"
|
itemData.system.category = "origin"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,21 +7,17 @@ export class BoLItem extends Item {
|
|||||||
* Augment the basic Item data model with additional dynamic data.
|
* Augment the basic Item data model with additional dynamic data.
|
||||||
*/
|
*/
|
||||||
prepareData() {
|
prepareData() {
|
||||||
super.prepareData();
|
super.prepareData()
|
||||||
// console.debug("Item prepareData");
|
|
||||||
// Get the Item's data
|
|
||||||
const itemData = this.data;
|
|
||||||
// console.log(itemData);
|
|
||||||
const actorData = this.actor ? this.actor.data : {};
|
|
||||||
const data = itemData.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
get properties() {
|
const actorData = this.actor ? this.actor.system : {}
|
||||||
return this.data.properties;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
get properties() {
|
||||||
|
return this.system.properties
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
* Get the Array of item properties which are used in the small sidebar of the description tab
|
* Get the Array of item properties which are used in the small sidebar of the description tab
|
||||||
* @return {Array}
|
* @return {Array}
|
||||||
@ -29,11 +25,11 @@ export class BoLItem extends Item {
|
|||||||
*/
|
*/
|
||||||
get itemProperties() {
|
get itemProperties() {
|
||||||
const props = [];
|
const props = [];
|
||||||
if ( this.data.type === "item" ) {
|
if ( this.type === "item" ) {
|
||||||
const entries = Object.entries(this.data.data.properties);
|
const entries = Object.entries(this.system.properties)
|
||||||
props.push(...entries.filter(e => e[1] === true).map(e => { return game.bol.config.itemProperties2[e[0]] }));
|
props.push(...entries.filter(e => e[1] === true).map(e => { return game.bol.config.itemProperties2[e[0]] }))
|
||||||
}
|
}
|
||||||
return props.filter(p => !!p);
|
return props.filter(p => !!p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
10
system.json
10
system.json
@ -14,10 +14,10 @@
|
|||||||
"url": "https://www.uberwald.me/gitea/public/bol",
|
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"flags": {},
|
"flags": {},
|
||||||
"version": "1.5.0",
|
"version": "10.0.0",
|
||||||
"templateVersion": 10,
|
"templateVersion": 10,
|
||||||
"minimumCoreVersion": "0.8.6",
|
"minimumCoreVersion": "10",
|
||||||
"compatibleCoreVersion": "9",
|
"compatibleCoreVersion": "10",
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"esmodules": [
|
"esmodules": [
|
||||||
"module/bol.js"
|
"module/bol.js"
|
||||||
@ -182,8 +182,8 @@
|
|||||||
"system": [],
|
"system": [],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/master/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v1.5.0.zip",
|
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.0.0.zip",
|
||||||
"protected": false,
|
"protected": false,
|
||||||
"background": "images/map_lemurie.webp",
|
"background": "images/map_lemurie.webp",
|
||||||
"gridDistance": 1.5,
|
"gridDistance": 1.5,
|
||||||
|
@ -137,7 +137,7 @@
|
|||||||
},
|
},
|
||||||
"character": {
|
"character": {
|
||||||
"templates": [ "base" ],
|
"templates": [ "base" ],
|
||||||
"type": "player",
|
"chartype": "player",
|
||||||
"villainy": false,
|
"villainy": false,
|
||||||
"bougette": {
|
"bougette": {
|
||||||
"state": "nomoney"
|
"state": "nomoney"
|
||||||
@ -157,7 +157,7 @@
|
|||||||
},
|
},
|
||||||
"encounter": {
|
"encounter": {
|
||||||
"templates": [ "base" ],
|
"templates": [ "base" ],
|
||||||
"type": "tough",
|
"chartype": "tough",
|
||||||
"villainy": false,
|
"villainy": false,
|
||||||
"size": "",
|
"size": "",
|
||||||
"environment": ""
|
"environment": ""
|
||||||
|
@ -12,14 +12,14 @@
|
|||||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||||
<div class="item-image" ><img src="{{item.img}}" title="{{item.name}}"/></div>
|
<div class="item-image" ><img src="{{item.img}}" title="{{item.name}}"/></div>
|
||||||
<h4 class="item-name flex2">{{#if ../weapon}}<a class="rollable" data-roll-type="weapon">{{/if}}{{item.name}}{{#if ../weapon}}</a>{{/if}}</h4>
|
<h4 class="item-name flex2">{{#if ../weapon}}<a class="rollable" data-roll-type="weapon">{{/if}}{{item.name}}{{#if ../weapon}}</a>{{/if}}</h4>
|
||||||
{{#if ../protection}}<div class="item-field"><a class="rollable" data-roll-type="protection">{{item.data.properties.soak.formula}}</a> / {{item.data.properties.soak.value}}</div>{{/if}}
|
{{#if ../protection}}<div class="item-field"><a class="rollable" data-roll-type="protection">{{item.system.properties.soak.formula}}</a> / {{item.data.properties.soak.value}}</div>{{/if}}
|
||||||
{{#if ../blocking}}<div class="item-field">{{item.data.properties.blocking.malus}}</div>{{/if}}
|
{{#if ../blocking}}<div class="item-field">{{item.system.properties.blocking.malus}}</div>{{/if}}
|
||||||
{{#if ../weapon}}<div class="item-field"><a class="rollable" data-roll-type="damage">
|
{{#if ../weapon}}<div class="item-field"><a class="rollable" data-roll-type="damage">
|
||||||
{{item.data.properties.damage}}+{{item.data.properties.damageModifiers}} x{{item.data.properties.damageMultiplier}}
|
{{item.system.properties.damage}}+{{item.system.properties.damageModifiers}}x{{item.system.properties.damageMultiplier}}
|
||||||
</a></div>{{/if}}
|
</a></div>{{/if}}
|
||||||
{{#if ../ranged}}<div class="item-field">{{item.data.properties.range}}</div>{{else}}<div class="item-field"></div>{{/if}}
|
{{#if ../ranged}}<div class="item-field">{{item.system.properties.range}}</div>{{else}}<div class="item-field"></div>{{/if}}
|
||||||
{{#if ../options}}<div class="item-field">
|
{{#if ../options}}<div class="item-field">
|
||||||
{{#if item.data.properties.activated}}
|
{{#if item.system.properties.activated}}
|
||||||
<a class="toggle-fight-option">{{localize "BOL.ui.toactivated"}}</a>
|
<a class="toggle-fight-option">{{localize "BOL.ui.toactivated"}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a class="toggle-fight-option">{{localize "BOL.ui.todeactivated"}}</a>
|
<a class="toggle-fight-option">{{localize "BOL.ui.todeactivated"}}</a>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
{{editor content=data.details.biography target="data.details.biography" button=true owner=owner
|
{{editor details.biography target="system.details.biography" button=true owner=owner
|
||||||
editable=editable}}
|
editable=editable}}
|
||||||
|
|
||||||
<ol class="items-list">
|
<ol class="items-list">
|
||||||
@ -49,4 +49,4 @@ editable=editable}}
|
|||||||
<div class="item-field flex1 right"></div>
|
<div class="item-field flex1 right"></div>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
{{editor content=data.details.notes target="data.details.notes" button=true owner=owner editable=editable}}
|
{{editor details.notes target="system.details.notes" button=true owner=owner editable=editable}}
|
@ -21,10 +21,10 @@
|
|||||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||||
<div class="item-image {{#if ../weapon}}roll-weapon{{/if}}"><img src="{{item.img}}" title="{{item.name}}"/></div>
|
<div class="item-image {{#if ../weapon}}roll-weapon{{/if}}"><img src="{{item.img}}" title="{{item.name}}"/></div>
|
||||||
<h4 class="item-name flex2"><a class="item-edit">{{item.name}}</a></h4>
|
<h4 class="item-name flex2"><a class="item-edit">{{item.name}}</a></h4>
|
||||||
{{#if ../protection}}<div class="item-field">{{item.data.properties.soak.value}}</div>{{/if}}
|
{{#if ../protection}}<div class="item-field">{{item.system.properties.soak.value}}</div>{{/if}}
|
||||||
{{#if ../blocking}}<div class="item-field">{{item.data.properties.blocking.malus}}</div>{{/if}}
|
{{#if ../blocking}}<div class="item-field">{{item.system.properties.blocking.malus}}</div>{{/if}}
|
||||||
{{#if ../weapon}}<div class="item-field">{{item.data.properties.damage}}</div>{{/if}}
|
{{#if ../weapon}}<div class="item-field">{{item.system.properties.damage}}</div>{{/if}}
|
||||||
{{#if ../ranged}}<div class="item-field">{{item.data.properties.range}}</div>{{else}}<div class="item-field"></div>{{/if}}
|
{{#if ../ranged}}<div class="item-field">{{item.system.properties.range}}</div>{{else}}<div class="item-field"></div>{{/if}}
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ol>
|
</ol>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
{{localize "BOL.ui.money"}}
|
{{localize "BOL.ui.money"}}
|
||||||
</h4>
|
</h4>
|
||||||
<select class="field-value" name="data.bougette.state" data-dtype="String">
|
<select class="field-value" name="data.bougette.state" data-dtype="String">
|
||||||
{{#select data.bougette.state}}
|
{{#select system.bougette.state}}
|
||||||
{{#each config.bougetteState as |value id|}}
|
{{#each config.bougetteState as |value id|}}
|
||||||
<option value="{{id}}">{{localize value}}</option>
|
<option value="{{id}}">{{localize value}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -39,26 +39,26 @@
|
|||||||
<a class="item-edit">{{item.name}}</a>
|
<a class="item-edit">{{item.name}}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="item-field flex2 center">
|
<div class="item-field flex2 center">
|
||||||
{{#if item.data.properties.equipable}}
|
{{#if item.system.properties.equipable}}
|
||||||
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
||||||
"BOL.equipmentSlots." item.data.properties.slot)}}</span>
|
"BOL.equipmentSlots." item.system.properties.slot)}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field group-btns flex1 center">
|
<div class="item-field group-btns flex1 center">
|
||||||
{{#if item.data.properties.stackable}}
|
{{#if item.system.properties.stackable}}
|
||||||
<a class="inc-dec-btns" data-operator="minus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="minus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
||||||
<span class="item-field">{{item.data.quantity}}</span>
|
<span class="item-field">{{item.data.quantity}}</span>
|
||||||
<a class="inc-dec-btns" data-operator="plus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="plus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
<span class="item-field">{{item.data.price}}</span>
|
<span class="item-field">{{item.system.price}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
{{#if data.properties.equipable}}
|
{{#if system.properties.equipable}}
|
||||||
{{#if data.worn}}
|
{{#if system.worn}}
|
||||||
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
||||||
class="fas fa-shield-alt"></i></a></span>
|
class="fas fa-shield-alt"></i></a></span>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -92,32 +92,32 @@
|
|||||||
<a class="item-edit">{{item.name}}</a>
|
<a class="item-edit">{{item.name}}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="item-field flex2 center">
|
<div class="item-field flex2 center">
|
||||||
{{#if item.data.properties.equipable}}
|
{{#if item.system.properties.equipable}}
|
||||||
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
||||||
"BOL.equipmentSlots." item.data.properties.slot)}}</span>
|
"BOL.equipmentSlots." item.system.properties.slot)}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex2 center">
|
<div class="item-field flex2 center">
|
||||||
{{#if item.data.properties.equipable}}
|
{{#if item.system.properties.equipable}}
|
||||||
<span class="item-field"
|
<span class="item-field"
|
||||||
style="font-size: smaller; font-style: italic; color:#4b4a44">{{data.properties.soak.formula}}</span>
|
style="font-size: smaller; font-style: italic; color:#4b4a44">{{system.properties.soak.formula}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field group-btns flex1 center">
|
<div class="item-field group-btns flex1 center">
|
||||||
{{#if item.data.properties.stackable}}
|
{{#if item.system.properties.stackable}}
|
||||||
<a class="inc-dec-btns" data-operator="minus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="minus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
||||||
<span class="item-field">{{item.data.quantity}}</span>
|
<span class="item-field">{{item.system.quantity}}</span>
|
||||||
<a class="inc-dec-btns" data-operator="plus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="plus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
<span class="item-field">{{item.data.price}}</span>
|
<span class="item-field">{{item.system.price}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
{{#if data.properties.equipable}}
|
{{#if system.properties.equipable}}
|
||||||
{{#if data.worn}}
|
{{#if system.worn}}
|
||||||
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
||||||
class="fas fa-shield-alt"></i></a></span>
|
class="fas fa-shield-alt"></i></a></span>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -150,26 +150,26 @@
|
|||||||
<a class="item-edit">{{item.name}}</a>
|
<a class="item-edit">{{item.name}}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="item-field flex2 center">
|
<div class="item-field flex2 center">
|
||||||
{{#if item.data.properties.equipable}}
|
{{#if item.system.properties.equipable}}
|
||||||
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
||||||
"BOL.equipmentSlots." item.data.properties.slot)}}</span>
|
"BOL.equipmentSlots." item.system.properties.slot)}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field group-btns flex1 center">
|
<div class="item-field group-btns flex1 center">
|
||||||
{{#if item.data.properties.stackable}}
|
{{#if item.system.properties.stackable}}
|
||||||
<a class="inc-dec-btns" data-operator="minus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="minus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
||||||
<span class="item-field">{{item.data.quantity}}</span>
|
<span class="item-field">{{item.system.quantity}}</span>
|
||||||
<a class="inc-dec-btns" data-operator="plus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="plus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
<span class="item-field">{{item.data.price}}</span>
|
<span class="item-field">{{item.system.price}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
{{#if data.properties.equipable}}
|
{{#if system.properties.equipable}}
|
||||||
{{#if data.worn}}
|
{{#if system.worn}}
|
||||||
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
||||||
class="fas fa-shield-alt"></i></a></span>
|
class="fas fa-shield-alt"></i></a></span>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -202,26 +202,26 @@
|
|||||||
<a class="item-edit">{{item.name}}</a>
|
<a class="item-edit">{{item.name}}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="item-field flex2 center">
|
<div class="item-field flex2 center">
|
||||||
{{#if item.data.properties.equipable}}
|
{{#if item.system.properties.equipable}}
|
||||||
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
||||||
"BOL.equipmentSlots." item.data.properties.slot)}}</span>
|
"BOL.equipmentSlots." item.system.properties.slot)}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field group-btns flex1 center">
|
<div class="item-field group-btns flex1 center">
|
||||||
{{#if item.data.properties.stackable}}
|
{{#if item.data.properties.stackable}}
|
||||||
<a class="inc-dec-btns" data-operator="minus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="system-dec-btns" data-operator="minus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
||||||
<span class="item-field">{{item.data.quantity}}</span>
|
<span class="item-field">{{item.system.quantity}}</span>
|
||||||
<a class="inc-dec-btns" data-operator="plus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="plus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
<span class="item-field">{{item.data.price}}</span>
|
<span class="item-field">{{item.system.price}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
{{#if data.properties.equipable}}
|
{{#if system.properties.equipable}}
|
||||||
{{#if data.worn}}
|
{{#if system.worn}}
|
||||||
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
||||||
class="fas fa-shield-alt"></i></a></span>
|
class="fas fa-shield-alt"></i></a></span>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -256,24 +256,24 @@
|
|||||||
<div class="item-field flex2 center">
|
<div class="item-field flex2 center">
|
||||||
{{#if item.data.properties.equipable}}
|
{{#if item.data.properties.equipable}}
|
||||||
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
||||||
"BOL.equipmentSlots." item.data.properties.slot)}}</span>
|
"BOL.equipmentSlots." item.system.properties.slot)}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field group-btns flex1 center">
|
<div class="item-field group-btns flex1 center">
|
||||||
{{#if item.data.properties.stackable}}
|
{{#if item.system.properties.stackable}}
|
||||||
<a class="inc-dec-btns" data-operator="minus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="minus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
||||||
<span class="item-field">{{item.data.quantity}}</span>
|
<span class="item-field">{{item.system.quantity}}</span>
|
||||||
<a class="inc-dec-btns" data-operator="plus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="plus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
<span class="item-field">{{item.data.price}}</span>
|
<span class="item-field">{{item.system.price}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
{{#if data.properties.equipable}}
|
{{#if system.properties.equipable}}
|
||||||
{{#if data.worn}}
|
{{#if system.worn}}
|
||||||
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
||||||
class="fas fa-shield-alt"></i></a></span>
|
class="fas fa-shield-alt"></i></a></span>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -306,26 +306,26 @@
|
|||||||
<a class="item-edit">{{item.name}}</a>
|
<a class="item-edit">{{item.name}}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="item-field flex2 center">
|
<div class="item-field flex2 center">
|
||||||
{{#if item.data.properties.equipable}}
|
{{#if item.system.properties.equipable}}
|
||||||
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
||||||
"BOL.equipmentSlots." item.data.properties.slot)}}</span>
|
"BOL.equipmentSlots." item.system.properties.slot)}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field group-btns flex1 center">
|
<div class="item-field group-btns flex1 center">
|
||||||
{{#if item.data.properties.stackable}}
|
{{#if item.data.properties.stackable}}
|
||||||
<a class="inc-dec-btns" data-operator="minus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="minus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
||||||
<span class="item-field">{{item.data.quantity}}</span>
|
<span class="item-field">{{item.system.quantity}}</span>
|
||||||
<a class="inc-dec-btns" data-operator="plus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="plus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
<span class="item-field">{{item.data.price}}</span>
|
<span class="item-field">{{item.system.price}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
{{#if data.properties.equipable}}
|
{{#if system.properties.equipable}}
|
||||||
{{#if data.worn}}
|
{{#if system.worn}}
|
||||||
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
||||||
class="fas fa-shield-alt"></i></a></span>
|
class="fas fa-shield-alt"></i></a></span>
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -358,26 +358,26 @@
|
|||||||
<a class="item-edit">{{item.name}}</a>
|
<a class="item-edit">{{item.name}}</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="item-field flex2 center">
|
<div class="item-field flex2 center">
|
||||||
{{#if item.data.properties.equipable}}
|
{{#if item.system.properties.equipable}}
|
||||||
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
<span class="item-field" style="font-size: smaller; font-style: italic; color:#4b4a44">{{localize (concat
|
||||||
"BOL.equipmentSlots." item.data.properties.slot)}}</span>
|
"BOL.equipmentSlots." item.system.properties.slot)}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field group-btns flex1 center">
|
<div class="item-field group-btns flex1 center">
|
||||||
{{#if item.data.properties.stackable}}
|
{{#if item.system.properties.stackable}}
|
||||||
<a class="inc-dec-btns" data-operator="minus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="minus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-minus-square"></i></a>
|
||||||
<span class="item-field">{{item.data.quantity}}</span>
|
<span class="item-field">{{item.system.quantity}}</span>
|
||||||
<a class="inc-dec-btns" data-operator="plus" data-target="data.quantity" data-incr="1" data-min="0"
|
<a class="inc-dec-btns" data-operator="plus" data-target="system.quantity" data-incr="1" data-min="0"
|
||||||
data-max="{{item.data.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
data-max="{{item.system.properties.stacksize}}"><i class="fas fa-plus-square"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
<span class="item-field">{{item.data.price}}</span>
|
<span class="item-field">{{item.system.price}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-field flex1 center">
|
<div class="item-field flex1 center">
|
||||||
{{#if data.properties.equipable}}
|
{{#if system.properties.equipable}}
|
||||||
{{#if data.worn}}
|
{{#if system.worn}}
|
||||||
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
<span class="item-field"><a class="item-control item-equip" title="{{localize " BOL.ui.unequip"}}"><i
|
||||||
class="fas fa-shield-alt"></i></a></span>
|
class="fas fa-shield-alt"></i></a></span>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -16,18 +16,18 @@
|
|||||||
</h4>
|
</h4>
|
||||||
<div class="item-field group-btns center flex2">
|
<div class="item-field group-btns center flex2">
|
||||||
{{#if (equals key "careers")}}
|
{{#if (equals key "careers")}}
|
||||||
<a class="inc-dec-btns" data-operator="minus" data-target="data.rank" data-incr="1" data-min="0" data-max="5"><i class="fas fa-minus-square"></i></a>
|
<a class="inc-dec-btns" data-operator="minus" data-target="system.rank" data-incr="1" data-min="0" data-max="5"><i class="fas fa-minus-square"></i></a>
|
||||||
<span class="item-field">{{item.data.rank}}</span>
|
<span class="item-field">{{item.system.rank}}</span>
|
||||||
<a class="inc-dec-btns" data-operator="plus" data-target="data.rank" data-incr="1" data-min="0" data-max="5"><i class="fas fa-plus-square"></i></a>
|
<a class="inc-dec-btns" data-operator="plus" data-target="system.rank" data-incr="1" data-min="0" data-max="5"><i class="fas fa-plus-square"></i></a>
|
||||||
<span class="item-field"> </span>
|
<span class="item-field"> </span>
|
||||||
<span class="tooltip-container">
|
<span class="tooltip-container">
|
||||||
<span class="stat-roll rollable" title="XP" data-roll-type="careerxp" data-key="{{key}}">
|
<span class="stat-roll rollable" title="XP" data-roll-type="careerxp" data-key="{{key}}">
|
||||||
<i class="xp-next fas fa-arrow-up"></i></span>
|
<i class="xp-next fas fa-arrow-up"></i></span>
|
||||||
<span class="tooltiptext">
|
<span class="tooltiptext">
|
||||||
{{#if (eq data.rank 0)}}
|
{{#if (eq system.rank 0)}}
|
||||||
1 XP
|
1 XP
|
||||||
{{else}}
|
{{else}}
|
||||||
{{add data.rank 1}} XP
|
{{add system.rank 1}} XP
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="attributes flexrow">
|
<div class="attributes flexrow">
|
||||||
{{#each data.attributes as |attribute id|}}
|
{{#each attributes as |attribute id|}}
|
||||||
<div class="attribute stat flex1 flex-group-center {{key}}">
|
<div class="attribute stat flex1 flex-group-center {{key}}">
|
||||||
<label class="stat-label"><a class="rollable" data-roll-type="attribute" data-roll="2d6+@attributes.{{key}}.value" data-adv="0" data-key="{{key}}">{{localize label}}</a></label><br/>
|
<label class="stat-label"><a class="rollable" data-roll-type="attribute" data-roll="2d6+@attributes.{{key}}.value" data-adv="0" data-key="{{key}}">{{localize label}}</a></label><br/>
|
||||||
<input class="stat-value rounded" type="text" name="data.attributes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
|
<input class="stat-value rounded" type="text" name="data.attributes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
<div class="aptitudes flexrow">
|
<div class="aptitudes flexrow">
|
||||||
{{#each data.aptitudes as |aptitude id|}}
|
{{#each aptitudes as |aptitude id|}}
|
||||||
<div class="aptitude stat flex1 flex-group-center">
|
<div class="aptitude stat flex1 flex-group-center">
|
||||||
<label class="stat-label"><a class="rollable" data-roll-type="aptitude" data-roll="2d6+@aptitudes.{{key}}.value" data-adv="0" data-key="{{key}}">{{localize label}}</a></label><br/>
|
<label class="stat-label"><a class="rollable" data-roll-type="aptitude" data-roll="2d6+@aptitudes.{{key}}.value" data-adv="0" data-key="{{key}}">{{localize label}}</a></label><br/>
|
||||||
<input class="stat-value rounded-border" type="text" name="data.aptitudes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
|
<input class="stat-value rounded-border" type="text" name="data.aptitudes.{{key}}.value" value="{{numberFormat value decimals=0 sign=true}}" data-dtype="Number"/><br/>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<div class="flex1 center cell">
|
<div class="flex1 center cell">
|
||||||
<select class="flex1" name="career" id="career" data-type="String" multiple>
|
<select class="flex1" name="career" id="career" data-type="String" multiple>
|
||||||
{{#each careers as | career id|}}
|
{{#each careers as | career id|}}
|
||||||
<option value="{{career.data.rank}}">{{career.name}} ({{numberFormat career.data.rank decimals=0 sign=true}})</option>
|
<option value="{{career.system.rank}}">{{career.name}} ({{numberFormat career.system.rank decimals=0 sign=true}})</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<div class="flex1 center bg-darkred">
|
<div class="flex1 center bg-darkred">
|
||||||
<label for="mod">{{localize 'BOL.ui.attackValue'}}</label>
|
<label for="mod">{{localize 'BOL.ui.attackValue'}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex1 center cell">{{weapon.data.data.properties.attackModifiers}}</div>
|
<div class="flex1 center cell">{{weapon.system.properties.attackModifiers}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flexrow roll-box" >
|
<div class="flexrow roll-box" >
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
{{editor item.system.description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab properties" data-group="primary" data-tab="properties">
|
<div class="tab properties" data-group="primary" data-tab="properties">
|
||||||
{{#if (eq item.type "item")}}
|
{{#if (eq item.type "item")}}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "BOL.ui.subtype"}}</label>
|
<label class="property-label">{{localize "BOL.ui.subtype"}}</label>
|
||||||
<select name="data.subtype" value="{{data.subtype}}" data-dtype="String">
|
<select name="system.subtype" value="{{item.system.subtype}}" data-dtype="String">
|
||||||
{{#select data.subtype}}
|
{{#select item.system.subtype}}
|
||||||
{{#each config.featureSubtypes as |item id|}}
|
{{#each config.featureSubtypes as |item id|}}
|
||||||
<option value="{{id}}">{{localize item}}</option>
|
<option value="{{id}}">{{localize item}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -9,18 +9,18 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if (equals data.subtype "career")}}
|
{{#if (equals item.system.subtype "career")}}
|
||||||
{{> "systems/bol/templates/item/parts/properties/feature/career-properties.hbs"}}
|
{{> "systems/bol/templates/item/parts/properties/feature/career-properties.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (equals data.subtype "fightoption")}}
|
{{#if (equals item.system.subtype "fightoption")}}
|
||||||
{{> "systems/bol/templates/item/parts/properties/feature/fightoption-properties.hbs"}}
|
{{> "systems/bol/templates/item/parts/properties/feature/fightoption-properties.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{!#if (equals data.subtype "race")}}
|
{{!#if (equals data.subtype "race")}}
|
||||||
{{!> "systems/bol/templates/item/parts/properties/feature/race-properties.hbs"}}
|
{{!> "systems/bol/templates/item/parts/properties/feature/race-properties.hbs"}}
|
||||||
{{!/if}}
|
{{!/if}}
|
||||||
{{#if (equals data.subtype "boon")}}
|
{{#if (equals item.system.subtype "boon")}}
|
||||||
{{> "systems/bol/templates/item/parts/properties/feature/boon-properties.hbs"}}
|
{{> "systems/bol/templates/item/parts/properties/feature/boon-properties.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (equals data.subtype "flaw")}}
|
{{#if (equals item.system.subtype "flaw")}}
|
||||||
{{> "systems/bol/templates/item/parts/properties/feature/flaw-properties.hbs"}}
|
{{> "systems/bol/templates/item/parts/properties/feature/flaw-properties.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<h3 class="form-header">{{localize 'BOL.featureSubtypes.boon'}}</h3>
|
<h3 class="form-header">{{localize 'BOL.featureSubtypes.boon'}}</h3>
|
||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "BOL.ui.isbonusdice"}}</label>
|
<label class="property-label">{{localize "BOL.ui.isbonusdice"}}</label>
|
||||||
<input class="field-value" type="checkbox" name="data.properties.isbonusdice" {{checked data.properties.isbonusdice}}>
|
<input class="field-value" type="checkbox" name="system.properties.isbonusdice" {{checked item.system.properties.isbonusdice}}>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<h3 class="form-header">{{localize 'BOL.featureSubtypes.career'}}</h3>
|
<h3 class="form-header">{{localize 'BOL.featureSubtypes.career'}}</h3>
|
||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "BOL.ui.rank"}}</label>
|
<label class="property-label">{{localize "BOL.ui.rank"}}</label>
|
||||||
<input type="text" name="data.rank" value="{{data.rank}}" data-dtype="Number"/>
|
<input type="text" name="system.rank" value="{{item.system.rank}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "BOL.ui.isSorcerer"}}</label>
|
<label class="property-label">{{localize "BOL.ui.isSorcerer"}}</label>
|
||||||
<input class="field-value" type="checkbox" name="data.properties.sorcerer" {{checked data.properties.sorcerer}}>
|
<input class="field-value" type="checkbox" name="item.system.properties.sorcerer" {{checked item.system.properties.sorcerer}}>
|
||||||
</div>
|
</div>
|
||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "BOL.ui.isAlchemist"}}</label>
|
<label class="property-label">{{localize "BOL.ui.isAlchemist"}}</label>
|
||||||
<input class="field-value" type="checkbox" name="data.properties.alchemist" {{checked data.properties.alchemist}}>
|
<input class="field-value" type="checkbox" name="item.system.properties.alchemist" {{checked item.system.properties.alchemist}}>
|
||||||
</div>
|
</div>
|
||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "BOL.ui.isPriest"}}</label>
|
<label class="property-label">{{localize "BOL.ui.isPriest"}}</label>
|
||||||
<input class="field-value" type="checkbox" name="data.properties.priest" {{checked data.properties.priest}}>
|
<input class="field-value" type="checkbox" name="item.system.properties.priest" {{checked item.system.properties.priest}}>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="property-label">{{localize "BOL.ui.fightOptionType"}}</label>
|
<label class="property-label">{{localize "BOL.ui.fightOptionType"}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<select name="data.properties.fightoptiontype" data-dtype="String">
|
<select name="item.system.properties.fightoptiontype" data-dtype="String">
|
||||||
{{#select data.properties.fightoptiontype}}
|
{{#select item.system.properties.fightoptiontype}}
|
||||||
{{#each config.fightOptionTypes as |item id|}}
|
{{#each config.fightOptionTypes as |item id|}}
|
||||||
<option value="{{id}}">{{localize item}}</option>
|
<option value="{{id}}">{{localize item}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -14,6 +14,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "BOL.ui.activated"}}</label>
|
<label class="property-label">{{localize "BOL.ui.activated"}}</label>
|
||||||
<input class="field-value" type="checkbox" name="data.properties.activated" {{checked data.properties.activated}}>
|
<input class="field-value" type="checkbox" name="system.properties.activated" {{checked item.system.properties.activated}}>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<h3 class="form-header">{{localize 'BOL.featureSubtypes.flaw'}}</h3>
|
<h3 class="form-header">{{localize 'BOL.featureSubtypes.flaw'}}</h3>
|
||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "BOL.ui.ismalusdice"}}</label>
|
<label class="property-label">{{localize "BOL.ui.ismalusdice"}}</label>
|
||||||
<input class="field-value" type="checkbox" name="data.properties.ismalusdice" {{checked data.properties.ismalusdice}}>
|
<input class="field-value" type="checkbox" name="system.properties.ismalusdice" {{checked item.system.properties.ismalusdice}}>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="property-label">{{localize "BOL.ui.category"}}</label>
|
<label class="property-label">{{localize "BOL.ui.category"}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<select class="field-value" name="data.category" value="{{data.category}}" data-dtype="String">
|
<select class="field-value" name="system.category" value="{{item.system.category}}" data-dtype="String">
|
||||||
{{#select data.category}}
|
{{#select item.system.category}}
|
||||||
{{#each config.itemCategories as |item id|}}
|
{{#each config.itemCategories as |item id|}}
|
||||||
<option value="{{id}}">{{localize item}}</option>
|
<option value="{{id}}">{{localize item}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -11,18 +11,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if (eq data.category "equipment")}}
|
{{#if (eq item.system.category "equipment")}}
|
||||||
{{> "systems/bol/templates/item/parts/properties/item/equipment-properties.hbs"}}
|
{{> "systems/bol/templates/item/parts/properties/item/equipment-properties.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq data.category "capacity")}}
|
{{#if (eq item.system.category "capacity")}}
|
||||||
{{> "systems/bol/templates/item/parts/properties/item/capacity-properties.hbs"}}
|
{{> "systems/bol/templates/item/parts/properties/item/capacity-properties.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq data.category "vehicle")}}
|
{{#if (eq item.system.category "vehicle")}}
|
||||||
{{> "systems/bol/templates/item/parts/properties/item/vehicle-properties.hbs"}}
|
{{> "systems/bol/templates/item/parts/properties/item/vehicle-properties.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq data.category "spell")}}
|
{{#if (eq item.system.category "spell")}}
|
||||||
{{> "systems/bol/templates/item/parts/properties/item/spell-properties.hbs"}}
|
{{> "systems/bol/templates/item/parts/properties/item/spell-properties.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq data.category "alchemy")}}
|
{{#if (eq item.system.category "alchemy")}}
|
||||||
{{> "systems/bol/templates/item/parts/properties/item/alchemy-properties.hbs"}}
|
{{> "systems/bol/templates/item/parts/properties/item/alchemy-properties.hbs"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Loading…
Reference in New Issue
Block a user