Compare commits

..

6 Commits

Author SHA1 Message Date
05f09aa3f5 Add dice selection 2023-01-26 20:50:56 +01:00
727db74545 Update sheet 2023-01-23 20:50:48 +01:00
ccb3a458c0 Add pages 2023-01-05 17:00:11 +01:00
1ac9605f08 Fix init creature + minor changes 2023-01-04 09:57:13 +01:00
1bbefd3499 Astrologie ! 2022-12-25 18:00:42 +01:00
bcb377db7a Gestion de l'astrologie 2022-12-23 23:24:09 +01:00
47 changed files with 998 additions and 174 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View File

@ -33,6 +33,7 @@
"BOL.ui.tab.description": "Description",
"BOL.ui.tab.details": "Details",
"BOL.ui.tab.spellalchemy": "Spells & Alchemy",
"BOL.ui.tab.astrologer": "Astrologer",
"BOL.ui.properties": "Properties",
"BOL.ui.description": "Description",
@ -115,6 +116,7 @@
"BOL.ui.isSorcerer": "Is Sorcerer ?",
"BOL.ui.isAlchemist": "Is Alchemist ?",
"BOL.ui.isPriest": "Is Priest/Druid ?",
"BOL.ui.isAstrologer": "Is Astrologer?",
"BOL.ui.circle": "Circle",
"BOL.ui.spells": "Spells",
"BOL.ui.focusSpell": "Cast a spell",

View File

@ -28,7 +28,9 @@
"BOL.resources.power": "Pouvoir",
"BOL.resources.villainy": "Vilénie",
"BOL.resources.alchemypoints": "Points de Creation",
"BOL.resources.astrologypoints": "Points d'Astrologie",
"BOL.traits.xp": "Expérience",
"BOL.ui.tab.stats": "Attributs",
"BOL.ui.tab.combat": "Combat",
"BOL.ui.tab.actions": "Actions",
@ -36,7 +38,19 @@
"BOL.ui.tab.equipment": "Equipement",
"BOL.ui.tab.description": "Description",
"BOL.ui.tab.details": "Details",
"BOL.ui.tab.spellalchemy": "Sorts&Alchimie",
"BOL.ui.tab.spellalchemy": "Mystères",
"BOL.ui.astrologerPoints": "Points d'Astrologie",
"BOL.ui.astrologerPointsLabel": "Points d'Astrologie actuels",
"BOL.ui.ishoroscopemajor": "Horoscope Majeur (ie de groupe) ?",
"BOL.ui.answer": "Réponse",
"BOL.ui.horoscopefavorable": "Favorable (1dB)",
"BOL.ui.horoscopeunfavorable": "Défavorable (1dM)",
"BOL.ui.horoscopes": "Horoscopes",
"BOL.ui.horoscopesBonus": "Horoscopes (Bonus)",
"BOL.ui.horoscopesMalus": "Horoscopes (Malus)",
"BOL.ui.groupHoroscope": "Horoscrope de Groupe de ",
"BOL.ui.properties": "Propriétés",
"BOL.ui.description": "Description",
"BOL.ui.actions": "Actions",
@ -92,8 +106,8 @@
"BOL.ui.success": "Succès",
"BOL.ui.failure": "Échec",
"BOL.ui.fumble": "Échec critique",
"BOL.ui.critical": "Succès critique",
"BOL.ui.criticallegend": "Succès légendaire !",
"BOL.ui.critical": "Succès Héroïque",
"BOL.ui.criticallegend": "Succès Légendaire !",
"BOL.ui.maneuvers": "Actions de combat",
"BOL.ui.stacksize": "Taille de pile (max)",
"BOL.ui.weapons": "Armes",
@ -117,9 +131,11 @@
"BOL.ui.spellkeep": "Prolongation",
"BOL.ui.concentrate": "Concentration",
"BOL.ui.registerInit": "Enregistrer comme Init. de combat",
"BOL.ui.isSorcerer": "Carrière de Sorcier ?",
"BOL.ui.isAlchemist": "Carrière d'Alchimiste ?",
"BOL.ui.isPriest": "Carrière de Prêtre/Druide ?",
"BOL.ui.isAstrologer": "Carrière d'Astrologue?",
"BOL.ui.circle": "Cercle",
"BOL.ui.spells": "Sorts",
"BOL.ui.focusSpell": "Lance un sort",
@ -137,6 +153,21 @@
"BOL.ui.alchemyCostTotal": "Points de Création nécessaires pour la Préparation",
"BOL.ui.alchemyInvest": "Points de Création investis",
"BOL.ui.alchemyCurrent": "Points de Création actuel dans la Préparation",
"BOL.ui.astrology": "Astrologie et Horoscopes",
"BOL.ui.astrologyMinor": "Etablir un Horoscope Mineur",
"BOL.ui.astrologyMajor": "Etablir un Horoscope Majeur",
"BOL.ui.astrologyMajorGroup": "Etablir un Horoscope Majeur de Groupe",
"BOL.ui.makeHoroscope": "Etablir un Horoscope",
"BOL.ui.astrologerRank": "Rang de l'Astrologue",
"BOL.ui.horoscopeCost": "Cout en Points d'Astrologie",
"BOL.ui.minor": "Mineur",
"BOL.ui.major": "Majeur",
"BOL.ui.majorgroup": "Majeur de Groupe",
"BOL.ui.horoscopeGroup": "Horoscopes de Groupe",
"BOL.ui.horoscopeDiceRemaining": "Dés restants",
"BOL.ui.horoscopeDiceMax": "Dés Max",
"BOL.ui.astrologyNoPoints": "Vous n'avez pas assez de Points d'Astrologie!",
"BOL.ui.advance": "Avancement",
"BOL.ui.isbonusdice": "Fourni un dé bonus?",
"BOL.ui.ismalusdice": "Fourni un dé malus?",
@ -209,6 +240,7 @@
"BOL.featureSubtypes.effect": "Effet",
"BOL.featureSubtypes.effects": "Effets",
"BOL.featureSubtypes.boleffect": "Effet",
"BOL.featureSubtypes.horoscope": "Horoscope",
"BOL.fightOptionTypes.armor": "Attaque au défaut d'armure",
"BOL.fightOptionTypes.intrepid": "Attaque intrépide",
@ -480,7 +512,27 @@
"BOL.chat.bougettesuccess": "Votre bougette reste inchangée !",
"BOL.chat.bougettefailure": "Vous avez trop dépensé, votre bougette s'est réduite...",
"BOL.chat.initiative": "Rang d'intiative (10 à 1)",
"BOL.chat.horoscope": "Horoscope",
"BOL.chat.horoscopepoints": "Coût : {points} Points d'Astrologie",
"BOL.chat.horoscopeminorsuccess": "Votre horoscope mineur est un succès : éditez le nom de l'horoscope sur votre fiche. Vous bénéficiez d'1 dé Bonus pour cette situation.",
"BOL.chat.horoscopeminorfailure": "Votre horoscope mineur est un échec : éditez le nom de l'horoscope sur votre fiche. Vous souffrez d'1 dé Malus pour cette situation.",
"BOL.chat.horoscopemajorsuccess": "Votre horoscope majeur est un succès : vous bénéficiez d'1 point d'Héroisme pour cette aventure. Ce point a été ajouté automatiquement.",
"BOL.chat.horoscopemajorfailure": "Votre horoscope majeur est un échec : vous perdez 1 point d'Héroisme pour cette aventure. Ce point a été enlevé automatiquement.",
"BOL.chat.horoscopemajorgroupsuccess": "Votre horoscope majeur de groupe est un succès. Vous et vos amis bénéficiez de {careerBonus} dés bonus pendant cette aventure.",
"BOL.chat.horoscopemajorgroupfailure": "Votre horoscope majeur de groupe est un échec. Vous et vos amis souffrez de {careerBonus} dés malus pendant cette aventure.",
"BOL.chat.usedhoroscope": "Horoscope utilisé",
"BOL.chat.horoscopedeleted": "Le(s) Horoscopes utilisé(s) a/ont été supprimé(s) automatiquement.",
"BOL.chat.criticaloptions": "Succès critique !! Vous pouvez faire (1 option au choix) :",
"BOL.chat.criticalcarnage": "Faire un Carnage : vous avez une attaque gratuite supplémentaire. Cette seconde attaque ne peut bénéficier d'un Point d'Héroisme.",
"BOL.chat.criticalplus6": "Coup Dévastateur : +6 aux dommages (cf bouton ci-dessous).",
"BOL.chat.criticalprecise": "Coup Précis : Vous frappez pour diminuer les capacités de votre adversaire. Décrivez ce que vous faites, et si le MJ l'accepte, votre opposant subira un Dé de Malus pour les actions concernées.",
"BOL.chat.criticalunarm": "Désarmement : Si votre adversaire a une arme en main, vous le désarmez.",
"BOL.chat.criticalrabble": "Massacrer la piétaille : Si vous combattez de la Piétaille, les résultats des dommages indiquent le nombre d'adversaires mis hors de combat.",
"BOL.chat.criticalpush": "Renversement : Si la taille le permet, vous poussez votre adversaire au sol, il souffrira d'1 Dé de Malus pour toutes ses actions au round suivant.",
"BOL.chat.criticalup": "Transformer en Légendaire : En dépensant 1 point d'Héroisme, vous pouvez transformer ce Succès Héroïque en Légendaire, qui vous permet de prendre 2 options dans la liste ci-dessus (cf. bouton pour un +12 aux dommages par exemple).",
"BOL.chat.criticalinfo": "C'est un succès Héroïque ou Légendaire ! Choisissez vos options et effets !",
"BOL.chat.criticalbuttonjournal": "Succès Héroïque/Légendaire",
"BOL.dialog.soeasy": "Inmanquable (+4)",
"BOL.dialog.veryeasy": "Trés Facile (+2)",
"BOL.dialog.easy": "Facile (+1)",

