FIX: lang and fixes

master
U~man 2020-06-28 20:30:30 +02:00
parent 0f74e6ae4f
commit 647727f1ae
6 changed files with 65 additions and 70 deletions

View File

@ -1,2 +1,65 @@
{
"OSE.Edit": "Modifier",
"OSE.Delete": "Supprimer",
"OSE.Add": "Ajouter",
"OSE.Name": "Nom",
"OSE.Class": "Classe",
"OSE.Title": "Titre",
"OSE.Alignment": "Alignement",
"OSE.Level": "Niveau",
"OSE.Experience": "Expérience",
"OSE.Treasure": "Butin",
"OSE.Size": "Taille",
"OSE.Morale": "Moral",
"OSE.Appearing": "NA",
"OSE.scores.str.long": "Force",
"OSE.scores.str.short": "FOR",
"OSE.scores.wis.long": "Sagesse",
"OSE.scores.wis.short": "SAG",
"OSE.scores.int.long": "Intelligence",
"OSE.scores.int.short": "INT",
"OSE.scores.dex.long": "Dextérité",
"OSE.scores.dex.short": "DEX",
"OSE.scores.con.long": "Constitution",
"OSE.scores.con.short": "CON",
"OSE.scores.cha.long": "Charisme",
"OSE.scores.cha.short": "CHA",
"OSE.saves.death.short": "D",
"OSE.saves.death.long": "Mort",
"OSE.saves.wands.short": "W",
"OSE.saves.wands.long": "Baguettes",
"OSE.saves.paralysis.short": "P",
"OSE.saves.paralysis.long": "Paralysie",
"OSE.saves.breath.short": "B",
"OSE.saves.breath.long": "Souffle",
"OSE.saves.spells.short": "S",
"OSE.saves.spells.long": "Sorts",
"OSE.Health": "Points de Vie",
"OSE.HealthShort": "PV",
"OSE.HitDice": "Dés de Vie",
"OSE.HitDiceShort": "DV",
"OSE.Movement": "Mouvement",
"OSE.MovementShort": "MOUV",
"OSE.SpecialMovement": "Mouvement Spécial",
"OSE.ArmorClass": "Classe d'Armure",
"OSE.ArmorClassShort": "CA",
"OSE.SpellDC": "DF",
"OSE.Thac0": "THAC0",
"OSE.Initiative": "Initiative",
"OSE.InitiativeShort": "INIT",
"OSE.Attacks": "Attaques par Round",
"OSE.AttacksShort": "ATT",
"OSE.category.attributes": "Attributs",
"OSE.category.inventory": "Inventaire",
"OSE.category.spells": "Sorts",
"OSE.category.notes": "Notes",
"OSE.panel.abilities": "Aptitudes",
"OSE.panel.equipment": "Equipement"
}

View File

@ -108,12 +108,6 @@ export class OseActorSheetCharacter extends ActorSheet {
li.toggleClass("expanded");
}
_onRollAttribute(event) {
event.preventDefault();
let attribute = event.currentTarget.dataset.attribute;
this.actor.rollAttribute(attribute, { event: event });
}
/**
* Activate event listeners using the prepared sheet HTML
* @param html {HTML} The prepared HTML object ready to be rendered into the DOM

View File

@ -17,65 +17,4 @@ export class OseActor extends Actor {
/* -------------------------------------------- */
/* Rolls */
/* -------------------------------------------- */
rollAttribute(attributeId, options = {}) {
const label = CONFIG.MAJI.attributes[attributeId];
const abl = this.data.data.attributes[attributeId];
let parts = [];
if (abl.value <= 4) {
parts.push("2d4");
} else if (abl.value <= 7) {
parts.push("2d6");
} else {
parts.push("2d8");
}
let rollMode = game.settings.get("core", "rollMode");
let roll = new Roll(parts.join(" + "), {}).roll();
roll.toMessage(
{
speaker: ChatMessage.getSpeaker({ actor: this }),
flavor: `${label} Attribute Test`,
},
{ rollMode }
);
return roll;
}
rollInit(monsterId, options = {}) {
let monster = game.actors.get(monsterId);
let speed = monster.data.data.attributes.speed.value + monster.data.data.attributes.speed.mod;
if (!game.combats.active) return;
let combatant = game.combats.active.getCombatant(this.actor);
console.log(combatant);
}
static async applyDamage(roll, options = {}) {
let value = Math.floor(parseFloat(roll.find(".dice-total").text()));
const promises = [];
for (let t of canvas.tokens.controlled) {
let a = t.actor,
hp = a.data.data.hp;
let delta = 0;
if (a.data.type == "monster") {
if (options.vulnerable) {
delta -= value + a.data.data.affinity.value;
} else if (options.resistant) {
delta -= Math.max(0, value - a.data.data.resistance.value);
} else if (options.healing) {
delta += value;
} else {
delta -= value;
}
} else {
delta -= options.healing ? -value : value;
}
promises.push(
t.actor.update({
"data.hp.value": Math.clamped(hp.value + delta, 0, hp.max),
})
);
}
return Promise.all(promises);
}
}

View File

@ -36,7 +36,6 @@ export class OseActorSheetMonster extends ActorSheet {
// Override to set resizable initial size
async _renderInner(...args) {
const html = await super._renderInner(...args);
console.log(html);
this.form = html[0];
// Resize resizable classes

View File

@ -171,7 +171,7 @@
}
.item-summary {
font-size: 12px;
padding: 4px;
padding: 0 4px;
}
&:nth-child(odd) {
background: rgba(0, 0, 0, 0.1);

View File

@ -2,7 +2,7 @@
"name": "ose",
"title": "Old-School Essentials",
"description": "Play OSR modules with Old-School Essentials on Foundry VTT",
"version": 0.1,
"version": 0.2,
"minimumCoreVersion": "0.6.2",
"compatibleCoreVersion": "0.6.4",
"templateVersion": 2,