ENH: Ability rolls and auto item tags
parent
10460834c2
commit
9b8dc1211d
|
@ -32,6 +32,9 @@
|
||||||
"OSE.roll.exploration": "{exploration} test",
|
"OSE.roll.exploration": "{exploration} test",
|
||||||
"OSE.roll.details.exploration": "Roll 1d6 <= {expl} for success",
|
"OSE.roll.details.exploration": "Roll 1d6 <= {expl} for success",
|
||||||
"OSE.roll.reaction": "Reaction roll",
|
"OSE.roll.reaction": "Reaction roll",
|
||||||
|
"OSE.roll.type.result": "Result",
|
||||||
|
"OSE.roll.type.above": "Above",
|
||||||
|
"OSE.roll.type.below": "Below",
|
||||||
|
|
||||||
"OSE.details.name": "Name",
|
"OSE.details.name": "Name",
|
||||||
"OSE.details.class": "Class",
|
"OSE.details.class": "Class",
|
||||||
|
@ -169,6 +172,8 @@
|
||||||
"OSE.items.Quantity": "Qt.",
|
"OSE.items.Quantity": "Qt.",
|
||||||
"OSE.items.Roll": "Roll",
|
"OSE.items.Roll": "Roll",
|
||||||
"OSE.items.BlindRoll": "Blind",
|
"OSE.items.BlindRoll": "Blind",
|
||||||
|
"OSE.items.RollTarget": "Target",
|
||||||
|
"OSE.items.RollType": "Type",
|
||||||
"OSE.items.Damage": "Damage",
|
"OSE.items.Damage": "Damage",
|
||||||
"OSE.items.Melee": "Melee",
|
"OSE.items.Melee": "Melee",
|
||||||
"OSE.items.Missile": "Missile",
|
"OSE.items.Missile": "Missile",
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
"OSE.roll.exploration": "Prueba de {exploration}",
|
"OSE.roll.exploration": "Prueba de {exploration}",
|
||||||
"OSE.roll.details.exploration": "Tirar 1d6 <= {expl} para éxito",
|
"OSE.roll.details.exploration": "Tirar 1d6 <= {expl} para éxito",
|
||||||
"OSE.roll.reaction": "Tirada de Reacción",
|
"OSE.roll.reaction": "Tirada de Reacción",
|
||||||
|
"OSE.roll.type.result": "Resultado",
|
||||||
|
"OSE.roll.type.above": "Encima",
|
||||||
|
"OSE.roll.type.below": "Debajo",
|
||||||
|
|
||||||
"OSE.details.name": "Nombre",
|
"OSE.details.name": "Nombre",
|
||||||
"OSE.details.class": "Clase",
|
"OSE.details.class": "Clase",
|
||||||
|
@ -167,6 +170,8 @@
|
||||||
"OSE.items.Quantity": "Qt.",
|
"OSE.items.Quantity": "Qt.",
|
||||||
"OSE.items.Roll": "Tirada",
|
"OSE.items.Roll": "Tirada",
|
||||||
"OSE.items.BlindRoll": "Ciega",
|
"OSE.items.BlindRoll": "Ciega",
|
||||||
|
"OSE.items.RollTarget": "Mira",
|
||||||
|
"OSE.items.RollType": "Tipo",
|
||||||
"OSE.items.Damage": "Daño",
|
"OSE.items.Damage": "Daño",
|
||||||
"OSE.items.Melee": "CC",
|
"OSE.items.Melee": "CC",
|
||||||
"OSE.items.Missile": "Distancia",
|
"OSE.items.Missile": "Distancia",
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
"OSE.roll.exploration": "Test de {exploration}",
|
"OSE.roll.exploration": "Test de {exploration}",
|
||||||
"OSE.roll.details.exploration": "Lancez 1d6 <= {expl} pour réussir",
|
"OSE.roll.details.exploration": "Lancez 1d6 <= {expl} pour réussir",
|
||||||
"OSE.roll.reaction": "Jet de Réaction",
|
"OSE.roll.reaction": "Jet de Réaction",
|
||||||
|
"OSE.roll.type.result": "Resultat",
|
||||||
|
"OSE.roll.type.above": "Au-Dessus",
|
||||||
|
"OSE.roll.type.below": "En-Dessous",
|
||||||
|
|
||||||
"OSE.details.name": "Nom",
|
"OSE.details.name": "Nom",
|
||||||
"OSE.details.class": "Classe",
|
"OSE.details.class": "Classe",
|
||||||
|
@ -109,9 +112,9 @@
|
||||||
"OSE.MeleeShort": "MEL",
|
"OSE.MeleeShort": "MEL",
|
||||||
"OSE.Melee": "Mêlée",
|
"OSE.Melee": "Mêlée",
|
||||||
"OSE.MeleeBonus": "Bonus de Mêlée",
|
"OSE.MeleeBonus": "Bonus de Mêlée",
|
||||||
"OSE.MissileShort": "PRO",
|
"OSE.MissileShort": "DIS",
|
||||||
"OSE.Missile": "Projectiles",
|
"OSE.Missile": "Distance",
|
||||||
"OSE.MissileBonus": "Bonus de Projectile",
|
"OSE.MissileBonus": "Bonus à Distance",
|
||||||
"OSE.Initiative": "Initiative",
|
"OSE.Initiative": "Initiative",
|
||||||
"OSE.InitiativeBonus": "Bonus d'Initiative",
|
"OSE.InitiativeBonus": "Bonus d'Initiative",
|
||||||
"OSE.InitiativeShort": "INIT",
|
"OSE.InitiativeShort": "INIT",
|
||||||
|
@ -167,9 +170,11 @@
|
||||||
"OSE.items.Quantity": "Qt.",
|
"OSE.items.Quantity": "Qt.",
|
||||||
"OSE.items.Roll": "Jet",
|
"OSE.items.Roll": "Jet",
|
||||||
"OSE.items.BlindRoll": "Aveugle",
|
"OSE.items.BlindRoll": "Aveugle",
|
||||||
|
"OSE.items.RollTarget": "Cible",
|
||||||
|
"OSE.items.RollType": "Type",
|
||||||
"OSE.items.Damage": "Dégâts",
|
"OSE.items.Damage": "Dégâts",
|
||||||
"OSE.items.Melee": "Mêlée",
|
"OSE.items.Melee": "Mêlée",
|
||||||
"OSE.items.Missile": "Projectile",
|
"OSE.items.Missile": "Distance",
|
||||||
"OSE.items.Slow": "Lent",
|
"OSE.items.Slow": "Lent",
|
||||||
"OSE.items.ArmorAC": "CA",
|
"OSE.items.ArmorAC": "CA",
|
||||||
"OSE.items.ArmorAAC": "CAA",
|
"OSE.items.ArmorAAC": "CAA",
|
||||||
|
|
|
@ -71,7 +71,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Above",
|
type: "above",
|
||||||
target: this.data.data.saves[save].value,
|
target: this.data.data.saves[save].value,
|
||||||
details: game.i18n.format("OSE.roll.details.save", { save: label }),
|
details: game.i18n.format("OSE.roll.details.save", { save: label }),
|
||||||
},
|
},
|
||||||
|
@ -99,7 +99,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Below",
|
type: "below",
|
||||||
target: this.data.data.details.morale,
|
target: this.data.data.details.morale,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -125,7 +125,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Below",
|
type: "below",
|
||||||
target: this.data.data.retainer.loyalty,
|
target: this.data.data.retainer.loyalty,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -151,7 +151,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Table",
|
type: "table",
|
||||||
table: {
|
table: {
|
||||||
2: game.i18n.format("OSE.reaction.Hostile", {
|
2: game.i18n.format("OSE.reaction.Hostile", {
|
||||||
name: this.data.name,
|
name: this.data.name,
|
||||||
|
@ -195,7 +195,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Check",
|
type: "check",
|
||||||
target: this.data.data.scores[score].value,
|
target: this.data.data.scores[score].value,
|
||||||
details: game.i18n.format("OSE.roll.details.attribute", {
|
details: game.i18n.format("OSE.roll.details.attribute", {
|
||||||
score: label,
|
score: label,
|
||||||
|
@ -226,7 +226,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Hit Dice",
|
type: "hit dice",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -257,7 +257,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Appearing",
|
type: "appearing",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -282,7 +282,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Below",
|
type: "below",
|
||||||
target: this.data.data.exploration[expl],
|
target: this.data.data.exploration[expl],
|
||||||
details: game.i18n.format("OSE.roll.details.exploration", {
|
details: game.i18n.format("OSE.roll.details.exploration", {
|
||||||
expl: label,
|
expl: label,
|
||||||
|
@ -312,7 +312,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Damage",
|
type: "damage",
|
||||||
stat: attData.type,
|
stat: attData.type,
|
||||||
scores: data.scores,
|
scores: data.scores,
|
||||||
},
|
},
|
||||||
|
@ -389,7 +389,7 @@ export class OseActor extends Actor {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Attack",
|
type: "attack",
|
||||||
thac0: thac0,
|
thac0: thac0,
|
||||||
weapon: {
|
weapon: {
|
||||||
parts: dmgParts,
|
parts: dmgParts,
|
||||||
|
|
|
@ -7,6 +7,11 @@ export const OSE = {
|
||||||
con: "OSE.scores.con.long",
|
con: "OSE.scores.con.long",
|
||||||
cha: "OSE.scores.cha.long",
|
cha: "OSE.scores.cha.long",
|
||||||
},
|
},
|
||||||
|
roll_type: {
|
||||||
|
result: "OSE.roll.type.result",
|
||||||
|
above: "OSE.roll.type.above",
|
||||||
|
below: "OSE.roll.type.below"
|
||||||
|
},
|
||||||
saves_short: {
|
saves_short: {
|
||||||
death: "OSE.saves.death.short",
|
death: "OSE.saves.death.short",
|
||||||
wand: "OSE.saves.wand.short",
|
wand: "OSE.saves.wand.short",
|
||||||
|
@ -60,5 +65,10 @@ export const OSE = {
|
||||||
"Ogre",
|
"Ogre",
|
||||||
"Orcish",
|
"Orcish",
|
||||||
"Pixie"
|
"Pixie"
|
||||||
]
|
],
|
||||||
|
tags: {
|
||||||
|
melee: "OSE.items.Melee",
|
||||||
|
missile: "OSE.items.Missile",
|
||||||
|
slow: "OSE.items.Slow",
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,28 +7,28 @@ export class OseDice {
|
||||||
};
|
};
|
||||||
|
|
||||||
let die = roll.parts[0].total;
|
let die = roll.parts[0].total;
|
||||||
if (data.rollData.type == "Above") {
|
if (data.rollData.type == "above") {
|
||||||
// SAVING THROWS
|
// SAVING THROWS
|
||||||
if (roll.total >= result.target) {
|
if (roll.total >= result.target) {
|
||||||
result.isSuccess = true;
|
result.isSuccess = true;
|
||||||
} else {
|
} else {
|
||||||
result.isFailure = true;
|
result.isFailure = true;
|
||||||
}
|
}
|
||||||
} else if (data.rollData.type == "Below") {
|
} else if (data.rollData.type == "below") {
|
||||||
// MORALE, EXPLORATION
|
// MORALE, EXPLORATION
|
||||||
if (roll.total <= result.target) {
|
if (roll.total <= result.target) {
|
||||||
result.isSuccess = true;
|
result.isSuccess = true;
|
||||||
} else {
|
} else {
|
||||||
result.isFailure = true;
|
result.isFailure = true;
|
||||||
}
|
}
|
||||||
} else if (data.rollData.type == "Check") {
|
} else if (data.rollData.type == "check") {
|
||||||
// SCORE CHECKS (1s and 20s)
|
// SCORE CHECKS (1s and 20s)
|
||||||
if (die == 1 || (roll.total <= result.target && die < 20)) {
|
if (die == 1 || (roll.total <= result.target && die < 20)) {
|
||||||
result.isSuccess = true;
|
result.isSuccess = true;
|
||||||
} else {
|
} else {
|
||||||
result.isFailure = true;
|
result.isFailure = true;
|
||||||
}
|
}
|
||||||
} else if (data.rollData.type == "Table") {
|
} else if (data.rollData.type == "table") {
|
||||||
// Reaction
|
// Reaction
|
||||||
let table = data.rollData.table;
|
let table = data.rollData.table;
|
||||||
let output = "";
|
let output = "";
|
||||||
|
@ -251,7 +251,7 @@ export class OseDice {
|
||||||
speaker: speaker
|
speaker: speaker
|
||||||
};
|
};
|
||||||
if (skipDialog) {
|
if (skipDialog) {
|
||||||
return data.rollData.type === "Attack"
|
return data.rollData.type === "attack"
|
||||||
? OseDice.sendAttackRoll(rollData)
|
? OseDice.sendAttackRoll(rollData)
|
||||||
: OseDice.sendRoll(rollData);
|
: OseDice.sendRoll(rollData);
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ export class OseDice {
|
||||||
rolled = true;
|
rolled = true;
|
||||||
rollData.form = html[0].children[0];
|
rollData.form = html[0].children[0];
|
||||||
roll =
|
roll =
|
||||||
data.rollData.type === "Attack"
|
data.rollData.type === "attack"
|
||||||
? OseDice.sendAttackRoll(rollData)
|
? OseDice.sendAttackRoll(rollData)
|
||||||
: OseDice.sendRoll(rollData);
|
: OseDice.sendRoll(rollData);
|
||||||
},
|
},
|
||||||
|
|
|
@ -102,19 +102,23 @@ export class OseItem extends Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
async rollFormula(options = {}) {
|
async rollFormula(options = {}) {
|
||||||
if (!this.data.data.roll) {
|
const data = this.data.data;
|
||||||
|
if (!data.roll) {
|
||||||
throw new Error("This Item does not have a formula to roll!");
|
throw new Error("This Item does not have a formula to roll!");
|
||||||
}
|
}
|
||||||
|
|
||||||
const label = `${this.name}`;
|
const label = `${this.name}`;
|
||||||
const rollParts = [this.data.data.roll];
|
const rollParts = [data.roll];
|
||||||
|
|
||||||
const data = {
|
let type = data.rollType;
|
||||||
|
|
||||||
|
const newData = {
|
||||||
...this.data,
|
...this.data,
|
||||||
...{
|
...{
|
||||||
rollData: {
|
rollData: {
|
||||||
type: "Formula",
|
type: type,
|
||||||
blindroll: this.data.data.blindroll,
|
target: data.rollTarget,
|
||||||
|
blindroll: data.blindroll,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -123,7 +127,7 @@ export class OseItem extends Item {
|
||||||
return OseDice.Roll({
|
return OseDice.Roll({
|
||||||
event: options.event,
|
event: options.event,
|
||||||
parts: rollParts,
|
parts: rollParts,
|
||||||
data: data,
|
data: newData,
|
||||||
skipDialog: true,
|
skipDialog: true,
|
||||||
speaker: ChatMessage.getSpeaker({ actor: this }),
|
speaker: ChatMessage.getSpeaker({ actor: this }),
|
||||||
flavor: game.i18n.format("OSE.roll.formula", { label: label }),
|
flavor: game.i18n.format("OSE.roll.formula", { label: label }),
|
||||||
|
@ -144,8 +148,8 @@ export class OseItem extends Item {
|
||||||
getTags() {
|
getTags() {
|
||||||
let formatTag = (tag) => {
|
let formatTag = (tag) => {
|
||||||
if (!tag) return "";
|
if (!tag) return "";
|
||||||
return `<li class='tag'>${tag}</li>`
|
return `<li class='tag'>${tag}</li>`;
|
||||||
}
|
};
|
||||||
|
|
||||||
const data = this.data.data;
|
const data = this.data.data;
|
||||||
switch (this.data.type) {
|
switch (this.data.type) {
|
||||||
|
@ -156,11 +160,63 @@ export class OseItem extends Item {
|
||||||
case "item":
|
case "item":
|
||||||
return "";
|
return "";
|
||||||
case "spell":
|
case "spell":
|
||||||
return `${formatTag(data.class)}${formatTag(data.range)}${formatTag(data.duration)}${formatTag(CONFIG.OSE.saves_long[data.save])}${formatTag(data.roll)}`;
|
return `${formatTag(data.class)}${formatTag(data.range)}${formatTag(
|
||||||
|
data.duration
|
||||||
|
)}${formatTag(CONFIG.OSE.saves_long[data.save])}${formatTag(
|
||||||
|
data.roll
|
||||||
|
)}`;
|
||||||
case "ability":
|
case "ability":
|
||||||
return `${formatTag(data.requirements)}${formatTag(data.roll)}`;
|
return `${formatTag(data.requirements)}${formatTag(data.roll)}`;
|
||||||
}
|
}
|
||||||
return "TEST";
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
pushTag(values) {
|
||||||
|
const data = this.data.data;
|
||||||
|
let update = [];
|
||||||
|
if (data.tags) {
|
||||||
|
update = duplicate(data.tags);
|
||||||
|
}
|
||||||
|
let newData = {};
|
||||||
|
var regExp = /\(([^)]+)\)/;
|
||||||
|
if (update) {
|
||||||
|
values.forEach((val) => {
|
||||||
|
// Catch infos in brackets
|
||||||
|
var matches = regExp.exec(val);
|
||||||
|
let title = "";
|
||||||
|
if (matches) {
|
||||||
|
title = matches[1];
|
||||||
|
val = val.substring(0, matches.index);
|
||||||
|
}
|
||||||
|
// Auto fill checkboxes
|
||||||
|
switch (val) {
|
||||||
|
case CONFIG.OSE.tags.melee:
|
||||||
|
newData.melee = true;
|
||||||
|
break;
|
||||||
|
case CONFIG.OSE.tags.slow:
|
||||||
|
newData.slow = true;
|
||||||
|
break;
|
||||||
|
case CONFIG.OSE.tags.missile:
|
||||||
|
newData.missile = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
update.push({ title: title, value: val });
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
update = values;
|
||||||
|
}
|
||||||
|
newData.tags = update;
|
||||||
|
console.log(newData);
|
||||||
|
return this.update({ data: newData });
|
||||||
|
}
|
||||||
|
|
||||||
|
popTag(value) {
|
||||||
|
const data = this.data.data;
|
||||||
|
let update = data.tags.filter((el) => el.value != value);
|
||||||
|
let newData = {
|
||||||
|
tags: update,
|
||||||
|
};
|
||||||
|
return this.update({ data: newData });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -51,41 +51,6 @@ export class OseItemSheet extends ItemSheet {
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
_pushTag(values) {
|
|
||||||
const data = this.object.data.data;
|
|
||||||
let update = [];
|
|
||||||
if (data.tags) {
|
|
||||||
update = duplicate(data.tags);
|
|
||||||
}
|
|
||||||
var regExp = /\(([^)]+)\)/;
|
|
||||||
if (update) {
|
|
||||||
values.forEach(val => {
|
|
||||||
// Catch infos in brackets
|
|
||||||
var matches = regExp.exec(val);
|
|
||||||
let title = "";
|
|
||||||
if (matches) {
|
|
||||||
title = matches[1];
|
|
||||||
val = val.substring(0, matches.index);
|
|
||||||
}
|
|
||||||
update.push({title: title, value: val});
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
update = values;
|
|
||||||
}
|
|
||||||
let newData = {
|
|
||||||
tags: update
|
|
||||||
};
|
|
||||||
return this.object.update({ data: newData });
|
|
||||||
}
|
|
||||||
|
|
||||||
_popTag(value) {
|
|
||||||
const data = this.object.data.data;
|
|
||||||
let update = data.tags.filter((el) => el.value != value);
|
|
||||||
let newData = {
|
|
||||||
tags: update
|
|
||||||
};
|
|
||||||
return this.object.update({ data: newData });
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Activate event listeners using the prepared sheet HTML
|
* Activate event listeners using the prepared sheet HTML
|
||||||
* @param html {HTML} The prepared HTML object ready to be rendered into the DOM
|
* @param html {HTML} The prepared HTML object ready to be rendered into the DOM
|
||||||
|
@ -95,12 +60,12 @@ export class OseItemSheet extends ItemSheet {
|
||||||
if (event.which == 13) {
|
if (event.which == 13) {
|
||||||
let value = $(ev.currentTarget).val();
|
let value = $(ev.currentTarget).val();
|
||||||
let values = value.split(',');
|
let values = value.split(',');
|
||||||
this._pushTag(values);
|
this.object.pushTag(values);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
html.find('.tag-delete').click((ev) => {
|
html.find('.tag-delete').click((ev) => {
|
||||||
let value = ev.currentTarget.parentElement.dataset.tag;
|
let value = ev.currentTarget.parentElement.dataset.tag;
|
||||||
this._popTag(value);
|
this.object.popTag(value);
|
||||||
});
|
});
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ Hooks.once("init", async function () {
|
||||||
*/
|
*/
|
||||||
Hooks.once("setup", function () {
|
Hooks.once("setup", function () {
|
||||||
// Localize CONFIG objects once up-front
|
// Localize CONFIG objects once up-front
|
||||||
const toLocalize = ["saves_short", "saves_long", "scores", "armor", "colors"];
|
const toLocalize = ["saves_short", "saves_long", "scores", "armor", "colors", "roll_type", "tags"];
|
||||||
for (let o of toLocalize) {
|
for (let o of toLocalize) {
|
||||||
CONFIG.OSE[o] = Object.entries(CONFIG.OSE[o]).reduce((obj, e) => {
|
CONFIG.OSE[o] = Object.entries(CONFIG.OSE[o]).reduce((obj, e) => {
|
||||||
obj[e[0]] = game.i18n.localize(e[1]);
|
obj[e[0]] = game.i18n.localize(e[1]);
|
||||||
|
|
|
@ -2,22 +2,14 @@
|
||||||
"name": "ose",
|
"name": "ose",
|
||||||
"title": "Old-School Essentials",
|
"title": "Old-School Essentials",
|
||||||
"description": "Play B/X OSR modules with Old-School Essentials on Foundry VTT",
|
"description": "Play B/X OSR modules with Old-School Essentials on Foundry VTT",
|
||||||
"version": 0.8,
|
"version": 0.9,
|
||||||
"minimumCoreVersion": "0.6.2",
|
"minimumCoreVersion": "0.6.2",
|
||||||
"compatibleCoreVersion": "0.6.5",
|
"compatibleCoreVersion": "0.6.5",
|
||||||
"templateVersion": 2,
|
"templateVersion": 2,
|
||||||
"author": "U~man",
|
"author": "U~man",
|
||||||
"esmodules": ["ose.js"],
|
"esmodules": ["ose.js"],
|
||||||
"styles": ["ose.css"],
|
"styles": ["ose.css"],
|
||||||
"packs": [
|
"packs": [],
|
||||||
{
|
|
||||||
"name": "OSEMacros",
|
|
||||||
"label": "Old School Essentials Macros",
|
|
||||||
"system": "ose",
|
|
||||||
"path": "./packs/macros.db",
|
|
||||||
"entity": "Macro"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
"lang": "en",
|
"lang": "en",
|
||||||
|
@ -39,5 +31,5 @@
|
||||||
"gridUnits": "ft",
|
"gridUnits": "ft",
|
||||||
"url": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose",
|
"url": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose",
|
||||||
"manifest": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/raw/master/src/system.json",
|
"manifest": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/raw/master/src/system.json",
|
||||||
"download": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/-/raw/master/package/ose-v0.8.zip"
|
"download": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/-/raw/master/package/ose-v0.9.zip"
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,6 +210,8 @@
|
||||||
"ability": {
|
"ability": {
|
||||||
"requirements": "",
|
"requirements": "",
|
||||||
"roll": "",
|
"roll": "",
|
||||||
|
"rollType": "result",
|
||||||
|
"rollTarget": 0,
|
||||||
"blindroll": false,
|
"blindroll": false,
|
||||||
"description": ""
|
"description": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,24 @@
|
||||||
<input type="text" name="data.roll" value="{{data.roll}}" data-dtype="String" />
|
<input type="text" name="data.roll" value="{{data.roll}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group block-input">
|
||||||
|
<label>{{localize 'OSE.items.RollType'}}</label>
|
||||||
|
<div class="form-fields">
|
||||||
|
<select name="data.rollType">
|
||||||
|
{{#select data.rollType}}
|
||||||
|
{{#each config.roll_type as |t a|}}
|
||||||
|
<option value="{{a}}">{{t}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{localize 'OSE.items.RollTarget'}}</label>
|
||||||
|
<div class="form-fields">
|
||||||
|
<input type="text" name="data.rollTarget" value="{{data.rollTarget}}" data-dtype="Number" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>{{localize 'OSE.items.BlindRoll'}}</label>
|
<label>{{localize 'OSE.items.BlindRoll'}}</label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
|
|
Loading…
Reference in New Issue