Compare commits
19 Commits
12.0.24
...
d9af32b168
Author | SHA1 | Date | |
---|---|---|---|
d9af32b168 | |||
f13677106e | |||
e98a793506 | |||
57d35a0f9a | |||
417db33752 | |||
bf0eea693a | |||
28ee8607bb | |||
91717a3290 | |||
39ce66a26c | |||
5265c013c1 | |||
a03cee5d60 | |||
296c4babbb | |||
d9c1804a08 | |||
fa375f8092 | |||
a27e3894a0 | |||
ce8616c34e | |||
bbfac286a6 | |||
c0563efcfa | |||
c481bad81a |
@ -27,7 +27,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
version: ${{steps.get_version.outputs.version-without-v}}
|
version: ${{steps.get_version.outputs.version-without-v}}
|
||||||
url: https://www.uberwald.me/gitea/${{gitea.repository}}
|
url: https://www.uberwald.me/gitea/${{gitea.repository}}
|
||||||
manifest: https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download//${{github.event.release.tag_name}}/system.json
|
manifest: https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json
|
||||||
download: https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/rddsystem.zip
|
download: https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/rddsystem.zip
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
@ -61,3 +61,14 @@ jobs:
|
|||||||
./rddsystem.zip
|
./rddsystem.zip
|
||||||
system.json
|
system.json
|
||||||
api_key: '${{secrets.ALLOW_PUSH_RELEASE}}'
|
api_key: '${{secrets.ALLOW_PUSH_RELEASE}}'
|
||||||
|
|
||||||
|
- name: Publish to Foundry server
|
||||||
|
uses: djlechuck/foundryvtt-publish-package-action@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }}
|
||||||
|
id: 'foundryvtt-reve-de-dragon'
|
||||||
|
version: ${{github.event.release.tag_name}}
|
||||||
|
manifest: 'https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json'
|
||||||
|
notes: 'https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md'
|
||||||
|
compatibility-minimum: '12'
|
||||||
|
compatibility-verified: '12'
|
@ -1,4 +1,10 @@
|
|||||||
# 12.0
|
# 12.0
|
||||||
|
## 12.0.26 - Astrobazzarh le Haut-rêvant
|
||||||
|
- bouton pour le don de haut-rêve en un clic
|
||||||
|
- les compétences de draconic ne sont plus précédées de "Voie de"
|
||||||
|
- migration des compétences & compendiums
|
||||||
|
- Correction feuille simplifiée qui ne s'affichait pas en ccas de sort variable
|
||||||
|
|
||||||
## 12.0.24 - Les ajustements d'Astrobazzarh
|
## 12.0.24 - Les ajustements d'Astrobazzarh
|
||||||
- amélioration
|
- amélioration
|
||||||
- meilleure gestion des noms des voies de draconic
|
- meilleure gestion des noms des voies de draconic
|
||||||
|
@ -214,6 +214,8 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
|||||||
});
|
});
|
||||||
// Boutons spéciaux MJs
|
// Boutons spéciaux MJs
|
||||||
this.html.find('.forcer-tmr-aleatoire').click(async event => this.actor.reinsertionAleatoire("Action MJ"))
|
this.html.find('.forcer-tmr-aleatoire').click(async event => this.actor.reinsertionAleatoire("Action MJ"))
|
||||||
|
this.html.find('.don-de-haut-reve').click(async event => this.actor.addDonDeHautReve())
|
||||||
|
|
||||||
this.html.find('.afficher-tmr').click(async event => this.actor.changeTMRVisible())
|
this.html.find('.afficher-tmr').click(async event => this.actor.changeTMRVisible())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ import { RdDCoeur } from "./coeur/rdd-coeur.js";
|
|||||||
import { DialogChoixXpCarac } from "./dialog-choix-xp-carac.js";
|
import { DialogChoixXpCarac } from "./dialog-choix-xp-carac.js";
|
||||||
import { RdDItemArme } from "./item-arme.js";
|
import { RdDItemArme } from "./item-arme.js";
|
||||||
import { RdDCombatManager } from "./rdd-combat.js";
|
import { RdDCombatManager } from "./rdd-combat.js";
|
||||||
|
import { RdDItemTete } from "./item/tete.js";
|
||||||
|
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
||||||
|
|
||||||
export const MAINS_DIRECTRICES = ['Droitier', 'Gaucher', 'Ambidextre']
|
export const MAINS_DIRECTRICES = ['Droitier', 'Gaucher', 'Ambidextre']
|
||||||
|
|
||||||
@ -53,41 +55,27 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
* Prepare Character type specific data
|
* Prepare Character type specific data
|
||||||
*/
|
*/
|
||||||
prepareActorData() {
|
prepareActorData() {
|
||||||
this.$computeCaracDerivee()
|
|
||||||
this.$computeIsHautRevant()
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
$computeCaracDerivee() {
|
|
||||||
|
|
||||||
this.system.carac.force.value = Math.min(this.system.carac.force.value, parseInt(this.system.carac.taille.value) + 4);
|
this.system.carac.force.value = Math.min(this.system.carac.force.value, parseInt(this.system.carac.taille.value) + 4);
|
||||||
this.system.carac.melee.value = Math.floor((parseInt(this.system.carac.force.value) + parseInt(this.system.carac.agilite.value)) / 2);
|
|
||||||
|
this.system.carac.melee.value = Math.floor((this.getForce() + parseInt(this.system.carac.agilite.value)) / 2);
|
||||||
this.system.carac.tir.value = Math.floor((parseInt(this.system.carac.vue.value) + parseInt(this.system.carac.dexterite.value)) / 2);
|
this.system.carac.tir.value = Math.floor((parseInt(this.system.carac.vue.value) + parseInt(this.system.carac.dexterite.value)) / 2);
|
||||||
this.system.carac.lancer.value = Math.floor((parseInt(this.system.carac.tir.value) + parseInt(this.system.carac.force.value)) / 2);
|
this.system.carac.lancer.value = Math.floor((parseInt(this.system.carac.tir.value) + parseInt(this.system.carac.force.value)) / 2);
|
||||||
this.system.carac.derobee.value = Math.floor(parseInt(((21 - this.system.carac.taille.value)) + parseInt(this.system.carac.agilite.value)) / 2);
|
this.system.carac.derobee.value = Math.floor(parseInt(((21 - this.system.carac.taille.value)) + parseInt(this.system.carac.agilite.value)) / 2);
|
||||||
|
|
||||||
let bonusDomKey = Math.floor((parseInt(this.system.carac.force.value) + parseInt(this.system.carac.taille.value)) / 2);
|
super.prepareActorData()
|
||||||
let tailleData = RdDCarac.getCaracDerivee(bonusDomKey);
|
|
||||||
this.system.attributs.plusdom.value = tailleData.plusdom;
|
|
||||||
this.system.attributs.encombrement.value = (parseInt(this.system.carac.force.value) + parseInt(this.system.carac.taille.value)) / 2;
|
|
||||||
|
|
||||||
this.system.attributs.sconst.value = RdDCarac.calculSConst(this.system.carac.constitution.value);
|
this.system.attributs.sconst.value = RdDCarac.calculSConst(this.getConstitution())
|
||||||
this.system.attributs.sust.value = RdDCarac.getCaracDerivee(this.system.carac.taille.value).sust;
|
this.system.attributs.sust.value = RdDCarac.getCaracDerivee(this.getTaille()).sust
|
||||||
this.system.sante.vie.max = Math.ceil((parseInt(this.system.carac.taille.value) + parseInt(this.system.carac.constitution.value)) / 2);
|
|
||||||
|
|
||||||
this.system.sante.vie.value = Math.min(this.system.sante.vie.value, this.system.sante.vie.max)
|
this.system.sante.fatigue.max = this.getFatigueMax()
|
||||||
this.system.sante.endurance.max = Math.max(parseInt(this.system.carac.taille.value) + parseInt(this.system.carac.constitution.value), parseInt(this.system.sante.vie.max) + parseInt(this.system.carac.volonte.value));
|
|
||||||
this.system.sante.endurance.value = Math.min(this.system.sante.endurance.value, this.system.sante.endurance.max);
|
|
||||||
this.system.sante.fatigue.max = this.getFatigueMax();
|
|
||||||
this.system.sante.fatigue.value = Math.min(this.system.sante.fatigue.value, this.system.sante.fatigue.max);
|
this.system.sante.fatigue.value = Math.min(this.system.sante.fatigue.value, this.system.sante.fatigue.max);
|
||||||
|
|
||||||
//Compteurs
|
//Compteurs
|
||||||
this.system.reve.reve.max = this.system.carac.reve.value;
|
this.system.reve.reve.max = 3 * this.getReve()
|
||||||
this.system.compteurs.chance.max = this.system.carac.chance.value;
|
this.system.compteurs.chance.max = this.getChance()
|
||||||
}
|
|
||||||
|
|
||||||
$computeIsHautRevant() {
|
this.system.attributs.hautrevant.value = this.itemTypes[ITEM_TYPES.tete].find(it => RdDItemTete.isDonDeHautReve(it))
|
||||||
this.system.attributs.hautrevant.value = this.itemTypes['tete'].find(it => Grammar.equalsInsensitive(it.name, 'don de haut-reve'))
|
|
||||||
? "Haut rêvant"
|
? "Haut rêvant"
|
||||||
: "";
|
: "";
|
||||||
}
|
}
|
||||||
@ -112,6 +100,8 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
getChanceActuel() { return this.system.compteurs.chance?.value ?? 10 }
|
getChanceActuel() { return this.system.compteurs.chance?.value ?? 10 }
|
||||||
getMoralTotal() { return this.system.compteurs.moral?.value ?? 0 }
|
getMoralTotal() { return this.system.compteurs.moral?.value ?? 0 }
|
||||||
|
|
||||||
|
getEnduranceMax() { return Math.max(1, Math.max(this.getTaille() + this.getConstitution(), this.getVieMax() + this.getVolonte())) }
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getEtatGeneral(options = { ethylisme: false }) {
|
getEtatGeneral(options = { ethylisme: false }) {
|
||||||
const etatGeneral = this.system.compteurs.etat?.value ?? 0
|
const etatGeneral = this.system.compteurs.etat?.value ?? 0
|
||||||
@ -989,6 +979,16 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async addDonDeHautReve() {
|
||||||
|
if (!game.user.isGM || this.isHautRevant()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const donHR = await RdDItemTete.teteDonDeHautReve()
|
||||||
|
if (donHR) {
|
||||||
|
this.createEmbeddedDocuments('Item', [donHR.toObject()])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async reinsertionAleatoire(raison, accessible = tmr => true) {
|
async reinsertionAleatoire(raison, accessible = tmr => true) {
|
||||||
@ -1083,9 +1083,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getSConst() {
|
getSConst() { return RdDCarac.calculSConst(this.getConstitution()) }
|
||||||
return RdDCarac.calculSConst(this.system.carac.constitution.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
async ajoutXpConstitution(xp) {
|
async ajoutXpConstitution(xp) {
|
||||||
await this.update({ "system.carac.constitution.xp": Misc.toInt(this.system.carac.constitution.xp) + xp });
|
await this.update({ "system.carac.constitution.xp": Misc.toInt(this.system.carac.constitution.xp) + xp });
|
||||||
|
@ -19,6 +19,7 @@ import { RdDCombat, RdDCombatManager } from "../rdd-combat.js";
|
|||||||
import { RdDConfirm } from "../rdd-confirm.js";
|
import { RdDConfirm } from "../rdd-confirm.js";
|
||||||
import { ENTITE_INCARNE, SHOW_DICE, SYSTEM_RDD } from "../constants.js";
|
import { ENTITE_INCARNE, SHOW_DICE, SYSTEM_RDD } from "../constants.js";
|
||||||
import { RdDItemArme } from "../item-arme.js";
|
import { RdDItemArme } from "../item-arme.js";
|
||||||
|
import { RdDCarac } from "../rdd-carac.js";
|
||||||
|
|
||||||
const POSSESSION_SANS_DRACONIC = {
|
const POSSESSION_SANS_DRACONIC = {
|
||||||
img: 'systems/foundryvtt-reve-de-dragon/icons/entites/possession.webp',
|
img: 'systems/foundryvtt-reve-de-dragon/icons/entites/possession.webp',
|
||||||
@ -36,6 +37,13 @@ const POSSESSION_SANS_DRACONIC = {
|
|||||||
*/
|
*/
|
||||||
export class RdDBaseActorReve extends RdDBaseActor {
|
export class RdDBaseActorReve extends RdDBaseActor {
|
||||||
|
|
||||||
|
prepareActorData() {
|
||||||
|
super.prepareActorData()
|
||||||
|
this.system.attributs.plusdom.value = this.getBonusDegat()
|
||||||
|
this.system.sante.endurance.max = this.getEnduranceMax()
|
||||||
|
this.system.sante.endurance.value = Math.min(this.system.sante.endurance.value, this.system.sante.endurance.max)
|
||||||
|
}
|
||||||
|
|
||||||
getCaracChanceActuelle() {
|
getCaracChanceActuelle() {
|
||||||
return {
|
return {
|
||||||
label: 'Chance actuelle',
|
label: 'Chance actuelle',
|
||||||
@ -52,21 +60,26 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getTaille() { return Misc.toInt(this.system.carac.taille?.value) }
|
||||||
|
getConstitution() { return this.getReve() }
|
||||||
|
getForce() { return this.getReve() }
|
||||||
|
getAgilite() { return this.getForce() }
|
||||||
|
getReve() { return Misc.toInt(this.system.carac.reve?.value) }
|
||||||
|
getChance() { return this.getReve() }
|
||||||
|
|
||||||
getReveActuel() { return this.getReve() }
|
getReveActuel() { return this.getReve() }
|
||||||
getChanceActuel() { return this.getChance() }
|
getChanceActuel() { return this.getChance() }
|
||||||
|
|
||||||
getReve() { return Number(this.system.carac.reve?.value ?? 0) }
|
getEnduranceMax() { return Math.max(1, this.getTaille() + this.getConstitution()) }
|
||||||
getForce() { return this.getReve() }
|
getEncombrementMax() { return (this.getForce() + this.getTaille()) / 2 }
|
||||||
getTaille() { return Number(this.system.carac.taille?.value ?? 0) }
|
getBonusDegat() { return RdDCarac.getCaracDerivee(this.getEncombrementMax()).plusdom }
|
||||||
getAgilite() { return this.getForce() }
|
|
||||||
getChance() { return this.getReve() }
|
|
||||||
getMoralTotal() { return 0 }
|
getMoralTotal() { return 0 }
|
||||||
getBonusDegat() { return Number(this.system.attributs?.plusdom?.value ?? 0) }
|
|
||||||
getProtectionNaturelle() { return Number(this.system.attributs?.protection?.value ?? 0) }
|
getProtectionNaturelle() { return Number(this.system.attributs?.protection?.value ?? 0) }
|
||||||
getSConst() { return 0 }
|
getSConst() { return 0 }
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getEncombrementMax() { return 0 }
|
|
||||||
isSurenc() { return false }
|
isSurenc() { return false }
|
||||||
computeMalusSurEncombrement() { return 0 }
|
computeMalusSurEncombrement() { return 0 }
|
||||||
|
|
||||||
@ -84,7 +97,7 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
|||||||
isActorCombat() { return true }
|
isActorCombat() { return true }
|
||||||
|
|
||||||
getCaracInit(competence) {
|
getCaracInit(competence) {
|
||||||
if (!competence){
|
if (!competence) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
if (competence.type == ITEM_TYPES.competencecreature) {
|
if (competence.type == ITEM_TYPES.competencecreature) {
|
||||||
|
@ -6,6 +6,7 @@ import { RdDBaseActorReve } from "./base-actor-reve.js";
|
|||||||
import { RdDDice } from "../rdd-dice.js";
|
import { RdDDice } from "../rdd-dice.js";
|
||||||
import { RdDItemBlessure } from "../item/blessure.js";
|
import { RdDItemBlessure } from "../item/blessure.js";
|
||||||
import { ChatUtility } from "../chat-utility.js";
|
import { ChatUtility } from "../chat-utility.js";
|
||||||
|
import { Misc } from "../misc.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classe de base pour les acteurs qui peuvent subir des blessures
|
* Classe de base pour les acteurs qui peuvent subir des blessures
|
||||||
@ -14,25 +15,32 @@ import { ChatUtility } from "../chat-utility.js";
|
|||||||
*/
|
*/
|
||||||
export class RdDBaseActorSang extends RdDBaseActorReve {
|
export class RdDBaseActorSang extends RdDBaseActorReve {
|
||||||
|
|
||||||
|
prepareActorData() {
|
||||||
|
this.system.sante.vie.max = Math.ceil((this.getTaille() + this.getConstitution()) / 2)
|
||||||
|
this.system.sante.vie.value = Math.min(this.system.sante.vie.value, this.system.sante.vie.max)
|
||||||
|
super.prepareActorData()
|
||||||
|
this.system.attributs.encombrement.value = this.getEncombrementMax()
|
||||||
|
}
|
||||||
|
|
||||||
getForce() { return Number(this.system.carac.force?.value ?? 0) }
|
getForce() { return Misc.toInt(this.system.carac.force?.value) }
|
||||||
|
getConstitution() { return Misc.toInt(this.system.carac.constitution?.value) }
|
||||||
|
getVolonte() { return Misc.toInt(this.system.carac.volonte?.value) }
|
||||||
|
|
||||||
getBonusDegat() { return Number(this.system.attributs?.plusdom?.value ?? 0) }
|
getVieMax() { return Misc.toInt(this.system.sante.vie?.max) }
|
||||||
getProtectionNaturelle() { return Number(this.system.attributs?.protection?.value ?? 0) }
|
getEnduranceMax() { return Math.max(1, this.getTaille() + this.getConstitution()) }
|
||||||
getSConst() { return 0 }
|
getFatigueMax() { return this.getEnduranceMax() * 2 }
|
||||||
|
|
||||||
getEnduranceMax() { return Math.max(1, Math.min(this.system.sante.endurance.max, MAX_ENDURANCE_FATIGUE)) }
|
getProtectionNaturelle() { return Misc.toInt(this.system.attributs?.protection?.value) }
|
||||||
|
|
||||||
getFatigueActuelle() {
|
getFatigueActuelle() {
|
||||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
||||||
return Math.max(0, Math.min(this.getFatigueMax(), this.system.sante.fatigue?.value ?? 0));
|
return Math.max(0, Math.min(this.getFatigueMax(), Misc.toInt(this.system.sante.fatigue?.value)))
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
getFatigueRestante() { return this.getFatigueMax() - this.getFatigueActuelle() }
|
getFatigueRestante() { return this.getFatigueMax() - this.getFatigueActuelle() }
|
||||||
getFatigueMin() { return this.system.sante.endurance.max - this.system.sante.endurance.value }
|
getFatigueMin() { return this.system.sante.endurance.max - this.system.sante.endurance.value }
|
||||||
getFatigueMax() { return this.getEnduranceMax() * 2 }
|
|
||||||
|
|
||||||
malusFatigue() {
|
malusFatigue() {
|
||||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
||||||
@ -42,7 +50,6 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getEncombrementMax() { return Number(this.system.attributs?.encombrement?.value ?? 0) }
|
|
||||||
isSurenc() { return this.computeMalusSurEncombrement() < 0 }
|
isSurenc() { return this.computeMalusSurEncombrement() < 0 }
|
||||||
|
|
||||||
computeMalusSurEncombrement() {
|
computeMalusSurEncombrement() {
|
||||||
|
@ -18,6 +18,7 @@ export class RdDBaseActor extends Actor {
|
|||||||
.map(it => it[0])
|
.map(it => it[0])
|
||||||
.find(it => it)
|
.find(it => it)
|
||||||
}
|
}
|
||||||
|
|
||||||
static $findCaracByName(carac, name) {
|
static $findCaracByName(carac, name) {
|
||||||
const caracList = Object.entries(carac);
|
const caracList = Object.entries(carac);
|
||||||
let entry = Misc.findFirstLike(name, caracList, { mapper: it => it[0], description: 'caractéristique' });
|
let entry = Misc.findFirstLike(name, caracList, { mapper: it => it[0], description: 'caractéristique' });
|
||||||
@ -26,6 +27,16 @@ export class RdDBaseActor extends Actor {
|
|||||||
}
|
}
|
||||||
return entry && entry.length > 0 ? carac[entry[0]] : undefined;
|
return entry && entry.length > 0 ? carac[entry[0]] : undefined;
|
||||||
}
|
}
|
||||||
|
static getDefaultValue(actorType, path) {
|
||||||
|
if (path.includes('.')) {
|
||||||
|
path = path.split('.')
|
||||||
|
}
|
||||||
|
let obj = game.model.Actor[actorType]
|
||||||
|
for (let p of path) {
|
||||||
|
obj = obj ? obj[p] : undefined
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
|
||||||
static getDefaultImg(itemType) {
|
static getDefaultImg(itemType) {
|
||||||
return game.system.rdd.actorClasses[itemType]?.defaultIcon ?? defaultItemImg[itemType];
|
return game.system.rdd.actorClasses[itemType]?.defaultIcon ?? defaultItemImg[itemType];
|
||||||
@ -178,7 +189,8 @@ export class RdDBaseActor extends Actor {
|
|||||||
this.computeEncTotal()
|
this.computeEncTotal()
|
||||||
}
|
}
|
||||||
|
|
||||||
async prepareActorData() { }
|
prepareActorData() { }
|
||||||
|
|
||||||
async computeEtatGeneral() { }
|
async computeEtatGeneral() { }
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
findPlayer() {
|
findPlayer() {
|
||||||
@ -210,6 +222,9 @@ export class RdDBaseActor extends Actor {
|
|||||||
getMonnaie(id) { return this.findItemLike(id, 'monnaie'); }
|
getMonnaie(id) { return this.findItemLike(id, 'monnaie'); }
|
||||||
getEncombrementMax() { return 0 }
|
getEncombrementMax() { return 0 }
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async updateCarac(caracName, to) {
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async onPreUpdateItem(item, change, options, id) { }
|
async onPreUpdateItem(item, change, options, id) { }
|
||||||
async onCreateItem(item, options, id) { }
|
async onCreateItem(item, options, id) { }
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import { ENTITE_INCARNE } from "../constants.js";
|
|
||||||
import { ITEM_TYPES } from "../item.js";
|
import { ITEM_TYPES } from "../item.js";
|
||||||
import { STATUSES } from "../settings/status-effects.js";
|
|
||||||
import { RdDBaseActorSang } from "./base-actor-sang.js";
|
import { RdDBaseActorSang } from "./base-actor-sang.js";
|
||||||
|
|
||||||
export class RdDCreature extends RdDBaseActorSang {
|
export class RdDCreature extends RdDBaseActorSang {
|
||||||
@ -9,6 +7,7 @@ export class RdDCreature extends RdDBaseActorSang {
|
|||||||
return "systems/foundryvtt-reve-de-dragon/icons/creatures/bramart.svg";
|
return "systems/foundryvtt-reve-de-dragon/icons/creatures/bramart.svg";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getEnduranceMax() { return Math.max(1, this.getVieMax() + this.getConstitution()) }
|
||||||
isCreature() { return true }
|
isCreature() { return true }
|
||||||
|
|
||||||
canReceive(item) {
|
canReceive(item) {
|
||||||
|
@ -27,6 +27,7 @@ export class RdDEntite extends RdDBaseActorReve {
|
|||||||
getForce() { return this.getReve() }
|
getForce() { return this.getReve() }
|
||||||
getAgilite() { return this.getReve() }
|
getAgilite() { return this.getReve() }
|
||||||
getChance() { return this.getReve() }
|
getChance() { return this.getReve() }
|
||||||
|
getEnduranceMax() { return Math.max(1, this.getTaille() + this.getReve()) }
|
||||||
|
|
||||||
getDraconicOuPossession() {
|
getDraconicOuPossession() {
|
||||||
return this.itemTypes[ITEM_TYPES.competencecreature]
|
return this.itemTypes[ITEM_TYPES.competencecreature]
|
||||||
|
@ -76,7 +76,7 @@ const MAPPING_BASE = [
|
|||||||
{ column: "derobee", rollClass: 'roll-carac', colName: 'Dérobée', getter: (actor, context) => actor.system.carac.derobee.value },
|
{ column: "derobee", rollClass: 'roll-carac', colName: 'Dérobée', getter: (actor, context) => actor.system.carac.derobee.value },
|
||||||
{ column: "vie", getter: (actor, context) => actor.system.sante.vie.max },
|
{ column: "vie", getter: (actor, context) => actor.system.sante.vie.max },
|
||||||
{ column: "endurance", getter: (actor, context) => actor.system.sante.endurance.max },
|
{ column: "endurance", getter: (actor, context) => actor.system.sante.endurance.max },
|
||||||
{ column: "plusdom", colName: '+dom', getter: (actor, context) => actor.system.attributs.plusdom.value },
|
{ column: "plusdom", colName: '+dom', getter: (actor, context) => actor.getBonusDegat() },
|
||||||
{ column: "protectionnaturelle", colName: 'Protection naturelle', getter: (actor, context) => actor.system.attributs.protection.value > 0 ? actor.system.attributs.protection.value : '' },
|
{ column: "protectionnaturelle", colName: 'Protection naturelle', getter: (actor, context) => actor.system.attributs.protection.value > 0 ? actor.system.attributs.protection.value : '' },
|
||||||
{ column: "description", getter: (actor, context) => Mapping.getDescription(actor) },
|
{ column: "description", getter: (actor, context) => Mapping.getDescription(actor) },
|
||||||
{ column: "armure", getter: (actor, context) => Mapping.getArmure(actor, context) },
|
{ column: "armure", getter: (actor, context) => Mapping.getArmure(actor, context) },
|
||||||
@ -169,10 +169,10 @@ export class Mapping {
|
|||||||
arme: arme
|
arme: arme
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static dommagesArme(actor, arme, maniement){
|
static dommagesArme(actor, arme, maniement) {
|
||||||
const dmgArme = RdDItemArme.dommagesReels(arme, maniement)
|
const dmgArme = RdDItemArme.dommagesReels(arme, maniement)
|
||||||
const dommages = Misc.toSignedString(dmgArme + RdDBonus.bonusDmg(actor, maniement, dmgArme))
|
const dommages = Misc.toSignedString(dmgArme + RdDBonus.bonusDmg(actor, maniement, dmgArme))
|
||||||
switch(arme.system.mortalite) {
|
switch (arme.system.mortalite) {
|
||||||
case 'non-mortel': return `(${dommages})`
|
case 'non-mortel': return `(${dommages})`
|
||||||
case 'empoignade': return '-'
|
case 'empoignade': return '-'
|
||||||
}
|
}
|
||||||
@ -259,6 +259,9 @@ export class Mapping {
|
|||||||
const diff = 'R' + RdDItemSort.addSpaceToNonNumeric(sort.system.difficulte)
|
const diff = 'R' + RdDItemSort.addSpaceToNonNumeric(sort.system.difficulte)
|
||||||
return `${sort.name}${ptSeuil} (${caseTMR}) ${diff} ${coutReve}`
|
return `${sort.name}${ptSeuil} (${caseTMR}) ${diff} ${coutReve}`
|
||||||
}
|
}
|
||||||
|
static toVar(caseSpeciale) {
|
||||||
|
return Grammar.toLowerCaseNoAccent(caseSpeciale).startsWith('var') ? 'var' : caseSpeciale
|
||||||
|
}
|
||||||
|
|
||||||
static bonusCase(sort) {
|
static bonusCase(sort) {
|
||||||
const list = RdDItemSort.stringToBonuscases(sort.system.bonuscase).sort(Misc.descending(it => it.bonus))
|
const list = RdDItemSort.stringToBonuscases(sort.system.bonuscase).sort(Misc.descending(it => it.bonus))
|
||||||
|
@ -2,6 +2,399 @@
|
|||||||
import "./xregexp-all.js";
|
import "./xregexp-all.js";
|
||||||
import { SystemCompendiums } from "../settings/system-compendiums.js";
|
import { SystemCompendiums } from "../settings/system-compendiums.js";
|
||||||
import { RdDBaseActorReve } from "../actor/base-actor-reve.js";
|
import { RdDBaseActorReve } from "../actor/base-actor-reve.js";
|
||||||
|
import { Grammar } from "../grammar.js";
|
||||||
|
import { Misc } from "../misc.js";
|
||||||
|
import { ENTITE_INCARNE, ENTITE_NONINCARNE } from "../constants.js";
|
||||||
|
import { RdDItemTete } from "../item/tete.js";
|
||||||
|
|
||||||
|
const WHITESPACES = "\\s+"
|
||||||
|
const NUMERIC = "[\\+\\-]?\\d+"
|
||||||
|
const NUMERIC_VALUE = "(?<value>" + NUMERIC + ")"
|
||||||
|
|
||||||
|
const XREGEXP_COMP_CREATURE = WHITESPACES + "(?<carac>\\d+)"
|
||||||
|
+ WHITESPACES + NUMERIC_VALUE
|
||||||
|
+ "(" + WHITESPACES + "(?<init>\\d+)?\\s+?(?<dommages>[\\+\\-]?\\d+)?" + ")?"
|
||||||
|
|
||||||
|
// Skill parser depending on the type of actor
|
||||||
|
const compParser = {
|
||||||
|
personnage: "(\\D+)*" + WHITESPACES + NUMERIC_VALUE,
|
||||||
|
creature: XREGEXP_COMP_CREATURE,
|
||||||
|
entite: XREGEXP_COMP_CREATURE
|
||||||
|
}
|
||||||
|
|
||||||
|
const XREGEXP_SORT_VOIE = "(?<voies>[OHNT](\\/[OHNT])*)"
|
||||||
|
const XREGEXP_SORT_NAME = "(?<name>[^\\(]+)"
|
||||||
|
const XREGEXP_SORT_CASE = "\\((?<case>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+)\\)";
|
||||||
|
|
||||||
|
const XREGEXP_SORT = "(" + XREGEXP_SORT_VOIE
|
||||||
|
+ WHITESPACES + XREGEXP_SORT_NAME
|
||||||
|
+ WHITESPACES + XREGEXP_SORT_CASE
|
||||||
|
+ WHITESPACES + "R(?<diff>([\\-\\d]+|(\\w|\\s)+))"
|
||||||
|
+ WHITESPACES + "r(?<reve>(\\d+(\\+)?|\\s\\w+))"
|
||||||
|
+ "(" + WHITESPACES + "\\+(?<bonus>\\d+)\\s?%" + WHITESPACES + "en" + WHITESPACES + "(?<bonuscase>[A-M]\\d{1,2})" + ")?"
|
||||||
|
+ ")"
|
||||||
|
|
||||||
|
|
||||||
|
// Main class for parsing a stat block
|
||||||
|
export class RdDStatBlockParser {
|
||||||
|
|
||||||
|
static openInputDialog() {
|
||||||
|
let dialog = new Dialog({
|
||||||
|
title: "Import de stats de PNJ/Créatures",
|
||||||
|
content: `
|
||||||
|
<div>
|
||||||
|
<p>Coller le texte de la stat ici</p>
|
||||||
|
<textarea id="statBlock" style="width: 100%; height: 200px;"></textarea>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
buttons: {
|
||||||
|
ok: {
|
||||||
|
label: "OK",
|
||||||
|
callback: async (html) => {
|
||||||
|
let statBlock = html.find("#statBlock")[0].value;
|
||||||
|
await RdDStatBlockParser.parseStatBlock(statBlock);
|
||||||
|
dialog.close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel: {
|
||||||
|
label: "Cancel"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dialog.render(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
static fixWeirdPDF(statString) {
|
||||||
|
// Split the statString into lines
|
||||||
|
let lines = statString.split("\n");
|
||||||
|
let newLines = [];
|
||||||
|
let index = 0;
|
||||||
|
let nextType = "string";
|
||||||
|
// Loop through each line
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
// remove trailing spaces
|
||||||
|
lines[i] = lines[i].trim();
|
||||||
|
// Is it text ?
|
||||||
|
if (lines[i].match(/^[a-zA-Zéêè\s]+/)) {
|
||||||
|
if (nextType == "string") {
|
||||||
|
newLines[index] = lines[i];
|
||||||
|
nextType = "number";
|
||||||
|
} else {
|
||||||
|
console.log("Wrong sequence string detected...", lines[i], nextType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Is it a number ?
|
||||||
|
if (lines[i].match(/^[\d\s]+/)) {
|
||||||
|
if (nextType == "number") {
|
||||||
|
newLines[index] = newLines[index] + lines[i];
|
||||||
|
nextType = "string";
|
||||||
|
index++;
|
||||||
|
} else {
|
||||||
|
console.log("Wrong sequence number detected...", lines[i], nextType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static getHeureKey(heure) {
|
||||||
|
for (let h of game.system.rdd.config.heuresRdD) {
|
||||||
|
if (h.label.toLowerCase() == heure.toLowerCase()) {
|
||||||
|
return h.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "vaisseau";
|
||||||
|
}
|
||||||
|
|
||||||
|
static async parseStatBlock(statString) {
|
||||||
|
|
||||||
|
//statString = statBlock03;
|
||||||
|
if (!statString) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special function to fix strange/weird copy/paste from PDF readers
|
||||||
|
// Unused up to now : this.fixWeirdPDF(statString);
|
||||||
|
|
||||||
|
// Replace all endline by space in the statString
|
||||||
|
statString = statString.replace(/\n/g, " ");
|
||||||
|
// Remove all multiple spaces
|
||||||
|
statString = statString.replace(/\s{2,}/g, " ");
|
||||||
|
// Remove all leading and trailing spaces
|
||||||
|
statString = statString.trim();
|
||||||
|
|
||||||
|
// TODO: check for entite
|
||||||
|
let type = RdDStatBlockParser.parseActorType(statString);
|
||||||
|
|
||||||
|
// Now start carac
|
||||||
|
let actorData = foundry.utils.deepClone(game.model.Actor[type]);
|
||||||
|
for (let key in actorData.carac) {
|
||||||
|
let caracDef = actorData.carac[key];
|
||||||
|
// Parse the stat string for each caracteristic
|
||||||
|
let carac = XRegExp.exec(statString, XRegExp(caracDef.label + "\\s+(?<value>\\d+)", 'giu'));
|
||||||
|
if (carac?.value) {
|
||||||
|
actorData.carac[key].value = Number(carac.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If creature we need to setup additionnal fields
|
||||||
|
switch (type) {
|
||||||
|
case "creature":
|
||||||
|
RdDStatBlockParser.parseCreature(statString, actorData)
|
||||||
|
break
|
||||||
|
case "entite":
|
||||||
|
RdDStatBlockParser.parseEntite(statString, actorData)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
let items = [];
|
||||||
|
// Get skills from compendium
|
||||||
|
const competences = await SystemCompendiums.getCompetences(type);
|
||||||
|
//console.log("Competences : ", competences);
|
||||||
|
for (let comp of competences) {
|
||||||
|
let compMatch = XRegExp.exec(statString, XRegExp(comp.name + compParser[type], 'giu'));
|
||||||
|
if (compMatch) {
|
||||||
|
comp = comp.toObject()
|
||||||
|
comp.system.niveau = Number(compMatch.value);
|
||||||
|
if (type == "creature" || type == "entite") {
|
||||||
|
comp.system.carac_value = Number(compMatch.carac);
|
||||||
|
if (compMatch.dommages != undefined) {
|
||||||
|
comp.system.dommages = Number(compMatch.dommages);
|
||||||
|
comp.system.iscombat = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
items.push(comp)
|
||||||
|
}
|
||||||
|
else if (type == "personnage") {
|
||||||
|
comp = comp.toObject()
|
||||||
|
items.push(comp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now process weapons
|
||||||
|
const weapons = await SystemCompendiums.getWorldOrCompendiumItems("arme", "equipement")
|
||||||
|
//console.log("Equipement : ", equipment);
|
||||||
|
// TODO: les noms d'armes peuvent avoir un suffixe (à une main, lancée) qui détermine la compétence correspondante
|
||||||
|
// TODO: une arme peut être spécifique ("fourche"), ajouter une compétence dans ces cas là?
|
||||||
|
for (let weapon of weapons) {
|
||||||
|
let weapMatch = XRegExp.exec(statString, XRegExp(weapon.name + "\\s+(?<value>\\+\\d+)", 'giu'));
|
||||||
|
if (weapMatch) {
|
||||||
|
weapon = weapon.toObject()
|
||||||
|
weapon.system.equipe = 'true'
|
||||||
|
items.push(weapon)
|
||||||
|
// now process the skill
|
||||||
|
if (weapon.system?.competence != "") {
|
||||||
|
let wComp = items.find(i => Grammar.equalsInsensitive(i.name, weapon.system.competence))
|
||||||
|
if (wComp) {
|
||||||
|
wComp.system.niveau = Number(weapMatch.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (weapon.system?.tir != "") {
|
||||||
|
let wComp = items.find(i => Grammar.equalsInsensitive(i.name, weapon.system.tir))
|
||||||
|
if (wComp) {
|
||||||
|
wComp.system.niveau = Number(weapMatch.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (weapon.system?.lancer != "") {
|
||||||
|
let wComp = items.find(i => Grammar.equalsInsensitive(i.name, weapon.system.lancer))
|
||||||
|
if (wComp) {
|
||||||
|
wComp.system.niveau = Number(weapMatch.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now process armors
|
||||||
|
const armors = await SystemCompendiums.getWorldOrCompendiumItems("armure", "equipement")
|
||||||
|
for (let armor of armors) {
|
||||||
|
let matchArmor = XRegExp.exec(statString, XRegExp(armor.name, 'giu'));
|
||||||
|
if (matchArmor) {
|
||||||
|
armor = armor.toObject()
|
||||||
|
armor.system.equipe = true
|
||||||
|
items.push(armor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (type == "personnage") {
|
||||||
|
await RdDStatBlockParser.parseHautReve(statString, actorData, items);
|
||||||
|
RdDStatBlockParser.parsePersonnage(statString, actorData);
|
||||||
|
}
|
||||||
|
|
||||||
|
let name = RdDStatBlockParser.extractName(type, statString);
|
||||||
|
|
||||||
|
let newActor = await RdDBaseActorReve.create({ name, type: type, system: actorData, items });
|
||||||
|
await newActor.remiseANeuf()
|
||||||
|
await RdDStatBlockParser.setValActuelle(newActor, statString)
|
||||||
|
// DUmp....
|
||||||
|
console.log(actorData);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async setValActuelle(newActor, statString) {
|
||||||
|
const updates = {
|
||||||
|
}
|
||||||
|
const endurance = XRegExp.exec(statString, XRegExp("endurance\\s+(?<value>\\d+)\\s+(\\(actuelle\\s*:\\s+(?<actuelle>\\d+)\\))?", 'giu'));
|
||||||
|
if (endurance?.value) {
|
||||||
|
if (newActor.getEnduranceMax() != endurance.value) {
|
||||||
|
const message = `Vérifier le calcul de l'endurance, calcul: ${newActor.getEnduranceMax()} / import: ${endurance.value}`;
|
||||||
|
RdDStatBlockParser.warning(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (endurance?.actuelle) {
|
||||||
|
updates['system.sante.endurance.value'] = Number(endurance?.actuelle)
|
||||||
|
}
|
||||||
|
|
||||||
|
const vie = XRegExp.exec(statString, XRegExp("vie\\s+(?<value>\\d+)\\s+(\\(actuelle\\s*:\\s+(?<actuelle>\\d+)\\))?", 'giu'));
|
||||||
|
if (vie?.value) {
|
||||||
|
if (newActor.getVieMax() != vie.value) {
|
||||||
|
const message = `Vérifier le calcul de la vie, calcul: ${newActor.getVieMax()} / import: ${vie.value}`;
|
||||||
|
RdDStatBlockParser.warning(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (vie?.actuelle) {
|
||||||
|
updates['system.sante.vie.value'] = Number(vie?.actuelle)
|
||||||
|
}
|
||||||
|
await newActor.update(updates)
|
||||||
|
}
|
||||||
|
|
||||||
|
static async parseHautReve(statString, actorData, items) {
|
||||||
|
let hautRevant = false;
|
||||||
|
// Attemp to detect spell
|
||||||
|
let sorts = await SystemCompendiums.getWorldOrCompendiumItems("sort", "sorts-oniros");
|
||||||
|
sorts = sorts.concat(await SystemCompendiums.getWorldOrCompendiumItems("sort", "sorts-hypnos"));
|
||||||
|
sorts = sorts.concat(await SystemCompendiums.getWorldOrCompendiumItems("sort", "sorts-narcos"));
|
||||||
|
sorts = sorts.concat(await SystemCompendiums.getWorldOrCompendiumItems("sort", "sorts-thanatos"));
|
||||||
|
|
||||||
|
XRegExp.forEach(statString, XRegExp(XREGEXP_SORT, 'gu' /* keep case sensitive to match the spell draconic skill */),
|
||||||
|
function (matchSort, i) {
|
||||||
|
const sortName = Grammar.toLowerCaseNoAccent(matchSort.name).trim().replace("’", "'");
|
||||||
|
let sort = sorts.find(s => Grammar.toLowerCaseNoAccent(s.name) == sortName)
|
||||||
|
if (sort) {
|
||||||
|
hautRevant = true;
|
||||||
|
sort = sort.toObject();
|
||||||
|
if (matchSort.bonus && matchSort.bonuscase) {
|
||||||
|
sort.system.bonuscase = `${matchSort.bonuscase}:${matchSort.bonus}`;
|
||||||
|
}
|
||||||
|
items.push(sort);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
RdDStatBlockParser.warning(`Impossible de trouver le sort ${matchSort.name} / ${sortName}`)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (hautRevant) {
|
||||||
|
const donHR = await RdDItemTete.teteDonDeHautReve();
|
||||||
|
if (donHR) {
|
||||||
|
items.push(donHR.toObject());
|
||||||
|
}
|
||||||
|
|
||||||
|
const demiReve = XRegExp.exec(statString, XRegExp("Demi-rêve\\s+(?<value>[A-M]\\d{1,2})", 'giu'))
|
||||||
|
actorData.reve.tmrpos.coord = demiReve?.value ?? 'A1'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static parsePersonnage(statString, actorData) {
|
||||||
|
actorData.reve.seuil.value = actorData.carac.reve.value
|
||||||
|
|
||||||
|
const reveActuel = XRegExp.exec(statString, XRegExp("Rêve actuel\\s+(?<value>\\d+)", 'giu'))
|
||||||
|
actorData.reve.reve.value = reveActuel?.value ? Number(reveActuel.value) : actorData.reve.seuil.value
|
||||||
|
|
||||||
|
const feminin = XRegExp.exec(statString, XRegExp("né(?<value>e?) à", 'giu'));
|
||||||
|
actorData.sexe = (feminin?.value == 'e') ? 'féminin' : 'masculin';
|
||||||
|
|
||||||
|
// Get hour name : heure du XXXXX
|
||||||
|
const heure = XRegExp.exec(statString, XRegExp("heure (du|de la|des|de l\')\\s*(?<value>[A-Za-zÀ-ÖØ-öø-ÿ\\s]+),", 'giu'));
|
||||||
|
actorData.heure = this.getHeureKey(heure?.value || "Vaisseau");
|
||||||
|
|
||||||
|
// Get age
|
||||||
|
const age = XRegExp.exec(statString, XRegExp("(?<value>\\d+) ans", 'giu'));
|
||||||
|
if (age?.value) {
|
||||||
|
actorData.age = Number(age.value);
|
||||||
|
}
|
||||||
|
// Get height
|
||||||
|
const taille = XRegExp.exec(statString, XRegExp("(?<value>\\d+m\\d+)", 'giu'));
|
||||||
|
if (taille?.value) {
|
||||||
|
actorData.taille = taille.value;
|
||||||
|
}
|
||||||
|
// Get weight
|
||||||
|
const poids = XRegExp.exec(statString, XRegExp("(?<value>\\d+) kg", 'giu'));
|
||||||
|
if (poids?.value) {
|
||||||
|
actorData.poids = poids.value;
|
||||||
|
}
|
||||||
|
// Get cheveux
|
||||||
|
const cheveux = XRegExp.exec(statString, XRegExp("kg,\\s+(?<value>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+),\\s+yeux", 'giu'));
|
||||||
|
if (cheveux?.value) {
|
||||||
|
actorData.cheveux = cheveux.value;
|
||||||
|
}
|
||||||
|
// Get yeux
|
||||||
|
const yeux = XRegExp.exec(statString, XRegExp("yeux\\s+(?<value>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+), Beau", 'giu'));
|
||||||
|
if (yeux?.value) {
|
||||||
|
actorData.yeux = yeux.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get beauty
|
||||||
|
const beaute = XRegExp.exec(statString, XRegExp("beauté\\s+(?<value>\\d+)", 'giu'));
|
||||||
|
if (beaute?.value) {
|
||||||
|
actorData.beaute = Number(beaute.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static parseCreature(statString, actorData) {
|
||||||
|
let protection = XRegExp.exec(statString, XRegExp("protection\\s+(?<value>[\\-]?\\d+)", 'giu'));
|
||||||
|
if (protection?.value) {
|
||||||
|
actorData.attributs.protection.value = Number(protection.value);
|
||||||
|
}
|
||||||
|
let vitesse = XRegExp.exec(statString, XRegExp("vitesse\\s+(?<value>[\\d\\/]+)", 'giu'));
|
||||||
|
if (vitesse?.value) {
|
||||||
|
actorData.attributs.vitesse.value = vitesse.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static parseEntite(statString, actorData) {
|
||||||
|
actorData.definition.categorieentite = 'cauchemar'
|
||||||
|
actorData.definition.typeentite = ENTITE_NONINCARNE
|
||||||
|
let endurance = XRegExp.exec(statString, XRegExp("endurance\\s+(?<value>\\d+)", 'giu'));
|
||||||
|
if (endurance?.value) {
|
||||||
|
actorData.sante.endurance.value = Number(endurance.value);
|
||||||
|
actorData.sante.endurance.max = Number(endurance.value);
|
||||||
|
actorData.definition.typeentite = ENTITE_INCARNE
|
||||||
|
}
|
||||||
|
let vitesse = XRegExp.exec(statString, XRegExp("vitesse\\s+(?<value>[\\d\\/]+)", 'giu'));
|
||||||
|
if (vitesse?.value) {
|
||||||
|
actorData.attributs.vitesse.value = vitesse.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static parseActorType(statString) {
|
||||||
|
let niveau = XRegExp.exec(statString, XRegExp("Niveau\\s+(?<value>[\\+\\-]?\\d+)", 'giu'))
|
||||||
|
let perception = XRegExp.exec(statString, XRegExp("perception\\s+(?<value>\\d+)", 'giu'))
|
||||||
|
if (perception?.value) {
|
||||||
|
return "creature"
|
||||||
|
}
|
||||||
|
if (niveau?.value) {
|
||||||
|
return "entite"
|
||||||
|
}
|
||||||
|
return "personnage"
|
||||||
|
}
|
||||||
|
|
||||||
|
static extractName(actorType, statString) {
|
||||||
|
switch (actorType) {
|
||||||
|
case "personnage":
|
||||||
|
// Name is all string before first comma ','
|
||||||
|
const namePersonnage = XRegExp.exec(statString, XRegExp("(?<value>[\\p{Letter}\\s\\d]+),", 'giu'));
|
||||||
|
if (namePersonnage?.value) {
|
||||||
|
return Misc.upperFirst(namePersonnage?.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const name = XRegExp.exec(statString, XRegExp("(?<value>.+)\\s+taille", 'giu'));
|
||||||
|
return Misc.upperFirst(name?.value || "Importé");
|
||||||
|
}
|
||||||
|
|
||||||
|
static warning(message) {
|
||||||
|
ui.notifications.warn(message);
|
||||||
|
console.warn(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
// Some internal test strings
|
// Some internal test strings
|
||||||
@ -76,7 +469,7 @@ Corps à corps
|
|||||||
(0)
|
(0)
|
||||||
Esquive
|
Esquive
|
||||||
+8
|
+8
|
||||||
Escalade +4 / Saut +5 / Commerce +3 / Équitation
|
Escalade, Saut +4 / Commerce +3 / Équitation
|
||||||
+6 / Chirurgie 0 / Survie en extérieur +4 / Survie fo-
|
+6 / Chirurgie 0 / Survie en extérieur +4 / Survie fo-
|
||||||
rêt +6 / Acrobatie -2 / Métallurgie +2 / Natation +3 /
|
rêt +6 / Acrobatie -2 / Métallurgie +2 / Natation +3 /
|
||||||
Légendes -1 / Écriture -4
|
Légendes -1 / Écriture -4
|
||||||
@ -194,240 +587,4 @@ Discrétion
|
|||||||
Vigilance
|
Vigilance
|
||||||
13
|
13
|
||||||
+3
|
+3
|
||||||
`
|
`
|
||||||
// Skill parser depending on the type of actor
|
|
||||||
const compParser = { personnage: "\\s+(?<value>[\\+\\-]?\\d+)", creature: "\\s+(?<carac>\\d+)\\s+(?<value>[\\+\\-]?\\d+)\\s?(?<init>\\d+)?\\s+?(?<dommages>\\+\\d+)?" };
|
|
||||||
|
|
||||||
// Main class for parsing a stat block
|
|
||||||
export class RdDStatBlockParser {
|
|
||||||
|
|
||||||
static openInputDialog() {
|
|
||||||
let dialog = new Dialog({
|
|
||||||
title: "Import de stats de PNJ/Créatures",
|
|
||||||
content: `
|
|
||||||
<div>
|
|
||||||
<p>Coller le texte de la stat ici</p>
|
|
||||||
<textarea id="statBlock" style="width: 100%; height: 200px;"></textarea>
|
|
||||||
</div>
|
|
||||||
`,
|
|
||||||
buttons: {
|
|
||||||
ok: {
|
|
||||||
label: "OK",
|
|
||||||
callback: async (html) => {
|
|
||||||
let statBlock = html.find("#statBlock")[0].value;
|
|
||||||
await RdDStatBlockParser.parseStatBlock(statBlock);
|
|
||||||
dialog.close();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel: {
|
|
||||||
label: "Cancel"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dialog.render(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
static fixWeirdPDF(statString) {
|
|
||||||
// Split the statString into lines
|
|
||||||
let lines = statString.split("\n");
|
|
||||||
let newLines = [];
|
|
||||||
let index = 0;
|
|
||||||
let nextType = "string";
|
|
||||||
// Loop through each line
|
|
||||||
for (let i = 0; i < lines.length; i++) {
|
|
||||||
// remove trailing spaces
|
|
||||||
lines[i] = lines[i].trim();
|
|
||||||
// Is it text ?
|
|
||||||
if (lines[i].match(/^[a-zA-Zéêè\s]+/)) {
|
|
||||||
if ( nextType == "string" ) {
|
|
||||||
newLines[index] = lines[i];
|
|
||||||
nextType = "number";
|
|
||||||
} else {
|
|
||||||
console.log("Wrong sequence string detected...", lines[i], nextType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Is it a number ?
|
|
||||||
if (lines[i].match(/^[\d\s]+/)) {
|
|
||||||
if ( nextType == "number" ) {
|
|
||||||
newLines[index] = newLines[index] + lines[i];
|
|
||||||
nextType = "string";
|
|
||||||
index++;
|
|
||||||
} else {
|
|
||||||
console.log("Wrong sequence number detected...", lines[i], nextType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static async parseStatBlock(statString, type = "npc") {
|
|
||||||
|
|
||||||
//statString = statBlock03;
|
|
||||||
if (!statString) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Special function to fix strange/weird copy/paste from PDF readers
|
|
||||||
// Unused up to now : this.fixWeirdPDF(statString);
|
|
||||||
|
|
||||||
// Replace all endline by space in the statString
|
|
||||||
statString = statString.replace(/\n/g, " ");
|
|
||||||
// Remove all multiple spaces
|
|
||||||
statString = statString.replace(/\s{2,}/g, " ");
|
|
||||||
// Remove all leading and trailing spaces
|
|
||||||
statString = statString.trim();
|
|
||||||
|
|
||||||
let actorType = "personnage";
|
|
||||||
let perception = XRegExp.exec(statString.toLowerCase(), XRegExp("perception\\s+(?<value>\\d+)", 'gi'));
|
|
||||||
if (perception?.value ) {
|
|
||||||
actorType = "creature";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now start carac
|
|
||||||
let actorData = foundry.utils.deepClone(game.model.Actor[actorType]);
|
|
||||||
for (let key in game.model.Actor.personnage.carac) {
|
|
||||||
let caracDef = game.model.Actor.personnage.carac[key];
|
|
||||||
// Parse the stat string for each caracteristic
|
|
||||||
let carac = XRegExp.exec(statString.toLowerCase(), XRegExp(caracDef.label.toLowerCase()+"\\s+(?<value>\\d+)", 'gi'));
|
|
||||||
if (carac?.value) {
|
|
||||||
actorData.carac[key].value = Number(carac.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If creature we need to setup additionnal fields
|
|
||||||
if (actorType == "creature") {
|
|
||||||
let plusDom = XRegExp.exec(statString.toLowerCase(), XRegExp("\\+dom\\s+(?<value>\\+\\d+)", 'gi'));
|
|
||||||
if (plusDom?.values) {
|
|
||||||
actorData.attributs.plusdom.value = Number(plusDom.value);
|
|
||||||
}
|
|
||||||
let protection = XRegExp.exec(statString.toLowerCase(), XRegExp("protection\\s+(?<value>\\d+)", 'gi'));
|
|
||||||
if (protection?.value) {
|
|
||||||
actorData.attributs.protection.value = Number(protection.value);
|
|
||||||
}
|
|
||||||
let endurance = XRegExp.exec(statString.toLowerCase(), XRegExp("endurance\\s+(?<value>\\d+)", 'gi'));
|
|
||||||
if (endurance?.value) {
|
|
||||||
actorData.sante.endurance.value = Number(endurance.value);
|
|
||||||
actorData.sante.endurance.max = Number(endurance.value);
|
|
||||||
}
|
|
||||||
let vie = XRegExp.exec(statString.toLowerCase(), XRegExp("vie\\s+(?<value>\\d+)", 'gi'));
|
|
||||||
if (vie.value) {
|
|
||||||
actorData.sante.vie.value = Number(vie.value);
|
|
||||||
actorData.sante.vie.max = Number(vie.value);
|
|
||||||
}
|
|
||||||
let vitesse = XRegExp.exec(statString.toLowerCase(), XRegExp("vitesse\\s+(?<value>[\\d\\/]+)", 'gi'));
|
|
||||||
if (vitesse?.value) {
|
|
||||||
actorData.attributs.vitesse.value = vitesse.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let items = [];
|
|
||||||
// Get skills from compendium
|
|
||||||
const competences = await SystemCompendiums.getCompetences(actorType);
|
|
||||||
//console.log("Competences : ", competences);
|
|
||||||
let allComp = competences.map(i => i.toObject())
|
|
||||||
for (let comp of allComp) {
|
|
||||||
let skill = XRegExp.exec(statString.toLowerCase(), XRegExp(comp.name.toLowerCase()+compParser[actorType], 'gi'));
|
|
||||||
if (skill) {
|
|
||||||
comp.system.niveau = Number(skill.value);
|
|
||||||
if (actorType == "creature") {
|
|
||||||
comp.system.carac_value = Number(skill.carac);
|
|
||||||
if (skill.init) {
|
|
||||||
comp.system.dommages = Number(skill.dommages);
|
|
||||||
comp.system.iscombat = true;
|
|
||||||
}
|
|
||||||
items.push(comp); // Only selective push
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (actorType == "personnage") {
|
|
||||||
items.push(comp); // Always push
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now process weapons
|
|
||||||
const weapons = await SystemCompendiums.getWorldOrCompendiumItems("arme", "equipement")
|
|
||||||
//console.log("Equipement : ", equipment);
|
|
||||||
for (let w of weapons) {
|
|
||||||
|
|
||||||
let weapon = XRegExp.exec(statString.toLowerCase(), XRegExp(w.name.toLowerCase()+"\\s+(?<value>\\+\\d+)", 'gi'));
|
|
||||||
if (weapon) {
|
|
||||||
w.system.equipe = true
|
|
||||||
items.push(w.toObject());
|
|
||||||
// now process the skill
|
|
||||||
if ( w.system?.competence != "") {
|
|
||||||
let wComp = items.find(i => i.name.toLowerCase() == w.system.competence.toLowerCase());
|
|
||||||
if (wComp) {
|
|
||||||
wComp.system.niveau = Number(weapon.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( w.system?.tir != "") {
|
|
||||||
let wComp = items.find(i => i.name.toLowerCase() == w.system.tir.toLowerCase());
|
|
||||||
if (wComp) {
|
|
||||||
wComp.system.niveau = Number(weapon.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( w.system?.lancer != "") {
|
|
||||||
let wComp = items.find(i => i.name.toLowerCase() == w.system.lancer.toLowerCase());
|
|
||||||
if (wComp) {
|
|
||||||
wComp.system.niveau = Number(weapon.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now process armors
|
|
||||||
const armors = await SystemCompendiums.getWorldOrCompendiumItems("armure", "equipement")
|
|
||||||
for (let a of armors) {
|
|
||||||
let armor = XRegExp.exec(statString.toLowerCase(), XRegExp(a.name.toLowerCase(), 'gi'));
|
|
||||||
if (armor) {
|
|
||||||
a.system.equipe = true
|
|
||||||
items.push(a.toObject());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get hour name : heure du XXXXX
|
|
||||||
let heure = XRegExp.exec(statString.toLowerCase(), XRegExp("heure du\\s+(?<value>\\w+)", 'gi'));
|
|
||||||
if (heure?.value) {
|
|
||||||
actorData.heure = heure.value;
|
|
||||||
}
|
|
||||||
// Get age
|
|
||||||
let age = XRegExp.exec(statString.toLowerCase(), XRegExp("(?<value>\\d+) ans", 'gi'));
|
|
||||||
if (age?.value) {
|
|
||||||
actorData.age = Number(age.value);
|
|
||||||
}
|
|
||||||
// Get height
|
|
||||||
let taille = XRegExp.exec(statString.toLowerCase(), XRegExp("(?<value>\\d+)m\\d+", 'gi'));
|
|
||||||
if (taille?.value) {
|
|
||||||
actorData.taille = taille.value;
|
|
||||||
}
|
|
||||||
// Get weight
|
|
||||||
let poids = XRegExp.exec(statString.toLowerCase(), XRegExp("(?<value>\\d+) kg", 'gi'));
|
|
||||||
if (poids?.value) {
|
|
||||||
actorData.poids = poids.value;
|
|
||||||
}
|
|
||||||
// Get beauty
|
|
||||||
let beaute = XRegExp.exec(statString.toLowerCase(), XRegExp("beauté\\s+(?<value>\\d+)", 'gi'));
|
|
||||||
if (beaute?.value) {
|
|
||||||
actorData.beaute = Number(beaute.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Name is all string before ', né'
|
|
||||||
let name
|
|
||||||
if (actorType == "personnage") {
|
|
||||||
name = XRegExp.exec(statString.toLowerCase(), XRegExp("(?<value>[\\w\\s\\d]+),", 'gi'));
|
|
||||||
if (!name?.value) {
|
|
||||||
name = XRegExp.exec(statString.toLowerCase(), XRegExp("(?<value>.+)\\s+taille", 'gi'));
|
|
||||||
}
|
|
||||||
name = name?.value || "Importé";
|
|
||||||
}
|
|
||||||
if (actorType == "creature") {
|
|
||||||
name = XRegExp.exec(statString.toLowerCase(), XRegExp("(?<value>.+)\\s+taille", 'gi'));
|
|
||||||
name = name?.value || "Importé";
|
|
||||||
}
|
|
||||||
|
|
||||||
let newActor = RdDBaseActorReve.create({name: name || "Importé", type:actorType, system: actorData, items: items});
|
|
||||||
|
|
||||||
// DUmp....
|
|
||||||
console.log(actorData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ export class RdDItemCompetenceCreature extends Item {
|
|||||||
|
|
||||||
static isParade(item) {
|
static isParade(item) {
|
||||||
if (item.type == ITEM_TYPES.competencecreature) {
|
if (item.type == ITEM_TYPES.competencecreature) {
|
||||||
return armeData.system.categorie_parade || armeData.system.isparade
|
return item.system.categorie_parade || item.system.isparade
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
25
module/item/tete.js
Normal file
25
module/item/tete.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { Grammar } from "../grammar.js"
|
||||||
|
import { ITEM_TYPES, RdDItem } from "../item.js"
|
||||||
|
import { SystemCompendiums } from "../settings/system-compendiums.js"
|
||||||
|
|
||||||
|
const DON_HAUT_REVE = "Don de Haut-Rêve"
|
||||||
|
|
||||||
|
export class RdDItemTete extends RdDItem {
|
||||||
|
|
||||||
|
static get defaultIcon() {
|
||||||
|
return "systems/foundryvtt-reve-de-dragon/icons/tete_dragon.webp"
|
||||||
|
}
|
||||||
|
|
||||||
|
static isDonDeHautReve(tete) {
|
||||||
|
return tete.type == ITEM_TYPES.tete && Grammar.equalsInsensitive(tete.name, DON_HAUT_REVE)
|
||||||
|
}
|
||||||
|
|
||||||
|
static async teteDonDeHautReve() {
|
||||||
|
const tetes = await SystemCompendiums.getItems("tetes-de-dragon-pour-tous-personnages", ITEM_TYPES.tete)
|
||||||
|
const tete = tetes.find(it => RdDItemTete.isDonDeHautReve(it))
|
||||||
|
if (!tete) {
|
||||||
|
ui.notifications.warn(`Impossible de trouver la tête "${DON_HAUT_REVE}", vérifiez le compendium de têtes pour tous personnages`)
|
||||||
|
}
|
||||||
|
return tete
|
||||||
|
}
|
||||||
|
}
|
@ -137,7 +137,7 @@ class _10_0_21_VehiculeStructureResistanceMax extends Migration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _10_0_33_MigrationNomsDraconic extends Migration {
|
class _10_0_33_MigrationNomsDraconic extends Migration {
|
||||||
get code() { return "competences-creature-parade"; }
|
get code() { return "competences-nom-draconic"; }
|
||||||
get version() { return "10.0.33"; }
|
get version() { return "10.0.33"; }
|
||||||
|
|
||||||
migrationNomDraconic(ancien) {
|
migrationNomDraconic(ancien) {
|
||||||
@ -530,15 +530,25 @@ class _11_2_20_MigrationAstrologie extends Migration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _12_0_24_MigrationVoieSorts extends Migration {
|
class _12_0_26_MigrationVoieSorts extends Migration {
|
||||||
get code() { return "migration-voies-sorts" }
|
get code() { return "migration-voies-sorts" }
|
||||||
get version() { return "12.0.24" }
|
get version() { return "12.0.26" }
|
||||||
|
|
||||||
async migrate() {
|
async migrate() {
|
||||||
await this.applyItemsUpdates(items => items
|
await this.applyItemsUpdates(items => items
|
||||||
.filter(it => ITEM_TYPES.sort == it.type)
|
.filter(it => [ITEM_TYPES.sort, ITEM_TYPES.sortreserve].includes(it.type))
|
||||||
.map(it => this.migrateSort(it))
|
.map(it => this.migrateSort(it))
|
||||||
)
|
)
|
||||||
|
await this.applyItemsUpdates(items => items
|
||||||
|
.filter(it => ITEM_TYPES.competence == it.type && it.system.categorie == 'draconic')
|
||||||
|
.map(it => this.migrateDraconic(it))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
migrateDraconic(it) {
|
||||||
|
return {
|
||||||
|
_id: it.id,
|
||||||
|
name: this.convertDraconic(it.name),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
migrateSort(it) {
|
migrateSort(it) {
|
||||||
return {
|
return {
|
||||||
@ -575,6 +585,7 @@ export class Migrations {
|
|||||||
new _10_7_19_CategorieCompetenceCreature(),
|
new _10_7_19_CategorieCompetenceCreature(),
|
||||||
new _10_7_19_PossessionsEntiteVictime(),
|
new _10_7_19_PossessionsEntiteVictime(),
|
||||||
new _11_2_20_MigrationAstrologie(),
|
new _11_2_20_MigrationAstrologie(),
|
||||||
|
new _12_0_26_MigrationVoieSorts()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,9 +58,6 @@ export class Misc {
|
|||||||
* @param {*} value value to convert to an integer using parseInt
|
* @param {*} value value to convert to an integer using parseInt
|
||||||
*/
|
*/
|
||||||
static toInt(value) {
|
static toInt(value) {
|
||||||
if (value == undefined) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
const parsed = parseInt(value);
|
const parsed = parseInt(value);
|
||||||
return isNaN(parsed) ? 0 : parsed;
|
return isNaN(parsed) ? 0 : parsed;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ export class RdDCarac {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static getCaracDerivee(value) {
|
static getCaracDerivee(value) {
|
||||||
return TABLE_CARACTERISTIQUES_DERIVEES[Math.min(Math.max(Number(value), 1), 32)];
|
return TABLE_CARACTERISTIQUES_DERIVEES[Math.min(Math.max(Math.floor(Number(value)), 1), 32)];
|
||||||
}
|
}
|
||||||
|
|
||||||
static computeTotal(carac, beaute = undefined) {
|
static computeTotal(carac, beaute = undefined) {
|
||||||
|
@ -70,6 +70,7 @@ import { AppPersonnageAleatoire } from "./actor/random/app-personnage-aleatoire.
|
|||||||
import { RdDActorExportSheet } from "./actor/export-scriptarium/actor-encart-sheet.js"
|
import { RdDActorExportSheet } from "./actor/export-scriptarium/actor-encart-sheet.js"
|
||||||
import { RdDStatBlockParser } from "./apps/rdd-import-stats.js"
|
import { RdDStatBlockParser } from "./apps/rdd-import-stats.js"
|
||||||
import { RdDItemSort } from "./item-sort.js"
|
import { RdDItemSort } from "./item-sort.js"
|
||||||
|
import { RdDItemTete } from "./item/tete.js"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RdD system
|
* RdD system
|
||||||
@ -97,6 +98,7 @@ export class SystemReveDeDragon {
|
|||||||
ombre: RdDItemOmbre,
|
ombre: RdDItemOmbre,
|
||||||
poison: RdDItemPoison,
|
poison: RdDItemPoison,
|
||||||
queue: RdDItemQueue,
|
queue: RdDItemQueue,
|
||||||
|
tete: RdDItemTete,
|
||||||
rencontre: RdDRencontre,
|
rencontre: RdDRencontre,
|
||||||
service: RdDItemService,
|
service: RdDItemService,
|
||||||
signedraconique: RdDItemSigneDraconique,
|
signedraconique: RdDItemSigneDraconique,
|
||||||
|
@ -20,6 +20,7 @@ import { ExperienceLog } from "./actor/experience-log.js";
|
|||||||
import { RdDCoeur } from "./coeur/rdd-coeur.js";
|
import { RdDCoeur } from "./coeur/rdd-coeur.js";
|
||||||
import { APP_ASTROLOGIE_REFRESH } from "./sommeil/app-astrologie.js";
|
import { APP_ASTROLOGIE_REFRESH } from "./sommeil/app-astrologie.js";
|
||||||
import { RDD_CONFIG } from "./constants.js";
|
import { RDD_CONFIG } from "./constants.js";
|
||||||
|
import { RdDBaseActor } from "./actor/base-actor.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// This table starts at 0 -> niveau -10
|
// This table starts at 0 -> niveau -10
|
||||||
@ -145,8 +146,8 @@ export class RdDUtility {
|
|||||||
'systems/foundryvtt-reve-de-dragon/templates/actor/alchimie.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor/alchimie.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor/astrologie.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor/astrologie.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor/chirurgie.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor/chirurgie.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor/non-haut-revant.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor/non-haut-revant.hbs',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor/haut-revant.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor/haut-revant.hbs',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queues.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queues.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queue.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queue.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-souffles.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-souffles.html',
|
||||||
@ -288,6 +289,8 @@ export class RdDUtility {
|
|||||||
Handlebars.registerHelper('timestamp-formulesDuree', () => RdDTimestamp.formulesDuree());
|
Handlebars.registerHelper('timestamp-formulesDuree', () => RdDTimestamp.formulesDuree());
|
||||||
Handlebars.registerHelper('timestamp-formulesPeriode', () => RdDTimestamp.formulesPeriode());
|
Handlebars.registerHelper('timestamp-formulesPeriode', () => RdDTimestamp.formulesPeriode());
|
||||||
|
|
||||||
|
Handlebars.registerHelper('actor-default', (actorType, ...path) => RdDBaseActor.getDefaultValue(actorType, path.slice(0, -1)));
|
||||||
|
|
||||||
Handlebars.registerHelper('array-includes', (array, value) => array.includes(value));
|
Handlebars.registerHelper('array-includes', (array, value) => array.includes(value));
|
||||||
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
||||||
Handlebars.registerHelper('isLastIndex', (index, list) => index + 1 >= list.length);
|
Handlebars.registerHelper('isLastIndex', (index, list) => index + 1 >= list.length);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { ChatUtility } from "../chat-utility.js";
|
import { ChatUtility } from "../chat-utility.js";
|
||||||
import { HIDE_DICE, SYSTEM_RDD } from "../constants.js";
|
import { HIDE_DICE, SYSTEM_RDD } from "../constants.js";
|
||||||
|
import { Grammar } from "../grammar.js";
|
||||||
import { RdDItem } from "../item.js";
|
import { RdDItem } from "../item.js";
|
||||||
import { Misc } from "../misc.js";
|
import { Misc } from "../misc.js";
|
||||||
import { RdDDice } from "../rdd-dice.js";
|
import { RdDDice } from "../rdd-dice.js";
|
||||||
@ -32,7 +33,7 @@ export class SystemCompendiums extends FormApplication {
|
|||||||
compendium: compendium,
|
compendium: compendium,
|
||||||
default: SystemCompendiums._getDefaultCompendium(compendium),
|
default: SystemCompendiums._getDefaultCompendium(compendium),
|
||||||
setting: SystemCompendiums._getSettingCompendium(compendium)
|
setting: SystemCompendiums._getSettingCompendium(compendium)
|
||||||
});
|
})
|
||||||
|
|
||||||
game.settings.register(SYSTEM_RDD, definition.setting, {
|
game.settings.register(SYSTEM_RDD, definition.setting, {
|
||||||
name: definition.label,
|
name: definition.label,
|
||||||
@ -40,8 +41,8 @@ export class SystemCompendiums extends FormApplication {
|
|||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
type: String
|
type: String
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
|
|
||||||
game.settings.registerMenu(SYSTEM_RDD, "compendium-settings", {
|
game.settings.registerMenu(SYSTEM_RDD, "compendium-settings", {
|
||||||
name: "Choisir les compendiums système",
|
name: "Choisir les compendiums système",
|
||||||
@ -71,26 +72,27 @@ export class SystemCompendiums extends FormApplication {
|
|||||||
|
|
||||||
static async getCompetences(actorType) {
|
static async getCompetences(actorType) {
|
||||||
switch (actorType ?? 'personnage') {
|
switch (actorType ?? 'personnage') {
|
||||||
case 'personnage': return await SystemCompendiums.getWorldOrCompendiumItems('competence', 'competences');
|
case 'personnage':
|
||||||
case 'creature': return await SystemCompendiums.getWorldOrCompendiumItems('competencecreature', 'competences-creatures');
|
return await SystemCompendiums.getWorldOrCompendiumItems('competence', 'competences')
|
||||||
case 'entite': return await SystemCompendiums.getWorldOrCompendiumItems('competencecreature', 'competences-entites');
|
case 'entite':
|
||||||
|
case 'creature':
|
||||||
|
return await SystemCompendiums.getWorldOrCompendiumItems('competencecreature', 'competences-creatures')
|
||||||
case 'vehicule': return [];
|
case 'vehicule': return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async getWorldOrCompendiumItems(itemType, compendium) {
|
static async getWorldOrCompendiumItems(itemType, compendium) {
|
||||||
let items = game.items.filter(it => it.type == itemType);
|
let items = game.items.filter(it => it.type == itemType)
|
||||||
if (compendium) {
|
if (compendium) {
|
||||||
const ids = items.map(it => it.id);
|
const ids = items.map(it => it.id)
|
||||||
const names = items.map(it => it.name.toLowerCase());
|
const names = items.map(it => Grammar.toLowerCaseNoAccent(it.name))
|
||||||
const compendiumItems = await SystemCompendiums.getItems(compendium);
|
const compendiumItems = await SystemCompendiums.getItems(compendium, itemType)
|
||||||
items = items.concat(compendiumItems
|
return items.concat(compendiumItems
|
||||||
.filter(it => it.type == itemType)
|
|
||||||
.filter(it => !ids.includes(it.id))
|
.filter(it => !ids.includes(it.id))
|
||||||
.filter(it => !names.includes(it.name.toLowerCase())));
|
.filter(it => !names.includes(Grammar.equalsInsensitive(it.name))))
|
||||||
}
|
}
|
||||||
return items;
|
return items
|
||||||
}
|
}
|
||||||
|
|
||||||
static async loadDocument(document) {
|
static async loadDocument(document) {
|
||||||
@ -284,7 +286,7 @@ export class CompendiumTableHelpers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async tableRowToChatMessage(row, type, options = {showSource: true}) {
|
static async tableRowToChatMessage(row, type, options = { showSource: true }) {
|
||||||
if (!row) {
|
if (!row) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -6,17 +6,16 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: generale
|
categorie: melee
|
||||||
categorie_parade: ''
|
categorie_parade: ''
|
||||||
iscombat: true
|
iscombat: true
|
||||||
isnaturelle: true
|
isnaturelle: true
|
||||||
ispossession: false
|
ispossession: false
|
||||||
dommages: 0
|
dommages: 0
|
||||||
mortalite: mortel
|
mortalite: mortel
|
||||||
carac-value: null
|
|
||||||
isparade: false
|
isparade: false
|
||||||
ownership:
|
ownership:
|
||||||
default: 0
|
default: 0
|
@ -6,17 +6,16 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: ''
|
categorie: melee
|
||||||
categorie_parade: boucliers
|
categorie_parade: boucliers
|
||||||
iscombat: true
|
iscombat: true
|
||||||
isnaturelle: true
|
isnaturelle: true
|
||||||
ispossession: false
|
ispossession: false
|
||||||
dommages: 0
|
dommages: 0
|
||||||
mortalite: mortel
|
mortalite: mortel
|
||||||
carac-value: null
|
|
||||||
isparade: true
|
isparade: true
|
||||||
ownership:
|
ownership:
|
||||||
default: 0
|
default: 0
|
@ -1,22 +1,21 @@
|
|||||||
_id: WsYnwR8GcOxfuCI0
|
_id: WsYnwR8GcOxfuCI0
|
||||||
name: Bras-Galet
|
name: Bras-Galet
|
||||||
type: competencecreature
|
type: competencecreature
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/competence_course.webp
|
img: systems/foundryvtt-reve-de-dragon/icons/compcreature-pierretenue.webp
|
||||||
effects: []
|
effects: []
|
||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: ''
|
categorie: melee
|
||||||
categorie_parade: ''
|
categorie_parade: ''
|
||||||
iscombat: true
|
iscombat: true
|
||||||
isnaturelle: true
|
isnaturelle: true
|
||||||
ispossession: false
|
ispossession: false
|
||||||
dommages: 1
|
dommages: 1
|
||||||
mortalite: mortel
|
mortalite: mortel
|
||||||
carac-value: null
|
|
||||||
isparade: false
|
isparade: false
|
||||||
ownership:
|
ownership:
|
||||||
default: 0
|
default: 0
|
@ -6,10 +6,10 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: ''
|
categorie: melee
|
||||||
categorie_parade: sans-armes
|
categorie_parade: sans-armes
|
||||||
iscombat: true
|
iscombat: true
|
||||||
isnaturelle: true
|
isnaturelle: true
|
@ -6,17 +6,16 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: ''
|
categorie: melee
|
||||||
categorie_parade: ''
|
categorie_parade: ''
|
||||||
iscombat: true
|
iscombat: true
|
||||||
isnaturelle: true
|
isnaturelle: true
|
||||||
ispossession: false
|
ispossession: false
|
||||||
dommages: 1
|
dommages: 1
|
||||||
mortalite: mortel
|
mortalite: mortel
|
||||||
carac-value: null
|
|
||||||
isparade: false
|
isparade: false
|
||||||
ownership:
|
ownership:
|
||||||
default: 0
|
default: 0
|
@ -6,9 +6,9 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: melee
|
categorie: melee
|
||||||
categorie_parade: dagues
|
categorie_parade: dagues
|
||||||
iscombat: true
|
iscombat: true
|
||||||
|
@ -6,17 +6,16 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: ''
|
categorie: melee
|
||||||
categorie_parade: epees-lourdes
|
categorie_parade: epees-lourdes
|
||||||
iscombat: true
|
iscombat: true
|
||||||
isnaturelle: true
|
isnaturelle: false
|
||||||
ispossession: false
|
ispossession: false
|
||||||
dommages: 4
|
dommages: 4
|
||||||
mortalite: mortel
|
mortalite: mortel
|
||||||
carac-value: null
|
|
||||||
isparade: true
|
isparade: true
|
||||||
ownership:
|
ownership:
|
||||||
default: 0
|
default: 0
|
@ -6,8 +6,8 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: 0
|
||||||
categorie: generale
|
categorie: generale
|
||||||
categorie_parade: ''
|
categorie_parade: ''
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
name: Esquive eau
|
||||||
|
type: competencecreature
|
||||||
|
img: systems/foundryvtt-reve-de-dragon/icons/competence_esquive.webp
|
||||||
|
effects: []
|
||||||
|
system:
|
||||||
|
description: ''
|
||||||
|
descriptionmj: ''
|
||||||
|
carac_value: 10
|
||||||
|
niveau: 1
|
||||||
|
default_diffLibre: 0
|
||||||
|
categorie: generale
|
||||||
|
categorie_parade: ''
|
||||||
|
iscombat: false
|
||||||
|
isnaturelle: true
|
||||||
|
ispossession: false
|
||||||
|
dommages: 0
|
||||||
|
mortalite: mortel
|
||||||
|
isparade: false
|
||||||
|
ownership:
|
||||||
|
default: 0
|
||||||
|
folder: null
|
||||||
|
_stats:
|
||||||
|
compendiumSource: null
|
||||||
|
duplicateSource: null
|
||||||
|
coreVersion: '12.331'
|
||||||
|
systemId: foundryvtt-reve-de-dragon
|
||||||
|
systemVersion: 12.0.24
|
||||||
|
createdTime: 1733182927319
|
||||||
|
modifiedTime: 1733182927336
|
||||||
|
lastModifiedBy: Hp9ImM4o9YRTSdfu
|
||||||
|
flags: {}
|
||||||
|
_id: Qrg3ADB9LOhGthaO
|
||||||
|
sort: 1300000
|
||||||
|
_key: '!items!Qrg3ADB9LOhGthaO'
|
||||||
|
|
@ -1,15 +1,14 @@
|
|||||||
_id: 0Ms9iKxqigNNpZEx
|
name: Esquive sol
|
||||||
name: Esquive
|
|
||||||
type: competencecreature
|
type: competencecreature
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/competence_esquive.webp
|
img: systems/foundryvtt-reve-de-dragon/icons/competence_esquive.webp
|
||||||
effects: []
|
effects: []
|
||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: 0
|
||||||
categorie: ''
|
categorie: generale
|
||||||
categorie_parade: ''
|
categorie_parade: ''
|
||||||
iscombat: false
|
iscombat: false
|
||||||
isnaturelle: true
|
isnaturelle: true
|
||||||
@ -20,10 +19,17 @@ system:
|
|||||||
ownership:
|
ownership:
|
||||||
default: 0
|
default: 0
|
||||||
folder: null
|
folder: null
|
||||||
sort: 0
|
|
||||||
_stats:
|
_stats:
|
||||||
systemId: foundryvtt-reve-de-dragon
|
compendiumSource: null
|
||||||
systemVersion: 12.0.22
|
duplicateSource: null
|
||||||
coreVersion: '12.331'
|
coreVersion: '12.331'
|
||||||
_key: '!items!0Ms9iKxqigNNpZEx'
|
systemId: foundryvtt-reve-de-dragon
|
||||||
|
systemVersion: 12.0.24
|
||||||
|
createdTime: 1733182930109
|
||||||
|
modifiedTime: 1733182930109
|
||||||
|
lastModifiedBy: Hp9ImM4o9YRTSdfu
|
||||||
|
flags: {}
|
||||||
|
_id: siPvW3hAMCJbrYvq
|
||||||
|
sort: 0
|
||||||
|
_key: '!items!siPvW3hAMCJbrYvq'
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
name: Esquive vol
|
||||||
|
type: competencecreature
|
||||||
|
img: systems/foundryvtt-reve-de-dragon/icons/competence_esquive.webp
|
||||||
|
effects: []
|
||||||
|
system:
|
||||||
|
description: ''
|
||||||
|
descriptionmj: ''
|
||||||
|
carac_value: 10
|
||||||
|
niveau: 1
|
||||||
|
default_diffLibre: 0
|
||||||
|
categorie: generale
|
||||||
|
categorie_parade: ''
|
||||||
|
iscombat: false
|
||||||
|
isnaturelle: true
|
||||||
|
ispossession: false
|
||||||
|
dommages: 0
|
||||||
|
mortalite: mortel
|
||||||
|
isparade: false
|
||||||
|
ownership:
|
||||||
|
default: 0
|
||||||
|
folder: null
|
||||||
|
_stats:
|
||||||
|
compendiumSource: null
|
||||||
|
duplicateSource: null
|
||||||
|
coreVersion: '12.331'
|
||||||
|
systemId: foundryvtt-reve-de-dragon
|
||||||
|
systemVersion: 12.0.24
|
||||||
|
createdTime: 1733182932133
|
||||||
|
modifiedTime: 1733182932133
|
||||||
|
lastModifiedBy: Hp9ImM4o9YRTSdfu
|
||||||
|
flags: {}
|
||||||
|
_id: 3ScoGTkQ0VBOpaX6
|
||||||
|
sort: 0
|
||||||
|
_key: '!items!3ScoGTkQ0VBOpaX6'
|
||||||
|
|
@ -6,17 +6,16 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: ''
|
categorie: melee
|
||||||
categorie_parade: ''
|
categorie_parade: boucliers
|
||||||
iscombat: false
|
iscombat: true
|
||||||
isnaturelle: true
|
isnaturelle: true
|
||||||
ispossession: false
|
ispossession: false
|
||||||
dommages: 0
|
dommages: 0
|
||||||
mortalite: mortel
|
mortalite: mortel
|
||||||
carac-value: null
|
|
||||||
isparade: false
|
isparade: false
|
||||||
ownership:
|
ownership:
|
||||||
default: 0
|
default: 0
|
@ -7,7 +7,7 @@ system:
|
|||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 14
|
carac_value: 14
|
||||||
niveau: 2
|
niveau: 2
|
||||||
default_diffLibre: 0
|
default_diffLibre: -4
|
||||||
categorie: draconic
|
categorie: draconic
|
||||||
categorie_parade: ''
|
categorie_parade: ''
|
||||||
iscombat: true
|
iscombat: true
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
name: Possession
|
|
||||||
type: competencecreature
|
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/entites/possession.webp
|
|
||||||
effects: []
|
|
||||||
system:
|
|
||||||
description: <p>L'entité tente de prendre possession du corps de sa victime.</p>
|
|
||||||
descriptionmj: ''
|
|
||||||
carac_value: 14
|
|
||||||
niveau: 2
|
|
||||||
default_diffLibre: 0
|
|
||||||
categorie: draconic
|
|
||||||
categorie_parade: ''
|
|
||||||
iscombat: true
|
|
||||||
isnaturelle: true
|
|
||||||
ispossession: true
|
|
||||||
dommages: 0
|
|
||||||
mortalite: mortel
|
|
||||||
isparade: false
|
|
||||||
_id: duVgxI3Cdko0KzAj
|
|
||||||
folder: null
|
|
||||||
sort: 0
|
|
||||||
ownership:
|
|
||||||
default: 0
|
|
||||||
_stats:
|
|
||||||
systemId: foundryvtt-reve-de-dragon
|
|
||||||
systemVersion: 12.0.22
|
|
||||||
coreVersion: '12.331'
|
|
||||||
_key: '!items!duVgxI3Cdko0KzAj'
|
|
||||||
|
|
@ -6,10 +6,10 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: <p>Attaque ou parade avec un tentacule.</p>
|
description: <p>Attaque ou parade avec un tentacule.</p>
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: ''
|
categorie: melee
|
||||||
categorie_parade: boucliers
|
categorie_parade: boucliers
|
||||||
iscombat: true
|
iscombat: true
|
||||||
isnaturelle: true
|
isnaturelle: true
|
@ -6,9 +6,9 @@ effects: []
|
|||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
carac_value: 0
|
carac_value: 10
|
||||||
niveau: 0
|
niveau: 1
|
||||||
default_diffLibre: 0
|
default_diffLibre: -2
|
||||||
categorie: melee
|
categorie: melee
|
||||||
categorie_parade: ''
|
categorie_parade: ''
|
||||||
iscombat: true
|
iscombat: true
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
_id: d5SZ09sFaG3cL2Rg
|
|
||||||
name: Bec
|
|
||||||
type: competencecreature
|
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/compcreature-beak.webp
|
|
||||||
effects: []
|
|
||||||
system:
|
|
||||||
description: ''
|
|
||||||
descriptionmj: ''
|
|
||||||
carac_value: 0
|
|
||||||
niveau: 0
|
|
||||||
default_diffLibre: 0
|
|
||||||
categorie: ''
|
|
||||||
categorie_parade: ''
|
|
||||||
iscombat: true
|
|
||||||
isnaturelle: true
|
|
||||||
ispossession: false
|
|
||||||
dommages: 0
|
|
||||||
mortalite: mortel
|
|
||||||
isparade: false
|
|
||||||
ownership:
|
|
||||||
default: 0
|
|
||||||
folder: null
|
|
||||||
sort: 0
|
|
||||||
_stats:
|
|
||||||
systemId: foundryvtt-reve-de-dragon
|
|
||||||
systemVersion: 12.0.22
|
|
||||||
coreVersion: '12.331'
|
|
||||||
_key: '!items!d5SZ09sFaG3cL2Rg'
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
_id: lDZ3qUPKN35ob5TH
|
|
||||||
name: Grande morsure
|
|
||||||
type: competencecreature
|
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/compcreature-morsure.webp
|
|
||||||
effects: []
|
|
||||||
system:
|
|
||||||
description: ''
|
|
||||||
descriptionmj: ''
|
|
||||||
carac_value: 0
|
|
||||||
niveau: 0
|
|
||||||
default_diffLibre: 0
|
|
||||||
categorie: ''
|
|
||||||
categorie_parade: ''
|
|
||||||
iscombat: true
|
|
||||||
isnaturelle: true
|
|
||||||
ispossession: false
|
|
||||||
dommages: 2
|
|
||||||
mortalite: mortel
|
|
||||||
isparade: false
|
|
||||||
ownership:
|
|
||||||
default: 0
|
|
||||||
folder: null
|
|
||||||
sort: 0
|
|
||||||
_stats:
|
|
||||||
systemId: foundryvtt-reve-de-dragon
|
|
||||||
systemVersion: 12.0.22
|
|
||||||
coreVersion: '12.331'
|
|
||||||
_key: '!items!lDZ3qUPKN35ob5TH'
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
_id: 6eWCVDYLXXO1Z48D
|
|
||||||
name: Grandes griffes
|
|
||||||
type: competencecreature
|
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/compcreature-griffes.webp
|
|
||||||
effects: []
|
|
||||||
system:
|
|
||||||
description: ''
|
|
||||||
descriptionmj: ''
|
|
||||||
carac_value: 0
|
|
||||||
niveau: 0
|
|
||||||
default_diffLibre: 0
|
|
||||||
categorie: ''
|
|
||||||
categorie_parade: sans-armes
|
|
||||||
iscombat: true
|
|
||||||
isnaturelle: true
|
|
||||||
ispossession: false
|
|
||||||
dommages: 2
|
|
||||||
mortalite: mortel
|
|
||||||
isparade: false
|
|
||||||
ownership:
|
|
||||||
default: 0
|
|
||||||
folder: null
|
|
||||||
sort: 0
|
|
||||||
_stats:
|
|
||||||
systemId: foundryvtt-reve-de-dragon
|
|
||||||
systemVersion: 12.0.22
|
|
||||||
coreVersion: '12.331'
|
|
||||||
_key: '!items!6eWCVDYLXXO1Z48D'
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
_id: 9Y83OsQgeyR5oCdH
|
|
||||||
name: Griffes
|
|
||||||
type: competencecreature
|
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/compcreature-griffes.webp
|
|
||||||
effects: []
|
|
||||||
system:
|
|
||||||
description: ''
|
|
||||||
descriptionmj: ''
|
|
||||||
carac_value: 0
|
|
||||||
niveau: 0
|
|
||||||
default_diffLibre: 0
|
|
||||||
categorie: ''
|
|
||||||
categorie_parade: sans-armes
|
|
||||||
iscombat: true
|
|
||||||
isnaturelle: true
|
|
||||||
ispossession: false
|
|
||||||
dommages: 1
|
|
||||||
mortalite: mortel
|
|
||||||
carac-value: null
|
|
||||||
isparade: false
|
|
||||||
ownership:
|
|
||||||
default: 0
|
|
||||||
folder: null
|
|
||||||
sort: 0
|
|
||||||
_stats:
|
|
||||||
systemId: foundryvtt-reve-de-dragon
|
|
||||||
systemVersion: 12.0.22
|
|
||||||
coreVersion: '12.331'
|
|
||||||
_key: '!items!9Y83OsQgeyR5oCdH'
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
_id: j1xHCzfIeYKgXxoH
|
|
||||||
name: Morsure
|
|
||||||
type: competencecreature
|
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/compcreature-morsure.webp
|
|
||||||
effects: []
|
|
||||||
system:
|
|
||||||
description: ''
|
|
||||||
descriptionmj: ''
|
|
||||||
carac_value: 0
|
|
||||||
niveau: 0
|
|
||||||
default_diffLibre: 0
|
|
||||||
categorie: ''
|
|
||||||
categorie_parade: ''
|
|
||||||
iscombat: true
|
|
||||||
isnaturelle: true
|
|
||||||
ispossession: false
|
|
||||||
dommages: 1
|
|
||||||
mortalite: mortel
|
|
||||||
isparade: false
|
|
||||||
ownership:
|
|
||||||
default: 0
|
|
||||||
folder: null
|
|
||||||
sort: 0
|
|
||||||
_stats:
|
|
||||||
systemId: foundryvtt-reve-de-dragon
|
|
||||||
systemVersion: 12.0.22
|
|
||||||
coreVersion: '12.331'
|
|
||||||
_key: '!items!j1xHCzfIeYKgXxoH'
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
name: Possession
|
|
||||||
type: competencecreature
|
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/entites/possession.webp
|
|
||||||
effects: []
|
|
||||||
system:
|
|
||||||
description: <p>L'entité tente de prendre possession du corps de sa victime.</p>
|
|
||||||
descriptionmj: ''
|
|
||||||
carac_value: 14
|
|
||||||
niveau: 2
|
|
||||||
default_diffLibre: -4
|
|
||||||
categorie: melee
|
|
||||||
categorie_parade: ''
|
|
||||||
iscombat: true
|
|
||||||
isnaturelle: true
|
|
||||||
ispossession: true
|
|
||||||
dommages: 0
|
|
||||||
mortalite: mortel
|
|
||||||
isparade: false
|
|
||||||
ownership:
|
|
||||||
default: 0
|
|
||||||
folder: null
|
|
||||||
sort: 0
|
|
||||||
_id: wDHR5UHWq568lfGa
|
|
||||||
_stats:
|
|
||||||
systemId: foundryvtt-reve-de-dragon
|
|
||||||
systemVersion: 12.0.22
|
|
||||||
coreVersion: '12.331'
|
|
||||||
_key: '!items!wDHR5UHWq568lfGa'
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
name: Voie d'Hypnos
|
name: Hypnos
|
||||||
type: competence
|
type: competence
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/competence_hypnos.webp
|
img: systems/foundryvtt-reve-de-dragon/icons/competence_hypnos.webp
|
||||||
_id: bt2cR4aE6lIOeg4F
|
_id: bt2cR4aE6lIOeg4F
|
@ -1,4 +1,4 @@
|
|||||||
name: Voie de Narcos
|
name: Narcos
|
||||||
type: competence
|
type: competence
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/competence_narcos.webp
|
img: systems/foundryvtt-reve-de-dragon/icons/competence_narcos.webp
|
||||||
_id: u1Peok1EYkBcVsmN
|
_id: u1Peok1EYkBcVsmN
|
@ -1,4 +1,4 @@
|
|||||||
name: Voie d'Oniros
|
name: Oniros
|
||||||
type: competence
|
type: competence
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp
|
img: systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp
|
||||||
_id: nnR2UHelUaF8dxYn
|
_id: nnR2UHelUaF8dxYn
|
@ -1,4 +1,4 @@
|
|||||||
name: Voie de Thanatos
|
name: Thanatos
|
||||||
type: competence
|
type: competence
|
||||||
img: systems/foundryvtt-reve-de-dragon/icons/competence_thanatos.webp
|
img: systems/foundryvtt-reve-de-dragon/icons/competence_thanatos.webp
|
||||||
_id: dPlTQzvU3CEg5qKc
|
_id: dPlTQzvU3CEg5qKc
|
46
system.json
46
system.json
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"id": "foundryvtt-reve-de-dragon",
|
"id": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"version": "12.0.24",
|
"version": "12.0.26",
|
||||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/latest/rddsystem.zip",
|
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.26/rddsystem.zip",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/latest/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.26/system.json",
|
||||||
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
|
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "11",
|
"minimum": "11",
|
||||||
@ -53,7 +53,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
|
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"esmodules": [
|
"esmodules": [
|
||||||
"module/rdd-main.js"
|
"module/rdd-main.js"
|
||||||
@ -115,19 +115,6 @@
|
|||||||
},
|
},
|
||||||
"flags": {}
|
"flags": {}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "competences-entites",
|
|
||||||
"label": "Compétences des Entités",
|
|
||||||
"system": "foundryvtt-reve-de-dragon",
|
|
||||||
"path": "packs/competences-entites",
|
|
||||||
"banner": "systems/foundryvtt-reve-de-dragon/styles/img/ui/compendium_banner.webp",
|
|
||||||
"type": "Item",
|
|
||||||
"ownership": {
|
|
||||||
"PLAYER": "NONE",
|
|
||||||
"ASSISTANT": "OWNER"
|
|
||||||
},
|
|
||||||
"flags": {}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "sorts-oniros",
|
"name": "sorts-oniros",
|
||||||
"label": "Sorts d'Oniros",
|
"label": "Sorts d'Oniros",
|
||||||
@ -458,7 +445,7 @@
|
|||||||
"label": "Méditations et Ecrits",
|
"label": "Méditations et Ecrits",
|
||||||
"system": "foundryvtt-reve-de-dragon",
|
"system": "foundryvtt-reve-de-dragon",
|
||||||
"path": "packs/meditations-et-ecrits",
|
"path": "packs/meditations-et-ecrits",
|
||||||
"banner": "systems/foundryvtt-reve-de-dragon/styles/img/ui/compendium_banner.webp",
|
"banner": "systems/foundryvtt-reve-de-dragon/styles/img/ui/compendium_banner.webp",
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"ownership": {
|
"ownership": {
|
||||||
"PLAYER": "NONE",
|
"PLAYER": "NONE",
|
||||||
@ -513,7 +500,9 @@
|
|||||||
"arts-et-divertissements",
|
"arts-et-divertissements",
|
||||||
"meditations-et-ecrits",
|
"meditations-et-ecrits",
|
||||||
"recettes-alchimiques"
|
"recettes-alchimiques"
|
||||||
]
|
],
|
||||||
|
"color": null,
|
||||||
|
"folders": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Le Haut-rêve",
|
"name": "Le Haut-rêve",
|
||||||
@ -530,7 +519,9 @@
|
|||||||
"ombres-de-thanatos",
|
"ombres-de-thanatos",
|
||||||
"souffles-de-dragon",
|
"souffles-de-dragon",
|
||||||
"tetes-de-dragon-pour-haut-revants"
|
"tetes-de-dragon-pour-haut-revants"
|
||||||
]
|
],
|
||||||
|
"color": null,
|
||||||
|
"folders": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Découverte du monde",
|
"name": "Découverte du monde",
|
||||||
@ -541,9 +532,10 @@
|
|||||||
"entites",
|
"entites",
|
||||||
"faune-flore-mineraux",
|
"faune-flore-mineraux",
|
||||||
"competences-creatures",
|
"competences-creatures",
|
||||||
"competences-entites",
|
|
||||||
"maladies-et-poisons"
|
"maladies-et-poisons"
|
||||||
]
|
],
|
||||||
|
"color": null,
|
||||||
|
"folders": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Outils du Gardien",
|
"name": "Outils du Gardien",
|
||||||
@ -554,14 +546,16 @@
|
|||||||
"macros",
|
"macros",
|
||||||
"tarot-draconique",
|
"tarot-draconique",
|
||||||
"extrait-poetique"
|
"extrait-poetique"
|
||||||
]
|
],
|
||||||
|
"color": null,
|
||||||
|
"folders": []
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"color": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"grid": {
|
"grid": {
|
||||||
"distance": 1,
|
|
||||||
"units": "m"
|
"units": "m"
|
||||||
},
|
},
|
||||||
"primaryTokenAttribute": "sante.vie",
|
"primaryTokenAttribute": "sante.vie",
|
||||||
@ -590,4 +584,4 @@
|
|||||||
"flags": {}
|
"flags": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -112,7 +112,7 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"label": "Vitesse",
|
"label": "Vitesse",
|
||||||
"derivee": true
|
"derivee": false
|
||||||
},
|
},
|
||||||
"protection": {
|
"protection": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
@ -195,13 +195,13 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"label": "Vitesse",
|
"label": "Vitesse",
|
||||||
"derivee": true
|
"derivee": false
|
||||||
},
|
},
|
||||||
"encombrement": {
|
"encombrement": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"value": 0,
|
"value": 0,
|
||||||
"label": "Encombrement",
|
"label": "Encombrement",
|
||||||
"derivee": false
|
"derivee": true
|
||||||
},
|
},
|
||||||
"protection": {
|
"protection": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
|
@ -129,11 +129,10 @@
|
|||||||
<div>
|
<div>
|
||||||
{{#if system.attributs.hautrevant.value}}
|
{{#if system.attributs.hautrevant.value}}
|
||||||
<h3>Haut rêvant</h3>
|
<h3>Haut rêvant</h3>
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/haut-revant.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/haut-revant.hbs"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<h3>Vous n'avez pas le don de haut-rêve</h3>
|
<h3>Vous n'avez pas le don de haut-rêve</h3>
|
||||||
<p>Attribuer la Tête de Dragon 'Don de Haut Rêve' pour rendre le personnage Haut-Rêvant.</p>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/non-haut-revant.hbs"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/non-haut-revant.html"}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<br><br>
|
<br><br>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,21 @@
|
|||||||
<ol class="carac-list alterne-list">
|
<ol class="carac-list alterne-list">
|
||||||
{{#each system.attributs as |attr key|}}
|
{{#each system.attributs as |attr key|}}
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
{{#if (and (eq key 'plusdom') (eq @root.system.definition.typeentite 'nonincarne'))}}
|
||||||
<span class="carac-label" name="system.attributs.{{key}}.label">{{attr.label}}</span>
|
{{else}}
|
||||||
<input class="caracteristique streched" type="text" name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="{{attr.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}}/>
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
</li>
|
<span class="carac-label" name="system.attributs.{{key}}.label">{{attr.label}}</span>
|
||||||
|
{{#if (actor-default @root.type 'attributs' key 'derivee')}}
|
||||||
|
<input class="caracteristique streched" type="text" name="system.attributs.{{key}}.value"
|
||||||
|
{{#if (eq key 'plusdom')}}
|
||||||
|
value="{{numberFormat attr.value decimals=0 sign=true}}"
|
||||||
|
{{else}}
|
||||||
|
value="{{attr.value}}"
|
||||||
|
{{/if}}
|
||||||
|
data-dtype="{{attr.type}}" disabled/>
|
||||||
|
{{else}}
|
||||||
|
<input class="caracteristique streched" type="text" name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="{{attr.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}}/>
|
||||||
|
{{/if}}
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ol>
|
</ol>
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
{{selectOptions (RDD_CONFIG 'typeEntite') selected=system.definition.typeentite}}
|
{{selectOptions (RDD_CONFIG 'typeEntite') selected=system.definition.typeentite}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
{{#each system.attributs as |attr key|}}
|
</ol>
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
|
||||||
<span class="carac-label" name="system.attributs.{{key}}.label">{{attr.label}} : </span>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/carac-creature.html"}}
|
||||||
<input class="caracteristique streched" type="text" name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="{{attr.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}}/>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ol>
|
|
||||||
|
@ -1,36 +1,39 @@
|
|||||||
<ul class="carac-list alterne-list">
|
<ul class="carac-list alterne-list">
|
||||||
{{#each system.carac as |carac key|}}
|
{{#each system.carac as |carac key|}}
|
||||||
|
{{#if (and (eq key 'taille') (eq @root.system.definition.typeentite 'nonincarne'))}}
|
||||||
|
{{else}}
|
||||||
<li class="caracteristique flexrow list-item{{#if carac.isLevelUp}} xp-level-up{{/if}}" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item{{#if carac.isLevelUp}} xp-level-up{{/if}}" data-attribute="{{key}}">
|
||||||
{{#if (eq key 'taille')}}
|
{{#if (eq key 'taille')}}
|
||||||
<span class="carac-label" name="system.carac.{{key}}.label">{{carac.label}}</span>
|
<span class="carac-label" name="system.carac.{{key}}.label">{{carac.label}}</span>
|
||||||
<input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
<input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
||||||
<label class="carac-xp"/>
|
<label class="carac-xp"/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if carac.derivee}}
|
{{#if (actor-default @root.type 'carac' key 'derivee')}}
|
||||||
<span class="carac-label" name="system.carac.{{key}}.label"><a class="roll-carac" data-carac-name={{key}}>{{carac.label}}</a></span>
|
<span class="carac-label" name="system.carac.{{key}}.label"><a class="roll-carac" data-carac-name={{key}}>{{carac.label}}</a></span>
|
||||||
<label class="competence-value">{{carac.value}}</label>
|
<label class="competence-value">{{carac.value}}</label>
|
||||||
<label class="carac-xp"/>
|
<label class="carac-xp"/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if carac.isLevelUp}}
|
{{#if carac.isLevelUp}}
|
||||||
<span class="carac-label tooltip" name="system.carac.{{key}}.label">
|
<span class="carac-label tooltip" name="system.carac.{{key}}.label">
|
||||||
<span class="tooltiptext ttt-levelup">
|
<span class="tooltiptext ttt-levelup">
|
||||||
Vous pouvez dépenser {{carac.xpNext}} points d'Experience pour augmenter de 1 votre caractéristique {{carac.label}}
|
Vous pouvez dépenser {{carac.xpNext}} points d'Experience pour augmenter de 1 votre caractéristique {{carac.label}}
|
||||||
</span>
|
|
||||||
<a name={{key}}>{{carac.label}}</a>
|
|
||||||
<a class="carac-xp-augmenter" name="augmenter.{{key}}" data-tooltip="Augmenter la caractéristique avec l'expérience">
|
|
||||||
<i class="fas fa-arrow-alt-circle-up"></i>
|
|
||||||
</a>
|
|
||||||
</span>
|
</span>
|
||||||
{{else}}
|
<a name={{key}}>{{carac.label}}</a>
|
||||||
<span class="carac-label tooltip" name="system.carac.{{key}}.label"><a class="roll-carac" data-carac-name={{key}}>{{carac.label}}</a></span>
|
<a class="carac-xp-augmenter" name="augmenter.{{key}}" data-tooltip="Augmenter la caractéristique avec l'expérience">
|
||||||
{{/if}}
|
<i class="fas fa-arrow-alt-circle-up"></i>
|
||||||
<input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
</a>
|
||||||
<span class="carac-xp tooltip">
|
|
||||||
<input class="carac-xp" type="text" name="system.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
|
||||||
<span class="tooltiptext ttt-xp">Vous devez acquérir {{carac.xpNext}} points d'Experience pour augmenter de 1 votre {{carac.label}}</span>
|
|
||||||
</span>
|
</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="carac-label tooltip" name="system.carac.{{key}}.label"><a class="roll-carac" data-carac-name={{key}}>{{carac.label}}</a></span>
|
||||||
|
{{/if}}
|
||||||
|
<input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
||||||
|
<span class="carac-xp tooltip">
|
||||||
|
<input class="carac-xp" type="text" name="system.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.options.vueDetaillee}}disabled{{/unless}} />
|
||||||
|
<span class="tooltiptext ttt-xp">Vous devez acquérir {{carac.xpNext}} points d'Experience pour augmenter de 1 votre {{carac.label}}</span>
|
||||||
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/non-haut-revant.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/non-haut-revant.hbs"}}
|
||||||
<hr>
|
<hr>
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-signes-draconiques.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-signes-draconiques.html"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-rencontres.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-rencontres.html"}}
|
@ -5,9 +5,7 @@
|
|||||||
<a class="jet-vie" name="system.sante.vie.label" data-tooltip="Faire un jet de vie">Vie</a>
|
<a class="jet-vie" name="system.sante.vie.label" data-tooltip="Faire un jet de vie">Vie</a>
|
||||||
<a class="vie-moins"><i class="fa-solid fa-square-minus"></i></a>
|
<a class="vie-moins"><i class="fa-solid fa-square-minus"></i></a>
|
||||||
<input class="resource-content" type="text" name="system.sante.vie.value" value="{{system.sante.vie.value}}" data-dtype="Number" />
|
<input class="resource-content" type="text" name="system.sante.vie.value" value="{{system.sante.vie.value}}" data-dtype="Number" />
|
||||||
/ {{#if @root.options.vueDetaillee}}
|
/ {{system.sante.vie.max}}
|
||||||
<input class="resource-content" type="text" name="system.sante.vie.max" value="{{system.sante.vie.max}}" data-dtype="Number"/>
|
|
||||||
{{else}}{{system.sante.vie.max}}{{/if}}
|
|
||||||
<a class="vie-plus"><i class="fa-solid fa-square-plus"></i></a>
|
<a class="vie-plus"><i class="fa-solid fa-square-plus"></i></a>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
@ -16,9 +14,7 @@
|
|||||||
<a class="jet-endurance" name="system.sante.endurance.label" data-tooltip="Faire un jet d'endurance pour ne pas être sonné">Endurance</a>
|
<a class="jet-endurance" name="system.sante.endurance.label" data-tooltip="Faire un jet d'endurance pour ne pas être sonné">Endurance</a>
|
||||||
<a class="endurance-moins"><i class="fa-solid fa-square-minus"></i></a>
|
<a class="endurance-moins"><i class="fa-solid fa-square-minus"></i></a>
|
||||||
<input class="resource-content" type="text" name="system.sante.endurance.value" value="{{system.sante.endurance.value}}" data-dtype="Number"/>
|
<input class="resource-content" type="text" name="system.sante.endurance.value" value="{{system.sante.endurance.value}}" data-dtype="Number"/>
|
||||||
/ {{#if @root.options.vueDetaillee}}
|
/ {{system.sante.endurance.max}}
|
||||||
<input class="resource-content" type="text" name="system.sante.endurance.max" value="{{system.sante.endurance.max}}" data-dtype="Number"/>
|
|
||||||
{{else}}{{system.sante.endurance.max}}{{/if}}
|
|
||||||
<a class="endurance-plus"><i class="fa-solid fa-square-plus"></i></a>
|
<a class="endurance-plus"><i class="fa-solid fa-square-plus"></i></a>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
Endurance
|
Endurance
|
||||||
<a class="endurance-moins"><i class="fa-solid fa-square-minus"></i></a>
|
<a class="endurance-moins"><i class="fa-solid fa-square-minus"></i></a>
|
||||||
<input class="resource-content" type="text" name="system.sante.endurance.value" value="{{system.sante.endurance.value}}" data-dtype="Number" />
|
<input class="resource-content" type="text" name="system.sante.endurance.value" value="{{system.sante.endurance.value}}" data-dtype="Number" />
|
||||||
/ {{#if @root.options.vueDetaillee}}
|
/ {{system.sante.endurance.max}}
|
||||||
<input class="resource-content" type="text" name="system.sante.endurance.max" value="{{system.sante.endurance.max}}" data-dtype="Number"/>
|
|
||||||
{{else}}{{system.sante.endurance.max}}{{/if}}
|
|
||||||
<a class="endurance-plus"><i class="fa-solid fa-square-plus"></i></a>
|
<a class="endurance-plus"><i class="fa-solid fa-square-plus"></i></a>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
41
templates/actor/non-haut-revant.hbs
Normal file
41
templates/actor/non-haut-revant.hbs
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{{#if (not system.attributs.hautrevant.value)}}
|
||||||
|
<p>Attribuer la Tête de Dragon
|
||||||
|
{{#if options.isGM}}
|
||||||
|
<a class="chat-card-button don-de-haut-reve" data-tooltip="Donner le don de haut-rêve">Don de Haut Rêve</a>
|
||||||
|
{{else}}
|
||||||
|
'Don de Haut Rêve'
|
||||||
|
{{/if}}
|
||||||
|
pour rendre le personnage Haut-Rêvant.</p>
|
||||||
|
{{/if}}
|
||||||
|
<li class="item flexrow">
|
||||||
|
<span class="competence-label">Seuil de Rêve :</span>
|
||||||
|
<span>
|
||||||
|
{{#if options.isGM}}
|
||||||
|
<input class="competence-value seuil-reve-value" type="text" name="system.reve.seuil.value" value="{{system.reve.seuil.value}}" data-dtype="Number"/>
|
||||||
|
{{else}}
|
||||||
|
{{system.reve.seuil.value}}
|
||||||
|
{{/if}}
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<li class="item flexrow" >
|
||||||
|
<span class="competence-label">Refoulement : </span>
|
||||||
|
<span>
|
||||||
|
{{#if options.isGM}}
|
||||||
|
<input class="competence-value" type="text" name="system.reve.refoulement.value" value="{{system.reve.refoulement.value}}" data-dtype="Number"/>
|
||||||
|
{{else}}
|
||||||
|
{{system.reve.refoulement.value}}
|
||||||
|
{{/if}}
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
{{#if system.reve.reve.thanatosused}}
|
||||||
|
<li class="item flexrow" >
|
||||||
|
<span class="competence-label">La prochaine queue est une Ombre</span>
|
||||||
|
<span>
|
||||||
|
<img class="sheet-competence-img" src="systems/foundryvtt-reve-de-dragon/icons/competence_thanatos.webp"/>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
<hr>
|
||||||
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queues.html"}}
|
||||||
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-souffles.html"}}
|
||||||
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-tetes.html"}}
|
@ -1,34 +0,0 @@
|
|||||||
<ul class="item-list">
|
|
||||||
<li class="item flexrow">
|
|
||||||
<span class="competence-label">Seuil de Rêve :</span>
|
|
||||||
<span>
|
|
||||||
{{#if options.isGM}}
|
|
||||||
<input class="competence-value seuil-reve-value" type="text" name="system.reve.seuil.value" value="{{system.reve.seuil.value}}" data-dtype="Number"/>
|
|
||||||
{{else}}
|
|
||||||
{{system.reve.seuil.value}}
|
|
||||||
{{/if}}
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li class="item flexrow" >
|
|
||||||
<span class="competence-label">Refoulement : </span>
|
|
||||||
<span>
|
|
||||||
{{#if options.isGM}}
|
|
||||||
<input class="competence-value" type="text" name="system.reve.refoulement.value" value="{{system.reve.refoulement.value}}" data-dtype="Number"/>
|
|
||||||
{{else}}
|
|
||||||
{{system.reve.refoulement.value}}
|
|
||||||
{{/if}}
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
{{#if system.reve.reve.thanatosused}}
|
|
||||||
<li class="item flexrow" >
|
|
||||||
<span class="competence-label">La prochaine queue est une Ombre</span>
|
|
||||||
<span>
|
|
||||||
<img class="sheet-competence-img" src="systems/foundryvtt-reve-de-dragon/icons/competence_thanatos.webp"/>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
{{/if}}
|
|
||||||
</ul>
|
|
||||||
<hr>
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queues.html"}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-souffles.html"}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-tetes.html"}}
|
|
Reference in New Issue
Block a user