Corrections description aléatoire
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
# 13.0
|
# 13.0
|
||||||
|
|
||||||
|
## 13.0.42 - La rebellion d'Illisys
|
||||||
|
|
||||||
|
- Corrections V14
|
||||||
|
- Les descriptions aléatoires fonctionnent de nouveau
|
||||||
|
|
||||||
## 13.0.41 - Le miroir d'Illisys
|
## 13.0.41 - Le miroir d'Illisys
|
||||||
|
|
||||||
- les mode de visibilité des jets sont bien pris en compte
|
- les mode de visibilité des jets sont bien pris en compte
|
||||||
|
|
||||||
## 13.0.40 - Le miroir d'Illisys
|
## 13.0.40 - Le miroir d'Illisys
|
||||||
|
|
||||||
- les mode de visibilité des jets sont bien pris en compte
|
|
||||||
- pas de stress ou de sommeil pour les personnage non liés
|
- pas de stress ou de sommeil pour les personnage non liés
|
||||||
|
|
||||||
## 13.0.39 - La défense d'Illisys
|
## 13.0.39 - La défense d'Illisys
|
||||||
|
|||||||
@@ -5,25 +5,80 @@ import { RdDDice } from "../../rdd-dice.js";
|
|||||||
import { RdDNameGen } from "../../rdd-namegen.js";
|
import { RdDNameGen } from "../../rdd-namegen.js";
|
||||||
import { RdDTimestamp } from "../../time/rdd-timestamp.js";
|
import { RdDTimestamp } from "../../time/rdd-timestamp.js";
|
||||||
|
|
||||||
const PATHS = [
|
async function randomFrom(values) {
|
||||||
'name',
|
const max = Object.values(values).reduce(Misc.sum(), 0)
|
||||||
'system.sexe',
|
const total = await RdDDice.rollTotal(`1d${max}`)
|
||||||
'system.age',
|
let sum = 0
|
||||||
'system.taille',
|
for (let entry of Object.entries(values)) {
|
||||||
'system.poids',
|
sum = sum + entry[1]
|
||||||
'system.main',
|
if (sum >= total) {
|
||||||
'system.heure',
|
return entry[0]
|
||||||
'system.cheveux',
|
}
|
||||||
'system.yeux'
|
}
|
||||||
]
|
return Object.keys(values)[0]
|
||||||
|
|
||||||
const RANDOM_VALUES = {
|
|
||||||
'system.sexe': { 'masculin': 1, 'féminin': 1 },
|
|
||||||
'system.main': { 'droitier': 51, 'gaucher': 15, 'ambidextre': 6 },
|
|
||||||
'system.cheveux': { 'noirs': 2, 'bruns': 5, 'châtains': 3, 'châtain clair': 5, 'blonds': 4, 'blond platine': 1, 'roux carotte': 1, 'roux cuivré': 3, 'chauve': 1 },
|
|
||||||
'system.yeux': { 'noirs': 2, 'noisette': 3, 'brun-vert': 4, 'verts': 3, 'bleu clair': 3, 'bleu gris': 2, 'gris': 1, 'mauves': 1, 'indigos': 1 },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function randomTailleCm(taille) {
|
||||||
|
const infoTaille = RdDCarac.getCaracDerivee(taille)
|
||||||
|
const infoTailleSup = RdDCarac.getCaracDerivee(taille + 1)
|
||||||
|
const variation = (infoTailleSup.taille - infoTaille.taille) + Math.floor((infoTaille.poidsMax - infoTaille.poidsMin) / 2)
|
||||||
|
const base = infoTaille.taille
|
||||||
|
const total = await RdDDice.rollTotal(`1d${variation} -1d ${variation} + ${base}`)
|
||||||
|
const cm = total % 100
|
||||||
|
const dm = cm < 10 ? '0' : ''
|
||||||
|
const m = (total - cm) / 100
|
||||||
|
return `${m}m${dm}${cm}`
|
||||||
|
}
|
||||||
|
|
||||||
|
async function randomPoidsKg(taille) {
|
||||||
|
const infoTaille = RdDCarac.getCaracDerivee(taille)
|
||||||
|
const range = infoTaille.poidsMax - infoTaille.poidsMin + 1
|
||||||
|
const total = await RdDDice.rollTotal(`1d${range} + ${infoTaille.poidsMin}`)
|
||||||
|
return total + ' kg'
|
||||||
|
}
|
||||||
|
|
||||||
|
async function randomHeure() {
|
||||||
|
return RdDTimestamp.defHeure(await RdDDice.rollHeure({ rollMode: "selfroll", showDice: SHOW_DICE })).key
|
||||||
|
}
|
||||||
|
|
||||||
|
const CONTROL_UNKNOWN = { name: 'unknown', path: '', getter: (act) => { undefined }, random: async act => undefined }
|
||||||
|
const TABLE_SEXES = { 'masculin': 1, 'féminin': 1 };
|
||||||
|
const TABLE_MAINS = { 'droitier': 51, 'gaucher': 15, 'ambidextre': 6 };
|
||||||
|
const TABLE_COULEURS_CHEVEUX = {
|
||||||
|
'noirs': 2,
|
||||||
|
'bruns': 5,
|
||||||
|
'châtains': 3,
|
||||||
|
'châtain clair': 5,
|
||||||
|
'blonds': 4,
|
||||||
|
'blond platine': 1,
|
||||||
|
'roux carotte': 1,
|
||||||
|
'roux cuivré': 3,
|
||||||
|
'chauve': 1
|
||||||
|
};
|
||||||
|
const TABLE_COULEURS_YEUX = {
|
||||||
|
'noirs': 2,
|
||||||
|
'noisette': 3,
|
||||||
|
'brun-vert': 4,
|
||||||
|
'verts': 3,
|
||||||
|
'bleu clair': 3,
|
||||||
|
'bleu gris': 2,
|
||||||
|
'gris': 1,
|
||||||
|
'mauves': 1,
|
||||||
|
'indigos': 1
|
||||||
|
};
|
||||||
|
|
||||||
|
const CONTROLS = [
|
||||||
|
{ name: 'name', path: 'name', getter: (act) => act.name, random: async act => await RdDNameGen.generate() },
|
||||||
|
{ name: 'sexe', path: 'system.sexe', getter: act => act.system.sexe, random: async act => await randomFrom(TABLE_SEXES) },
|
||||||
|
{ name: 'age', path: 'system.age', getter: act => act.system.age, random: async act => await RdDDice.rollTotal('(2d4kl)*10 + 1d7xo + 2d20kl') },
|
||||||
|
{ name: 'taille', path: 'system.taille', getter: act => act.system.taille, random: async act => await randomTailleCm(act.system.carac.taille.value) },
|
||||||
|
{ name: 'poids', path: 'system.poids', getter: act => act.system.poids, random: async act => await randomPoidsKg(act.system.carac.taille.value) },
|
||||||
|
{ name: 'main', path: 'system.main', getter: act => act.system.main, random: async act => await randomFrom(TABLE_MAINS) },
|
||||||
|
{ name: 'heure', path: 'system.heure', getter: act => act.system.heure, random: async act => await randomHeure() },
|
||||||
|
{ name: 'cheveux', path: 'system.cheveux', getter: act => act.system.cheveux, random: async act => await randomFrom(TABLE_COULEURS_CHEVEUX) },
|
||||||
|
{ name: 'yeux', path: 'system.yeux', getter: act => act.system.yeux, random: async act => await randomFrom(TABLE_COULEURS_YEUX) },
|
||||||
|
]
|
||||||
|
|
||||||
export class AppPersonnageAleatoire extends FormApplication {
|
export class AppPersonnageAleatoire extends FormApplication {
|
||||||
static preloadHandlebars() {
|
static preloadHandlebars() {
|
||||||
foundry.applications.handlebars.loadTemplates([
|
foundry.applications.handlebars.loadTemplates([
|
||||||
@@ -47,18 +102,12 @@ export class AppPersonnageAleatoire extends FormApplication {
|
|||||||
constructor(actor) {
|
constructor(actor) {
|
||||||
super({})
|
super({})
|
||||||
this.actor = actor
|
this.actor = actor
|
||||||
this.current = foundry.utils.duplicate(actor)
|
this.current = AppPersonnageAleatoire.getActorValues()
|
||||||
this.checked = {
|
this.checked = Object.fromEntries(CONTROLS.map(it => [it.name, [0, '', undefined].includes(it.getter(this.current))]))
|
||||||
'name': false,
|
}
|
||||||
'system.sexe': (this.actor.system.sexe ?? '') == '',
|
|
||||||
'system.age': this.actor.system.age == 0,
|
static getActorValues() {
|
||||||
'system.taille': (this.actor.system.taille ?? '') == '',
|
return Object.fromEntries(CONTROLS.map(it => [it.name, it.getter(this.actor)]));
|
||||||
'system.poids': (this.actor.system.poids ?? '') == '',
|
|
||||||
'system.main': (this.actor.system.main ?? '') == '',
|
|
||||||
'system.heure': (this.actor.system.heure ?? '') == '',
|
|
||||||
'system.cheveux': (this.actor.system.cheveux ?? '') == '',
|
|
||||||
'system.yeux': (this.actor.system.yeux ?? '') == '',
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getData(options) {
|
async getData(options) {
|
||||||
@@ -73,124 +122,84 @@ export class AppPersonnageAleatoire extends FormApplication {
|
|||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html)
|
super.activateListeners(html)
|
||||||
this.html = html
|
this.html = html
|
||||||
this.html.find("button.button-cancel").click(async event => await this.close())
|
|
||||||
this.html.find("button.button-apply").click(async event => await this.onApply())
|
|
||||||
this.html.find("input.current-value").change(async event => await this.onChange(event))
|
this.html.find("input.current-value").change(async event => await this.onChange(event))
|
||||||
this.html.find("div.random-field[data-path='system.heure'] select.current-value").change(async event => await this.onChange(event))
|
|
||||||
this.html.find('a[data-action="sexe-masculin"]').click(async event => await this.onSexe('masculin'))
|
|
||||||
this.html.find('a[data-action="sexe-feminin"]').click(async event => await this.onSexe('féminin'))
|
|
||||||
this.html.find("a.random").click(async event => await this.onRandom(event))
|
this.html.find("a.random").click(async event => await this.onRandom(event))
|
||||||
this.html.find("a.reset").click(async event => await this.onReset(event))
|
this.html.find("a.reset").click(async event => await this.onReset(event))
|
||||||
this.html.find("a.randomize-selected").click(async event => await this.onRandomizeSelected())
|
this.html.find("a.randomize-selected").click(async event => await this.onRandomizeSelected())
|
||||||
this.html.find("input.check-for-random").click(async event => await this.onCheckForRandom(event))
|
this.html.find("input.check-for-random").click(async event => await this.onCheckForRandom(event))
|
||||||
|
|
||||||
|
this.html.find("div.random-field[data-field-name='heure'] select.current-value").change(async event => await this.onChange(event))
|
||||||
|
this.html.find('a[data-action="sexe-masculin"]').click(async event => await this.onSexe('masculin'))
|
||||||
|
this.html.find('a[data-action="sexe-feminin"]').click(async event => await this.onSexe('féminin'))
|
||||||
|
|
||||||
|
this.html.find("button.button-cancel").click(async event => await this.close())
|
||||||
|
this.html.find("button.button-apply").click(async event => await this.onApply())
|
||||||
}
|
}
|
||||||
|
|
||||||
async _updateObject(event, formData) { }
|
async _updateObject(event, formData) { }
|
||||||
|
|
||||||
async onApply() {
|
async onApply() {
|
||||||
const updates = Object.fromEntries(
|
const updates = Object.fromEntries(
|
||||||
PATHS.filter(path => game.user.isGM || path != 'name')
|
CONTROLS.filter(control => game.user.isGM || control.name != 'name')
|
||||||
.map(path => [path, this.current[path]])
|
.map(control => [control.path, control.getter(this.current)])
|
||||||
)
|
)
|
||||||
await this.actor.update(updates)
|
await this.actor.update(updates)
|
||||||
await this.close()
|
await this.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
getPath(selector) {
|
getName(selector) {
|
||||||
const fields = this.html.find(selector).parents("div.random-field:first")
|
const fields = this.html.find(selector).parents("div.random-field:first")
|
||||||
return fields[0].attributes['data-path'].value
|
return fields[0].attributes['data-field-name'].value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getControl(name) {
|
||||||
|
return CONTROLS.find(it => it.name == name) ?? CONTROL_UNKNOWN
|
||||||
|
}
|
||||||
|
|
||||||
async onSexe(sexe) {
|
async onSexe(sexe) {
|
||||||
this.current['system.sexe'] = sexe
|
this.current['sexe'] = sexe
|
||||||
this.render()
|
this.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
async onChange(event) {
|
async onChange(event) {
|
||||||
const path = this.getPath(event.currentTarget)
|
const name = this.getName(event.currentTarget)
|
||||||
this.current[path] = event.currentTarget.value
|
const control = this.getControl(name)
|
||||||
|
this.current[control.name] = event.currentTarget.value
|
||||||
|
this.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async onRandom(event) {
|
async onRandom(event) {
|
||||||
const path = this.getPath(event.currentTarget)
|
const name = this.getName(event.currentTarget)
|
||||||
await this.setRandom(path);
|
const control = this.getControl(name)
|
||||||
|
await this.randomControl(control)
|
||||||
this.render()
|
this.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
async onReset(event) {
|
async onReset(event) {
|
||||||
const path = this.getPath(event.currentTarget)
|
const name = this.getName(event.currentTarget)
|
||||||
this.current[path] = this.actor[path]
|
const control = this.getControl(name)
|
||||||
|
this.current[control.name] = control.getter(this.actor)
|
||||||
await this.render()
|
await this.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
async onCheckForRandom(event) {
|
async onCheckForRandom(event) {
|
||||||
const path = this.getPath(event.currentTarget)
|
const name = this.getName(event.currentTarget)
|
||||||
this.checked[path] = event.currentTarget.checked
|
this.checked[name] = event.currentTarget.checked
|
||||||
this.render()
|
this.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
async onRandomizeSelected() {
|
async onRandomizeSelected() {
|
||||||
const paths = this.html.find("input.check-for-random:checked")
|
const controls = this.html.find("input.check-for-random:checked")
|
||||||
.parents("div.random-field")
|
.parents("div.random-field")
|
||||||
.toArray()
|
.toArray()
|
||||||
.map(it => it.attributes['data-path'].value)
|
.map(it => this.getControl(it.attributes['data-field-name'].value))
|
||||||
await Promise.all(paths.map(path => this.setRandom(path)))
|
await Promise.all(controls.map(it => this.randomControl(it)))
|
||||||
this.render()
|
this.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
async setRandom(path) {
|
async randomControl(control) {
|
||||||
this.current[path] = await this.random(path);
|
this.current[control.name] = await control.random(this.current)
|
||||||
}
|
}
|
||||||
|
|
||||||
async random(path) {
|
|
||||||
switch (path) {
|
|
||||||
case 'name':
|
|
||||||
return await RdDNameGen.generate()
|
|
||||||
case 'system.sexe':
|
|
||||||
case 'system.main':
|
|
||||||
case 'system.cheveux':
|
|
||||||
case 'system.yeux':
|
|
||||||
return await this.randomFromMap(RANDOM_VALUES[path])
|
|
||||||
case 'system.poids':
|
|
||||||
return await this.randomPoids()
|
|
||||||
case 'system.taille':
|
|
||||||
return await this.randomTaille()
|
|
||||||
case 'system.age':
|
|
||||||
return await RdDDice.rollTotal('(2d4kl)*10 + 1d7xo + 2d20kl')
|
|
||||||
case 'system.heure':
|
|
||||||
return RdDTimestamp.defHeure(await RdDDice.rollHeure({ rollMode: "selfroll", showDice: SHOW_DICE })).key
|
|
||||||
}
|
|
||||||
return 'unknown'
|
|
||||||
}
|
|
||||||
|
|
||||||
async randomFromMap(valuesMap) {
|
|
||||||
const max = Object.values(valuesMap).reduce(Misc.sum(), 0)
|
|
||||||
const total = await RdDDice.rollTotal(`1d${max}`)
|
|
||||||
let sum = 0
|
|
||||||
for (let entry of Object.entries(valuesMap)) {
|
|
||||||
sum = sum + entry[1]
|
|
||||||
if (sum >= total) {
|
|
||||||
return entry[0]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Object.keys(valuesMap)[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
async randomPoids() {
|
|
||||||
const caracTaille = RdDCarac.getCaracDerivee(this.current.system.carac.taille.value)
|
|
||||||
const range = caracTaille.poidsMax - caracTaille.poidsMin + 1
|
|
||||||
const total = await RdDDice.rollTotal(`1d${range} + ${caracTaille.poidsMin}`)
|
|
||||||
return total + ' kg'
|
|
||||||
}
|
|
||||||
|
|
||||||
async randomTaille() {
|
|
||||||
const caracTaille = RdDCarac.getCaracDerivee(this.current.system.carac.taille.value)
|
|
||||||
const base = this.current.system.carac.taille.value * 2 + 60 + caracTaille.poidsMin
|
|
||||||
const variation = Math.floor((caracTaille.poidsMax - caracTaille.poidsMin + base / 5) / 2)
|
|
||||||
const total = await RdDDice.rollTotal(`2d${variation} + ${base}`)
|
|
||||||
const cm = total % 100
|
|
||||||
const dm = cm < 10 ? '0' : ''
|
|
||||||
const m = (total - cm) / 100
|
|
||||||
return `${m}m${dm}${cm}`
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,38 +3,38 @@ import { Misc } from "./misc.js";
|
|||||||
|
|
||||||
const TABLE_CARACTERISTIQUES_DERIVEES = {
|
const TABLE_CARACTERISTIQUES_DERIVEES = {
|
||||||
// xp: coût pour passer du niveau inférieur à ce niveau
|
// xp: coût pour passer du niveau inférieur à ce niveau
|
||||||
1: { xp: 3, niveau: -5, poids: "moins de 1kg", poidsMin: 0, poidsMax: 1, plusdom: -5, sconst: 0.5, sust: 0.1 },
|
1: { xp: 3, niveau: -5, taille: 40, poids: "moins de 1kg", poidsMin: 0, poidsMax: 1, plusdom: -5, sconst: 0.5, sust: 0.1 },
|
||||||
2: { xp: 3, niveau: -4, poids: "1-5", poidsMin: 1, poidsMax: 5, plusdom: -4, sconst: 0.5, sust: 0.3 },
|
2: { xp: 3, niveau: -4, taille: 70, poids: "1-5", poidsMin: 1, poidsMax: 5, plusdom: -4, sconst: 0.5, sust: 0.3 },
|
||||||
3: { xp: 4, niveau: -3, poids: "6-10", poidsMin: 6, poidsMax: 10, plusdom: -3, sconst: 1, sust: 0.5, beaute: 'hideux' },
|
3: { xp: 4, niveau: -3, taille: 100, poids: "6-10", poidsMin: 6, poidsMax: 10, plusdom: -3, sconst: 1, sust: 0.5, beaute: 'hideux' },
|
||||||
4: { xp: 4, niveau: -2, poids: "11-20", poidsMin: 11, poidsMax: 20, plusdom: -3, sconst: 1, sust: 1, beaute: 'repoussant' },
|
4: { xp: 4, niveau: -2, taille: 120, poids: "11-20", poidsMin: 11, poidsMax: 20, plusdom: -3, sconst: 1, sust: 1, beaute: 'repoussant' },
|
||||||
5: { xp: 5, niveau: -1, poids: "21-30", poidsMin: 21, poidsMax: 30, plusdom: -2, sconst: 1, sust: 1, beaute: 'franchement très laid' },
|
5: { xp: 5, niveau: -1, taille: 135, poids: "21-30", poidsMin: 21, poidsMax: 30, plusdom: -2, sconst: 1, sust: 1, beaute: 'franchement très laid' },
|
||||||
6: { xp: 5, niveau: 0, poids: "31-40", poidsMin: 31, poidsMax: 40, plusdom: -1, sconst: 2, sust: 2, beaute: 'laid' },
|
6: { xp: 5, niveau: 0, taille: 145, poids: "31-40", poidsMin: 31, poidsMax: 40, plusdom: -1, sconst: 2, sust: 2, beaute: 'laid' },
|
||||||
7: { xp: 6, niveau: 0, poids: "41-50", poidsMin: 41, poidsMax: 50, plusdom: -1, sconst: 2, sust: 2, beaute: 'très désavantagé' },
|
7: { xp: 6, niveau: 0, taille: 150, poids: "41-50", poidsMin: 41, poidsMax: 50, plusdom: -1, sconst: 2, sust: 2, beaute: 'très désavantagé' },
|
||||||
8: { xp: 6, niveau: 0, poids: "51-60", poidsMin: 51, poidsMax: 60, plusdom: 0, sconst: 2, sust: 2, beaute: 'désavantagé' },
|
8: { xp: 6, niveau: 0, taille: 155, poids: "51-60", poidsMin: 51, poidsMax: 60, plusdom: 0, sconst: 2, sust: 2, beaute: 'désavantagé' },
|
||||||
9: { xp: 7, niveau: 0, poids: "61-65", poidsMin: 61, poidsMax: 65, plusdom: 0, sconst: 3, sust: 2, beaute: 'pas terrible' },
|
9: { xp: 7, niveau: 0, taille: 160, poids: "61-65", poidsMin: 61, poidsMax: 65, plusdom: 0, sconst: 3, sust: 2, beaute: 'pas terrible' },
|
||||||
10: { xp: 7, niveau: 0, poids: "66-70", poidsMin: 66, poidsMax: 70, plusdom: 0, sconst: 3, sust: 3, beaute: 'commun' },
|
10: { xp: 7, niveau: 0, taille: 170, poids: "66-70", poidsMin: 66, poidsMax: 70, plusdom: 0, sconst: 3, sust: 3, beaute: 'commun' },
|
||||||
11: { xp: 8, niveau: 1, poids: "71-75", poidsMin: 71, poidsMax: 75, plusdom: 0, sconst: 3, sust: 3, beaute: 'pas mal' },
|
11: { xp: 8, niveau: 1, taille: 175, poids: "71-75", poidsMin: 71, poidsMax: 75, plusdom: 0, sconst: 3, sust: 3, beaute: 'pas mal' },
|
||||||
12: { xp: 8, niveau: 1, poids: "76-80", poidsMin: 76, poidsMax: 80, plusdom: +1, sconst: 4, sust: 3, beaute: 'avantagé' },
|
12: { xp: 8, niveau: 1, taille: 180, poids: "76-80", poidsMin: 76, poidsMax: 80, plusdom: +1, sconst: 4, sust: 3, beaute: 'avantagé' },
|
||||||
13: { xp: 9, niveau: 2, poids: "81-90", poidsMin: 81, poidsMax: 90, plusdom: +1, sconst: 4, sust: 3, beaute: 'mignon' },
|
13: { xp: 9, niveau: 2, taille: 185, poids: "81-90", poidsMin: 81, poidsMax: 90, plusdom: +1, sconst: 4, sust: 3, beaute: 'mignon' },
|
||||||
14: { xp: 9, niveau: 2, poids: "91-100", poidsMin: 91, poidsMax: 100, plusdom: +2, sconst: 4, sust: 4, beaute: 'beau' },
|
14: { xp: 9, niveau: 2, taille: 190, poids: "91-100", poidsMin: 91, poidsMax: 100, plusdom: +2, sconst: 4, sust: 4, beaute: 'beau' },
|
||||||
15: { xp: 10, niveau: 3, poids: "101-110", poidsMin: 101, poidsMax: 110, plusdom: +2, sconst: 5, sust: 4, beaute: 'très beau' },
|
15: { xp: 10, niveau: 3, taille: 200, poids: "101-110", poidsMin: 101, poidsMax: 110, plusdom: +2, sconst: 5, sust: 4, beaute: 'très beau' },
|
||||||
16: { xp: 20, niveau: 3, poids: "111-120", poidsMin: 111, poidsMax: 120, plusdom: +3, sconst: 5, sust: 4, beaute: 'éblouissant' },
|
16: { xp: 20, niveau: 3, taille: 210, poids: "111-120", poidsMin: 111, poidsMax: 120, plusdom: +3, sconst: 5, sust: 4, beaute: 'éblouissant' },
|
||||||
17: { xp: 30, niveau: 4, poids: "121-131", poidsMin: 121, poidsMax: 131, plusdom: +3, sconst: 5, sust: 5 },
|
17: { xp: 30, niveau: 4, taille: 220, poids: "121-131", poidsMin: 121, poidsMax: 131, plusdom: +3, sconst: 5, sust: 5 },
|
||||||
18: { xp: 40, niveau: 4, poids: "131-141", poidsMin: 131, poidsMax: 141, plusdom: +4, sconst: 6, sust: 5 },
|
18: { xp: 40, niveau: 4, taille: 230, poids: "131-141", poidsMin: 131, poidsMax: 141, plusdom: +4, sconst: 6, sust: 5 },
|
||||||
19: { xp: 50, niveau: 5, poids: "141-150", poidsMin: 141, poidsMax: 150, plusdom: +4, sconst: 6, sust: 5 },
|
19: { xp: 50, niveau: 5, taille: 240, poids: "141-150", poidsMin: 141, poidsMax: 150, plusdom: +4, sconst: 6, sust: 5 },
|
||||||
20: { xp: 60, niveau: 5, poids: "151-160", poidsMin: 151, poidsMax: 160, plusdom: +4, sconst: 6, sust: 6 },
|
20: { xp: 60, niveau: 5, taille: 250, poids: "151-160", poidsMin: 151, poidsMax: 160, plusdom: +4, sconst: 6, sust: 6 },
|
||||||
21: { xp: 70, niveau: 6, poids: "161-180", poidsMin: 161, poidsMax: 180, plusdom: +5, sconst: 7, sust: 6 },
|
21: { xp: 70, niveau: 6, taille: 260, poids: "161-180", poidsMin: 161, poidsMax: 180, plusdom: +5, sconst: 7, sust: 6 },
|
||||||
22: { xp: 80, niveau: 6, poids: "181-200", poidsMin: 181, poidsMax: 200, plusdom: +5, sconst: 7, sust: 7 },
|
22: { xp: 80, niveau: 6, taille: 270, poids: "181-200", poidsMin: 181, poidsMax: 200, plusdom: +5, sconst: 7, sust: 7 },
|
||||||
23: { xp: 90, niveau: 7, poids: "201-300", poidsMin: 201, poidsMax: 300, plusdom: +6, sconst: 7, sust: 8 },
|
23: { xp: 90, niveau: 7, taille: 280, poids: "201-300", poidsMin: 201, poidsMax: 300, plusdom: +6, sconst: 7, sust: 8 },
|
||||||
24: { xp: 100, niveau: 7, poids: "301-400", poidsMin: 301, poidsMax: 400, plusdom: +6, sconst: 8, sust: 9 },
|
24: { xp: 100, niveau: 7, taille: 290, poids: "301-400", poidsMin: 301, poidsMax: 400, plusdom: +6, sconst: 8, sust: 9 },
|
||||||
25: { xp: 110, niveau: 8, poids: "401-500", poidsMin: 401, poidsMax: 500, plusdom: +7, sconst: 8, sust: 10 },
|
25: { xp: 110, niveau: 8, taille: 300, poids: "401-500", poidsMin: 401, poidsMax: 500, plusdom: +7, sconst: 8, sust: 10 },
|
||||||
26: { xp: 120, niveau: 8, poids: "501-600", poidsMin: 501, poidsMax: 600, plusdom: +7, sconst: 8, sust: 11 },
|
26: { xp: 120, niveau: 8, taille: 310, poids: "501-600", poidsMin: 501, poidsMax: 600, plusdom: +7, sconst: 8, sust: 11 },
|
||||||
27: { xp: 130, niveau: 9, poids: "601-700", poidsMin: 601, poidsMax: 700, plusdom: +8, sconst: 9, sust: 12 },
|
27: { xp: 130, niveau: 9, taille: 320, poids: "601-700", poidsMin: 601, poidsMax: 700, plusdom: +8, sconst: 9, sust: 12 },
|
||||||
28: { xp: 140, niveau: 9, poids: "701-800", poidsMin: 701, poidsMax: 800, plusdom: +8, sconst: 9, sust: 13 },
|
28: { xp: 140, niveau: 9, taille: 330, poids: "701-800", poidsMin: 701, poidsMax: 800, plusdom: +8, sconst: 9, sust: 13 },
|
||||||
29: { xp: 150, niveau: 10, poids: "801-900", poidsMin: 801, poidsMax: 900, plusdom: +9, sconst: 9, sust: 14 },
|
29: { xp: 150, niveau: 10, taille: 340, poids: "801-900", poidsMin: 801, poidsMax: 900, plusdom: +9, sconst: 9, sust: 14 },
|
||||||
30: { xp: 160, niveau: 10, poids: "901-1000", poidsMin: 901, poidsMax: 1000, plusdom: +9, sconst: 10, sust: 15 },
|
30: { xp: 160, niveau: 10, taille: 350, poids: "901-1000", poidsMin: 901, poidsMax: 1000, plusdom: +9, sconst: 10, sust: 15 },
|
||||||
31: { xp: 170, niveau: 11, poids: "1001-1500", poidsMin: 1001, poidsMax: 1500, plusdom: +10, sconst: 10, sust: 16 },
|
31: { xp: 170, niveau: 11, taille: 360, poids: "1001-1500", poidsMin: 1001, poidsMax: 1500, plusdom: +10, sconst: 10, sust: 16 },
|
||||||
32: { xp: 180, niveau: 11, poids: "1501-2000", poidsMin: 1501, poidsMax: 2000, plusdom: +11, sconst: 10, sust: 17 }
|
32: { xp: 180, niveau: 11, taille: 370, poids: "1501-2000", poidsMin: 1501, poidsMax: 2000, plusdom: +11, sconst: 10, sust: 17 },
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CARACS = {
|
export const CARACS = {
|
||||||
|
|||||||
@@ -3,40 +3,40 @@
|
|||||||
<div class="flex-group-left">
|
<div class="flex-group-left">
|
||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
||||||
label="Nom" path="name" type="text" value=current.name checked=checked.name
|
label="Nom" fieldname="name" type="text" value=current.name checked=checked.name
|
||||||
}}
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/sexe-aleatoire.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/sexe-aleatoire.hbs"
|
||||||
label="Sexe" path="system.sexe" type="text"
|
label="Sexe" fieldname="sexe" type="text"
|
||||||
value=current.system.sexe checked=checked.system.sexe
|
value=current.system.sexe checked=checked.sexe
|
||||||
}}
|
}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
||||||
label="Age" path="system.age" type="entier" min=10 max=100
|
label="Age" fieldname="age" type="entier" min=10 max=100
|
||||||
value=current.system.age checked=checked.system.age
|
value=current.system.age checked=checked.age
|
||||||
}}
|
}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
||||||
label="Taille" path="system.taille" type="text"
|
label="Taille" fieldname="taille" type="text"
|
||||||
value=current.system.taille checked=checked.system.taille
|
value=current.system.taille checked=checked.taille
|
||||||
}}
|
}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
||||||
label="Poids" path="system.poids" type="text"
|
label="Poids" fieldname="poids" type="text"
|
||||||
value=current.system.poids checked=checked.system.poids
|
value=current.system.poids checked=checked.poids
|
||||||
}}
|
}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
||||||
label="Main directrice" path="system.main" type="text"
|
label="Main directrice" fieldname="main" type="text"
|
||||||
value=current.system.main checked=checked.system.main
|
value=current.system.main checked=checked.main
|
||||||
}}
|
}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
||||||
label="Heure de naissance" path="system.heure" type="heure"
|
label="Heure de naissance" fieldname="heure" type="heure"
|
||||||
value=current.system.heure checked=checked.system.heure
|
value=current.system.heure checked=checked.heure
|
||||||
}}
|
}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
||||||
label="Cheveux" path="system.cheveux" type="text"
|
label="Cheveux" fieldname="cheveux" type="text"
|
||||||
value=current.system.cheveux checked=checked.system.cheveux
|
value=current.system.cheveux checked=checked.cheveux
|
||||||
}}
|
}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
|
||||||
label="Yeux" path="system.yeux" type="text"
|
label="Yeux" fieldname="yeux" type="text"
|
||||||
value=current.system.yeux checked=checked.system.yeux
|
value=current.system.yeux checked=checked.yeux
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<div class="flexrow random-field" data-path="{{path}}">
|
<div class="flexrow random-field" data-field-name="{{fieldname}}">
|
||||||
<label for="{{path}}">{{label}}:</label>
|
<label for="{{fieldname}}">{{label}}:</label>
|
||||||
{{#if (eq type 'entier')}}
|
{{#if (eq type 'entier')}}
|
||||||
<input name="current.{{path}}" class="current-value" type="number" data-dtype="Number" placeholder="{{label}}" value="{{value}}" min="{{min}}" max="{{max}}"/>
|
<input name="current.{{fieldname}}" class="current-value" type="number" data-dtype="Number" placeholder="{{label}}" value="{{value}}" min="{{min}}" max="{{max}}"/>
|
||||||
{{else if (eq type 'heure')}}
|
{{else if (eq type 'heure')}}
|
||||||
<select class="current-value" name="current.{{path}}" value="{{value}}" type="text" data-dtype="String">
|
<select class="current-value" name="current.{{fieldname}}" value="{{value}}" type="text" data-dtype="String">
|
||||||
{{#select value}}
|
{{#select value}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/enum-heures.hbs"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/enum-heures.hbs"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="current.{{path}}" class="current-value" type="text" data-dtype="String" value="{{value}}" placeholder="{{label}}"/>
|
<input name="current.{{fieldname}}" class="current-value" type="text" data-dtype="String" value="{{value}}" placeholder="{{label}}"/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
<input class="check-for-random" type="checkbox" data-tooltip="Sélectionné pour génération automatique" {{#if checked}}checked{{/if}}/>
|
<input class="check-for-random" type="checkbox" data-tooltip="Sélectionné pour génération automatique" {{#if checked}}checked{{/if}}/>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="flexrow random-field" data-path="{{path}}">
|
<div class="flexrow random-field" data-field-name="{{fieldname}}">
|
||||||
<label for="{{path}}">{{label}}:</label>
|
<label for="{{fieldname}}">{{label}}:</label>
|
||||||
<input class="current-value" name="current.{{path}}" value="{{value}}" placeholder="{{label}}" type="text" data-dtype="String"/>
|
<input class="current-value" name="current.{{fieldname}}" value="{{value}}" placeholder="{{label}}" type="text" data-dtype="String"/>
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
<input class="check-for-random" type="checkbox" data-tooltip="Sélectionné pour génération automatique" {{#if checked}}checked{{/if}}/>
|
<input class="check-for-random" type="checkbox" data-tooltip="Sélectionné pour génération automatique" {{#if checked}}checked{{/if}}/>
|
||||||
<a data-action="sexe-feminin" data-tooltip="sexe féminin"><i class="fa-solid fa-venus"></i></a>
|
<a data-action="sexe-feminin" data-tooltip="sexe féminin"><i class="fa-solid fa-venus"></i></a>
|
||||||
|
|||||||
Reference in New Issue
Block a user