Compare commits
22 Commits
foundryvtt
...
d4f0cce62b
| Author | SHA1 | Date | |
|---|---|---|---|
| d4f0cce62b | |||
| 59b4f62145 | |||
| 3359492f13 | |||
| 676e6739a6 | |||
|
|
872d3fff31 | ||
| 5f3361ecc6 | |||
| 9c71827baa | |||
| fc9ef06e7b | |||
|
|
9e63706de6 | ||
| 3958b1bdc2 | |||
| 6d6843223b | |||
|
|
46f5cb67f6 | ||
|
|
d51243d74f | ||
|
|
34cc671f12 | ||
|
|
16ce6a58dd | ||
| c80cde6d18 | |||
| 89910e234d | |||
| f30df47d22 | |||
|
|
c3c42bdb21 | ||
|
|
14eb655382 | ||
|
|
52e4375972 | ||
| 15e4bfb713 |
108
module/actor.js
108
module/actor.js
@@ -33,7 +33,8 @@ import { RollDataAjustements } from "./rolldata-ajustements.js";
|
||||
import { DialogItemAchat } from "./dialog-item-achat.js";
|
||||
import { RdDItem } from "./item.js";
|
||||
import { RdDPossession } from "./rdd-possession.js";
|
||||
import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
@@ -98,7 +99,6 @@ export class RdDActor extends Actor {
|
||||
* @param {Object} options (Unused) Additional options which customize the creation workflow.
|
||||
*
|
||||
*/
|
||||
|
||||
static async create(actorData, options) {
|
||||
// Case of compendium global import
|
||||
if (actorData instanceof Array) {
|
||||
@@ -115,12 +115,15 @@ export class RdDActor extends Actor {
|
||||
return actor;
|
||||
}
|
||||
|
||||
const competences = await RdDUtility.loadCompendium(RdDItemCompetence.actorCompendium(actorData.type))
|
||||
actorData.items = competences.map(i => i.toObject())
|
||||
if (isPersonnage) {
|
||||
const competences = await RdDUtility.loadCompendium(RdDItemCompetence.actorCompendium(actorData.type));
|
||||
actorData.items = competences.map(i => i.toObject());
|
||||
actorData.items = actorData.items.concat(Monnaie.monnaiesData());
|
||||
}
|
||||
return super.create(actorData, options)
|
||||
else {
|
||||
actorData.items = [];
|
||||
}
|
||||
return super.create(actorData, options);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -131,13 +134,6 @@ export class RdDActor extends Actor {
|
||||
this.encTotal = 0;
|
||||
this.prixTotalEquipement = 0;
|
||||
|
||||
/*
|
||||
// Auto-resize token
|
||||
if (this.isToken) {
|
||||
let tokenSize = actorData.data.carac.taille.value/10;
|
||||
this.token.update({height: tokenSize, width: tokenSize } );
|
||||
}*/
|
||||
|
||||
// Make separate methods for each Actor type (character, npc, etc.) to keep
|
||||
// things organized.
|
||||
if (this.type === 'personnage') this._prepareCharacterData(this)
|
||||
@@ -242,7 +238,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
getForce() {
|
||||
if (this.isEntiteCauchemar()) {
|
||||
if (this.isEntite()) {
|
||||
return Misc.toInt(this.system.carac.reve?.value);
|
||||
}
|
||||
return Misc.toInt(this.system.carac.force?.value);
|
||||
@@ -320,7 +316,7 @@ export class RdDActor extends Actor {
|
||||
return this.filterItemsData(it => it.type == type);
|
||||
}
|
||||
filterItemsData(filter) {
|
||||
return this.items.map( it => it).filter(filter)
|
||||
return this.items.map(it => it).filter(filter)
|
||||
}
|
||||
filterItems(filter) {
|
||||
return this.items.filter(it => filter(it))
|
||||
@@ -372,11 +368,11 @@ export class RdDActor extends Actor {
|
||||
getDraconicOuPossession() {
|
||||
const possessions = this.items.filter(it => it.type == 'competencecreature' && it.system.ispossession)
|
||||
.sort(Misc.descending(it => it.system.niveau));
|
||||
if (possessions.length>0) {
|
||||
if (possessions.length > 0) {
|
||||
return duplicate(possessions[0]);
|
||||
}
|
||||
const draconics = this.getDraconicList().filter(it => it.system.niveau >= 0);
|
||||
if (draconics.length> 0) {
|
||||
if (draconics.length > 0) {
|
||||
return duplicate(draconics[0]);
|
||||
}
|
||||
return {
|
||||
@@ -613,7 +609,11 @@ export class RdDActor extends Actor {
|
||||
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
||||
content: "Remise à neuf de " + this.name
|
||||
};
|
||||
if (this.isEntiteCauchemar()) {
|
||||
const actorData = Misc.data(this);
|
||||
if (this.isEntite([ENTITE_NONINCARNE])) {
|
||||
return;
|
||||
}
|
||||
if (this.isEntite([ENTITE_INCARNE, ENTITE_BLURETTE])) {
|
||||
await this.santeIncDec("endurance", this.system.sante.endurance.max - this.system.sante.endurance.value);
|
||||
}
|
||||
else {
|
||||
@@ -828,7 +828,7 @@ export class RdDActor extends Actor {
|
||||
async resultCombatReveDeDragon(rollData) {
|
||||
rollData.queues = [];
|
||||
if (rollData.rolled.isEchec) {
|
||||
rollData.queues.push( await this.ajouterQueue());
|
||||
rollData.queues.push(await this.ajouterQueue());
|
||||
}
|
||||
if (rollData.rolled.isETotal) {
|
||||
rollData.queues.push(await this.ajouterQueue());
|
||||
@@ -978,7 +978,7 @@ export class RdDActor extends Actor {
|
||||
let nouveauNiveau = compValue ?? RdDItemCompetence.getNiveauBase(competence.system.categorie);
|
||||
const tronc = RdDItemCompetence.getListTronc(competence.name).filter(it => {
|
||||
const comp = this.getCompetence(it);
|
||||
const niveauTr = competence? competence.system.niveau : 0;
|
||||
const niveauTr = competence ? competence.system.niveau : 0;
|
||||
return niveauTr < 0 && niveauTr < nouveauNiveau;
|
||||
});
|
||||
if (tronc.length > 0) {
|
||||
@@ -1307,17 +1307,17 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
return Math.min(0, this.getEncombrementMax() - Math.ceil(Number(this.getEncTotal())));
|
||||
}
|
||||
getMessageSurEncombrement(){
|
||||
return this.computeMalusSurEncombrement() <0 ? "Sur-Encombrement!" : "";
|
||||
getMessageSurEncombrement() {
|
||||
return this.computeMalusSurEncombrement() < 0 ? "Sur-Encombrement!" : "";
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getEncombrementMax() {
|
||||
switch (this.type){
|
||||
case 'vehicule':
|
||||
switch (this.type) {
|
||||
case 'vehicule':
|
||||
return this.system.capacite_encombrement;
|
||||
case 'entite':
|
||||
return 0;
|
||||
return 0;
|
||||
default:
|
||||
return this.system.attributs.encombrement.value
|
||||
}
|
||||
@@ -1339,7 +1339,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async computeEncombrementTotalEtMalusArmure() {
|
||||
if ( !this.pack ) {
|
||||
if (!this.pack) {
|
||||
await this.computeMalusArmure();
|
||||
return this.computeEncombrement();
|
||||
}
|
||||
@@ -1617,7 +1617,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async setSonne(sonne = true) {
|
||||
if (this.isEntiteCauchemar()) {
|
||||
if (this.isEntite()) {
|
||||
return;
|
||||
}
|
||||
if (!game.combat && sonne) {
|
||||
@@ -1629,7 +1629,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getSConst() {
|
||||
if (this.isEntiteCauchemar()) {
|
||||
if (this.isEntite()) {
|
||||
return 0;
|
||||
}
|
||||
return RdDCarac.calculSConst(this.system.carac.constitution.value)
|
||||
@@ -1744,7 +1744,7 @@ export class RdDActor extends Actor {
|
||||
result.newValue = Math.max(minValue, Math.min(compteur.value + inc, compteur.max));
|
||||
//console.log("New value ", inc, minValue, result.newValue);
|
||||
let fatigue = 0;
|
||||
if (name == "endurance" && !this.isEntiteCauchemar()) {
|
||||
if (name == "endurance" && !this.isEntite()) {
|
||||
if (result.newValue == 0 && inc < 0 && !isCritique) { // perte endurance et endurance devient 0 (sauf critique) -> -1 vie
|
||||
sante.vie.value--;
|
||||
result.perteVie = true;
|
||||
@@ -1781,7 +1781,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
isDead() {
|
||||
return !this.isEntiteCauchemar() && this.system.sante.vie.value < -this.getSConst()
|
||||
return !this.isEntite() && this.system.sante.vie.value < -this.getSConst()
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -1910,7 +1910,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async actionItem(item, onActionItem = async ()=>{}) {
|
||||
async actionItem(item, onActionItem = async () => { }) {
|
||||
if (!item.getActionPrincipale()) return;
|
||||
switch (item.type) {
|
||||
case 'nourritureboisson': return await this.actionNourritureboisson(item, onActionItem);
|
||||
@@ -1918,7 +1918,7 @@ export class RdDActor extends Actor {
|
||||
case 'livre': return await this.actionLire(item);
|
||||
case 'conteneur': return await item.sheet.render(true);
|
||||
case 'herbe': {
|
||||
if (item.isHerbeAPotion()){
|
||||
if (item.isHerbeAPotion()) {
|
||||
return this.dialogFabriquerPotion(item);
|
||||
}
|
||||
return;
|
||||
@@ -2665,7 +2665,7 @@ export class RdDActor extends Actor {
|
||||
selectedCarac: duplicate(this.system.carac[selected])
|
||||
},
|
||||
{ overwrite: false });
|
||||
artData.competence.system.defaut_carac = selected;
|
||||
artData.competence.system.defaut_carac = selected;
|
||||
if (!artData.forceCarac) {
|
||||
artData.forceCarac = {};
|
||||
artData.forceCarac[selected] = duplicate(this.system.carac[selected]);
|
||||
@@ -3286,10 +3286,10 @@ export class RdDActor extends Actor {
|
||||
if (res) {
|
||||
let malus = Misc.toInt(res[3]) - 1;
|
||||
let armure = Misc.toInt(res[2]);
|
||||
if (armure+malus <= 0){
|
||||
if (armure + malus <= 0) {
|
||||
itemData.system.protection = 0;
|
||||
} else {
|
||||
itemData.system.protection = '' + (res[1]??'1') + 'd' + armure + malus;
|
||||
itemData.system.protection = '' + (res[1] ?? '1') + 'd' + armure + malus;
|
||||
}
|
||||
}
|
||||
else if (/\d+/.exec(itemData.system.protection)) {
|
||||
@@ -3322,7 +3322,7 @@ export class RdDActor extends Actor {
|
||||
let encaissement = await this.jetEncaissement(rollData);
|
||||
|
||||
this.ajouterBlessure(encaissement); // Will upate the result table
|
||||
const perteVie = this.isEntiteCauchemar()
|
||||
const perteVie = this.isEntite()
|
||||
? { newValue: 0 }
|
||||
: await this.santeIncDec("vie", - encaissement.vie);
|
||||
const perteEndurance = await this.santeIncDec("endurance", -encaissement.endurance, encaissement.critiques > 0);
|
||||
@@ -3336,7 +3336,7 @@ export class RdDActor extends Actor {
|
||||
sonne: perteEndurance.sonne,
|
||||
jetEndurance: perteEndurance.jetEndurance,
|
||||
endurance: santeOrig.endurance.value - perteEndurance.newValue,
|
||||
vie: this.isEntiteCauchemar() ? 0 : (santeOrig.vie.value - perteVie.newValue),
|
||||
vie: this.isEntite() ? 0 : (santeOrig.vie.value - perteVie.newValue),
|
||||
show: defenderRoll?.show ?? {}
|
||||
});
|
||||
|
||||
@@ -3525,8 +3525,8 @@ export class RdDActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
async accorder(entite, when = 'avant-encaissement') {
|
||||
if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar")
|
||||
|| !entite.isEntiteCauchemar()
|
||||
|| entite.isEntiteCauchemarAccordee(this)) {
|
||||
|| !entite.isEntite([ENTITE_INCARNE])
|
||||
|| entite.isEntiteAccordee(this)) {
|
||||
return true;
|
||||
}
|
||||
const tplData = this.system;
|
||||
@@ -3550,29 +3550,29 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
isEntiteCauchemar() {
|
||||
return this.type == 'entite';
|
||||
isEntite(typeentite = []) {
|
||||
return this.type == 'entite' && (typeentite.length == 0 || typeentite.includes(this.system.typeentite));
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
isEntiteCauchemarAccordee(attaquant) {
|
||||
if (!this.isEntiteCauchemar()) { return true; }
|
||||
isEntiteAccordee(attaquant) {
|
||||
if (!this.isEntite([ENTITE_INCARNE])) { return true; }
|
||||
let resonnance = this.system.sante.resonnance;
|
||||
return (resonnance.actors.find(it => it == attaquant._id));
|
||||
return (resonnance.actors.find(it => it == attaquant.id));
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async setEntiteReveAccordee(attaquant) {
|
||||
if (!this.isEntiteCauchemar()) {
|
||||
if (!this.isEntite([ENTITE_INCARNE])) {
|
||||
ui.notifications.error("Impossible de s'accorder à " + this.name + ": ce n'est pas une entite de cauchemer/rêve");
|
||||
return;
|
||||
}
|
||||
let resonnance = duplicate(this.system.sante.resonnance);
|
||||
if (resonnance.actors.find(it => it == attaquant._id)) {
|
||||
if (resonnance.actors.find(it => it == attaquant.id)) {
|
||||
// déjà accordé
|
||||
return;
|
||||
}
|
||||
resonnance.actors.push(attaquant._id);
|
||||
resonnance.actors.push(attaquant.id);
|
||||
await this.update({ "system.sante.resonnance": resonnance });
|
||||
return;
|
||||
}
|
||||
@@ -3599,7 +3599,7 @@ export class RdDActor extends Actor {
|
||||
10: Math.floor(fortuneTotale / 10) % 10, // bronze
|
||||
1: fortuneTotale % 10 // étain
|
||||
}
|
||||
console.log('RdDActor.optimizeArgent', fortuneTotale, 'nouvelleFortune', nouvelleFortune, 'monnaie_par_valeur',parValeur);
|
||||
console.log('RdDActor.optimizeArgent', fortuneTotale, 'nouvelleFortune', nouvelleFortune, 'monnaie_par_valeur', parValeur);
|
||||
let updates = [];
|
||||
for (const [valeur, nombre] of Object.entries(nouvelleFortune)) {
|
||||
updates.push({ _id: parValeur[valeur].id, 'system.quantite': nombre });
|
||||
@@ -3668,7 +3668,8 @@ export class RdDActor extends Actor {
|
||||
RdDActor.remoteActorCall({
|
||||
userId: Misc.connectedGMOrUser(),
|
||||
actorId: this.id,
|
||||
method: 'ajouterDeniers', args: [gain, fromActorId] });
|
||||
method: 'ajouterDeniers', args: [gain, fromActorId]
|
||||
});
|
||||
}
|
||||
else {
|
||||
const fromActor = game.actors.get(fromActorId)
|
||||
@@ -3703,8 +3704,9 @@ export class RdDActor extends Actor {
|
||||
RdDActor.remoteActorCall({
|
||||
actorId: achat.vendeurId ?? achat.acheteurId,
|
||||
method: 'achatVente',
|
||||
args: [achat] },
|
||||
);
|
||||
args: [achat]
|
||||
},
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4075,7 +4077,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async consommerPotion(potion, onActionItem = async () => {}) {
|
||||
async consommerPotion(potion, onActionItem = async () => { }) {
|
||||
const potionData = potion
|
||||
|
||||
if (potionData.system.categorie.includes('Soin')) {
|
||||
@@ -4111,7 +4113,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getEffectByLabel(label) {
|
||||
getEffectByLabel(label) {
|
||||
return this.getActiveEffects().find(it => it.system?.label == label);
|
||||
}
|
||||
|
||||
@@ -4122,7 +4124,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async setStatusEffect(label, status, updates = {}) {
|
||||
if (this.isEntiteCauchemar() || this.type == 'vehicule') {
|
||||
if (this.isEntite() || this.type == 'vehicule') {
|
||||
return;
|
||||
}
|
||||
console.log("setStatusEffect", label, status, updates)
|
||||
|
||||
@@ -3,3 +3,7 @@ export const SYSTEM_SOCKET_ID = 'system.foundryvtt-reve-de-dragon';
|
||||
|
||||
export const HIDE_DICE = 'hide';
|
||||
export const SHOW_DICE = 'show';
|
||||
|
||||
export const ENTITE_INCARNE = 'incarne';
|
||||
export const ENTITE_NONINCARNE = 'nonincarne';
|
||||
export const ENTITE_BLURETTE = 'blurette';
|
||||
|
||||
@@ -55,7 +55,7 @@ export class DialogItemAchat extends Dialog {
|
||||
|
||||
static prepareVenteData(buttonAcheter, vendeurId, vendeur, acheteur) {
|
||||
const jsondata = buttonAcheter.attributes['data-jsondata']?.value;
|
||||
const prixLot = buttonAcheter.attributes['data-prixLot']?.value ?? 0;
|
||||
const prixLot = parseInt(buttonAcheter.attributes['data-prixLot']?.value ?? 0);
|
||||
let venteData = {
|
||||
item: JSON.parse(jsondata),
|
||||
vendeurId: vendeurId,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ChatUtility } from "./chat-utility.js";
|
||||
import { HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { ENTITE_INCARNE, ENTITE_NONINCARNE, HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { Grammar } from "./grammar.js";
|
||||
import { RdDItemArme } from "./item-arme.js";
|
||||
import { RdDItemCompetence } from "./item-competence.js";
|
||||
@@ -85,48 +85,23 @@ export class RdDCombatManager extends Combat {
|
||||
// calculate initiative
|
||||
for (let cId = 0; cId < ids.length; cId++) {
|
||||
const combatant = this.combatants.get(ids[cId]);
|
||||
<<<<<<< HEAD
|
||||
//if (!c) return results;
|
||||
|
||||
let rollFormula = formula; // Init per default
|
||||
if (!rollFormula) {
|
||||
let armeCombat, competence;
|
||||
if (combatant.actor.system.type == 'creature' || combatant.actor.system.type == 'entite') {
|
||||
for (const competenceItemData of combatant.actor.items) {
|
||||
if (competenceItemData.system.iscombat) {
|
||||
competence = duplicate(competenceItemData);
|
||||
}
|
||||
}
|
||||
rollFormula = "2+( (" + RdDCombatManager.calculInitiative(competence.system.niveau, competence.system.carac_value) + ")/100)";
|
||||
} else {
|
||||
for (const itemData of combatant.actor.items) {
|
||||
if (itemData.type == "arme" && itemData.data.equipe) {
|
||||
armeCombat = duplicate(itemData);
|
||||
}
|
||||
}
|
||||
let compName = (armeCombat == undefined) ? "Corps à corps" : armeCombat.system.competence;
|
||||
competence = RdDItemCompetence.findCompetence(combatant.actor.items, compName);
|
||||
let bonusEcaille = (armeCombat && armeCombat.data.magique) ? armeCombat.system.ecaille_efficacite : 0;
|
||||
rollFormula = "2+( (" + RdDCombatManager.calculInitiative(competence.system.niveau, combatant.actor.system.carac[competence.system.defaut_carac].value, bonusEcaille) + ")/100)";
|
||||
=======
|
||||
let rollFormula = formula ?? RdDCombatManager.formuleInitiative(2, 10, 0, 0);
|
||||
if (!formula) {
|
||||
if (combatant.actor.data.type == 'creature' || combatant.actor.data.type == 'entite') {
|
||||
const competence = combatant.actor.data.items.find(it => it.data.data.iscombat)
|
||||
if (combatant.actor.type == 'creature' || combatant.actor.type == 'entite') {
|
||||
const competence = combatant.actor.items.find(it => it.system.iscombat)
|
||||
if (competence) {
|
||||
rollFormula = RdDCombatManager.formuleInitiative(2, competence.data.carac_value, competence.data.niveau, 0);
|
||||
rollFormula = RdDCombatManager.formuleInitiative(2, competence.system.carac_value, competence.system.niveau, 0);
|
||||
}
|
||||
} else {
|
||||
const armeCombat = combatant.actor.data.items.find(it => it.type == 'arme' && itemData.data.equipe)
|
||||
const compName = (armeCombat == undefined) ? "Corps à corps" : armeCombat.data.competence;
|
||||
const competence = RdDItemCompetence.findCompetence(combatant.actor.data.items, compName);
|
||||
const armeCombat = combatant.actor.items.find(it => it.type == 'arme' && itemData.system.equipe)
|
||||
const compName = (armeCombat == undefined) ? "Corps à corps" : armeCombat.system.competence;
|
||||
const competence = RdDItemCompetence.findCompetence(combatant.actor.items, compName);
|
||||
if (competence) {
|
||||
const carac = combatant.actor.data.data.carac[competence.data.defaut_carac].value;
|
||||
const niveau = competence.data.niveau;
|
||||
const bonusEcaille = (armeCombat?.data.magique) ? armeCombat.data.ecaille_efficacite : 0;
|
||||
const carac = combatant.actor.system.carac[competence.system.defaut_carac].value;
|
||||
const niveau = competence.system.niveau;
|
||||
const bonusEcaille = (armeCombat?.data.magique) ? armeCombat.system.ecaille_efficacite : 0;
|
||||
rollFormula = RdDCombatManager.formuleInitiative(2, carac, niveau, bonusEcaille);
|
||||
}
|
||||
>>>>>>> origin/v1.5
|
||||
}
|
||||
}
|
||||
//console.log("Combatat", c);
|
||||
@@ -180,70 +155,37 @@ export class RdDCombatManager extends Combat {
|
||||
// Gestion des armes 1/2 mains
|
||||
let actionsArme = [];
|
||||
for (const arme of armes) {
|
||||
<<<<<<< HEAD
|
||||
let armeData = duplicate(arme)
|
||||
if (armeData.system.equipe) {
|
||||
let compData = competences.find(c => c.name.toLowerCase() == armeData.system.competence.toLowerCase())
|
||||
|
||||
armesEquipe.push(armeData)
|
||||
armeData.system.dommagesReels = Number(armeData.system.dommages)
|
||||
armeData.system.niveau = compData.system.niveau
|
||||
armeData.system.initiative = RdDCombatManager.calculInitiative(compData.system.niveau, carac[compData.system.defaut_carac].value);
|
||||
// Dupliquer les armes pouvant être à 1 main et 2 mains en patchant la compétence
|
||||
if (armeData.system.unemain && !armeData.system.deuxmains) {
|
||||
armeData.system.mainInfo = "(1m)";
|
||||
} else if (!armeData.system.unemain && armeData.system.deuxmains) {
|
||||
armeData.system.mainInfo = "(2m)";
|
||||
} else if (armeData.system.unemain && armeData.system.deuxmains) {
|
||||
armeData.system.mainInfo = "(1m)";
|
||||
|
||||
const comp2m = armeData.system.competence.replace(" 1 main", " 2 mains"); // Replace !
|
||||
const comp = competences.find(c => c.name == comp2m)
|
||||
|
||||
const arme2main = duplicate(armeData)
|
||||
arme2main.system.mainInfo = "(2m)";
|
||||
arme2main.system.niveau = comp.system.niveau;
|
||||
arme2main.system.competence = comp2m;
|
||||
arme2main.system.initiative = RdDCombatManager.calculInitiative(arme2main.niveau, carac[comp.system.defaut_carac].value)
|
||||
armesEquipe.push(arme2main);
|
||||
const containsSlash = armeData.system.dommages.includes("/");
|
||||
if (containsSlash) {
|
||||
const tableauDegats = armeData.system.dommages.split("/");
|
||||
armeData.system.dommagesReels = Number(tableauDegats[0]);
|
||||
arme2main.system.dommagesReels = Number(tableauDegats[1]);
|
||||
=======
|
||||
let action = duplicate(Misc.data(arme));
|
||||
if (action.data.equipe) {
|
||||
let compData = competences.map(c => Misc.data(c)).find(c => c.name == action.data.competence);
|
||||
if (action.system.equipe) {
|
||||
let compData = competences.find(c => c.name == action.system.competence)
|
||||
|
||||
actionsArme.push(action);
|
||||
action.action = 'attaque';
|
||||
action.data.dommagesReels = Number(action.data.dommages);
|
||||
action.data.niveau = compData.data.niveau;
|
||||
action.data.initiative = RdDCombatManager.calculInitiative(compData.data.niveau, carac[compData.data.defaut_carac].value);
|
||||
action.system.dommagesReels = Number(action.system.dommages);
|
||||
action.system.niveau = compData.data.niveau;
|
||||
action.system.initiative = RdDCombatManager.calculInitiative(compData.system.niveau, carac[compData.system.defaut_carac].value);
|
||||
// Dupliquer les armes pouvant être à 1 main et 2 mains en patchant la compétence
|
||||
if (action.data.unemain && !action.data.deuxmains) {
|
||||
action.data.mainInfo = "(1m)";
|
||||
} else if (!action.data.unemain && action.data.deuxmains) {
|
||||
action.data.mainInfo = "(2m)";
|
||||
} else if (action.data.unemain && action.data.deuxmains) {
|
||||
action.data.mainInfo = "(1m)";
|
||||
if (action.system.unemain && !action.system.deuxmains) {
|
||||
action.system.mainInfo = "(1m)";
|
||||
} else if (!action.system.unemain && action.system.deuxmains) {
|
||||
action.system.mainInfo = "(2m)";
|
||||
} else if (action.system.unemain && action.system.deuxmains) {
|
||||
action.system.mainInfo = "(1m)";
|
||||
|
||||
const comp2m = action.data.competence.replace(" 1 main", " 2 mains"); // Replace !
|
||||
const comp = Misc.data(competences.find(c => c.name == comp2m));
|
||||
const comp2m = action.system.competence.replace(" 1 main", " 2 mains"); // Replace !
|
||||
const comp = competences.find(c => c.name == comp2m)
|
||||
|
||||
const arme2main = duplicate(action);
|
||||
arme2main.data.mainInfo = "(2m)";
|
||||
arme2main.data.niveau = comp.data.niveau;
|
||||
arme2main.data.competence = comp2m;
|
||||
arme2main.data.initiative = RdDCombatManager.calculInitiative(arme2main.data.niveau, carac[comp.data.defaut_carac].value);
|
||||
arme2main.system.mainInfo = "(2m)";
|
||||
arme2main.system.niveau = comp.system.niveau;
|
||||
arme2main.system.competence = comp2m;
|
||||
arme2main.system.initiative = RdDCombatManager.calculInitiative(arme2main.system.niveau, carac[comp.system.defaut_carac].value);
|
||||
actionsArme.push(arme2main);
|
||||
const containsSlash = action.data.dommages.includes("/");
|
||||
const containsSlash = action.system.dommages.includes("/");
|
||||
if (containsSlash) {
|
||||
const tableauDegats = action.data.dommages.split("/");
|
||||
action.data.dommagesReels = Number(tableauDegats[0]);
|
||||
arme2main.data.dommagesReels = Number(tableauDegats[1]);
|
||||
>>>>>>> origin/v1.5
|
||||
const tableauDegats = action.system.dommages.split("/");
|
||||
action.system.dommagesReels = Number(tableauDegats[0]);
|
||||
arme2main.system.dommagesReels = Number(tableauDegats[1]);
|
||||
}
|
||||
else{
|
||||
ui.notifications.info("Les dommages de l'arme à 1/2 mains " + action.name + " ne sont pas corrects (ie sous la forme X/Y)");
|
||||
@@ -378,7 +320,7 @@ export class RdDCombatManager extends Combat {
|
||||
initOffset = 10;
|
||||
caracForInit = combatant.actor.getReveActuel();
|
||||
initInfo = "Possession"
|
||||
} else if (action.name == 'autre') {
|
||||
} else if (action.action == 'autre') {
|
||||
initOffset = 2;
|
||||
initInfo = "Autre Action"
|
||||
} else if (action.action == 'haut-reve') {
|
||||
@@ -513,9 +455,9 @@ export class RdDCombat {
|
||||
: "Vous devez choisir une cible à attaquer!");
|
||||
}
|
||||
else {
|
||||
const defender = target?.actor
|
||||
const defenderTokenId = target?.id
|
||||
if ( defender.type == 'entite' && defender.system.definition.typeentite == 'nonincarne') {
|
||||
const defender = target?.actor;
|
||||
const defenderTokenId = target?.id;
|
||||
if ( defender.type == 'entite' && defender.system.definition.typeentite == ENTITE_NONINCARNE) {
|
||||
ui.notifications.warn("Vous ne pouvez pas cibler une entité non incarnée !!!!");
|
||||
} else {
|
||||
return this.create(attacker, defender, defenderTokenId, target)
|
||||
@@ -857,7 +799,7 @@ export class RdDCombat {
|
||||
async _onAttaqueNormale(attackerRoll) {
|
||||
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
||||
|
||||
attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker.getBonusDegat(), this.defender.isEntiteCauchemar());
|
||||
attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker.getBonusDegat(), this.defender.isEntite());
|
||||
let defenderRoll = { attackerRoll: attackerRoll, passeArme: attackerRoll.passeArme, show: {} }
|
||||
attackerRoll.show = {
|
||||
cible: this.target ? this.defender.system.name : 'la cible',
|
||||
@@ -1306,8 +1248,8 @@ export class RdDCombat {
|
||||
async accorderEntite(when = 'avant-encaissement') {
|
||||
if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar")
|
||||
|| this.defender == undefined
|
||||
|| !this.defender.isEntiteCauchemar()
|
||||
|| this.defender.isEntiteCauchemarAccordee(this.attacker)) {
|
||||
|| !this.defender.isEntite([ENTITE_INCARNE])
|
||||
|| this.defender.isEntiteAccordee(this.attacker)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,29 @@
|
||||
import { RdDActor } from "./actor.js";
|
||||
import { Misc } from "./misc.js";
|
||||
import { RdDDice } from "./rdd-dice.js";
|
||||
|
||||
const words = [ 'pore', 'pre', 'flor', 'lane', 'turlu', 'pin', 'a', 'alph', 'i', 'onse', 'iane', 'ane', 'zach', 'arri', 'ba', 'bo', 'bi',
|
||||
'alta', 'par', 'pir', 'zor', 'zir', 'de', 'pol', 'tran', 'no', 'la', 'al' , 'pul', 'one', 'ner', 'nur', 'mac', 'mery',
|
||||
'cat', 'do', 'di', 'der', 'er', 'el', 'far', 'fer', 'go', 'guer', 'hot', 'jor', 'jar', 'ji', 'kri', 'ket', 'lor', 'hur',
|
||||
'lar', 'lir', 'lu', 'pot', 'pro', 'pra', 'pit', 'qua', 'qui', 're', 'ral', 'sal', 'sen', 'ted', 'to', 'ta', 'lars', 'ver',
|
||||
'vin', 'ov', 'wal', 'ry', 'ly', '' ];
|
||||
const words = ['pore', 'pre', 'flor', 'lane', 'turlu', 'pin', 'a', 'alph', 'i', 'onse', 'iane', 'ane', 'zach', 'arri', 'ba', 'bo', 'bi',
|
||||
'alta', 'par', 'pir', 'zor', 'zir', 'de', 'pol', 'tran', 'no', 'la', 'al', 'pul', 'one', 'ner', 'nur', 'mac', 'mery',
|
||||
'cat', 'do', 'di', 'der', 'er', 'el', 'far', 'fer', 'go', 'guer', 'hot', 'jor', 'jar', 'ji', 'kri', 'ket', 'lor', 'hur',
|
||||
'lar', 'lir', 'lu', 'pot', 'pro', 'pra', 'pit', 'qua', 'qui', 're', 'ral', 'sal', 'sen', 'ted', 'to', 'ta', 'lars', 'ver',
|
||||
'vin', 'ov', 'wal', 'ry', 'ly', ''];
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class RdDNameGen {
|
||||
|
||||
static async getName( msg, params ) {
|
||||
let name = Misc.upperFirst( await RdDDice.rollOneOf(words) + await RdDDice.rollOneOf(words) )
|
||||
//console.log(name);
|
||||
ChatMessage.create( { content: `Nom : ${name}`, whisper: ChatMessage.getWhisperRecipients("GM") } );
|
||||
static async getName(msg, params) {
|
||||
const html = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-command-nom.html`, {
|
||||
nom: Misc.upperFirst(await RdDDice.rollOneOf(words) + await RdDDice.rollOneOf(words))
|
||||
});
|
||||
ChatMessage.create({ content: html, whisper: ChatMessage.getWhisperRecipients("GM") });
|
||||
}
|
||||
|
||||
static async onCreerActeur(event) {
|
||||
const button = event.currentTarget;
|
||||
await RdDActor.create({
|
||||
name: button.attributes['data-nom'].value,
|
||||
type: button.attributes['data-type'].value
|
||||
},
|
||||
{renderSheet: true});
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE } from "./constants.js";
|
||||
|
||||
/**
|
||||
* Extend the base Dialog entity by defining a custom window to perform roll.
|
||||
* @extends {Dialog}
|
||||
@@ -7,15 +9,19 @@ export class RdDEncaisser extends Dialog {
|
||||
/* -------------------------------------------- */
|
||||
constructor(html, actor) {
|
||||
// Common conf
|
||||
const buttonsCreatures = {
|
||||
"mortel": { label: "Mortel", callback: html => this.performEncaisser("mortel") },
|
||||
"non-mortel": { label: "Non-mortel", callback: html => this.performEncaisser("non-mortel") },
|
||||
"sonne": { label: "Sonné", callback: html => this.actor.setSonne() },
|
||||
};
|
||||
const buttonsEntitesCauchemar = {
|
||||
"cauchemar": { label: "cauchemar", callback: html => this.performEncaisser("cauchemar") }
|
||||
};
|
||||
const buttons = actor.isEntiteCauchemar() ? buttonsEntitesCauchemar : buttonsCreatures;
|
||||
let buttons = {};
|
||||
if (!actor.isEntite()){
|
||||
buttons = {
|
||||
"mortel": { label: "Mortel", callback: html => this.performEncaisser("mortel") },
|
||||
"non-mortel": { label: "Non-mortel", callback: html => this.performEncaisser("non-mortel") },
|
||||
"sonne": { label: "Sonné", callback: html => this.actor.setSonne() },
|
||||
};
|
||||
}
|
||||
else if (actor.isEntite([ENTITE_BLURETTE, ENTITE_INCARNE])){
|
||||
buttons = {
|
||||
"cauchemar": { label: "cauchemar", callback: html => this.performEncaisser("cauchemar") }
|
||||
}
|
||||
}
|
||||
|
||||
let dialogConf = {
|
||||
title: "Jet d'Encaissement",
|
||||
@@ -24,7 +30,6 @@ export class RdDEncaisser extends Dialog {
|
||||
default: "mortel"
|
||||
}
|
||||
|
||||
|
||||
let dialogOptions = {
|
||||
classes: ["rdddialog"],
|
||||
width: 320,
|
||||
|
||||
@@ -11,6 +11,7 @@ import { RdDDice } from "./rdd-dice.js";
|
||||
import { RdDItem } from "./item.js";
|
||||
import { Monnaie } from "./item-monnaie.js";
|
||||
import { RdDPossession } from "./rdd-possession.js";
|
||||
import { RdDNameGen } from "./rdd-namegen.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// This table starts at 0 -> niveau -10
|
||||
@@ -703,6 +704,7 @@ export class RdDUtility {
|
||||
|
||||
// gestion bouton tchat Acheter
|
||||
html.on("click", '.button-acheter', event => DialogItemAchat.onButtonAcheter(event));
|
||||
html.on("click", '.button-creer-acteur', event => RdDNameGen.onCreerActeur(event));
|
||||
|
||||
// Gestion du bouton payer
|
||||
html.on("click", '.payer-button', event => {
|
||||
|
||||
File diff suppressed because one or more lines are too long
395
system.json
395
system.json
@@ -2,38 +2,42 @@
|
||||
"id": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||
"author": "LeRatierBretonnien",
|
||||
"authors": [
|
||||
{
|
||||
"name": "LeRatierBretonnien"
|
||||
"name": "LeRatierBretonnien",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "VincentVK"
|
||||
"name": "VincentVK",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Grendel"
|
||||
"name": "Grendel",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Michael Nonne"
|
||||
"name": "Michael Nonne",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Mandar"
|
||||
"name": "Mandar",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Fred"
|
||||
"name": "Fred",
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "Fab"
|
||||
"name": "Fab",
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"compatibility": {
|
||||
"minimum": 10
|
||||
},
|
||||
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
|
||||
"license": "LICENSE.txt",
|
||||
"flags": {},
|
||||
"version": "10.0.3",
|
||||
"scripts": [],
|
||||
"version": "10.0.6",
|
||||
"compatibility": {
|
||||
"minimum": "10"
|
||||
},
|
||||
"esmodules": [
|
||||
"module/rdd-main.js"
|
||||
],
|
||||
@@ -45,12 +49,13 @@
|
||||
"lang": "en",
|
||||
"name": "English",
|
||||
"path": "lang/fr.json",
|
||||
"unreal": "this is a trick"
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"lang": "fr",
|
||||
"name": "Français",
|
||||
"path": "lang/fr.json"
|
||||
"path": "lang/fr.json",
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"packs": [
|
||||
@@ -58,452 +63,278 @@
|
||||
"name": "competences",
|
||||
"label": "Compétences",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/competences.db",
|
||||
"path": "packs/competences.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"compétences"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "arts-et-divertissements",
|
||||
"label": "Arts et Divertissements",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/arts-et-divertissements.db",
|
||||
"path": "packs/arts-et-divertissements.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"recette",
|
||||
"cuisine",
|
||||
"danse",
|
||||
"musique",
|
||||
"chant",
|
||||
"jeux"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "competences-creatures",
|
||||
"label": "Compétences de Créatures",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/competences-creatures.db",
|
||||
"path": "packs/competences-creatures.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"compétences",
|
||||
"créatures"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "competences-entites",
|
||||
"label": "Compétences des Entités",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/competences-entites.db",
|
||||
"path": "packs/competences-entites.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"compétences",
|
||||
"entités"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "sorts-oniros",
|
||||
"label": "Sorts d'Oniros",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/sorts-oniros.db",
|
||||
"path": "packs/sorts-oniros.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"sorts"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "sorts-hypnos",
|
||||
"label": "Sorts d'Hypnos",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/sorts-hypnos.db",
|
||||
"path": "packs/sorts-hypnos.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"sorts"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "sorts-narcos",
|
||||
"label": "Sorts de Narcos",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/sorts-narcos.db",
|
||||
"path": "packs/sorts-narcos.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"sorts"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "sorts-thanatos",
|
||||
"label": "Sorts de Thanatos",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/sorts-thanatos.db",
|
||||
"path": "packs/sorts-thanatos.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"sorts"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "equipement",
|
||||
"label": "Equipement",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/equipement.db",
|
||||
"path": "packs/equipement.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"équipement",
|
||||
"objet"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "maladies-et-poisons",
|
||||
"label": "Maladies & Poisons",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/maladies-et-poisons.db",
|
||||
"path": "packs/maladies-et-poisons.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"maladie",
|
||||
"poison"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "rappel-des-regles",
|
||||
"label": "Rappels des Règles",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/rappel-des-regles.db",
|
||||
"path": "packs/rappel-des-regles.db",
|
||||
"type": "JournalEntry",
|
||||
"tags": [
|
||||
"journal",
|
||||
"règles"
|
||||
],
|
||||
"entity": "JournalEntry",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "queues-de-dragon",
|
||||
"label": "Queues de Dragon",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/queues-de-dragon.db",
|
||||
"path": "packs/queues-de-dragon.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"queue"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "ombres-de-thanatos",
|
||||
"label": "Ombres de Thanatos",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/ombres-de-thanatos.db",
|
||||
"path": "packs/ombres-de-thanatos.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"ombre"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "souffles-de-dragon",
|
||||
"label": "Souffles de Dragon",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/souffles-de-dragon.db",
|
||||
"path": "packs/souffles-de-dragon.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"souffle"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "tarot-draconique",
|
||||
"label": "Tarot Draconique",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/tarot-draconique.db",
|
||||
"path": "packs/tarot-draconique.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"tarot"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "tetes-de-dragon-pour-haut-revants",
|
||||
"label": "Têtes de Dragon (Hauts-Rêvants)",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/tetes-de-dragon-pour-haut-revants.db",
|
||||
"path": "packs/tetes-de-dragon-pour-haut-revants.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"tête"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "tetes-de-dragon-pour-tous-personnages",
|
||||
"label": "Têtes de Dragon (Tous Personnages)",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/tetes-de-dragon-pour-tous-personnages.db",
|
||||
"path": "packs/tetes-de-dragon-pour-tous-personnages.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"item",
|
||||
"tête"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "tables-diverses",
|
||||
"label": "Tables Diverses",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/tables-diverses.db",
|
||||
"path": "packs/tables-diverses.db",
|
||||
"type": "RollTable",
|
||||
"tags": [
|
||||
"table",
|
||||
"tables"
|
||||
],
|
||||
"entity": "RollTable",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "animaux",
|
||||
"label": "Animaux",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/animaux.db",
|
||||
"path": "packs/animaux.db",
|
||||
"type": "Actor",
|
||||
"tags": [
|
||||
"animaux",
|
||||
"creature"
|
||||
],
|
||||
"entity": "Actor",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "voyageurs",
|
||||
"label": "Voyageurs",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/voyageurs.db",
|
||||
"path": "packs/voyageurs.db",
|
||||
"type": "Actor",
|
||||
"tags": [
|
||||
"voyageur",
|
||||
"profils"
|
||||
],
|
||||
"entity": "Actor",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "vehicules",
|
||||
"label": "Véhicules",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/vehicules.db",
|
||||
"path": "packs/vehicules.db",
|
||||
"type": "Actor",
|
||||
"tags": [
|
||||
"vehicule",
|
||||
"bateau",
|
||||
"charett",
|
||||
"chariot",
|
||||
"carriole",
|
||||
"barque"
|
||||
],
|
||||
"entity": "Actor",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "archetypes",
|
||||
"label": "Archetypes PNJs",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/archetypes.db",
|
||||
"path": "packs/archetypes.db",
|
||||
"type": "Actor",
|
||||
"tags": [
|
||||
"archetype",
|
||||
"pnj"
|
||||
],
|
||||
"entity": "Actor",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "humanoides",
|
||||
"label": "Humanoïdes",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/humanoides.db",
|
||||
"path": "packs/humanoides.db",
|
||||
"type": "Actor",
|
||||
"tags": [
|
||||
"humanoides",
|
||||
"pnj"
|
||||
],
|
||||
"entity": "Actor",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "entites",
|
||||
"label": "Entités de Cauchemar",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/entites-de-cauchemar.db",
|
||||
"path": "packs/entites-de-cauchemar.db",
|
||||
"type": "Actor",
|
||||
"tags": [
|
||||
"entités",
|
||||
"entite",
|
||||
"cauchemar",
|
||||
"ecni",
|
||||
"eni"
|
||||
],
|
||||
"entity": "Actor",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "invocations",
|
||||
"label": "Invocation d'Hypnos",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/invocations.db",
|
||||
"path": "packs/invocations.db",
|
||||
"type": "Actor",
|
||||
"tags": [
|
||||
"hypnos",
|
||||
"invocation"
|
||||
],
|
||||
"entity": "Actor",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "botanique",
|
||||
"label": "Botanique",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/botanique.db",
|
||||
"path": "packs/botanique.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"plantes",
|
||||
"champignons",
|
||||
"herbes"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "taches-courantes",
|
||||
"label": "Tâches courantes",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/taches-courantes.db",
|
||||
"path": "packs/taches-courantes.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"taches"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "meditations-et-ecrits",
|
||||
"label": "Méditations et Ecrits",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/meditations-et-ecrits.db",
|
||||
"path": "packs/meditations-et-ecrits.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"meditations",
|
||||
"méditations",
|
||||
"livres",
|
||||
"livre",
|
||||
"méditation",
|
||||
"écrits",
|
||||
"écrit"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "recettes-alchimiques",
|
||||
"label": "Recettes Alchimiques",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/recettes-alchimiques.db",
|
||||
"path": "packs/recettes-alchimiques.db",
|
||||
"type": "Item",
|
||||
"tags": [
|
||||
"recettes",
|
||||
"recette",
|
||||
"alchimie",
|
||||
"alchimique",
|
||||
"potion"
|
||||
],
|
||||
"entity": "Item",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
},
|
||||
{
|
||||
"name": "scenes-rdd",
|
||||
"label": "Scenes Reve de Dragon",
|
||||
"system": "foundryvtt-reve-de-dragon",
|
||||
"module": "foundryvtt-reve-de-dragon",
|
||||
"path": "./packs/scenes-rdd.db",
|
||||
"path": "packs/scenes-rdd.db",
|
||||
"type": "Scene",
|
||||
"tags": [
|
||||
"ecran",
|
||||
"scene"
|
||||
],
|
||||
"entity": "Scene",
|
||||
"private": false
|
||||
"private": false,
|
||||
"flags": {}
|
||||
}
|
||||
],
|
||||
"relationships": {},
|
||||
"socket": true,
|
||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.0.3.zip",
|
||||
"protected": false,
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.0.6.zip",
|
||||
"gridDistance": 1,
|
||||
"gridUnits": "m",
|
||||
"primaryTokenAttribute": "sante.vie",
|
||||
"secondaryTokenAttribute": "sante.endurance"
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
{{!-- Carac Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="carac">
|
||||
|
||||
|
||||
<div class="grid grid-2col">
|
||||
<div class="flex-group-left flexcol">
|
||||
<ol class="carac-list alterne-list">
|
||||
@@ -65,6 +65,7 @@
|
||||
{{#select data.definition.typeentite}}
|
||||
<option value="incarne">Incarnée</option>
|
||||
<option value="nonincarne">Non Incarnée</option>
|
||||
<option value="blurette">Blurete</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
@@ -89,9 +90,7 @@
|
||||
|
||||
{{!-- Compétences Tab --}}
|
||||
<div class="tab competences" data-group="primary" data-tab="competences">
|
||||
|
||||
<div class="flexcol">
|
||||
|
||||
<div class="flex-group-left flexcol competence-column">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each competences as |comp key|}}
|
||||
@@ -111,25 +110,24 @@
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
<div class="flex-group-left flexcol competence-column">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each possessions as |possession key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{possession._id}}">
|
||||
<img class="sheet-competence-img" src="{{possession.img}}" />
|
||||
<span class="competence-label">{{possession.name}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
<div class="flex-group-left flexcol competence-column">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each possessions as |possession key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{possession._id}}">
|
||||
<img class="sheet-competence-img" src="{{possession.img}}" />
|
||||
<span class="competence-label">{{possession.name}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab description" data-group="primary" data-tab="description">
|
||||
<div class="form-group editor">
|
||||
@@ -137,8 +135,6 @@
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</form>
|
||||
16
templates/chat-command-nom.html
Normal file
16
templates/chat-command-nom.html
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
<h4>Proposition de nom: {{nom}}</h4>
|
||||
<span class="chat-card-button-area">
|
||||
<a class="button-creer-acteur chat-card-button"
|
||||
data-nom='{{nom}}'
|
||||
data-type='personnage'
|
||||
>
|
||||
Créer un Personnage</a>
|
||||
</span>
|
||||
<span class="chat-card-button-area">
|
||||
<a class="button-creer-acteur chat-card-button"
|
||||
data-nom='{{nom}}'
|
||||
data-type='creature'>
|
||||
Créer une créature</a>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user