Compare commits

..

7 Commits

28 changed files with 439 additions and 128 deletions

BIN
assets/bol_monnaies_v1_1.pdf Executable file

Binary file not shown.

View File

@ -1,3 +1,9 @@
# v10.4.0
- Ajout de la gestion d'effets
- Aide intégré
- Intégration du PDF de la bougette
# v10.3.3 # v10.3.3
- Nouvelles clés de traduction - Nouvelles clés de traduction

View File

@ -59,8 +59,6 @@ a:hover {
top: -50px; top: -50px;
left: calc(50% - 100px); left: calc(50% - 100px);
opacity: 0.7; opacity: 0.7;
-webkit-animation: rotation 10s infinite linear;
animation: rotation 10s infinite linear;
} }
#pause h3 { #pause h3 {
font-family: "IMFellDWPicaSC-Regular", serif; font-family: "IMFellDWPicaSC-Regular", serif;
@ -444,12 +442,16 @@ ul.no-bullets {
.bol .inc-dec-btns { .bol .inc-dec-btns {
color: #4b4a44; color: #4b4a44;
} }
.summmary-number {
padding-left: 4rem;
}
/* Items List */ /* Items List */
.items-list { .items-list {
list-style: none; list-style: none;
margin: 7px 0; margin: 7px 0;
padding: 0; padding: 0;
overflow-y: auto; overflow-y:hidden;
/*overflow-y: auto;*/
} }
.items-list .item-header { .items-list .item-header {
font-family: 'Signika', sans-serif; font-family: 'Signika', sans-serif;
@ -520,7 +522,10 @@ ul.no-bullets {
.items-list .item .item-control { .items-list .item .item-control {
color: #4b4a44; color: #4b4a44;
} }
.items-list .item-name-fixed-medium {
min-width: 8rem;
width: 8rem;
}
/* ----------------------------------------- */ /* ----------------------------------------- */
/* Premade colors */ /* Premade colors */
/* ----------------------------------------- */ /* ----------------------------------------- */
@ -1054,4 +1059,7 @@ body.system-bol img#logo {
.bol-margin-tb-2 { .bol-margin-tb-2 {
margin-top: 2px; margin-top: 2px;
margin-bottom: 2px; margin-bottom: 2px;
} }
.character-summary-container {
  opacity: 0.95;
}

View File

@ -166,6 +166,12 @@
"BOL.ui.rabble": "Piétaille", "BOL.ui.rabble": "Piétaille",
"BOL.ui.tough": "Coriace", "BOL.ui.tough": "Coriace",
"BOL.ui.villain": "Rival", "BOL.ui.villain": "Rival",
"BOL.ui.attributaptitude": "Attribut ou Aptitude",
"BOL.ui.always": "Tout les jets (ie toujours)",
"BOL.ui.effectbonusmalus": "Bonus ou Malus à appliquer",
"BOL.ui.boleffects": "Effets (automatiques)",
"BOL.ui.modifier": "Modificateur",
"BOL.ui.effects": "Effets en cours",
"BOL.featureCategory.origins": "Origines", "BOL.featureCategory.origins": "Origines",
"BOL.featureCategory.races": "Races", "BOL.featureCategory.races": "Races",
@ -179,6 +185,7 @@
"BOL.bougette.easylife": "A l'aise", "BOL.bougette.easylife": "A l'aise",
"BOL.bougette.luxury": "Luxe&Volupté", "BOL.bougette.luxury": "Luxe&Volupté",
"BOL.bougette.rich": "Richissime", "BOL.bougette.rich": "Richissime",
"BOL.featureSubtypes.origin": "Origine", "BOL.featureSubtypes.origin": "Origine",
"BOL.featureSubtypes.race": "Race", "BOL.featureSubtypes.race": "Race",
"BOL.featureSubtypes.career": "Carrière", "BOL.featureSubtypes.career": "Carrière",
@ -187,6 +194,10 @@
"BOL.featureSubtypes.language": "Langue", "BOL.featureSubtypes.language": "Langue",
"BOL.featureSubtypes.gods": "Dieux & Foi", "BOL.featureSubtypes.gods": "Dieux & Foi",
"BOL.featureSubtypes.fightOption": "Option de Combat", "BOL.featureSubtypes.fightOption": "Option de Combat",
"BOL.featureSubtypes.effect": "Effet",
"BOL.featureSubtypes.effects": "Effets",
"BOL.featureSubtypes.boleffect": "Effet",
"BOL.fightOptionTypes.armor": "Attaque au défaut d'armure", "BOL.fightOptionTypes.armor": "Attaque au défaut d'armure",
"BOL.fightOptionTypes.intrepid": "Attaque intrépide", "BOL.fightOptionTypes.intrepid": "Attaque intrépide",
"BOL.fightOptionTypes.twoweaponsdef": "Combat à 2 armes (Défense)", "BOL.fightOptionTypes.twoweaponsdef": "Combat à 2 armes (Défense)",
@ -194,6 +205,7 @@
"BOL.fightOptionTypes.fulldefense": "Défense totale", "BOL.fightOptionTypes.fulldefense": "Défense totale",
"BOL.fightOptionTypes.defense": "Posture défensive", "BOL.fightOptionTypes.defense": "Posture défensive",
"BOL.fightOptionTypes.attack": "Posture offensive", "BOL.fightOptionTypes.attack": "Posture offensive",
"BOL.itemCategory.object": "Objet", "BOL.itemCategory.object": "Objet",
"BOL.itemCategory.equipment": "Équipement", "BOL.itemCategory.equipment": "Équipement",
"BOL.itemCategory.consumable": "Consommable", "BOL.itemCategory.consumable": "Consommable",
@ -203,12 +215,14 @@
"BOL.itemCategory.capacity": "Capacité", "BOL.itemCategory.capacity": "Capacité",
"BOL.itemCategory.alchemy": "Préparation Alchimique", "BOL.itemCategory.alchemy": "Préparation Alchimique",
"BOL.itemCategory.vehicleweapon": "Armes de Véhicule", "BOL.itemCategory.vehicleweapon": "Armes de Véhicule",
"BOL.combatCategory.protections": "Protections", "BOL.combatCategory.protections": "Protections",
"BOL.combatCategory.shields": "Boucliers", "BOL.combatCategory.shields": "Boucliers",
"BOL.combatCategory.melee": "Armes de contact", "BOL.combatCategory.melee": "Armes de contact",
"BOL.combatCategory.ranged": "Armes à distance", "BOL.combatCategory.ranged": "Armes à distance",
"BOL.combatCategory.fightOptions": "Options de combat", "BOL.combatCategory.fightOptions": "Options de combat",
"BOL.combatCategory.natural": "Armes Naturelless", "BOL.combatCategory.natural": "Armes Naturelless",
"BOL.equipmentCategory.weapon": "Arme", "BOL.equipmentCategory.weapon": "Arme",
"BOL.equipmentCategory.armor": "Armure", "BOL.equipmentCategory.armor": "Armure",
"BOL.equipmentCategory.protection": "Protection", "BOL.equipmentCategory.protection": "Protection",
@ -220,21 +234,26 @@
"BOL.equipmentCategory.container": "Conteneur", "BOL.equipmentCategory.container": "Conteneur",
"BOL.equipmentCategory.currency": "Monnaie", "BOL.equipmentCategory.currency": "Monnaie",
"BOL.equipmentCategory.other": "Autre", "BOL.equipmentCategory.other": "Autre",
"BOL.protectionCategory.armor": "Armure", "BOL.protectionCategory.armor": "Armure",
"BOL.protectionCategory.shield": "Bouclier", "BOL.protectionCategory.shield": "Bouclier",
"BOL.protectionCategory.helm": "Casque", "BOL.protectionCategory.helm": "Casque",
"BOL.protectionCategory.other": "Autre", "BOL.protectionCategory.other": "Autre",
"BOL.spellItem.charm": "Charme", "BOL.spellItem.charm": "Charme",
"BOL.spellItem.circle1": "Premier Cercle", "BOL.spellItem.circle1": "Premier Cercle",
"BOL.spellItem.circle2": "Second Cercle", "BOL.spellItem.circle2": "Second Cercle",
"BOL.spellItem.circle3": "Troisième Cercle", "BOL.spellItem.circle3": "Troisième Cercle",
"BOL.alchemyItem.common": "Courante", "BOL.alchemyItem.common": "Courante",
"BOL.alchemyItem.scarce": "Rare", "BOL.alchemyItem.scarce": "Rare",
"BOL.alchemyItem.legend": "Légendaire", "BOL.alchemyItem.legend": "Légendaire",
"BOL.alchemyItem.mythic": "Mythique", "BOL.alchemyItem.mythic": "Mythique",
"BOL.weaponCategory.melee": "Arme de mêlée", "BOL.weaponCategory.melee": "Arme de mêlée",
"BOL.weaponCategory.ranged": "Arme de tir", "BOL.weaponCategory.ranged": "Arme de tir",
"BOL.weaponCategory.other": "Autre", "BOL.weaponCategory.other": "Autre",
"BOL.itemProperty.damageMultiplier": "Multiplicateur de dommages", "BOL.itemProperty.damageMultiplier": "Multiplicateur de dommages",
"BOL.itemProperty.attackBonusDice": "Dé de Bonus d'attaque", "BOL.itemProperty.attackBonusDice": "Dé de Bonus d'attaque",
"BOL.itemProperty.equipable": "Équipable", "BOL.itemProperty.equipable": "Équipable",
@ -298,6 +317,7 @@
"BOL.itemProperty.isboarding": "Abordage", "BOL.itemProperty.isboarding": "Abordage",
"BOL.itemProperty.isspur": "Eperonnage", "BOL.itemProperty.isspur": "Eperonnage",
"BOL.itemProperty.isbreakrow": "Briser les rames", "BOL.itemProperty.isbreakrow": "Briser les rames",
"BOL.itemStat.quantity": "Quantité", "BOL.itemStat.quantity": "Quantité",
"BOL.itemStat.weight": "Poids", "BOL.itemStat.weight": "Poids",
"BOL.itemStat.price": "Prix", "BOL.itemStat.price": "Prix",
@ -307,21 +327,26 @@
"BOL.itemStat.soak": "Valeur de protection", "BOL.itemStat.soak": "Valeur de protection",
"BOL.itemStat.blocking": "Bloquage", "BOL.itemStat.blocking": "Bloquage",
"BOL.itemStat.modifiers": "Modificateurs", "BOL.itemStat.modifiers": "Modificateurs",
"BOL.weaponSize.unarmed": "Mains nues", "BOL.weaponSize.unarmed": "Mains nues",
"BOL.weaponSize.improvised": "Arme improvisée", "BOL.weaponSize.improvised": "Arme improvisée",
"BOL.weaponSize.light": "Légère", "BOL.weaponSize.light": "Légère",
"BOL.weaponSize.medium": "Moyenne", "BOL.weaponSize.medium": "Moyenne",
"BOL.weaponSize.heavy": "Lourde", "BOL.weaponSize.heavy": "Lourde",
"BOL.itemModifiers.init": "Malus (Initiative)", "BOL.itemModifiers.init": "Malus (Initiative)",
"BOL.itemModifiers.social": "Malus (Social)", "BOL.itemModifiers.social": "Malus (Social)",
"BOL.itemModifiers.agility": "Malus (Agilité)", "BOL.itemModifiers.agility": "Malus (Agilité)",
"BOL.itemModifiers.powercost": "Malus (Coût supplémentaire en PP)", "BOL.itemModifiers.powercost": "Malus (Coût supplémentaire en PP)",
"BOL.itemBlocking.malus": "Social", "BOL.itemBlocking.malus": "Social",
"BOL.itemBlocking.nbAttacksPerRound": "Agilité", "BOL.itemBlocking.nbAttacksPerRound": "Agilité",
"BOL.soakFormula.none": "-", "BOL.soakFormula.none": "-",
"BOL.soakFormula.light": "Légère (Annule d6-3 dégâts subis)", "BOL.soakFormula.light": "Légère (Annule d6-3 dégâts subis)",
"BOL.soakFormula.medium": "Moyenne (Annule d6-2 dégâts subis)", "BOL.soakFormula.medium": "Moyenne (Annule d6-2 dégâts subis)",
"BOL.soakFormula.heavy": "Lourde (Annule d6-1 dégâts subis)", "BOL.soakFormula.heavy": "Lourde (Annule d6-1 dégâts subis)",
"BOL.armorQuality.none": "-", "BOL.armorQuality.none": "-",
"BOL.armorQuality.light": "Légère", "BOL.armorQuality.light": "Légère",
"BOL.armorQuality.lightQ": "Légère de qualité", "BOL.armorQuality.lightQ": "Légère de qualité",
@ -335,6 +360,7 @@
"BOL.armorQuality.heavyQ": "Lourde de qualité", "BOL.armorQuality.heavyQ": "Lourde de qualité",
"BOL.armorQuality.heavySup": "Lourde Supérieure", "BOL.armorQuality.heavySup": "Lourde Supérieure",
"BOL.armorQuality.heavyLeg": "Lourde Légendaire", "BOL.armorQuality.heavyLeg": "Lourde Légendaire",
"BOL.equipmentSlots.none": "-", "BOL.equipmentSlots.none": "-",
"BOL.equipmentSlots.head": "Tête", "BOL.equipmentSlots.head": "Tête",
"BOL.equipmentSlots.neck": "Cou", "BOL.equipmentSlots.neck": "Cou",
@ -351,10 +377,12 @@
"BOL.equipmentSlots.feet": "Pieds", "BOL.equipmentSlots.feet": "Pieds",
"BOL.equipmentSlots.finder": "Doigt", "BOL.equipmentSlots.finder": "Doigt",
"BOL.equipmentSlots.ear": "Oreille", "BOL.equipmentSlots.ear": "Oreille",
"BOL.vehicleCategory.mount": "Monture terrestre", "BOL.vehicleCategory.mount": "Monture terrestre",
"BOL.vehicleCategory.flying": "Monture volante", "BOL.vehicleCategory.flying": "Monture volante",
"BOL.vehicleCategory.boat": "Bateau", "BOL.vehicleCategory.boat": "Bateau",
"BOL.vehicleCategory.other": "Autre", "BOL.vehicleCategory.other": "Autre",
"BOL.range.PointBlank": "Bout portant", "BOL.range.PointBlank": "Bout portant",
"BOL.range.Short": "Courte", "BOL.range.Short": "Courte",
"BOL.range.Medium": "Moyenne", "BOL.range.Medium": "Moyenne",
@ -362,6 +390,7 @@
"BOL.range.VeryLong": "Très longue", "BOL.range.VeryLong": "Très longue",
"BOL.range.Extreme": "Extrême", "BOL.range.Extreme": "Extrême",
"BOL.range.Maximum": "Maximale", "BOL.range.Maximum": "Maximale",
"BOL.notification.MacroMultipleTokensSelected": "Vous avez sélectionné plusieurs tokens", "BOL.notification.MacroMultipleTokensSelected": "Vous avez sélectionné plusieurs tokens",
"BOL.notification.MacroNoActorAvailable": "Aucun acteur n'a pu être ciblé", "BOL.notification.MacroNoActorAvailable": "Aucun acteur n'a pu être ciblé",
"BOL.notification.MacroNoTokenSelected": "Vous devez sélectionner un token", "BOL.notification.MacroNoTokenSelected": "Vous devez sélectionner un token",
@ -470,9 +499,10 @@
"BOL.ui.bionotes": "Notes", "BOL.ui.bionotes": "Notes",
"BOL.chat.welcome1": "Bienvenue dans Barbarians of Lemuria (Ludospherik version)", "BOL.chat.welcome1": "Bienvenue dans Barbarians of Lemuria (Ludospherik version)",
"BOL.chat.welcome2": "Les livres nécessaires pour jouer sont disponibles sur le site de l'éditeur : http://www.ludospherik.fr/content/14-barbarians-of-lemuria", "BOL.chat.welcome2": "Les livres nécessaires pour jouer sont disponibles sur le site de <a href='http://www.ludospherik.fr/content/14-barbarians-of-lemuria'>l'éditeur Ludospherik.</a>",
"BOL.chat.welcome3": "Les cartes intégrées au système le sont grace à l'aimable autorisation de leur auteur Guillaume Tavernier et des éditions Ludospherik. Merci à eux !.", "BOL.chat.welcome3": "Les cartes intégrées au système le sont grace à l'aimable autorisation de leur auteur Guillaume Tavernier et des éditions Ludospherik. Merci à eux !.",
"BOL.chat.welcome4": "Tout le support et le suivi de ce système est disponible via le Discord Foundry FR : https://discord.gg/pPSDNJk", "BOL.chat.welcome4": "Tout le support et le suivi de ce système est disponible via le <a href='https://discord.gg/pPSDNJk'>Discord Foundry FR</a>.",
"BOL.chat.welcome5": "Bon jeu en Lemurie !" "BOL.chat.welcome5": "Consulter l'aide en ligne pour plus d'informations : @UUID[Compendium.bol.aides-de-jeu.97rugQOtiwt8zPfQ]{Aide du Jeu}.",
"BOL.chat.welcome6": "Bon jeu en Lemurie !"
} }

View File

@ -134,6 +134,7 @@ export class BoLActorSheet extends ActorSheet {
formData.alchemy = this.actor.alchemy formData.alchemy = this.actor.alchemy
formData.containers = this.actor.containers formData.containers = this.actor.containers
formData.treasure = this.actor.treasure formData.treasure = this.actor.treasure
formData.boleffects = this.actor.boleffects
formData.alchemyrecipe = this.actor.alchemyrecipe formData.alchemyrecipe = this.actor.alchemyrecipe
formData.vehicles = this.actor.vehicles formData.vehicles = this.actor.vehicles
formData.fightoptions = this.actor.fightoptions formData.fightoptions = this.actor.fightoptions

View File

@ -28,6 +28,7 @@ export class BoLActor extends Actor {
} }
return this.system.chartype return this.system.chartype
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getVillainy() { getVillainy() {
if (this.type === 'character') { if (this.type === 'character') {
@ -52,7 +53,7 @@ export class BoLActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
prepareDerivedData() { prepareDerivedData() {
if ( this.type == "vehicle") { if (this.type == "vehicle") {
} else { } else {
super.prepareDerivedData() super.prepareDerivedData()
@ -102,6 +103,13 @@ export class BoLActor extends Actor {
if (fo && fo.system.properties.fightoptiontype == "attack") { if (fo && fo.system.properties.fightoptiontype == "attack") {
defMod += -1 defMod += -1
} }
// Apply defense effects
for (let i of this.items) {
if (i.type === "feature" && i.system.subtype === "boleffect" && i.system.properties.identifier.includes("aptitudes.def") ) {
defMod += Number(i.system.properties.modifier)
}
}
console.log("Defense : ", defMod)
return this.system.aptitudes.def.value + defMod return this.system.aptitudes.def.value + defMod
} }
@ -206,6 +214,9 @@ export class BoLActor extends Actor {
get resources() { get resources() {
return Object.values(this.system.resources) return Object.values(this.system.resources)
} }
get boleffects() {
return this.items.filter(i => i.type === "feature" && i.system.subtype === "boleffect")
}
get boons() { get boons() {
return duplicate(this.items.filter(i => i.type === "feature" && i.system.subtype === "boon") || []); return duplicate(this.items.filter(i => i.type === "feature" && i.system.subtype === "boon") || []);
} }
@ -213,7 +224,7 @@ export class BoLActor extends Actor {
return duplicate(this.items.filter(i => i.type === "feature" && i.system.subtype === "flaw") || []); return duplicate(this.items.filter(i => i.type === "feature" && i.system.subtype === "flaw") || []);
} }
get careers() { get careers() {
return duplicate( this.items.filter(i => i.type === "feature" && i.system.subtype === "career") || []) return duplicate(this.items.filter(i => i.type === "feature" && i.system.subtype === "career") || [])
} }
get origins() { get origins() {
return this.items.filter(i => i.type === "feature" && i.system.subtype === "origin"); return this.items.filter(i => i.type === "feature" && i.system.subtype === "origin");
@ -237,7 +248,7 @@ export class BoLActor extends Actor {
return this.items.filter(i => i.type === "item") return this.items.filter(i => i.type === "item")
} }
get equipmentCreature() { get equipmentCreature() {
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")) ) 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.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "armor"); return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "armor");
@ -249,7 +260,7 @@ export class BoLActor extends Actor {
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "shield"); return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "shield");
} }
get vehicleWeapons() { get vehicleWeapons() {
return this.items.filter(i => i.type === "item" && i.system.category === "vehicleweapon" ) return this.items.filter(i => i.type === "item" && i.system.category === "vehicleweapon")
} }
get weapons() { get weapons() {
return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "weapon") return this.items.filter(i => i.type === "item" && i.system.category === "equipment" && i.system.subtype === "weapon")
@ -295,10 +306,10 @@ export class BoLActor extends Actor {
get bonusBoons() { get bonusBoons() {
let boons = this.items.filter(i => i.type === "feature" && i.system.subtype === "boon" && i.system.properties.isbonusdice) let boons = this.items.filter(i => i.type === "feature" && i.system.subtype === "boon" && i.system.properties.isbonusdice)
return duplicate( boons || []) return duplicate(boons || [])
} }
get malusFlaws() { get malusFlaws() {
return duplicate( this.items.filter(i => i.type === "feature" && i.system.subtype === "flaw" && i.system.properties.ismalusdice) || []); return duplicate(this.items.filter(i => i.type === "feature" && i.system.subtype === "flaw" && i.system.properties.ismalusdice) || []);
} }
isSorcerer() { isSorcerer() {
@ -329,6 +340,23 @@ export class BoLActor extends Actor {
return ppCostArmor return ppCostArmor
} }
/*-------------------------------------------- */ /*-------------------------------------------- */
getDamageAttributeValue(attrDamage) {
let attrDamageValue = 0
if (attrDamage.includes("vigor")) {
attrDamageValue = actor.system.attributes.vigor.value
if (attrDamage.includes("half")) {
attrDamageValue = Math.floor(attrDamageValue / 2)
}
// Apply vigor effects
for (let i of this.items) {
if (i.type === "feature" && i.system.subtype === "boleffect" && i.system.properties.identifier.includes("vigor") ) {
attrDamageValue += Number(i.system.properties.modifier)
}
}
}
return attrDamageValue
}
/*-------------------------------------------- */
getArmorAgiMalus() { getArmorAgiMalus() {
let malusAgi = 0 let malusAgi = 0
for (let armor of this.protections) { for (let armor of this.protections) {
@ -471,6 +499,11 @@ export class BoLActor extends Actor {
"label": "BOL.featureSubtypes.gods", "label": "BOL.featureSubtypes.gods",
"ranked": false, "ranked": false,
"items": this.godsfaith "items": this.godsfaith
},
"boleffects": {
"label": "BOL.featureSubtypes.effects",
"ranked": false,
"items": this.boleffects
} }
} }
} }
@ -560,7 +593,7 @@ 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.system.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.system.resources.hp.value) await this.setFlag("world", hpID, this.system.resources.hp.value)
if (this.system.resources.hp.value <= 0) { if (this.system.resources.hp.value <= 0) {
ChatMessage.create({ ChatMessage.create({
@ -592,7 +625,7 @@ export class BoLActor extends Actor {
/*-------------------------------------------- */ /*-------------------------------------------- */
async sufferDamage(damage) { async sufferDamage(damage) {
let newHP = this.system.resources.hp.value - damage let newHP = this.system.resources.hp.value - damage
await this.update({ 'system.resources.hp.value': newHP }) await this.update({ 'system.resources.hp.value': newHP })
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -607,7 +640,7 @@ export class BoLActor extends Actor {
if (!protect.system.properties.soak.formula || protect.system.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.system.properties.soak.formula +",0)" formula += "+" + " max(" + protect.system.properties.soak.formula + ",0)"
} }
} else { } else {
if (protect.system.properties.soak.value == undefined) { if (protect.system.properties.soak.value == undefined) {
@ -626,7 +659,7 @@ export class BoLActor extends Actor {
rollProtection(itemId) { rollProtection(itemId) {
let armor = duplicate(this.items.get(itemId)) let armor = duplicate(this.items.get(itemId))
if (armor) { if (armor) {
let armorFormula = "max("+armor.system.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()
} }

View File

@ -110,7 +110,8 @@ function welcomeMessage() {
game.i18n.localize("BOL.chat.welcome2") + "<p>" + game.i18n.localize("BOL.chat.welcome2") + "<p>" +
game.i18n.localize("BOL.chat.welcome3") + "<p>" + game.i18n.localize("BOL.chat.welcome3") + "<p>" +
game.i18n.localize("BOL.chat.welcome4") + "</p>" + game.i18n.localize("BOL.chat.welcome4") + "</p>" +
game.i18n.localize("BOL.chat.welcome5") + "</p>" game.i18n.localize("BOL.chat.welcome5") + "<br>" +
game.i18n.localize("BOL.chat.welcome6")
} ) } )
} }

View File

@ -16,27 +16,56 @@ export class BoLRoll {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static attributeCheck(actor, key) { static updateApplicableEffects(rollData) {
let appEffects = []
for( let effect of rollData.bolEffects) {
if(effect.system.properties.identifier =="always") {
appEffects.push(effect)
} else if (effect.system.properties.identifier.includes(rollData.attribute.key)) {
appEffects.push(effect)
} else if ( rollData.aptitude && effect.system.properties.identifier.includes(rollData.aptitude.key)) {
appEffects.push(effect)
}
}
return appEffects
}
let attribute = eval(`actor.system.attributes.${key}`) /* -------------------------------------------- */
let label = (attribute.label) ? game.i18n.localize(attribute.label) : null static getCommonRollData(actor, mode, attribute, aptitude = undefined ) {
let description = game.i18n.localize('BOL.ui.attributeCheck') + " - " + game.i18n.localize(attribute.label)
let rollData = { let rollData = {
mode: "attribute", mode: mode,
actorId: actor.id, actorId: actor.id,
img: actor.img, img: actor.img,
attribute: attribute, attribute: attribute,
attrValue: attribute.value, attrValue: attribute.value,
aptValue: 0, aptValue: 0,
label: label,
careerBonus: 0, careerBonus: 0,
description: description,
armorAgiMalus: actor.getArmorAgiMalus(), armorAgiMalus: actor.getArmorAgiMalus(),
armorInitMalus: actor.getArmorInitMalus(), armorInitMalus: actor.getArmorInitMalus(),
adv: "0", adv: "0",
mod: 0 mod: 0,
modRanged: 0,
aptValue: 0,
bolEffects: actor.boleffects
} }
if (aptitude) {
rollData.aptitude = aptitude
rollData.aptValue = aptitude.value
}
rollData.bolApplicableEffects = this.updateApplicableEffects(rollData)
return rollData
}
/* -------------------------------------------- */
static attributeCheck(actor, key) {
let attribute = eval(`actor.system.attributes.${key}`)
let rollData = this.getCommonRollData(actor, "attribute", attribute)
rollData.description = game.i18n.localize('BOL.ui.attributeCheck') + " - " + game.i18n.localize(attribute.label)
rollData.label = (attribute.label) ? game.i18n.localize(attribute.label) : null
console.log(">>>>>>>>>>", rollData, actor) console.log(">>>>>>>>>>", rollData, actor)
return this.displayRollDialog(rollData) return this.displayRollDialog(rollData)
} }
@ -48,25 +77,12 @@ export class BoLRoll {
let attrKey = this.getDefaultAttribute(key) let attrKey = this.getDefaultAttribute(key)
let attribute = eval(`actor.system.attributes.${attrKey}`) let attribute = eval(`actor.system.attributes.${attrKey}`)
let label = (aptitude.label) ? game.i18n.localize(aptitude.label) : null; let rollData = this.getCommonRollData(actor, "aptitude", attribute, aptitude)
let description = game.i18n.localize('BOL.ui.aptitudeCheck') + " - " + game.i18n.localize(aptitude.label);
return this.displayRollDialog( rollData.label = (aptitude.label) ? game.i18n.localize(aptitude.label) : null
{ rollData.description = game.i18n.localize('BOL.ui.aptitudeCheck') + " - " + game.i18n.localize(aptitude.label)
mode: "aptitude",
actorId: actor.id, return this.displayRollDialog( rollData)
img: actor.img,
attribute: attribute,
aptitude: aptitude,
attrValue: attribute.value,
aptValue: aptitude.value,
armorAgiMalus: actor.getArmorAgiMalus(),
armorInitMalus: actor.getArmorInitMalus(),
label: label,
careerBonus: 0,
adv: "0",
description: description,
mod: 0
})
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -116,6 +132,8 @@ export class BoLRoll {
let attribute = eval(`actor.system.attributes.${weaponData.properties.attackAttribute}`) let attribute = eval(`actor.system.attributes.${weaponData.properties.attackAttribute}`)
let aptitude = eval(`actor.system.aptitudes.${weaponData.properties.attackAptitude}`) let aptitude = eval(`actor.system.aptitudes.${weaponData.properties.attackAptitude}`)
let rollData = this.getCommonRollData(actor, "weapon", attribute, aptitude)
// Compute distance // Compute distance
this.detectDistance( weapon, target) this.detectDistance( weapon, target)
@ -125,31 +143,19 @@ export class BoLRoll {
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
} }
// Build the roll structure
let rolldata = { // Update the roll structure
mode: "weapon", rollData.weapon = weapon
actorId: actor.id, rollData.isRanged = weaponData.properties.ranged || weaponData.properties.throwing
img: actor.img, rollData.targetId = target?.id
weapon: weapon, rollData.fightOption = fightOption
isRanged: weaponData.properties.ranged || weaponData.properties.throwing, rollData.defenderId = target?.actor.id
targetId: target?.id, rollData.label = (weapon.name) ? weapon.name : game.i18n.localize('BOL.ui.noWeaponName')
fightOption: fightOption, rollData.description = game.i18n.localize('BOL.ui.weaponAttack') + " : " + weapon.name
careerBonus: 0,
defenderId: target?.actor.id, return this.displayRollDialog(rollData)
attribute: attribute,
aptitude: aptitude,
attrValue: attribute.value,
aptValue: aptitude.value,
armorAgiMalus: actor.getArmorAgiMalus(),
armorInitMalus: actor.getArmorInitMalus(),
mod: 0,
modRanged: 0,
adv: "0",
label: (weapon.name) ? weapon.name : game.i18n.localize('BOL.ui.noWeaponName'),
description: game.i18n.localize('BOL.ui.weaponAttack') + " : " + weapon.name,
}
return this.displayRollDialog(rolldata)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static weaponCheck(actor, event) { static weaponCheck(actor, event) {
const li = $(event.currentTarget).parents(".item") const li = $(event.currentTarget).parents(".item")
@ -173,55 +179,39 @@ export class BoLRoll {
alchemy = duplicate(alchemy) alchemy = duplicate(alchemy)
let alchemyData = alchemy.system let alchemyData = alchemy.system
if (alchemyData.properties.pccurrent < alchemyData.properties.pccost) { if (alchemyData.properties.pccurrent < alchemyData.properties.pccost) {
ui.notifications.warn("Pas assez de Points de Cration investis dans la Préparation !") ui.notifications.warn("Pas assez de Points de Création investis dans la Préparation !")
return return
} }
let alchemyDef = { let rollData = this.getCommonRollData(actor, "alchemy", actor.system.attributes.mind)
mode: "alchemy",
actorId: actor.id, rollData.alchemy = alchemy
img: actor.img, rollData.careerBonus = actor.getAlchemistBonus()
alchemy: alchemy, rollData.pcCost = Number(alchemyData.properties.pccost)
attribute: actor.system.attributes.mind, rollData.pcCostCurrent = Number(alchemyData.properties.pccurrent)
attrValue: actor.system.attributes.mind.value, rollData.mod = Number(alchemyData.properties.difficulty)
aptValue: 0, rollData.label = alchemy.name
adv: "0", rollData.description = game.i18n.localize('BOL.ui.makeAlchemy') + "+" + alchemy.name
careerBonus: actor.getAlchemistBonus(),
pcCost: Number(alchemyData.properties.pccost),
pcCostCurrent: Number(alchemyData.properties.pccurrent),
mod: Number(alchemyData.properties.difficulty),
armorAgiMalus: actor.getArmorAgiMalus(),
armorInitMalus: actor.getArmorInitMalus(),
label: alchemy.name,
description: game.i18n.localize('BOL.ui.makeAlchemy') + "+" + alchemy.name,
}
console.log("ALCHEMY!", alchemyDef); console.log("ALCHEMY!", alchemyDef);
return this.displayRollDialog(alchemyDef); return this.displayRollDialog(alchemyDef);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static spellCheckWithSpell( actor, spell ) { static spellCheckWithSpell( actor, spell ) {
let spellDef = { let rollData = this.getCommonRollData(actor, "spell", actor.system.attributes.mind)
mode: "spell",
actorId: actor.id, rollData.spell = spell
img: actor.img, rollData.ppCurrent = Number(actor.system.resources.power.value),
spell: spell, rollData.careerBonus = actor.getSorcererBonus(),
attribute: actor.system.attributes.mind, rollData.ppCostArmor = actor.getPPCostArmor(),
attrValue: actor.system.attributes.mind.value, rollData.ppCost = Number(spell.system.properties.ppcost),
aptValue: 0, rollData.mod = Number(spell.system.properties.difficulty),
adv: "0", rollData.label = spell.name,
ppCurrent: Number(actor.system.resources.power.value), rollData.description = game.i18n.localize('BOL.ui.focusSpell') + " : " + spell.name
careerBonus: actor.getSorcererBonus(),
ppCostArmor: actor.getPPCostArmor(),
ppCost: Number(spell.system.properties.ppcost),
mod: Number(spell.system.properties.difficulty),
armorAgiMalus: actor.getArmorAgiMalus(),
armorInitMalus: actor.getArmorInitMalus(),
label: spell.name,
description: game.i18n.localize('BOL.ui.focusSpell') + " : " + spell.name,
}
//console.log("SPELL!", spellDef) //console.log("SPELL!", spellDef)
return this.displayRollDialog(spellDef) return this.displayRollDialog(rollData)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -246,8 +236,29 @@ export class BoLRoll {
this.updateArmorMalus(this.rollData) this.updateArmorMalus(this.rollData)
this.updatePPCost(this.rollData) this.updatePPCost(this.rollData)
// get basic dices from boons/flaws
let effectModifier = 0
this.rollData.bmDice = this.rollData.nbBoons - this.rollData.nbFlaws + this.rollData.bDice - this.rollData.mDice this.rollData.bmDice = this.rollData.nbBoons - this.rollData.nbFlaws + this.rollData.bDice - this.rollData.mDice
// add applicable bonus/malus dices effects
for (let effect of this.rollData.bolApplicableEffects) {
if (effect.system.properties.modifier == "1B") {
this.rollData.bmDice++;
} else if (effect.system.properties.modifier == "1B") {
this.rollData.bmDice+=2;
} else if (effect.system.properties.modifier == "1M") {
this.rollData.bmDice--;
} else if (effect.system.properties.modifier == "2M") {
this.rollData.bmDice-=2;
} else {
effectModifier += Number(effect.system.properties.modifier)
}
}
// Keep track of the final effect modifier
this.rollData.effectModifier = effectModifier
// Final number of dices
this.rollData.nbDice = 2 + Math.abs(this.rollData.bmDice) this.rollData.nbDice = 2 + Math.abs(this.rollData.bmDice)
// Bonus or Malus ?
if (this.rollData.bmDice == 0) { if (this.rollData.bmDice == 0) {
$('#roll-nbdice').val("2") $('#roll-nbdice').val("2")
} else { } else {
@ -260,7 +271,14 @@ export class BoLRoll {
} }
$('#roll-modifier').val(rollbase + "+" + this.rollData.careerBonus + "+" + this.rollData.mod + "+" + $('#roll-modifier').val(rollbase + "+" + this.rollData.careerBonus + "+" + this.rollData.mod + "+" +
this.rollData.modRanged + "+" + this.rollData.weaponModifier + "-" + this.rollData.defence + "-" + this.rollData.modArmorMalus + "-" + this.rollData.modRanged + "+" + this.rollData.weaponModifier + "-" + this.rollData.defence + "-" + this.rollData.modArmorMalus + "-" +
this.rollData.shieldMalus + "+" + this.rollData.attackModifier + "+" + this.rollData.appliedArmorMalus) this.rollData.shieldMalus + "+" + this.rollData.attackModifier + "+" + this.rollData.appliedArmorMalus + "+" + effectModifier)
// Rebuild lits of applicable effects
let selectEffects = ""
for(let effect of this.rollData.bolApplicableEffects) {
selectEffects += `<option value="${effect.id}" selected>${effect.name}</option>`
}
$('#applicable-effects').html(selectEffects)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -337,6 +355,7 @@ export class BoLRoll {
let actor = game.actors.get( this.rollData.actorId) let actor = game.actors.get( this.rollData.actorId)
this.rollData.attribute = duplicate(actor.system.attributes[attrKey]) this.rollData.attribute = duplicate(actor.system.attributes[attrKey])
this.rollData.attrValue = actor.system.attributes[attrKey].value this.rollData.attrValue = actor.system.attributes[attrKey].value
this.rollData.bolApplicableEffects = this.updateApplicableEffects(this.rollData)
this.updateTotalDice() this.updateTotalDice()
}) })
html.find('#apt').change((event) => { html.find('#apt').change((event) => {
@ -344,6 +363,7 @@ export class BoLRoll {
let actor = game.actors.get( this.rollData.actorId) let actor = game.actors.get( this.rollData.actorId)
this.rollData.aptitude = duplicate(actor.system.aptitudes[aptKey]) this.rollData.aptitude = duplicate(actor.system.aptitudes[aptKey])
this.rollData.aptValue = actor.system.aptitudes[aptKey].value this.rollData.aptValue = actor.system.aptitudes[aptKey].value
this.rollData.bolApplicableEffects = this.updateApplicableEffects(this.rollData)
this.updateTotalDice() this.updateTotalDice()
}) })
@ -478,14 +498,14 @@ export class BoLRoll {
rollData.registerInit = (rollData.aptitude && rollData.aptitude.key == 'init') ? $('#register-init').is(":checked") : false; rollData.registerInit = (rollData.aptitude && rollData.aptitude.key == 'init') ? $('#register-init').is(":checked") : false;
const isMalus = rollData.nbFlaws > rollData.nbBoons const isMalus = (rollData.bmDice < 0)
//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.system.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 + rollData.effectModifier
const formula = (isMalus) ? rollData.nbDice + "d6kl2 + " + modifiers : rollData.nbDice + "d6kh2 + " + modifiers const formula = (isMalus) ? rollData.nbDice + "d6kl2 + " + modifiers : rollData.nbDice + "d6kh2 + " + modifiers
rollData.formula = formula rollData.formula = formula
rollData.modifiers = modifiers rollData.modifiers = modifiers
@ -625,16 +645,8 @@ export class BoLDefaultRoll {
/* -------------------------------------------- */ /* -------------------------------------------- */
getDamageAttributeValue(attrDamage, actorId = undefined) { getDamageAttributeValue(attrDamage, actorId = undefined) {
let attrDamageValue = 0
let actor = game.actors.get( (actorId) ? actorId: this.rollData.actorId) let actor = game.actors.get( (actorId) ? actorId: this.rollData.actorId)
if (attrDamage.includes("vigor")) { return actor.getDamageAttributeValue( attrDamage )
attrDamageValue = actor.system.attributes.vigor.value
if (attrDamage.includes("half")) {
attrDamageValue = Math.floor(attrDamageValue / 2)
}
}
return attrDamageValue
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -40,7 +40,7 @@ export class BoLCalendar extends Application {
constructor() { constructor() {
super(); super();
// position // position
this.calendarPos = duplicate(game.settings.get(SYSTEM_RDD, "calendar-pos")); this.calendarPos = duplicate(game.settings.get("bol", "calendar-pos"));
if (this.calendarPos == undefined || this.calendarPos.top == undefined) { if (this.calendarPos == undefined || this.calendarPos.top == undefined) {
this.calendrierPos = BoLCalendar.createCalendarPos() this.calendrierPos = BoLCalendar.createCalendarPos()
game.settings.set("bol", "calendar-pos", this.calendarPos) game.settings.set("bol", "calendar-pos", this.calendarPos)

View File

@ -0,0 +1,66 @@
/* -------------------------------------------- */
import { BoLUtility } from "./bol-utility.js";
import { BoLRoll } from "../controllers/bol-rolls.js";
/* -------------------------------------------- */
export class BoLCharacterSummary extends Application {
/* -------------------------------------------- */
static displayPCSummary(){
let pcList = new BoLCharacterSummary()
pcList.render(true)
}
/* -------------------------------------------- */
static createSummaryPos() {
return { top: 200, left: 200 };
}
/* -------------------------------------------- */
constructor() {
if ( !game.user.isGM ) { // Uniquement si GM
return;
}
super();
}
/* -------------------------------------------- */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
template: "systems/bol/templates/apps/character-summary-template.html",
popOut: true,
resizable: true,
classes: ["bol", "dialog"], width: 820, height: 'fit-content'
})
}
/* -------------------------------------------- */
getData() {
let formData = super.getData();
formData.pcs = game.actors.filter( ac => ac.type == "character" && ac.hasPlayerOwner )
formData.config = game.bol.config
return formData
}
/* -------------------------------------------- */
/** @override */
async activateListeners(html) {
super.activateListeners(html);
html.find('.summary-roll').click((event) => {
const li = $(event.currentTarget).parents(".item")
const actor = game.actors.get(li.data("actor-id"))
let type = $(event.currentTarget).data("type")
let key = $(event.currentTarget).data("key")
if ( type == "attribute") {
BoLRoll.attributeCheck(actor, key, event)
} else if (type == "aptitude") {
BoLRoll.aptitudeCheck(actor, key, event)
}
})
}
}

View File

@ -1,5 +1,6 @@
/* -------------------------------------------- */ /* -------------------------------------------- */
import { BoLAdventureGenerator } from "./bol-adventure-generator.js" import { BoLAdventureGenerator } from "./bol-adventure-generator.js"
import { BoLCharacterSummary } from "./bol-character-summary.js"
/* -------------------------------------------- */ /* -------------------------------------------- */
export class BoLCommands { export class BoLCommands {
@ -8,6 +9,7 @@ export class BoLCommands {
if (!game.bol.commands) { if (!game.bol.commands) {
const bolCommands = new BoLCommands() const bolCommands = new BoLCommands()
bolCommands.registerCommand({ path: ["/adventure"], func: (content, msg, params) => BoLAdventureGenerator.createAdventure(), descr: "Nouvelle idée d'aventure!" }); bolCommands.registerCommand({ path: ["/adventure"], func: (content, msg, params) => BoLAdventureGenerator.createAdventure(), descr: "Nouvelle idée d'aventure!" });
bolCommands.registerCommand({ path: ["/pcview"], func: (content, msg, params) => BoLCharacterSummary.displayPCSummary(), descr: "Affiche la liste des PJs!" });
game.bol.commands = bolCommands game.bol.commands = bolCommands
} }

View File

@ -115,6 +115,14 @@ BOL.aptitudes = {
"def" : "BOL.aptitudes.def" "def" : "BOL.aptitudes.def"
} }
BOL.resources = {
"hp" : "BOL.resources.hp",
"hero" : "BOL.resources.hero",
"faith" : "BOL.resources.faith",
"power" : "BOL.resources.power",
"alchemypoints" : "BOL.resources.alchemypoints"
}
BOL.weaponSizes = { BOL.weaponSizes = {
"unarmed" : "BOL.weaponSize.unarmed", "unarmed" : "BOL.weaponSize.unarmed",
"improvised" : "BOL.weaponSize.improvised", "improvised" : "BOL.weaponSize.improvised",
@ -260,7 +268,8 @@ BOL.featureSubtypes = {
"flaw" : "BOL.featureSubtypes.flaw", "flaw" : "BOL.featureSubtypes.flaw",
"language" : "BOL.featureSubtypes.language", "language" : "BOL.featureSubtypes.language",
"godsfaith" : "BOL.featureSubtypes.gods", "godsfaith" : "BOL.featureSubtypes.gods",
"fightoption" : "BOL.featureSubtypes.fightOption" "fightoption" : "BOL.featureSubtypes.fightOption",
"boleffect": "BOL.featureSubtypes.effect",
} }
BOL.fightOptionTypes = { BOL.fightOptionTypes = {
@ -310,4 +319,20 @@ BOL.creatureSize = {
"colossal": "BOL.size.colossal" "colossal": "BOL.size.colossal"
} }
BOL.bolEffectModifier = {
"-8": "-8",
"-6": "-6",
"-4": "-4",
"-2": "-2",
"-1": "-1",
"1B": "1B",
"2B": "2B",
"1M": "1M",
"2M": "2M",
"+1": "+1",
"+2": "+2",
"+4": "+4",
"+6": "+6",
"+8": "+8",
}
BOL.debug = false; BOL.debug = false;

View File

@ -103,6 +103,12 @@ export const registerHandlebarsHelpers = function () {
Handlebars.registerHelper('sub', function (a, b) { Handlebars.registerHelper('sub', function (a, b) {
return parseInt(a) - parseInt(b); return parseInt(a) - parseInt(b);
}) })
Handlebars.registerHelper('abbrev2', function (a) {
return a.substring(0,2);
})
Handlebars.registerHelper('abbrev3', function (a) {
return a.substring(0,3);
})
Handlebars.registerHelper('valueAtIndex', function (arr, idx) { Handlebars.registerHelper('valueAtIndex', function (arr, idx) {
return arr[idx]; return arr[idx];
}) })

View File

@ -36,6 +36,7 @@ export const preloadHandlebarsTemplates = async function () {
"systems/bol/templates/item/parts/properties/feature/career-properties.hbs", "systems/bol/templates/item/parts/properties/feature/career-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/boon-properties.hbs", "systems/bol/templates/item/parts/properties/feature/boon-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/flaw-properties.hbs", "systems/bol/templates/item/parts/properties/feature/flaw-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/effect-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/origin-properties.hbs", "systems/bol/templates/item/parts/properties/feature/origin-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/race-properties.hbs", "systems/bol/templates/item/parts/properties/feature/race-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/fightoption-properties.hbs", "systems/bol/templates/item/parts/properties/feature/fightoption-properties.hbs",
@ -50,6 +51,7 @@ export const preloadHandlebarsTemplates = async function () {
"systems/bol/templates/dialogs/mod-roll-part.hbs", "systems/bol/templates/dialogs/mod-roll-part.hbs",
"systems/bol/templates/dialogs/adv-roll-part.hbs", "systems/bol/templates/dialogs/adv-roll-part.hbs",
"systems/bol/templates/dialogs/career-roll-part.hbs", "systems/bol/templates/dialogs/career-roll-part.hbs",
"systems/bol/templates/dialogs/effect-roll-part.hbs",
"systems/bol/templates/dialogs/boons-roll-part.hbs", "systems/bol/templates/dialogs/boons-roll-part.hbs",
"systems/bol/templates/dialogs/flaws-roll-part.hbs", "systems/bol/templates/dialogs/flaws-roll-part.hbs",
"systems/bol/templates/dialogs/total-roll-part.hbs", "systems/bol/templates/dialogs/total-roll-part.hbs",

File diff suppressed because one or more lines are too long

4
packs/effets-exemples.db Normal file
View File

@ -0,0 +1,4 @@
{"name":"Vigueur -1","type":"feature","img":"icons/consumables/potions/bottle-conical-corked-labeled-skull-poison-green.webp","system":{"category":null,"subtype":"boleffect","description":"","properties":{"ismalusdice":false,"bonusmalus":-2,"identifier":"system.attributes.vigor","modifier":"-1"},"rank":0},"effects":[],"flags":{"core":{"sourceId":"Item.6fTZ6hOKR4pWbWOe"}},"_stats":{"systemId":"bol","systemVersion":"10.3.3","coreVersion":"10.290","createdTime":1669218607632,"modifiedTime":1669234720255,"lastModifiedBy":"kQghu0tL1dft5xLu"},"_id":"6fTZ6hOKR4pWbWOe","folder":null,"sort":0,"ownership":{"default":0,"kQghu0tL1dft5xLu":3}}
{"name":"Esprit -1","type":"feature","img":"icons/consumables/potions/bottle-conical-corked-labeled-skull-poison-green.webp","system":{"category":null,"subtype":"boleffect","description":"","properties":{"ismalusdice":false,"bonusmalus":-2,"identifier":"system.attributes.mind","modifier":"-1"},"rank":0},"effects":[],"flags":{"core":{"sourceId":"Item.6fTZ6hOKR4pWbWOe"}},"_stats":{"systemId":"bol","systemVersion":"10.3.3","coreVersion":"10.290","createdTime":1669218607632,"modifiedTime":1669234720255,"lastModifiedBy":"kQghu0tL1dft5xLu"},"_id":"V2geomwPtTBnBeQW","folder":null,"sort":0,"ownership":{"default":0,"kQghu0tL1dft5xLu":3}}
{"name":"Agilité -1","type":"feature","img":"icons/consumables/potions/bottle-conical-corked-labeled-skull-poison-green.webp","system":{"category":null,"subtype":"boleffect","description":"","properties":{"ismalusdice":false,"bonusmalus":-2,"identifier":"system.attributes.agility","modifier":"-1"},"rank":0},"effects":[],"flags":{"core":{"sourceId":"Item.6fTZ6hOKR4pWbWOe"}},"_stats":{"systemId":"bol","systemVersion":"10.3.3","coreVersion":"10.290","createdTime":1669218607632,"modifiedTime":1669234720255,"lastModifiedBy":"kQghu0tL1dft5xLu"},"_id":"eXPNwGQiwnIiGYaK","folder":null,"sort":0,"ownership":{"default":0,"kQghu0tL1dft5xLu":3}}
{"name":"Aura -1","type":"feature","img":"icons/consumables/potions/bottle-conical-corked-labeled-skull-poison-green.webp","system":{"category":null,"subtype":"boleffect","description":"","properties":{"ismalusdice":false,"bonusmalus":-2,"identifier":"system.attributes.appeal","modifier":"-1"},"rank":0},"effects":[],"flags":{"core":{"sourceId":"Item.6fTZ6hOKR4pWbWOe"}},"_stats":{"systemId":"bol","systemVersion":"10.3.3","coreVersion":"10.290","createdTime":1669218607632,"modifiedTime":1669234720256,"lastModifiedBy":"kQghu0tL1dft5xLu"},"_id":"zwSNMO9HpiqUCMt8","folder":null,"sort":0,"ownership":{"default":0,"kQghu0tL1dft5xLu":3}}

View File

@ -14,7 +14,7 @@
], ],
"url": "https://www.uberwald.me/gitea/public/bol", "url": "https://www.uberwald.me/gitea/public/bol",
"license": "LICENSE.txt", "license": "LICENSE.txt",
"version": "10.3.3", "version": "10.4.3",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "10", "verified": "10",
@ -182,6 +182,15 @@
"private": false, "private": false,
"flags": {} "flags": {}
}, },
{
"label": "Effets - Exemples",
"type": "Item",
"name": "effets-exemples",
"path": "packs/effets-exemples.db",
"system": "bol",
"private": false,
"flags": {}
},
{ {
"label": "Créatures", "label": "Créatures",
"type": "Actor", "type": "Actor",
@ -194,7 +203,7 @@
], ],
"socket": true, "socket": true,
"manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json", "manifest": "https://www.uberwald.me/gitea/public/bol/raw/v10/system.json",
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.3.3.zip", "download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.4.3.zip",
"background": "systems/images/map_lemurie.webp", "background": "systems/images/map_lemurie.webp",
"gridDistance": 1.5, "gridDistance": 1.5,
"gridUnits": "m", "gridUnits": "m",

View File

@ -102,10 +102,10 @@
"hp": { "hp": {
"key": "hp", "key": "hp",
"label": "BOL.resources.hp", "label": "BOL.resources.hp",
"base": 0, "base": 1,
"value": 0, "value": 1,
"bonus": 0, "bonus": 0,
"max": 0 "max": 1
}, },
"hero": { "hero": {
"key": "hero", "key": "hero",

View File

@ -7,6 +7,23 @@
<div class="sidebar flex0 bol-actor-sidebar"> <div class="sidebar flex0 bol-actor-sidebar">
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100" <img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"
style="border:1px outset lightgray; box-shadow: 5px 5px 5px gray" /> style="border:1px outset lightgray; box-shadow: 5px 5px 5px gray" />
<div></div>
{{#if (count boleffects)}}
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-name flex2">{{localize "BOL.ui.effects"}}</div>
</li>
{{#each boleffects as |effect keyEffect|}}
<li class="item flexrow" data-item-id="{{effect.id}}">
<div class="item-image"><img src="{{effect.img}}" title="{{effect.name}}"/></div>
<h4 class="item-name flex2"><a class="item-edit">{{effect.name}}</a></h4>
</li>
{{/each}}
</ol>
{{/if}}
</div> </div>
<div class="main flex1"> <div class="main flex1">

View File

@ -0,0 +1,35 @@
<form class="{{cssClass}} flexcol character-summary-container" autocomplete="off">
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-field item-name item-name-fixed-medium">{{localize "BOL.ui.name"}}</div>
{{#each config.attackAttributes as |attr key|}}
<div class="item-field flex2">{{abbrev3 (localize attr)}}</div>
{{/each}}
{{#each config.aptitudes as |apt key|}}
<div class="item-field flex2">{{abbrev3 (localize apt)}}</div>
{{/each}}
{{#each config.resources as |res key|}}
<div class="item-field flex2">{{abbrev3 (localize res)}}</div>
{{/each}}
</li>
{{#each pcs as |pc key|}}
<li class="item flexrow" data-actor-id="{{pc.id}}">
<div class="item-field item-name item-name-fixed-medium">{{pc.name}}</div>
{{#each pc.system.attributes as |attr key|}}
<div class="item-field flex2 "><a class="summary-roll" data-type="attribute" data-key="{{key}}">{{attr.value}}</a></div>
{{/each}}
{{#each pc.system.aptitudes as |apt key|}}
<div class="item-field flex2 "><a class="summary-roll" data-type="aptitude" data-key="{{key}}">{{apt.value}}</a></div>
{{/each}}
{{#each pc.system.resources as |res key|}}
<div class="item-field flex2 ">{{res.value}}/{{res.max}}</div>
{{/each}}
</li>
{{/each}}
</ol>
</form>

View File

@ -35,6 +35,8 @@
{{> "systems/bol/templates/dialogs/flaws-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/flaws-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/effect-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/adv-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/adv-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/mod-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/mod-roll-part.hbs"}}

View File

@ -32,6 +32,8 @@
{{> "systems/bol/templates/dialogs/flaws-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/flaws-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/effect-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/adv-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/adv-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/mod-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/mod-roll-part.hbs"}}

View File

@ -16,6 +16,8 @@
{{> "systems/bol/templates/dialogs/flaws-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/flaws-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/effect-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/adv-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/adv-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/mod-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/mod-roll-part.hbs"}}

View File

@ -0,0 +1,14 @@
{{#if (count bolEffects)}}
<div class="flexrow roll-box" >
<div class="flex1 center bg-darkred">
<label for="mod">{{localize 'BOL.ui.boleffects'}}</label>
</div>
<div class="flex1 center cell">
<select disabled class="flex1" name="applicable-effects" id="applicable-effects" data-type="String" multiple>
{{#each bolApplicableEffects as |effect id|}}
<option value="{{id}}" selected >{{effect.name}} ({{effect.system.properties.modifier}})</option>
{{/each}}
</select>
</div>
</div>
{{/if}}

View File

@ -56,6 +56,8 @@
{{> "systems/bol/templates/dialogs/fightoptions-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/fightoptions-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/effect-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/adv-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/adv-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/mod-roll-part.hbs"}} {{> "systems/bol/templates/dialogs/mod-roll-part.hbs"}}

View File

@ -24,3 +24,6 @@
{{#if (equals item.system.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}}
{{#if (equals item.system.subtype "boleffect")}}
{{> "systems/bol/templates/item/parts/properties/feature/effect-properties.hbs"}}
{{/if}}

View File

@ -0,0 +1,27 @@
<h3 class="form-header">{{localize 'BOL.featureSubtypes.effect'}}</h3>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.attributaptitude"}}</label>
<select name="system.properties.identifier" value="{{item.system.properties.identifier}}">
{{#select item.system.properties.identifier}}
<option value="always">{{localize "BOL.ui.always"}}</option>
{{#each config.attackAttributes as |value id|}}
<option value="system.attributes.{{id}}">{{localize value}}</option>
{{/each}}
{{#each config.aptitudes as |value id|}}
<option value="system.aptitudes.{{id}}">{{localize value}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.modifier"}}</label>
<select name="system.properties.modifier" value="{{item.system.properties.modifier}}">
{{#select item.system.properties.modifier}}
{{#each config.bolEffectModifier as |modifier id|}}
<option value="{{id}}">{{localize modifier}}</option>
{{/each}}
{{/select}}
</select>
</div>