forked from public/bol
Ajout aide + effets
This commit is contained in:
parent
985aba0318
commit
fe1cda67c4
BIN
assets/bol_monnaies_v1_1.pdf
Executable file
BIN
assets/bol_monnaies_v1_1.pdf
Executable file
Binary file not shown.
35
lang/fr.json
35
lang/fr.json
@ -166,6 +166,11 @@
|
||||
"BOL.ui.rabble": "Piétaille",
|
||||
"BOL.ui.tough": "Coriace",
|
||||
"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.featureCategory.origins": "Origines",
|
||||
"BOL.featureCategory.races": "Races",
|
||||
@ -179,6 +184,7 @@
|
||||
"BOL.bougette.easylife": "A l'aise",
|
||||
"BOL.bougette.luxury": "Luxe&Volupté",
|
||||
"BOL.bougette.rich": "Richissime",
|
||||
|
||||
"BOL.featureSubtypes.origin": "Origine",
|
||||
"BOL.featureSubtypes.race": "Race",
|
||||
"BOL.featureSubtypes.career": "Carrière",
|
||||
@ -187,6 +193,10 @@
|
||||
"BOL.featureSubtypes.language": "Langue",
|
||||
"BOL.featureSubtypes.gods": "Dieux & Foi",
|
||||
"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.intrepid": "Attaque intrépide",
|
||||
"BOL.fightOptionTypes.twoweaponsdef": "Combat à 2 armes (Défense)",
|
||||
@ -194,6 +204,7 @@
|
||||
"BOL.fightOptionTypes.fulldefense": "Défense totale",
|
||||
"BOL.fightOptionTypes.defense": "Posture défensive",
|
||||
"BOL.fightOptionTypes.attack": "Posture offensive",
|
||||
|
||||
"BOL.itemCategory.object": "Objet",
|
||||
"BOL.itemCategory.equipment": "Équipement",
|
||||
"BOL.itemCategory.consumable": "Consommable",
|
||||
@ -203,12 +214,14 @@
|
||||
"BOL.itemCategory.capacity": "Capacité",
|
||||
"BOL.itemCategory.alchemy": "Préparation Alchimique",
|
||||
"BOL.itemCategory.vehicleweapon": "Armes de Véhicule",
|
||||
|
||||
"BOL.combatCategory.protections": "Protections",
|
||||
"BOL.combatCategory.shields": "Boucliers",
|
||||
"BOL.combatCategory.melee": "Armes de contact",
|
||||
"BOL.combatCategory.ranged": "Armes à distance",
|
||||
"BOL.combatCategory.fightOptions": "Options de combat",
|
||||
"BOL.combatCategory.natural": "Armes Naturelless",
|
||||
|
||||
"BOL.equipmentCategory.weapon": "Arme",
|
||||
"BOL.equipmentCategory.armor": "Armure",
|
||||
"BOL.equipmentCategory.protection": "Protection",
|
||||
@ -220,21 +233,26 @@
|
||||
"BOL.equipmentCategory.container": "Conteneur",
|
||||
"BOL.equipmentCategory.currency": "Monnaie",
|
||||
"BOL.equipmentCategory.other": "Autre",
|
||||
|
||||
"BOL.protectionCategory.armor": "Armure",
|
||||
"BOL.protectionCategory.shield": "Bouclier",
|
||||
"BOL.protectionCategory.helm": "Casque",
|
||||
"BOL.protectionCategory.other": "Autre",
|
||||
|
||||
"BOL.spellItem.charm": "Charme",
|
||||
"BOL.spellItem.circle1": "Premier Cercle",
|
||||
"BOL.spellItem.circle2": "Second Cercle",
|
||||
"BOL.spellItem.circle3": "Troisième Cercle",
|
||||
|
||||
"BOL.alchemyItem.common": "Courante",
|
||||
"BOL.alchemyItem.scarce": "Rare",
|
||||
"BOL.alchemyItem.legend": "Légendaire",
|
||||
"BOL.alchemyItem.mythic": "Mythique",
|
||||
|
||||
"BOL.weaponCategory.melee": "Arme de mêlée",
|
||||
"BOL.weaponCategory.ranged": "Arme de tir",
|
||||
"BOL.weaponCategory.other": "Autre",
|
||||
|
||||
"BOL.itemProperty.damageMultiplier": "Multiplicateur de dommages",
|
||||
"BOL.itemProperty.attackBonusDice": "Dé de Bonus d'attaque",
|
||||
"BOL.itemProperty.equipable": "Équipable",
|
||||
@ -298,6 +316,7 @@
|
||||
"BOL.itemProperty.isboarding": "Abordage",
|
||||
"BOL.itemProperty.isspur": "Eperonnage",
|
||||
"BOL.itemProperty.isbreakrow": "Briser les rames",
|
||||
|
||||
"BOL.itemStat.quantity": "Quantité",
|
||||
"BOL.itemStat.weight": "Poids",
|
||||
"BOL.itemStat.price": "Prix",
|
||||
@ -307,21 +326,26 @@
|
||||
"BOL.itemStat.soak": "Valeur de protection",
|
||||
"BOL.itemStat.blocking": "Bloquage",
|
||||
"BOL.itemStat.modifiers": "Modificateurs",
|
||||
|
||||
"BOL.weaponSize.unarmed": "Mains nues",
|
||||
"BOL.weaponSize.improvised": "Arme improvisée",
|
||||
"BOL.weaponSize.light": "Légère",
|
||||
"BOL.weaponSize.medium": "Moyenne",
|
||||
"BOL.weaponSize.heavy": "Lourde",
|
||||
|
||||
"BOL.itemModifiers.init": "Malus (Initiative)",
|
||||
"BOL.itemModifiers.social": "Malus (Social)",
|
||||
"BOL.itemModifiers.agility": "Malus (Agilité)",
|
||||
"BOL.itemModifiers.powercost": "Malus (Coût supplémentaire en PP)",
|
||||
|
||||
"BOL.itemBlocking.malus": "Social",
|
||||
"BOL.itemBlocking.nbAttacksPerRound": "Agilité",
|
||||
|
||||
"BOL.soakFormula.none": "-",
|
||||
"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.heavy": "Lourde (Annule d6-1 dégâts subis)",
|
||||
|
||||
"BOL.armorQuality.none": "-",
|
||||
"BOL.armorQuality.light": "Légère",
|
||||
"BOL.armorQuality.lightQ": "Légère de qualité",
|
||||
@ -335,6 +359,7 @@
|
||||
"BOL.armorQuality.heavyQ": "Lourde de qualité",
|
||||
"BOL.armorQuality.heavySup": "Lourde Supérieure",
|
||||
"BOL.armorQuality.heavyLeg": "Lourde Légendaire",
|
||||
|
||||
"BOL.equipmentSlots.none": "-",
|
||||
"BOL.equipmentSlots.head": "Tête",
|
||||
"BOL.equipmentSlots.neck": "Cou",
|
||||
@ -351,10 +376,12 @@
|
||||
"BOL.equipmentSlots.feet": "Pieds",
|
||||
"BOL.equipmentSlots.finder": "Doigt",
|
||||
"BOL.equipmentSlots.ear": "Oreille",
|
||||
|
||||
"BOL.vehicleCategory.mount": "Monture terrestre",
|
||||
"BOL.vehicleCategory.flying": "Monture volante",
|
||||
"BOL.vehicleCategory.boat": "Bateau",
|
||||
"BOL.vehicleCategory.other": "Autre",
|
||||
|
||||
"BOL.range.PointBlank": "Bout portant",
|
||||
"BOL.range.Short": "Courte",
|
||||
"BOL.range.Medium": "Moyenne",
|
||||
@ -362,6 +389,7 @@
|
||||
"BOL.range.VeryLong": "Très longue",
|
||||
"BOL.range.Extreme": "Extrême",
|
||||
"BOL.range.Maximum": "Maximale",
|
||||
|
||||
"BOL.notification.MacroMultipleTokensSelected": "Vous avez sélectionné plusieurs tokens",
|
||||
"BOL.notification.MacroNoActorAvailable": "Aucun acteur n'a pu être ciblé",
|
||||
"BOL.notification.MacroNoTokenSelected": "Vous devez sélectionner un token",
|
||||
@ -470,9 +498,10 @@
|
||||
"BOL.ui.bionotes": "Notes",
|
||||
|
||||
"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.welcome4": "Tout le support et le suivi de ce système est disponible via le Discord Foundry FR : https://discord.gg/pPSDNJk",
|
||||
"BOL.chat.welcome5": "Bon jeu en Lemurie !"
|
||||
"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": "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 !"
|
||||
|
||||
}
|
@ -134,6 +134,7 @@ export class BoLActorSheet extends ActorSheet {
|
||||
formData.alchemy = this.actor.alchemy
|
||||
formData.containers = this.actor.containers
|
||||
formData.treasure = this.actor.treasure
|
||||
formData.boleffects = this.actor.boleffects
|
||||
formData.alchemyrecipe = this.actor.alchemyrecipe
|
||||
formData.vehicles = this.actor.vehicles
|
||||
formData.fightoptions = this.actor.fightoptions
|
||||
|
@ -206,6 +206,9 @@ export class BoLActor extends Actor {
|
||||
get resources() {
|
||||
return Object.values(this.system.resources)
|
||||
}
|
||||
get boleffects() {
|
||||
return this.items.filter(i => i.type === "feature" && i.system.subtype === "boleffect")
|
||||
}
|
||||
get boons() {
|
||||
return duplicate(this.items.filter(i => i.type === "feature" && i.system.subtype === "boon") || []);
|
||||
}
|
||||
@ -471,6 +474,11 @@ export class BoLActor extends Actor {
|
||||
"label": "BOL.featureSubtypes.gods",
|
||||
"ranked": false,
|
||||
"items": this.godsfaith
|
||||
},
|
||||
"boleffects": {
|
||||
"label": "BOL.featureSubtypes.effects",
|
||||
"ranked": false,
|
||||
"items": this.boleffects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,8 @@ function welcomeMessage() {
|
||||
game.i18n.localize("BOL.chat.welcome2") + "<p>" +
|
||||
game.i18n.localize("BOL.chat.welcome3") + "<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")
|
||||
} )
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
let description = game.i18n.localize('BOL.ui.attributeCheck') + " - " + game.i18n.localize(attribute.label)
|
||||
/* -------------------------------------------- */
|
||||
static getCommonRollData(actor, mode, attribute, aptitude = undefined ) {
|
||||
|
||||
let rollData = {
|
||||
mode: "attribute",
|
||||
mode: mode,
|
||||
actorId: actor.id,
|
||||
img: actor.img,
|
||||
attribute: attribute,
|
||||
attrValue: attribute.value,
|
||||
aptValue: 0,
|
||||
label: label,
|
||||
careerBonus: 0,
|
||||
description: description,
|
||||
armorAgiMalus: actor.getArmorAgiMalus(),
|
||||
armorInitMalus: actor.getArmorInitMalus(),
|
||||
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)
|
||||
return this.displayRollDialog(rollData)
|
||||
}
|
||||
@ -48,25 +77,12 @@ export class BoLRoll {
|
||||
let attrKey = this.getDefaultAttribute(key)
|
||||
let attribute = eval(`actor.system.attributes.${attrKey}`)
|
||||
|
||||
let label = (aptitude.label) ? game.i18n.localize(aptitude.label) : null;
|
||||
let description = game.i18n.localize('BOL.ui.aptitudeCheck') + " - " + game.i18n.localize(aptitude.label);
|
||||
return this.displayRollDialog(
|
||||
{
|
||||
mode: "aptitude",
|
||||
actorId: actor.id,
|
||||
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
|
||||
})
|
||||
let rollData = this.getCommonRollData(actor, "aptitude", attribute, aptitude)
|
||||
|
||||
rollData.label = (aptitude.label) ? game.i18n.localize(aptitude.label) : null
|
||||
rollData.description = game.i18n.localize('BOL.ui.aptitudeCheck') + " - " + game.i18n.localize(aptitude.label)
|
||||
|
||||
return this.displayRollDialog( rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -116,6 +132,8 @@ export class BoLRoll {
|
||||
let attribute = eval(`actor.system.attributes.${weaponData.properties.attackAttribute}`)
|
||||
let aptitude = eval(`actor.system.aptitudes.${weaponData.properties.attackAptitude}`)
|
||||
|
||||
let rollData = this.getCommonRollData(actor, "weapon", attribute, aptitude)
|
||||
|
||||
// Compute distance
|
||||
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.`)
|
||||
return
|
||||
}
|
||||
// Build the roll structure
|
||||
let rolldata = {
|
||||
mode: "weapon",
|
||||
actorId: actor.id,
|
||||
img: actor.img,
|
||||
weapon: weapon,
|
||||
isRanged: weaponData.properties.ranged || weaponData.properties.throwing,
|
||||
targetId: target?.id,
|
||||
fightOption: fightOption,
|
||||
careerBonus: 0,
|
||||
defenderId: target?.actor.id,
|
||||
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)
|
||||
|
||||
// Update the roll structure
|
||||
rollData.weapon = weapon
|
||||
rollData.isRanged = weaponData.properties.ranged || weaponData.properties.throwing
|
||||
rollData.targetId = target?.id
|
||||
rollData.fightOption = fightOption
|
||||
rollData.defenderId = target?.actor.id
|
||||
rollData.label = (weapon.name) ? weapon.name : game.i18n.localize('BOL.ui.noWeaponName')
|
||||
rollData.description = game.i18n.localize('BOL.ui.weaponAttack') + " : " + weapon.name
|
||||
|
||||
return this.displayRollDialog(rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static weaponCheck(actor, event) {
|
||||
const li = $(event.currentTarget).parents(".item")
|
||||
@ -173,55 +179,39 @@ export class BoLRoll {
|
||||
alchemy = duplicate(alchemy)
|
||||
let alchemyData = alchemy.system
|
||||
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
|
||||
}
|
||||
|
||||
let alchemyDef = {
|
||||
mode: "alchemy",
|
||||
actorId: actor.id,
|
||||
img: actor.img,
|
||||
alchemy: alchemy,
|
||||
attribute: actor.system.attributes.mind,
|
||||
attrValue: actor.system.attributes.mind.value,
|
||||
aptValue: 0,
|
||||
adv: "0",
|
||||
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,
|
||||
}
|
||||
let rollData = this.getCommonRollData(actor, "alchemy", actor.system.attributes.mind)
|
||||
|
||||
rollData.alchemy = alchemy
|
||||
rollData.careerBonus = actor.getAlchemistBonus()
|
||||
rollData.pcCost = Number(alchemyData.properties.pccost)
|
||||
rollData.pcCostCurrent = Number(alchemyData.properties.pccurrent)
|
||||
rollData.mod = Number(alchemyData.properties.difficulty)
|
||||
rollData.label = alchemy.name
|
||||
rollData.description = game.i18n.localize('BOL.ui.makeAlchemy') + "+" + alchemy.name
|
||||
|
||||
console.log("ALCHEMY!", alchemyDef);
|
||||
return this.displayRollDialog(alchemyDef);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static spellCheckWithSpell( actor, spell ) {
|
||||
let spellDef = {
|
||||
mode: "spell",
|
||||
actorId: actor.id,
|
||||
img: actor.img,
|
||||
spell: spell,
|
||||
attribute: actor.system.attributes.mind,
|
||||
attrValue: actor.system.attributes.mind.value,
|
||||
aptValue: 0,
|
||||
adv: "0",
|
||||
ppCurrent: Number(actor.system.resources.power.value),
|
||||
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,
|
||||
}
|
||||
let rollData = this.getCommonRollData(actor, "spell", actor.system.attributes.mind)
|
||||
|
||||
rollData.spell = spell
|
||||
rollData.ppCurrent = Number(actor.system.resources.power.value),
|
||||
rollData.careerBonus = actor.getSorcererBonus(),
|
||||
rollData.ppCostArmor = actor.getPPCostArmor(),
|
||||
rollData.ppCost = Number(spell.system.properties.ppcost),
|
||||
rollData.mod = Number(spell.system.properties.difficulty),
|
||||
rollData.label = spell.name,
|
||||
rollData.description = game.i18n.localize('BOL.ui.focusSpell') + " : " + spell.name
|
||||
|
||||
//console.log("SPELL!", spellDef)
|
||||
return this.displayRollDialog(spellDef)
|
||||
return this.displayRollDialog(rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -246,8 +236,29 @@ export class BoLRoll {
|
||||
this.updateArmorMalus(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
|
||||
// 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)
|
||||
// Bonus or Malus ?
|
||||
if (this.rollData.bmDice == 0) {
|
||||
$('#roll-nbdice').val("2")
|
||||
} else {
|
||||
@ -260,7 +271,14 @@ export class BoLRoll {
|
||||
}
|
||||
$('#roll-modifier').val(rollbase + "+" + this.rollData.careerBonus + "+" + this.rollData.mod + "+" +
|
||||
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)
|
||||
this.rollData.attribute = duplicate(actor.system.attributes[attrKey])
|
||||
this.rollData.attrValue = actor.system.attributes[attrKey].value
|
||||
this.rollData.bolApplicableEffects = this.updateApplicableEffects(this.rollData)
|
||||
this.updateTotalDice()
|
||||
})
|
||||
html.find('#apt').change((event) => {
|
||||
@ -344,6 +363,7 @@ export class BoLRoll {
|
||||
let actor = game.actors.get( this.rollData.actorId)
|
||||
this.rollData.aptitude = duplicate(actor.system.aptitudes[aptKey])
|
||||
this.rollData.aptValue = actor.system.aptitudes[aptKey].value
|
||||
this.rollData.bolApplicableEffects = this.updateApplicableEffects(this.rollData)
|
||||
this.updateTotalDice()
|
||||
})
|
||||
|
||||
@ -485,7 +505,7 @@ export class BoLRoll {
|
||||
if ( rollData.weapon && rollData.weapon.system.properties.onlymodifier ) {
|
||||
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
|
||||
rollData.formula = formula
|
||||
rollData.modifiers = modifiers
|
||||
|
@ -260,7 +260,8 @@ BOL.featureSubtypes = {
|
||||
"flaw" : "BOL.featureSubtypes.flaw",
|
||||
"language" : "BOL.featureSubtypes.language",
|
||||
"godsfaith" : "BOL.featureSubtypes.gods",
|
||||
"fightoption" : "BOL.featureSubtypes.fightOption"
|
||||
"fightoption" : "BOL.featureSubtypes.fightOption",
|
||||
"boleffect": "BOL.featureSubtypes.effect",
|
||||
}
|
||||
|
||||
BOL.fightOptionTypes = {
|
||||
@ -310,4 +311,20 @@ BOL.creatureSize = {
|
||||
"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;
|
@ -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/boon-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/race-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/adv-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/flaws-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
4
packs/effets-exemples.db
Normal 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}}
|
13
system.json
13
system.json
@ -14,7 +14,7 @@
|
||||
],
|
||||
"url": "https://www.uberwald.me/gitea/public/bol",
|
||||
"license": "LICENSE.txt",
|
||||
"version": "10.3.3",
|
||||
"version": "10.4.0",
|
||||
"compatibility": {
|
||||
"minimum": "10",
|
||||
"verified": "10",
|
||||
@ -182,6 +182,15 @@
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Effets - Exemples",
|
||||
"type": "Item",
|
||||
"name": "effets-exemples",
|
||||
"path": "packs/effets-exemples.db",
|
||||
"system": "bol",
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"label": "Créatures",
|
||||
"type": "Actor",
|
||||
@ -194,7 +203,7 @@
|
||||
],
|
||||
"socket": true,
|
||||
"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.0.zip",
|
||||
"background": "systems/images/map_lemurie.webp",
|
||||
"gridDistance": 1.5,
|
||||
"gridUnits": "m",
|
||||
|
@ -35,6 +35,8 @@
|
||||
|
||||
{{> "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/mod-roll-part.hbs"}}
|
||||
|
@ -32,6 +32,8 @@
|
||||
|
||||
{{> "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/mod-roll-part.hbs"}}
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
{{> "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/mod-roll-part.hbs"}}
|
||||
|
14
templates/dialogs/effect-roll-part.hbs
Normal file
14
templates/dialogs/effect-roll-part.hbs
Normal 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}}
|
@ -56,6 +56,8 @@
|
||||
|
||||
{{> "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/mod-roll-part.hbs"}}
|
||||
|
@ -24,3 +24,6 @@
|
||||
{{#if (equals item.system.subtype "flaw")}}
|
||||
{{> "systems/bol/templates/item/parts/properties/feature/flaw-properties.hbs"}}
|
||||
{{/if}}
|
||||
{{#if (equals item.system.subtype "boleffect")}}
|
||||
{{> "systems/bol/templates/item/parts/properties/feature/effect-properties.hbs"}}
|
||||
{{/if}}
|
||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user