View File

@ -136,6 +136,7 @@ export class BoLActorSheet extends ActorSheet {
formData.treasure = this.actor.treasure
formData.boleffects = this.actor.boleffects
formData.alchemyrecipe = this.actor.alchemyrecipe
formData.horoscopes = this.actor.horoscopes
formData.vehicles = this.actor.vehicles
formData.fightoptions = this.actor.fightoptions
formData.ammos = this.actor.ammos
@ -152,11 +153,14 @@ export class BoLActorSheet extends ActorSheet {
formData.bougette = this.actor.getBougette()
formData.charType = this.actor.getCharType()
formData.villainy = this.actor.getVillainy()
formData.biography = await TextEditor.enrichHTML(this.object.system.details.biography, {async: true})
formData.notes = await TextEditor.enrichHTML(this.object.system.details.notes, {async: true})
formData.biography = await TextEditor.enrichHTML(this.object.system.details?.biography || "", {async: true})
formData.notes = await TextEditor.enrichHTML(this.object.system.details.notes || "", {async: true})
formData.isSorcerer = this.actor.isSorcerer()
formData.isAlchemist = this.actor.isAlchemist()
formData.isAstrologer = this.actor.isAstrologer()
formData.isMysteries = formData.isSorcerer || formData.isAlchemist || formData.isAstrologer
formData.isPriest = this.actor.isPriest()
formData.horoscopeGroupList = game.settings.get("bol", "horoscope-group")
formData.isGM = game.user.isGM
@ -244,7 +248,16 @@ export class BoLActorSheet extends ActorSheet {
case "careerxp":
this.actor.incCareerXP( li.data("item-id"))
break;
case "horoscope-minor":
BoLRoll.horoscopeCheck(this.actor, event, "minor")
break
case "horoscope-major":
BoLRoll.horoscopeCheck(this.actor, event, "major")
break
case "horoscope-major-group":
BoLRoll.horoscopeCheck(this.actor, event, "majorgroup")
break
default: break;
}
}

View File

@ -25,7 +25,7 @@ export class BoLActor extends Actor {
/* -------------------------------------------- */
getCharType() {
if (this.type === 'character') {
return 'player'
return "player"
}
return this.system.chartype
}
@ -249,6 +249,9 @@ export class BoLActor extends Actor {
get boleffects() {
return this.items.filter(i => i.type === "feature" && i.system.subtype === "boleffect")
}
get horoscopes() {
return this.items.filter(i => i.type === "feature" && i.system.subtype === "horoscope")
}
get boons() {
return duplicate(this.items.filter(i => i.type === "feature" && i.system.subtype === "boon") || []);
}
@ -354,6 +357,11 @@ export class BoLActor extends Actor {
return true
return false
}
isAstrologer() {
if (this.careers.find(item => item.system.properties.astrologer == true))
return true
return false
}
isPriest() {
if (this.careers.find(item => item.system.properties.priest == true))
return true
@ -424,6 +432,80 @@ export class BoLActor extends Actor {
this.updateEmbeddedDocuments('Item', [{ _id: alchemy.id, 'system.properties.pccurrent': 0 }])
}
}
/*-------------------------------------------- */
spentAstrologyPoints(points) {
let astrology = duplicate(this.system.resources.astrologypoints)
astrology.value -= points
astrology.value = Math.max(astrology.value,0)
this.update( { 'system.resources.astrologypoints': astrology} )
}
/*-------------------------------------------- */
getHoroscopesBonus() {
let astro = this.items.filter(it => it.type == "feature" && it.system.subtype == "horoscope" && !it.system.properties.ishoroscopemajor
&& it.system.properties.horoscopeanswer == "favorable")
return astro
}
/*-------------------------------------------- */
getHoroscopesMalus() {
let astro = this.items.filter(it => it.type == "feature" && it.system.subtype == "horoscope" && !it.system.properties.ishoroscopemajor
&& it.system.properties.horoscopeanswer == "unfavorable")
return astro
}
/*-------------------------------------------- */
manageHoroscope(rollData) {
//Spent points
this.spentAstrologyPoints(rollData.astrologyPointsCost)
if ( rollData.horoscopeType == "minor") {
let horoscope = { name: "SITUATION A SPECIFIER", type :"feature",
img: "icons/magic/perception/eye-ringed-glow-angry-large-red.webp",
system :{subtype: "horoscope", properties: {
ishoroscopemajor: false,
horoscopeanswer: (rollData.isSuccess) ? "favorable": "unfavorable",
rank: rollData.careerBonus
}
}
}
this.createEmbeddedDocuments('Item', [horoscope])
}
if ( rollData.horoscopeType == "major" ) {
if ( rollData.isSuccess) {
this.subHeroPoints(1)
} else {
this.addHeroPoints(1)
}
}
if ( rollData.horoscopeType == "majorgroup" ) {
let rID = randomID(16)
let horoscopes = duplicate(game.settings.get("bol", "horoscope-group"))
horoscopes[rID] = {
id: rID,
name: game.i18n.localize("BOL.ui.groupHoroscope") + this.name,
maxDice: rollData.careerBonus,
availableDice: rollData.careerBonus,
type: (rollData.isSuccess) ? "bonus": "malus"
}
game.settings.set("bol", "horoscope-group", horoscopes)
}
}
/*-------------------------------------------- */
getAstrologyPoints() {
return this.system.resources.astrologypoints.value
}
/*-------------------------------------------- */
removeHoroscopeMinor( rollData) {
let toDel = []
for(let horo of rollData.selectedHoroscope) {
toDel.push( horo._id )
}
if (toDel.length > 0) {
this.deleteEmbeddedDocuments('Item', toDel)
}
}
/*-------------------------------------------- */
async spendAlchemyPoint(alchemyId, pcCost) {
@ -441,7 +523,14 @@ export class BoLActor extends Actor {
}
}
}
/*-------------------------------------------- */
getAstrologerBonus() {
let astrologer = this.careers.find(item => item.system.properties.astrologer == true)
if (astrologer) {
return astrologer.system.rank
}
return 0;
}
/*-------------------------------------------- */
getAlchemistBonus() {
let sorcerer = this.careers.find(item => item.system.properties.alchemist == true)
@ -667,6 +756,14 @@ export class BoLActor extends Actor {
this.unsetFlag("world", "last-initiative" )
}
/*-------------------------------------------- */
getSize() {
if (this.system.details.size.length > 0 && game.bol.config.creatureSize[this.system.details.size]) {
return game.bol.config.creatureSize[this.system.details.size].order
}
return game.bol.config.creatureSize["medium"].order // Medium size per default
}
/*-------------------------------------------- */
getInitiativeRank(rollData = undefined, isCombat = false) {
if (!rollData) {
@ -698,6 +795,17 @@ export class BoLActor extends Actor {
if ( this.getCharType() == 'tough') {
fvttInit = 6
}
if ( this.getCharType() == 'creature') {
let mySize = this.getSize()
let sizeSmall = game.bol.config.creatureSize["small"].order
let sizeMedium = game.bol.config.creatureSize["medium"].order
if ( mySize >= sizeSmall && mySize <= sizeMedium) {
fvttInit = 6
}
if ( mySize > sizeMedium) {
fvttInit = 7
}
}
return fvttInit
}
@ -707,6 +815,12 @@ export class BoLActor extends Actor {
newHeroP = (newHeroP < 0) ? 0 : newHeroP;
await this.update({ 'system.resources.hero.value': newHeroP });
}
/*-------------------------------------------- */
async addHeroPoints(nb) {
let newHeroP = this.system.resources.hero.value + nb;
newHeroP = (newHeroP < 0) ? 0 : newHeroP;
await this.update({ 'system.resources.hero.value': newHeroP });
}
/*-------------------------------------------- */
async sufferDamage(damage) {

View File

@ -18,20 +18,33 @@ export class BoLRoll {
/* -------------------------------------------- */
static updateApplicableEffects(rollData) {
let appEffects = []
for( let effect of rollData.bolEffects) {
if(effect.system.properties.identifier =="always") {
appEffects.push(effect)
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)
appEffects.push(effect)
} else if (rollData.aptitude && effect.system.properties.identifier.includes(rollData.aptitude.key)) {
appEffects.push(effect)
}
}
return appEffects
}
/* -------------------------------------------- */
static getCommonRollData(actor, mode, attribute, aptitude = undefined ) {
static buildHoroscopeGroupList() {
let horoscopes = game.settings.get("bol", "horoscope-group")
let horoList = [ { id: -1, name: "Aucun", type: "malus", nbDice: 0 }]
for (let id in horoscopes) {
let horo = horoscopes[id]
for (let i=0; i<horo.availableDice; i++) {
horoList.push( { id: id, name: horo.name, type: horo.type, nbDice: i+1})
}
}
return horoList
}
/* -------------------------------------------- */
static getCommonRollData(actor, mode, attribute, aptitude = undefined) {
let rollData = {
mode: mode,
@ -42,13 +55,19 @@ export class BoLRoll {
attrValue: attribute.value,
aptValue: 0,
careerBonus: 0,
horoscopeBonus: 0,
horoscopeMalus: 0,
selectedHoroscope: [],
armorAgiMalus: actor.getArmorAgiMalus(),
armorInitMalus: actor.getArmorInitMalus(),
horoscopeBonusList: actor.getHoroscopesBonus(),
horoscopeMalusList: actor.getHoroscopesMalus(),
adv: "0",
mod: 0,
modRanged: 0,
aptValue: 0,
bolEffects: actor.boleffects
bolEffects: actor.boleffects,
horoscopeGroupList: this.buildHoroscopeGroupList()
}
if (aptitude) {
rollData.aptitude = aptitude
@ -62,7 +81,7 @@ export class BoLRoll {
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
@ -83,31 +102,31 @@ export class BoLRoll {
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)
return this.displayRollDialog(rollData)
}
/* -------------------------------------------- */
static async detectDistance( weapon, target ) {
static async detectDistance(weapon, target) {
let visible, dist
if (weapon.system.properties.ranged || weapon.system.properties.throwing) {
if (target && (weapon.system.properties.ranged || weapon.system.properties.throwing)) {
console.log("target", target, weapon)
visible = canvas.effects.visibility.testVisibility(target.center, { object: _token })
dist = Number(canvas.grid.measureDistances([{ ray: new Ray(_token.center, target.center) }], { gridSpaces: false })).toFixed(2)
let range = Number(weapon.system.properties.range)
let rangeMsg = "BOL.chat.rangeout"
if ( dist <= range) {
if (dist <= range) {
rangeMsg = "BOL.chat.range0"
} else if (dist < range*2) {
} else if (dist < range * 2) {
rangeMsg = "BOL.chat.range1"
} else if (dist < range*3) {
} else if (dist < range * 3) {
rangeMsg = "BOL.chat.range2"
} else if (dist < range*4) {
} else if (dist < range * 4) {
rangeMsg = "BOL.chat.range3"
} else if (dist < range*5) {
} else if (dist < range * 5) {
rangeMsg = "BOL.chat.range4"
} else if (dist < range*6) {
} else if (dist < range * 6) {
rangeMsg = "BOL.chat.range5"
} else if (dist < range*7) {
} else if (dist < range * 7) {
rangeMsg = "BOL.chat.range6"
}
ChatMessage.create({
@ -121,7 +140,7 @@ export class BoLRoll {
rangeMsg: rangeMsg
})
})
}
}
}
/* -------------------------------------------- */
@ -136,7 +155,7 @@ export class BoLRoll {
let rollData = this.getCommonRollData(actor, "weapon", attribute, aptitude)
// Compute distance
this.detectDistance( weapon, target)
this.detectDistance(weapon, target)
// Manage specific case
let fightOption = actor.getActiveFightOption()
@ -144,14 +163,14 @@ export class BoLRoll {
ui.notifications.warn(`{{actor.name}} est en Défense Totale ! Il ne peut pas attaquer ce round.`)
return
}
// Update the roll structure
rollData.weapon = weapon
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.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)
@ -194,23 +213,43 @@ export class BoLRoll {
rollData.label = alchemy.name
rollData.description = game.i18n.localize('BOL.ui.makeAlchemy') + "+" + alchemy.name
console.log("ALCHEMY!", alchemyDef);
return this.displayRollDialog(alchemyDef);
console.log("ALCHEMY!", rollData);
return this.displayRollDialog(rollData);
}
/* -------------------------------------------- */
static spellCheckWithSpell( actor, spell ) {
static horoscopeCheck(actor, event, horoscopeType) {
let cost = (horoscopeType == "minor") ? 1 : 2
if (cost > actor.getAstrologyPoints() ) {
ui.notifications.warn(game.i18n.localize("BOL.ui.astrologyNoPoints"))
return
}
let rollData = this.getCommonRollData(actor, "horoscope", actor.system.attributes.mind)
rollData.careerBonus = actor.getAstrologerBonus()
rollData.horoscopeType = horoscopeType
rollData.horoscopeTypeLabel = "BOL.ui."+horoscopeType
rollData.astrologyPointsCost = cost
rollData.label = game.i18n.localize('BOL.ui.makeHoroscope')
rollData.description = game.i18n.localize('BOL.ui.makeHoroscope') + " " + game.i18n.localize(rollData.horoscopeTypeLabel)
console.log("HOROSCOPE!", rollData);
return this.displayRollDialog(rollData);
}
/* -------------------------------------------- */
static spellCheckWithSpell(actor, spell) {
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
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(rollData)
}
@ -228,7 +267,7 @@ export class BoLRoll {
return
}
spell = duplicate(spell)
return this.spellCheckWithSpell( actor, spell)
return this.spellCheckWithSpell(actor, spell)
}
/* -------------------------------------------- */
@ -245,15 +284,21 @@ export class BoLRoll {
if (effect.system.properties.modifier == "1B") {
this.rollData.bmDice++;
} else if (effect.system.properties.modifier == "1B") {
this.rollData.bmDice+=2;
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 if (effect.system.properties.modifier == "2M") {
this.rollData.bmDice -= 2;
} else {
effectModifier += Number(effect.system.properties.modifier)
}
}
this.rollData.bmDice += this.rollData.horoscopeBonus
this.rollData.bmDice -= this.rollData.horoscopeMalus
if ( this.rollData.selectedGroupHoroscopeIndex && this.rollData.selectedGroupHoroscopeIndex > 0) {
let horo = this.rollData.horoscopeGroupList[this.rollData.selectedGroupHoroscopeIndex]
this.rollData.bmDice += (horo.type == "malus") ? -horo.nbDice : horo.nbDice;
}
// Keep track of the final effect modifier
this.rollData.effectModifier = effectModifier
@ -267,7 +312,7 @@ export class BoLRoll {
$('#roll-nbdice').val("2 + " + String(Math.abs(this.rollData.bmDice)) + letter)
}
let rollbase = this.rollData.attrValue + "+" + this.rollData.aptValue
if ( this.rollData.weapon && this.rollData.weapon.system.properties.onlymodifier ) {
if (this.rollData.weapon && this.rollData.weapon.system.properties.onlymodifier) {
rollbase = ""
}
$('#roll-modifier').val(rollbase + "+" + this.rollData.careerBonus + "+" + this.rollData.mod + "+" +
@ -276,7 +321,7 @@ export class BoLRoll {
// Rebuild lits of applicable effects
let selectEffects = ""
for(let effect of this.rollData.bolApplicableEffects) {
for (let effect of this.rollData.bolApplicableEffects) {
selectEffects += `<option value="${effect.id}" selected>${effect.name}</option>`
}
$('#applicable-effects').html(selectEffects)
@ -339,7 +384,7 @@ export class BoLRoll {
html.find('#optcond').change((event) => { // Dynamic change of PP cost of spell
let pp = BoLUtility.computeSpellCost(this.rollData.spell, event.currentTarget.selectedOptions.length)
this.rollData.ppCost = pp
this.updatePPCost( this.rollData)
this.updatePPCost(this.rollData)
})
html.find('#mod').change((event) => {
@ -401,6 +446,31 @@ export class BoLRoll {
this.rollData.mDice = Number(event.currentTarget.value)
this.updateTotalDice()
})
html.find('#horoscope-bonus-applied').change((event) => {
this.rollData.selectedHoroscope = []
for (let option of event.currentTarget.selectedOptions) {
this.rollData.selectedHoroscope.push( duplicate(this.rollData.horoscopeBonusList[Number(option.index)]) )
}
let horoscopes = $('#horoscope-bonus-applied').val()
this.rollData.horoscopeBonus = (!horoscopes || horoscopes.length == 0) ? 0 : horoscopes.length
this.updateTotalDice()
})
html.find('#horoscope-malus-applied').change((event) => {
this.rollData.selectedHoroscope = []
for (let option of event.currentTarget.selectedOptions) {
this.rollData.selectedHoroscope.push( duplicate(this.rollData.horoscopeBonusList[Number(option.index)]) )
}
let horoscopes = $('#horoscope-malus-applied').val()
this.rollData.horoscopeMalus = (!horoscopes || horoscopes.length == 0) ? 0 : horoscopes.length
this.updateTotalDice()
})
html.find('#horoscope-group-applied').change((event) => {
this.rollData.selectedGroupHoroscopeIndex = event.currentTarget.value
this.updateTotalDice()
})
}
/* -------------------------------------------- */
@ -408,7 +478,7 @@ export class BoLRoll {
if (rollData.mode == "weapon") {
rollData.weaponModifier = rollData.weapon.system.properties.attackModifiers ?? 0
rollData.attackBonusDice = rollData.weapon.system.properties.attackBonusDice
if ( rollData.attackBonusDice) {
if (rollData.attackBonusDice) {
rollData.adv = "1B"
rollData.bDice = 1
}
@ -435,7 +505,7 @@ export class BoLRoll {
let actor = BoLUtility.getActorFromRollData(rollData)
let defender
if ( rollData.targetId) {
if (rollData.targetId) {
let token = game.scenes.current.tokens.get(rollData.targetId)
defender = token.actor
}
@ -498,16 +568,18 @@ export class BoLRoll {
//console.log("ROLLMALUS", rollData)
rollData.registerInit = (rollData.aptitude && rollData.aptitude.key == 'init') ? $('#register-init').is(":checked") : false;
const isMalus = (rollData.bmDice < 0)
const isMalus = (rollData.bmDice < 0)
//rollData.nbDice += (rollData.attackBonusDice) ? 1 : 0
let rollbase = rollData.attrValue + rollData.aptValue
if ( rollData.weapon && rollData.weapon.system.properties.onlymodifier ) {
if (rollData.weapon && rollData.weapon.system.properties.onlymodifier) {
rollbase = 0
}
}
let diceData = BoLUtility.getDiceData()
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 + "d" + diceData.diceFormula + "kl2 + " + modifiers : rollData.nbDice + "d" + diceData.diceFormula + "kh2 + " + modifiers
rollData.formula = formula
rollData.modifiers = modifiers
@ -535,10 +607,10 @@ export class BoLDefaultRoll {
this.rollData.isFumble = false;
}
if (this.rollData.optionsId) {
BoLUtility.cleanupButtons( this.rollData.optionsId)
BoLUtility.cleanupButtons(this.rollData.optionsId)
}
if (this.rollData.applyId) {
BoLUtility.cleanupButtons( this.rollData.applyId)
BoLUtility.cleanupButtons(this.rollData.applyId)
}
this.rollData.optionsId = randomID(16)
this.rollData.applyId = randomID(16)
@ -550,25 +622,24 @@ export class BoLDefaultRoll {
const r = new Roll(this.rollData.formula)
//console.log("Roll formula", this.rollData.formula)
await r.roll({ "async": false })
let diceData = BoLUtility.getDiceData()
console.log("DICEDATA", diceData)
const activeDice = r.terms[0].results.filter(r => r.active)
const diceTotal = activeDice.map(r => r.result).reduce((a, b) => a + b)
this.rollData.roll = r
this.rollData.isSuccess = (r.total >= 9)
this.rollData.isCritical = (diceTotal === 12)
this.rollData.isRealCritical = (diceTotal === 12)
this.rollData.isHeroic = (diceTotal === 12)
this.rollData.isSuccess = (r.total >= diceData.successValue)
this.rollData.isCritical = (diceTotal >= diceData.criticalSuccessValue)
this.rollData.isRealCritical = (diceTotal >= diceData.criticalSuccessValue)
this.rollData.isHeroic = (diceTotal >= diceData.criticalSuccessValue)
this.rollData.isLegendary = false
this.rollData.isFumble = (diceTotal === 2)
this.rollData.isFumble = (diceTotal <= diceData.criticalFailureValue)
this.rollData.isFailure = !this.rollData.isSuccess
//this.rollData.isRealCritical = true
//this.rollData.isFumble = true
let actor = BoLUtility.getActorFromRollData(this.rollData)
if (this.rollData.reroll == undefined) {
this.rollData.reroll = actor.heroReroll()
}
if (this.rollData.registerInit) {
actor.registerInit(this.rollData)
this.rollData.initiativeRank = actor.getInitiativeRank(this.rollData)
@ -576,20 +647,31 @@ export class BoLDefaultRoll {
if (this.rollData.isSuccess && this.rollData.mode == "spell") { // PP cost management
this.rollData.remainingPP = actor.spendPowerPoint(this.rollData.ppCost + this.rollData.ppCostArmor)
}
if (this.rollData.mode == "alchemy") { // PP cost management
actor.resetAlchemyStatus(this.rollData.alchemy._id)
}
if ( this.rollData.mode == "bougette" && this.rollData.isFailure) {
if (this.rollData.mode == "bougette" && this.rollData.isFailure) {
actor.decBougette()
}
await this.sendChatMessage()
if (this.rollData.mode == "horoscope") { // PP cost management
actor.manageHoroscope(this.rollData)
}
if (this.rollData.selectedHoroscope.length > 0) { // PP cost management
actor.removeHoroscopeMinor(this.rollData)
}
if (this.rollData.selectedGroupHoroscopeIndex && this.rollData.selectedGroupHoroscopeIndex > 0) { // PP cost management
BoLUtility.removeGroupHoroscope(this.rollData)
}
}
/* -------------------------------------------- */
async sendChatMessage() {
let actor = BoLUtility.getActorFromRollData(this.rollData)
this._buildChatMessage(this.rollData).then( async msgFlavor => {
this._buildChatMessage(this.rollData).then(async msgFlavor => {
let msg = await this.rollData.roll.toMessage({
user: game.user.id,
rollMode: game.settings.get("core", "rollMode"),
@ -604,12 +686,15 @@ export class BoLDefaultRoll {
/* -------------------------------------------- */
upgradeToLegendary() {
// Force to Critical roll
let diceData = BoLUtility.getDiceData()
let maxValue = Number(diceData.diceFormula) * 2
this.rollData.isCritical = true
this.rollData.isLegendary = true
this.rollData.isRealCritical = false
this.rollData.isSuccess = true
this.rollData.isFailure = false
this.rollData.roll = new Roll("12+" + this.rollData.modifiers)
this.rollData.roll = new Roll(maxValue + "+" + this.rollData.modifiers)
this.rollData.reroll = false
this.sendChatMessage()
}
@ -617,17 +702,20 @@ export class BoLDefaultRoll {
/* -------------------------------------------- */
upgradeToHeroic() {
// Force to Critical roll
let diceData = BoLUtility.getDiceData()
let maxValue = Number(diceData.diceFormula) * 2
this.rollData.isCritical = true
this.rollData.isHeroic = true
this.rollData.isLegendary = false
this.rollData.isRealCritical = false
this.rollData.isSuccess = true
this.rollData.isFailure = false
this.rollData.roll = new Roll("12+" + this.rollData.modifiers)
this.rollData.roll = new Roll(maxValue + "+" + this.rollData.modifiers)
this.rollData.reroll = false
this.sendChatMessage()
}
/* -------------------------------------------- */
setSuccess(flag) {
this.rollData.isSuccess = flag
@ -651,7 +739,7 @@ export class BoLDefaultRoll {
/* -------------------------------------------- */
getDamageAttributeValue(attrDamage, actorId = undefined) {
let actor = BoLUtility.getActorFromRollData(this.rollData)
return actor.getDamageAttributeValue( attrDamage )
return actor.getDamageAttributeValue(attrDamage)
}
/* -------------------------------------------- */

View File

@ -9,6 +9,12 @@ export class BoLCharacterSummary extends Application {
static displayPCSummary(){
game.bol.charSummary.render(true)
}
/* -------------------------------------------- */
updatePCSummary(){
if ( this.rendered) {
this.render(true)
}
}
/* -------------------------------------------- */
static createSummaryPos() {
@ -60,6 +66,7 @@ export class BoLCharacterSummary extends Application {
}
}
formData.config = game.bol.config
formData.horoscopeGroupList = game.settings.get("bol", "horoscope-group")
if ( toUpdate ) {
this.settings.npcList = newList
@ -123,6 +130,33 @@ export class BoLCharacterSummary extends Application {
game.bol.charSummary.updateNPC()
})
}
html.find('#horoscope-group-edit-available').change(event => {
const horoId = $(event.currentTarget).data("horo-id")
let newValue = event.currentTarget.value
let horoscopes = duplicate(game.settings.get("bol", "horoscope-group"))
if ( horoId && horoscopes[horoId]) {
horoscopes[horoId].availableDice = Number(newValue)
if (newValue <= 0) {
horoscopes[horoId] = undefined
}
game.settings.set("bol", "horoscope-group", horoscopes)
setTimeout(function() { BoLUtility.updateSheets()}, 800 )
}
})
html.find('#horoscope-group-edit-max').change(event => {
const horoId = $(event.currentTarget).data("horo-id")
let newValue = event.currentTarget.value
let horoscopes = duplicate(game.settings.get("bol", "horoscope-group"))
if ( horoId && horoscopes[horoId]) {
horoscopes[horoId].maxDice = Number(newValue)
if (newValue <= 0) {
horoscopes[horoId] = undefined
}
game.settings.set("bol", "horoscope-group", horoscopes)
setTimeout(function() { BoLUtility.updateSheets()}, 800 )
}
})
}
}

View File

@ -35,7 +35,7 @@ export class BoLCombatManager extends Combat {
nextRound() {
let combatants = this.combatants.contents
for (let c of combatants) {
let actor = game.actors.get( c.data.actorId )
let actor = game.actors.get( c.actorId )
actor.clearRoundModifiers()
}
super.nextRound()
@ -45,7 +45,7 @@ export class BoLCombatManager extends Combat {
_onDelete() {
let combatants = this.combatants.contents
for (let c of combatants) {
let actor = game.actors.get(c.data.actorId)
let actor = game.actors.get(c.actorId)
actor.clearInitiative()
}
super._onDelete()

View File

@ -28,11 +28,71 @@ export class BoLUtility {
type: Boolean,
onChange: lang => window.location.reload()
})
game.settings.register("bol", "dice-formula", {
name: "Formule de dés",
hint: "Sélectionne la formule de dés (par défaut 2d6)",
scope: "world",
config: true,
default: "2d6",
type: String,
choices: { "6": "2d6", "8":"2d8", "10":"2d10", "12":"2d12", "20":"2d20"},
onChange: value => {
BoLUtility.setDiceFormula(value)
}
})
game.settings.register("bol", "dice-success-value", {
name: "Seuil de succès",
hint: "Sélectionne le seuil de succès (9 par défaut pour 2d6)",
scope: "world",
config: true,
default: 9,
range: {
min: 2,
max: 40,
step: 1
},
type: Number,
onChange: value => {
BoLUtility.setSuccessValue(value)
}
})
game.settings.register("bol", "dice-critical-success-value", {
name: "Valeur min de réussite critique",
hint: "Indique le seuil minimum de réussite critique (12 par défaut pour 2d6). Si les réussites critiques sont sur 19 et 20, alors indiquez 19.",
scope: "world",
config: true,
default: 12,
range: {
min: 2,
max: 40,
step: 1
},
type: Number,
onChange: value => {
BoLUtility.setCriticalSuccessValue(value)
}
})
game.settings.register("bol", "dice-critical-failure-value", {
name: "Valeur max d'échec critique",
hint: "Indique le seuil maximum d'échec critique (2 par défaut pour 2d6). Si les échecs critiques sont sur 2 et 3, alors indiquez 3.",
scope: "world",
config: true,
default: 2,
range: {
min: 2,
max: 40,
step: 1
},
type: Number,
onChange: value => {
BoLUtility.setCriticalFailureValue(value)
}
})
game.settings.register("world", "character-summary-data", {
name: "character-summary-data",
scope: "world",
config: false,
default: { npcList : [], x: 200, y: 200},
default: { npcList: [], x: 200, y: 200 },
type: Object
})
game.settings.register("bol", "logoActorSheet", {
@ -53,13 +113,46 @@ export class BoLUtility {
type: String,
onChange: lang => window.location.reload()
})
game.settings.register("bol", "horoscope-group", {
name: "horoscope-group",
scope: "world",
config: false,
default: {},
type: Object
})
this.rollArmor = game.settings.get("bol", "rollArmor") // Roll armor or not
this.useBougette = game.settings.get("bol", "useBougette") // Use optionnal bougette rules
this.actorSheetLogo = game.settings.get("bol", "logoActorSheet") || "/systems/bol/ui/logo.webp"
this.logoTopLeft = game.settings.get("bol", "logoTopLeft") || "/systems/bol/ui/logo2.webp"
this.diceFormula = game.settings.get("bol", "dice-formula")
this.successValue = Number(game.settings.get("bol", "dice-success-value"))
this.criticalSuccessValue = Number(game.settings.get("bol", "dice-critical-success-value"))
this.criticalFailureValue = Number(game.settings.get("bol", "dice-critical-failure-value"))
}
/* -------------------------------------------- */
static setDiceFormula(value) {
this.diceFormula = value
}
static setSuccessValue(value) {
this.successValue = Number(value)
}
static setCriticalSuccessValue(value) {
this.criticalSuccessValue = Number(value)
}
static setCriticalFailureValue(value) {
this.criticalFailureValue = Number(value)
}
static getDiceData() {
return {
diceFormula: this.diceFormula,
successValue : this.successValue,
criticalSuccessValue: this.criticalSuccessValue,
criticalFailureValue: this.criticalFailureValue
}
}
/* -------------------------------------------- */
static getRollArmor() {
return this.rollArmor
@ -77,8 +170,8 @@ export class BoLUtility {
return this.logoTopLeft
}
/* -------------------------------------------- */
static getActorFromRollData(rollData) {
let actor = game.actors.get( rollData.actorId)
static getActorFromRollData(rollData) {
let actor = game.actors.get(rollData.actorId)
if (rollData.tokenId) {
let token = canvas.tokens.placeables.find(t => t.id == rollData.tokenId)
if (token) {
@ -178,7 +271,7 @@ export class BoLUtility {
static getOtherWhisperRecipients(name) {
let users = []
for (let user of game.users) {
if ( !user.isGM && user.name != name) {
if (!user.isGM && user.name != name) {
users.push(user.id)
}
}
@ -578,5 +671,29 @@ export class BoLUtility {
return item
}
/* -------------------------------------------- */
static updateSheets() {
// Then force opened actor refresh if needed
for (let actor of game.actors) {
if (actor.sheet.rendered) {
actor.sheet.render()
}
}
game.bol.charSummary.updatePCSummary() // Refresh if needed
}
/* -------------------------------------------- */
static removeGroupHoroscope(rollData) {
let horo = rollData.horoscopeGroupList[rollData.selectedGroupHoroscopeIndex]
let horoscopes = duplicate(game.settings.get("bol", "horoscope-group"))
let toChange = duplicate(horoscopes[horo.id])
toChange.availableDice -= horo.nbDice // Remove the dice
if (toChange.availableDice <= 0) {
horoscopes[horo.id] = undefined
} else {
horoscopes[horo.id] = toChange
}
game.settings.set("bol", "horoscope-group", horoscopes)
this.updateSheets()
}
}

View File

@ -270,6 +270,7 @@ BOL.featureSubtypes = {
"godsfaith" : "BOL.featureSubtypes.gods",
"fightoption" : "BOL.featureSubtypes.fightOption",
"boleffect": "BOL.featureSubtypes.effect",
"horoscope": "BOL.featureSubtypes.horoscope",
}
BOL.fightOptionTypes = {
@ -312,18 +313,23 @@ BOL.bougetteDice = {
}
BOL.creatureSize = {
"tiny": "BOL.size.tiny",
"verysmall": "BOL.size.verysmall",
"small": "BOL.size.small",
"medium": "BOL.size.medium",
"large": "BOL.size.large",
"verylarge": "BOL.size.verylarge",
"huge": "BOL.size.huge",
"massive": "BOL.size.massive",
"enormous": "BOL.size.enormous",
"gigantic": "BOL.size.gigantic",
"immense": "BOL.size.immense",
"colossal": "BOL.size.colossal"
"tiny": {order: 1, label: "BOL.size.tiny"},
"verysmall": {order: 2, label: "BOL.size.verysmall"},
"small": {order: 3, label: "BOL.size.small"},
"medium": {order: 4, label: "BOL.size.medium"},
"large": {order: 5, label: "BOL.size.large"},
"verylarge": {order: 6, label: "BOL.size.verylarge"},
"huge": {order: 7, label: "BOL.size.huge"},
"massive": {order: 8, label: "BOL.size.massive"},
"enormous": {order: 9, label: "BOL.size.enormous"},
"gigantic": {order: 10, label: "BOL.size.gigantic"},
"immense": {order: 11, label: "BOL.size.immense"},
"colossal": {order: 12, label: "BOL.size.colossal"}
}
BOL.horoscopeAnswer = {
"favorable": "BOL.ui.horoscopefavorable",
"unfavorable": "BOL.ui.horoscopeunfavorable",
}
BOL.bolEffectModifier = {

View File

@ -76,6 +76,10 @@ export const registerHandlebarsHelpers = function () {
Handlebars.registerHelper('count', function (list) {
return list.length;
})
Handlebars.registerHelper('countKeys', function (obj) {
return Object.keys(obj).length;
})
Handlebars.registerHelper('isEnabled', function (configKey) {
return game.settings.get("bol", configKey);
})
@ -129,7 +133,14 @@ export const registerHandlebarsHelpers = function () {
}
return false
})
Handlebars.registerHelper('upperFirst', function (text) {
if (typeof text !== 'string') return text
return text.charAt(0).toUpperCase() + text.slice(1)
})
Handlebars.registerHelper('upperFirstOnly', function (text) {
if (typeof text !== 'string') return text
return text.charAt(0).toUpperCase()
})
}

View File

@ -16,6 +16,7 @@ export const preloadHandlebarsTemplates = async function () {
"systems/bol/templates/actor/parts/tabs/actor-equipment.hbs",
"systems/bol/templates/actor/parts/tabs/actor-spellalchemy.hbs",
"systems/bol/templates/actor/parts/tabs/actor-biodata.hbs",
"systems/bol/templates/actor/parts/tabs/actor-horoscope-group.hbs",
"systems/bol/templates/actor/parts/tabs/creature-stats.hbs",
"systems/bol/templates/actor/parts/tabs/creature-actions.hbs",
"systems/bol/templates/actor/parts/tabs/vehicle-stats.hbs",
@ -41,11 +42,14 @@ export const preloadHandlebarsTemplates = async function () {
"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/item/weapon-vehicle-properties.hbs",
"systems/bol/templates/item/parts/properties/feature/horoscope-properties.hbs",
// DIALOGS
"systems/bol/templates/chat/rolls/attack-damage-card.hbs",
"systems/bol/templates/chat/rolls/spell-roll-card.hbs",
"systems/bol/templates/chat/rolls/alchemy-roll-card.hbs",
"systems/bol/templates/chat/rolls/selected-horoscope-roll-card.hbs",
"systems/bol/templates/chat/rolls/horoscope-roll-card.hbs",
"systems/bol/templates/dialogs/aptitude-roll-part.hbs",
"systems/bol/templates/dialogs/attribute-roll-part.hbs",
"systems/bol/templates/dialogs/mod-roll-part.hbs",
@ -56,6 +60,7 @@ export const preloadHandlebarsTemplates = async function () {
"systems/bol/templates/dialogs/flaws-roll-part.hbs",
"systems/bol/templates/dialogs/total-roll-part.hbs",
"systems/bol/templates/dialogs/fightoptions-roll-part.hbs",
"systems/bol/templates/dialogs/horoscope-roll-part.hbs"
];
// Load the template parts

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -14,11 +14,10 @@
],
"url": "https://www.uberwald.me/gitea/public/bol",
"license": "LICENSE.txt",
"version": "10.4.13",
"version": "10.5.3",
"compatibility": {
"minimum": "10",
"verified": "10",
"maximum": "10"
"verified": "10"
},
"esmodules": [
"module/bol.js"
@ -203,10 +202,10 @@
],
"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.4.13.zip",
"download": "https://www.uberwald.me/gitea/public/bol/archive/bol-v10.5.3.zip",
"background": "systems/bol/ui/page_accueil.webp",
"gridDistance": 1.5,
"gridUnits": "m",
"primaryTokenAttribute": "resources.hp",
"secondaryTokenAttribute": "resources.hero"
}
}

View File

@ -102,6 +102,7 @@
"hp": {
"key": "hp",
"label": "BOL.resources.hp",
"ismain": true,
"base": 1,
"value": 1,
"bonus": 0,
@ -110,18 +111,21 @@
"hero": {
"key": "hero",
"label": "BOL.resources.hero",
"ismain": true,
"value": 5,
"max": 5
},
"faith": {
"key": "faith",
"label": "BOL.resources.faith",
"ismain": true,
"value": 0,
"max": 0
},
"power": {
"key": "power",
"label": "BOL.resources.power",
"ismain": true,
"value": 0,
"bonus": 0,
"max": 0
@ -129,6 +133,15 @@
"alchemypoints": {
"key": "alchemypoints",
"label": "BOL.resources.alchemypoints",
"ismain": false,
"value": 0,
"bonus": 0,
"max": 0
},
"astrologypoints": {
"key": "astrologypoints",
"label": "BOL.resources.astrologypoints",
"ismain": false,
"value": 0,
"bonus": 0,
"max": 0

View File

@ -37,7 +37,7 @@
<a class="item" data-tab="actions">{{localize "BOL.ui.tab.actions"}}</a>
<a class="item" data-tab="features">{{localize "BOL.ui.tab.features"}}</a>
<a class="item" data-tab="equipment">{{localize "BOL.ui.tab.equipment"}}</a>
{{#if (or isSorcerer isAlchemist)}}
{{#if isMysteries}}
<a class="item" data-tab="spellalchemy">{{localize "BOL.ui.tab.spellalchemy"}}</a>
{{/if}}
{{/if}}
@ -66,7 +66,7 @@
{{> "systems/bol/templates/actor/parts/tabs/actor-features.hbs"}}
</div>
{{#if (or isSorcerer isAlchemist)}}
{{#if isMysteries}}
<div class="tab features" data-group="primary" data-tab="spellalchemy">
{{> "systems/bol/templates/actor/parts/tabs/actor-spellalchemy.hbs"}}
</div>

View File

@ -1,52 +1,124 @@
<ol class="items-list">
{{#if (ne charType "creature")}}
<li class="item flexrow item-header">
<div class="item-name left">{{localize "BOL.ui.biosize"}}</div>
<div class="item-field flex2 left"><input type="text" name="system.details.height" value="{{details.height}}"></div>
<div class="item-name right">{{localize "BOL.ui.bioweight"}}</div>
<div class="item-field flex2 "><input type="text" name="system.details.weight" value="{{details.weight}}"></div>
<div class="item-name right">{{localize "BOL.ui.bioage"}} </div>
<div class="item-field flex2 "><input type="text" name="system.details.age" value="{{details.age}}"></div>
<ol class='items-list'>
{{#if (ne charType 'creature')}}
<li class='item flexrow item-header'>
<div class='item-name left'>
{{localize 'BOL.ui.biosize'}}
</div>
<div class='item-field flex2 left'>
<input
type='text'
name='system.details.height'
value="{{details.height}}"
/>
</div>
<div class='item-name right'>
{{localize 'BOL.ui.bioweight'}}
</div>
<div class='item-field flex2'>
<input
type='text'
name='system.details.weight'
value="{{details.weight}}"
/>
</div>
<div class='item-name right'>
{{localize 'BOL.ui.bioage'}}
</div>
<div class='item-field flex2'>
<input type='text' name='system.details.age' value="{{details.age}}" />
</div>
</li>
<li class="item flexrow item-header">
<div class="item-name left">{{localize "BOL.ui.biohair"}} </div>
<div class="item-field flex2 left"><input type="text" name="system.details.hait" value="{{details.hait}}"></div>
<div class="item-name right">{{localize "BOL.ui.bioeyes"}} </div>
<div class="item-field flex2 "><input type="text" name="system.details.eyes" value="{{details.eyes}}"></div>
<li class='item flexrow item-header'>
<div class='item-name left'>
{{localize 'BOL.ui.biohair'}}
</div>
<div class='item-field flex2 left'>
<input
type='text'
name='system.details.hait'
value="{{details.hait}}"
/>
</div>
<div class='item-name right'>
{{localize 'BOL.ui.bioeyes'}}
</div>
<div class='item-field flex2'>
<input
type='text'
name='system.details.eyes'
value="{{details.eyes}}"
/>
</div>
</li>
<li class="item flexrow item-header">
<div class="item-name left">{{localize "BOL.ui.biosigns"}} </div>
<div class="item-field flex2 left"><input type="text" name="system.details.signs" value="{{details.signs}}"></div>
<li class='item flexrow item-header'>
<div class='item-name left'>
{{localize 'BOL.ui.biosigns'}}
</div>
<div class='item-field flex2 left'>
<input
type='text'
name='system.details.signs'
value="{{details.signs}}"
/>
</div>
</li>
{{else}}
<li class="item flexrow item-header">
<div class="item-name left">Taille </div>
<div class="form-fields center">
<select class="field-value size" name="system.details.size" data-dtype="String">
{{#select details.size}}
{{#each config.creatureSize as |value id|}}
<option value="{{id}}">{{localize value}}</option>
{{/each}}
{{/select}}
<li class='item flexrow item-header'>
<div class='item-name left'>
Taille
</div>
<div class='form-fields center'>
<select
class='field-value size'
name='system.details.size'
data-dtype='String'
>
{{#select details.size}}
{{#each config.creatureSize as |sizeData id|}}
<option value="{{id}}">
{{localize sizeData.label}}
</option>
{{/each}}
{{/select}}
</select>
</div>
</li>
{{/if}}
</ol>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-name flex4 left">{{localize "BOL.ui.biodescription"}}</div>
<div class="item-field flex1 right"></div>
</ol>
{{#if (and (not isAstrologer) (countKeys horoscopeGroupList))}}
{{> "systems/bol/templates/actor/parts/tabs/actor-horoscope-group.hbs"}}
{{/if}}
<ol class='items-list'>
<li class='item flexrow item-header'>
<div class='item-name flex4 left'>
{{localize 'BOL.ui.biodescription'}}
</div>
<div class='item-field flex1 right'></div>
</li>
</ol>
{{editor biography target="system.details.biography" button=true owner=owner
editable=editable}}
{{editor
biography
target='system.details.biography'
button=true
owner=owner
editable=editable
}}
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-name flex4 left">{{localize "BOL.ui.bionotes"}}</div>
<div class="item-field flex1 right"></div>
<ol class='items-list'>
<li class='item flexrow item-header'>
<div class='item-name flex4 left'>
{{localize 'BOL.ui.bionotes'}}
</div>
<div class='item-field flex1 right'></div>
</li>
</ol>
{{editor notes target="system.details.notes" button=true owner=owner editable=editable}}
{{editor
notes
target='system.details.notes'
button=true
owner=owner
editable=editable
}}

View File

@ -0,0 +1,26 @@
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-name flex4 left">{{localize "BOL.ui.horoscopeGroup"}}</div>
<div class="item-field flex2 center">{{localize "BOL.ui.type"}}</div>
<div class="item-field flex2 center">{{localize "BOL.ui.horoscopeDiceRemaining"}}</div>
<div class="item-field flex2 center">{{localize "BOL.ui.horoscopeDiceMax"}}</div>
<div class="item-field flex1 right"></div>
</li>
{{#each horoscopeGroupList as |horo id|}}
<li class="item flexrow" data-item-id="{{horo.id}}">
<h4 class="item-name flex4 left">
<div class="item-image"><img src="icons/magic/perception/eye-ringed-glow-angry-large-red.webp" /></div>{{horo.name}}
</h4>
<div class="item-field flex2 center">
<span class="item-field">{{upperFirst horo.type}}</span>
</div>
<div class="item-field flex2 center">
<span class="item-field">{{horo.availableDice}}</span>
</div>
<div class="item-field flex2 center">
<span class="item-field">{{horo.maxDice}}</span>
</div>
<div class="item-field flex1 right"></div>
</li>
{{/each}}
</ol>

View File

@ -21,6 +21,7 @@
</div>
<div class="item-field flex1 right">
<a class="item-control item-edit" title="{{localize "BOL.ui.edit"}}"><i class="fas fa-square"></i></a>
&nbsp;
<a class="item-control item-delete" title="{{localize "BOL.ui.delete"}}"><i class="fas fa-trash"></i></a>
</div>
</li>
@ -57,9 +58,77 @@
</div>
<div class="item-field flex1 right">
<a class="item-control item-edit" title="{{localize "BOL.ui.edit"}}"><i class="fas fa-square"></i></a>
&nbsp;
<a class="item-control item-delete" title="{{localize "BOL.ui.delete"}}"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
{{/if}}
<!--ASTROLOGIE-->
{{#if isAstrologer}}
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-name flex4 left">{{localize "BOL.ui.astrologerPoints"}}</div>
<div class="item-name flex4 left">&nbsp;</div>
</li>
<li class="item flexrow" data-item-id="{{item._id}}">
<h4 class="item-name flex4 left">
<div class="item-image"><img src="icons/magic/perception/hand-eye-fire-blue.webp" /></div>
{{localize "BOL.ui.astrologerPointsLabel"}}
</h4>
<input class="field-value" type="text" name="system.resources.astrologypoints.value" value="{{resources.astrologypoints.value}}" data-dtype="Number"/>
</li>
<li class="item flexrow" data-item-id="{{item._id}}">
<h4 class="item-name flex4 left">
<div class="item-image"><img src="icons/magic/perception/eye-ringed-glow-angry-large-teal.webp" /></div>
<a class="rollable" data-roll-type="horoscope-minor">{{localize "BOL.ui.astrologyMinor"}} <i class="darkgreen fas fa-dice"></i></a>
</h4>
<h4 class="item-name flex4 left">
<div class="item-image"><img src="icons/magic/perception/eye-ringed-glow-angry-large-red.webp" /></div>
<a class="rollable" data-roll-type="horoscope-major">{{localize "BOL.ui.astrologyMajor"}} <i class="darkgreen fas fa-dice"></i></a>
</h4>
</li>
<li class="item flexrow" data-item-id="{{item._id}}">
<h4 class="item-name flex4 left">
<div class="item-image"><img src="icons/magic/perception/eye-ringed-glow-angry-large-red.webp" /></div>
<a class="rollable" data-roll-type="horoscope-major-group">{{localize "BOL.ui.astrologyMajorGroup"}} <i class="darkgreen fas fa-dice"></i></a>
</h4>
</li>
</ol>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="item-name flex4 left">{{localize "BOL.ui.astrology"}}</div>
<div class="item-field flex2 center">{{localize "BOL.ui.type"}}</div>
<div class="item-field flex2 center">{{localize "BOL.ui.answer"}}</div>
<div class="item-field flex1 right"></div>
</li>
{{#each horoscopes as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<h4 class="item-name flex4 left">
<div class="item-image"><img src="{{item.img}}" title="{{item.name}}"/></div>{{item.name}}
</h4>
<div class="item-field flex2 center">
{{#if item.system.properties.ishoroscopemajor}}
<span class="item-field">Majeur (de groupe)</span>
{{else}}
<span class="item-field">Mineur</span>
{{/if}}
</div>
<div class="item-field flex2 center">
<span class="item-field">{{localize (concat 'BOL.ui.horoscope' item.system.properties.horoscopeanswer)}}</span>
</div>
<div class="item-field flex1 right">
<a class="item-control item-edit" title="{{localize "BOL.ui.edit"}}"><i class="fas fa-square"></i></a>
&nbsp;
<a class="item-control item-delete" title="{{localize "BOL.ui.delete"}}"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
{{> "systems/bol/templates/actor/parts/tabs/actor-horoscope-group.hbs"}}
{{/if}}

View File

@ -46,34 +46,19 @@
<hr/>
<div class="resources flexrow">
{{#each resources as |resource id|}}
{{#if (eq resource.key "alchemypoints")}}
{{#if @root.isAlchemist}}
<div class="resource stat flex1 flex-group-center">
<label class="stat-label">{{localize label}}</label><br/>
<input class="stat-value resources-value" type="text" name="system.resources.{{key}}.value" value="{{numberFormat value decimals=0 sign=false}}" data-dtype="Number"/>
{{#if (eq @root.chartype 'player')}}
{{#if (exists bonus)}}
<span class="flexrow"><label class="stat-max bonus-text">Bonus</label><input class="resource-bonus resources-value" type="text" name="system.resources.{{key}}.bonus" value="{{numberFormat bonus decimals=0 sign=false}}" data-dtype="Number"/></span>
{{else}}
<span class="flexrow"><label class="stat-max resources-value">&nbsp;</label><input class="resource-bonus resources-novalue" type="text" value="" disabled></span>
{{#if resource.ismain}}
<div class="resource stat flex1 flex-group-center">
<label class="stat-label">{{localize label}}</label><br/>
<input class="stat-value resources-value" type="text" name="system.resources.{{key}}.value" value="{{numberFormat value decimals=0 sign=false}}" data-dtype="Number"/>
{{#if (eq @root.charType 'player')}}
{{#if (exists bonus)}}
<span class="flexrow"><label class="stat-max bonus-text">Bonus</label><input class="resource-bonus resources-value" type="text" name="system.resources.{{key}}.bonus" value="{{numberFormat bonus decimals=0 sign=false}}" data-dtype="Number"/></span>
{{else}}
<span class="flexrow"><label class="stat-max">&nbsp;</label><input class="resource-bonus resources-novalue" type="text" value="" disabled></span>
{{/if}}
{{/if}}
{{/if}}
<input class="resources-value" type="text" name="system.resources.{{key}}.max" value="{{numberFormat max decimals=0 sign=false}}" data-dtype="Number"/>
</div>
{{/if}}
{{else}}
<div class="resource stat flex1 flex-group-center">
<label class="stat-label">{{localize label}}</label><br/>
<input class="stat-value resources-value" type="text" name="system.resources.{{key}}.value" value="{{numberFormat value decimals=0 sign=false}}" data-dtype="Number"/>
{{#if (eq @root.chartype 'player')}}
{{#if (exists bonus)}}
<span class="flexrow"><label class="stat-max bonus-text">Bonus</label><input class="resource-bonus resources-value" type="text" name="system.resources.{{key}}.bonus" value="{{numberFormat bonus decimals=0 sign=false}}" data-dtype="Number"/></span>
{{else}}
<span class="flexrow"><label class="stat-max">&nbsp;</label><input class="resource-bonus resources-novalue" type="text" value="" disabled></span>
{{/if}}
{{/if}}
<input class="resources-value" type="text" name="system.resources.{{key}}.max" value="{{numberFormat max decimals=0 sign=false}}" data-dtype="Number"/>
</div>
<input class="resources-value" type="text" name="system.resources.{{key}}.max" value="{{numberFormat max decimals=0 sign=false}}" data-dtype="Number"/>
</div>
{{/if}}
{{/each}}
</div>

View File

@ -79,6 +79,33 @@
</li>
{{/each}}
{{#if (countKeys horoscopeGroupList)}}
<li class="item flexrow item-header">
<div class="item-name flex4 left">{{localize "BOL.ui.horoscopeGroup"}}</div>
<div class="item-field flex2 center">{{localize "BOL.ui.type"}}</div>
<div class="item-field flex2 center">{{localize "BOL.ui.horoscopeDiceRemaining"}}</div>
<div class="item-field flex2 center">{{localize "BOL.ui.horoscopeDiceMax"}}</div>
<div class="item-field flex1 right"></div>
</li>
{{#each horoscopeGroupList as |horo id|}}
<li class="item flexrow" data-item-id="{{horo.id}}">
<h4 class="item-name flex4 left">
<div class="item-image"><img src="icons/magic/perception/eye-ringed-glow-angry-large-red.webp" /></div>{{horo.name}}
</h4>
<div class="item-field flex2 center">
<span class="item-field">{{upperFirst horo.type}}</span>
</div>
<div class="item-field flex2 center">
<input class="field-value" type="text" id="horoscope-group-edit-available" value="{{horo.availableDice}}" data-horo-id="{{id}}" data-type="Number">
</div>
<div class="item-field flex2 center">
<input class="field-value" type="text" id="horoscope-group-edit-max" value="{{horo.maxDice}}" data-horo-id="{{id}}" data-type="Number">
</div>
<div class="item-field flex1 right"></div>
</li>
{{/each}}
{{/if}}
</ol>

View File

@ -1,7 +1,7 @@
<button class="chat-damage-roll bol-margin-tb-2" data-damage-mode="normal-damage" data-attack-id="{{id}}">{{localize "BOL.chat.rolldamage"}}</button>
{{#if isCritical}}
{{#if isCritical}}
<button class="chat-damage-roll bol-margin-tb-2 " data-damage-mode="damage-plus-6" data-attack-id="{{id}}">{{localize "BOL.chat.rolldamage6"}}</button>
<button class="chat-damage-roll bol-margin-tb-2" data-damage-mode="damage-plus-12" data-attack-id="{{id}}">{{localize "BOL.chat.rolldamage12"}}</button>
{{/if}}

View File

@ -55,9 +55,13 @@
{{#if isRealCritical}}
{{#if isCritical}}
<div>
{{localize "BOL.chat.criticalinfo"}}
</div>
<div class="bol-margin-tb-2">
<a class="content-link" draggable="true" data-uuid="Compendium.bol.aides-de-jeu.Yl1RKQb0BjVUtilk" data-id="Yl1RKQb0BjVUtilk" data-type="JournalEntry" data-pack="bol.aides-de-jeu" data-tooltip="un journal"><i class="fas fa-book-open"></i>Succès Héroïque</a>
<a class="content-link" draggable="true" data-uuid="Compendium.bol.aides-de-jeu.Yl1RKQb0BjVUtilk" data-id="Yl1RKQb0BjVUtilk" data-type="JournalEntry" data-pack="bol.aides-de-jeu" data-tooltip="un journal">
<i class="fas fa-book-open"></i>{{localize "BOL.chat.criticalbuttonjournal"}}</a>
</div>
{{/if}}
@ -70,7 +74,14 @@
{{#if alchemy}}
{{> "systems/bol/templates/chat/rolls/alchemy-roll-card.hbs"}}
{{/if}}
{{#if (eq mode "horoscope")}}
{{> "systems/bol/templates/chat/rolls/horoscope-roll-card.hbs"}}
{{/if}}
{{#if (count selectedHoroscope)}}
{{> "systems/bol/templates/chat/rolls/selected-horoscope-roll-card.hbs"}}
{{/if}}
{{#if reroll}}
<button class="chat-button button hero-reroll bol-margin-tb-2" data-roll-id=="{{rollId}}" data-actor-id="{{actor.id}}">{{localize "BOL.chat.reroll"}}</button>
{{/if}}

View File

@ -0,0 +1,26 @@
<h4><strong>{{localize "BOL.chat.horoscope"}} {{localize horoscopeTypeLabel}}</strong></h4>
<h4><strong>{{localize "BOL.chat.horoscopepoints" points=astrologyPointsCost}}</strong></h4>
{{#if (eq horoscopeType "minor")}}
{{#if isSuccess}}
{{localize "BOL.chat.horoscopeminorsuccess"}}
{{else}}
{{localize "BOL.chat.horoscopeminorfailure"}}
{{/if}}
{{/if}}
{{#if (eq horoscopeType "major")}}
{{#if isSuccess}}
{{localize "BOL.chat.horoscopemajorsuccess"}}
{{else}}
{{localize "BOL.chat.horoscopemajorfailure"}}
{{/if}}
{{/if}}
{{#if (eq horoscopeType "majorgroup")}}
{{#if isSuccess}}
{{localize "BOL.chat.horoscopemajorgroupsuccess" careerBonus=careerBonus}}
{{else}}
{{localize "BOL.chat.horoscopemajorgroupfailure" careerBonus=careerBonus}}
{{/if}}
{{/if}}

View File

@ -0,0 +1,8 @@
<div>
{{#each selectedHoroscope as |horo id|}}
{{localize "BOL.chat.usedhoroscope"}} : {{horo.name}}
{{/each}}
</div>
<div>{{localize "BOL.chat.horoscopedeleted"}}</div>

View File

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

View File

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

View File

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

View File

@ -0,0 +1,39 @@
<form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}}
<header class="sheet-header">
<div class="row flexrow table-header">
<div class="flex1 center">
<h3>{{localize 'BOL.ui.makeHoroscope'}} {{localize horoscopeTypeLabel}}</h3>
</div>
</div>
</header>
{{> "systems/bol/templates/dialogs/attribute-roll-part.hbs"}}
<div class="flexrow" style="margin-bottom: 1px;">
<div class="flex1 center bg-darkred">
<label for="mod">{{localize 'BOL.ui.astrologerRank'}}</label>
</div>
<div class="flex1 center cell">{{careerBonus}}</div>
</div>
<div class="flexrow" style="margin-bottom: 1px;">
<div class="flex1 center bg-darkred">
<label for="mod">{{localize 'BOL.ui.horoscopeCost'}}</label>
</div>
<div class="flex1 center cell" id="astrologyPointsCost">{{astrologyPointsCost}}</div>
</div>
{{> "systems/bol/templates/dialogs/boons-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/mod-roll-part.hbs"}}
{{> "systems/bol/templates/dialogs/total-roll-part.hbs"}}
</form>

View File

@ -0,0 +1,73 @@
{{#if (count horoscopeBonusList)}}
<div class='flexrow roll-box'>
<div class='flex1 center bg-darkred'>
<label for='mod'>
{{localize 'BOL.ui.horoscopesBonus'}}
</label>
</div>
<div class='flex1 center cell'>
<select
class='flex1'
name='horoscope-bonus-applied'
id='horoscope-bonus-applied'
data-type='String'
multiple
>
{{#each horoscopeBonusList as |horoscope id|}}
<option value="{{id}}">
{{horoscope.name}}
</option>
{{/each}}
</select>
</div>
</div>
{{/if}}
{{#if (count horoscopeMalusList)}}
<div class='flexrow roll-box'>
<div class='flex1 center bg-darkred'>
<label for='mod'>
{{localize 'BOL.ui.horoscopesMalus'}}
</label>
</div>
<div class='flex1 center cell'>
<select
class='flex1'
name='horoscope-malus-applied'
id='horoscope-malus-applied'
data-type='String'
multiple
>
{{#each horoscopeMalusList as |horoscope id|}}
<option value="{{id}}">
{{horoscope.name}}
</option>
{{/each}}
</select>
</div>
</div>
{{/if}}
{{#if (countKeys horoscopeGroupList)}}
<div class='flexrow roll-box'>
<div class='flex1 center bg-darkred'>
<label for='mod'>
{{localize 'BOL.ui.horoscopeGroup'}}
</label>
</div>
<div class='flex1 center cell'>
<select
class='flex1'
name='horoscope-group-applied'
id='horoscope-group-applied'
data-type='String'
>
{{#each horoscopeGroupList as |horoscope index|}}
<option value="{{index}}">
{{horoscope.nbDice}}d{{upperFirstOnly horoscope.type}} - {{horoscope.name}}
</option>
{{/each}}
</select>
</div>
</div>
{{/if}}

View File

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

View File

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

View File

@ -27,3 +27,6 @@
{{#if (equals item.system.subtype "boleffect")}}
{{> "systems/bol/templates/item/parts/properties/feature/effect-properties.hbs"}}
{{/if}}
{{#if (equals item.system.subtype "horoscope")}}
{{> "systems/bol/templates/item/parts/properties/feature/horoscope-properties.hbs"}}
{{/if}}

View File

@ -15,3 +15,7 @@
<label class="property-label">{{localize "BOL.ui.isPriest"}}</label>
<input class="field-value" type="checkbox" name="system.properties.priest" {{checked item.system.properties.priest}}>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.isAstrologer"}}</label>
<input class="field-value" type="checkbox" name="system.properties.astrologer" {{checked item.system.properties.astrologer}}>
</div>

View File

@ -0,0 +1,17 @@
<h3 class="form-header">{{localize 'BOL.featureSubtypes.horoscope'}}</h3>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.answer"}}</label>
<select name="system.properties.horoscopeanswer" data-dtype="String">
{{#select item.system.properties.horoscopeanswer}}
{{#each config.horoscopeAnswer as |item id|}}
<option value="{{id}}">{{localize item}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.rank"}}</label>
<input class="field-value" type="text" name="system.properties.rank" value={{item.system.properties.rank}} data-type="Number">
</div>