Compare commits
33 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 | |||
| 8c2d49652c | |||
| ed02972a34 | |||
| 7d32a70e00 | |||
| 8aece9cad1 | |||
| ffd36a045e | |||
|
|
bafc52a151 | ||
|
|
940baad04c | ||
| 0d288c56d4 | |||
| 70c26ebfe0 | |||
| 782c6a8fe2 | |||
|
|
b417fdfe32 |
@@ -91,8 +91,9 @@ export class RdDActorSheet extends ActorSheet {
|
||||
formData.combat = duplicate(formData.armes ?? []);
|
||||
RdDItemArme.computeNiveauArmes(formData.combat, formData.competences);
|
||||
RdDItemArme.ajoutCorpsACorps(formData.combat, formData.competences, formData.data.carac);
|
||||
formData.esquives = this.actor.getCompetences("Esquive").map(i => foundry.utils.deepClone(i.system))
|
||||
formData.combat = RdDCombatManager.finalizeArmeList(formData.combat, formData.competences, formData.data.carac);
|
||||
formData.esquives = this.actor.getCompetences("Esquive").map(i => foundry.utils.deepClone(i.system));
|
||||
formData.combat = RdDCombatManager.listActionsArmes(formData.combat, formData.competences, formData.data.carac);
|
||||
|
||||
this.armesList = formData.combat;
|
||||
|
||||
// Common data
|
||||
@@ -332,8 +333,8 @@ export class RdDActorSheet extends ActorSheet {
|
||||
html.find('.arme-initiative a').click(async event => {
|
||||
let combatant = game.combat.data.combatants.find(c => c.actor.data._id == this.actor.data._id);
|
||||
if (combatant) {
|
||||
let arme = this._getEventArmeCombat(event);
|
||||
RdDCombatManager.rollInitiativeCompetence(combatant._id, arme);
|
||||
let action = this._getEventArmeCombat(event);
|
||||
RdDCombatManager.rollInitiativeAction(combatant._id, action);
|
||||
} else {
|
||||
ui.notifications.info("Impossible de lancer l'initiative sans être dans un combat.");
|
||||
}
|
||||
|
||||
146
module/actor.js
146
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))
|
||||
@@ -369,12 +365,30 @@ export class RdDActor extends Actor {
|
||||
const list = this.getDraconicList()
|
||||
return duplicate(list[0])
|
||||
}
|
||||
getDraconicOrZero() {
|
||||
const list = this.getDraconicList().filter(it => it.system.niveau >= 0);
|
||||
if (list.length == 0) {
|
||||
return { name: "Aucun", system: { niveau: 0 } };
|
||||
getDraconicOuPossession() {
|
||||
const possessions = this.items.filter(it => it.type == 'competencecreature' && it.system.ispossession)
|
||||
.sort(Misc.descending(it => it.system.niveau));
|
||||
if (possessions.length > 0) {
|
||||
return duplicate(possessions[0]);
|
||||
}
|
||||
return duplicate(list[0]);
|
||||
const draconics = this.getDraconicList().filter(it => it.system.niveau >= 0);
|
||||
if (draconics.length > 0) {
|
||||
return duplicate(draconics[0]);
|
||||
}
|
||||
return {
|
||||
img: 'systems/foundryvtt-reve-de-dragon/icons/entites/possession.webp',
|
||||
name: 'Sans draconic',
|
||||
data: {
|
||||
niveau: 0,
|
||||
defaut_carac: "reve",
|
||||
}
|
||||
};
|
||||
}
|
||||
getPossession(possessionId) {
|
||||
return this.items.find(it => it.type == 'possession' && it.system.possessionid == possessionId);
|
||||
}
|
||||
getPossessions() {
|
||||
return this.items.filter(it => it.type == 'possession');
|
||||
}
|
||||
|
||||
getDemiReve() {
|
||||
@@ -595,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 {
|
||||
@@ -779,7 +797,7 @@ export class RdDActor extends Actor {
|
||||
async combattreReveDeDragon(force) {
|
||||
let rollData = {
|
||||
actor: this,
|
||||
competence: duplicate(this.getDraconicOrZero()),
|
||||
competence: duplicate(this.getDraconicOuPossession()),
|
||||
canClose: false,
|
||||
rencontre: duplicate(TMRRencontres.getRencontre('rdd')),
|
||||
tmr: true,
|
||||
@@ -810,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());
|
||||
@@ -960,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) {
|
||||
@@ -1289,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
|
||||
}
|
||||
@@ -1321,7 +1339,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async computeEncombrementTotalEtMalusArmure() {
|
||||
if ( !this.pack ) {
|
||||
if (!this.pack) {
|
||||
await this.computeMalusArmure();
|
||||
return this.computeEncombrement();
|
||||
}
|
||||
@@ -1599,7 +1617,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async setSonne(sonne = true) {
|
||||
if (this.isEntiteCauchemar()) {
|
||||
if (this.isEntite()) {
|
||||
return;
|
||||
}
|
||||
if (!game.combat && sonne) {
|
||||
@@ -1611,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)
|
||||
@@ -1726,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;
|
||||
@@ -1763,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()
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -1892,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);
|
||||
@@ -1900,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;
|
||||
@@ -2519,9 +2537,9 @@ export class RdDActor extends Actor {
|
||||
if (rollData.competence.type == 'competencecreature') {
|
||||
if (rollData.competence.system.iscombat) {
|
||||
if (rollData.competence.system.ispossession) {
|
||||
RdDPossession.managePossession(this, rollData.competence)
|
||||
RdDPossession.onAttaquePossession(this, rollData.competence)
|
||||
} else {
|
||||
const arme = RdDItemCompetenceCreature.toArme(rollData.competence)
|
||||
const arme = RdDItemCompetenceCreature.toActionArme(rollData.competence)
|
||||
RdDCombat.createUsingTarget(this)?.attaque(competence, arme)
|
||||
}
|
||||
return
|
||||
@@ -2547,8 +2565,8 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
conjurerPossession(possession) {
|
||||
let draconic = this.getBestDraconic();
|
||||
RdDPossession.managePossession(this, draconic, possession)
|
||||
let draconic = this.getDraconicOuPossession();
|
||||
RdDPossession.onAttaquePossession(this, draconic, possession)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -2647,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]);
|
||||
@@ -3104,7 +3122,7 @@ export class RdDActor extends Actor {
|
||||
return carac.chance;
|
||||
}
|
||||
let entry = Misc.findFirstLike(name, Object.entries(carac), { mapper: it => it[1].label, description: 'caractéristique' });
|
||||
return entry.length > 0 ? carac[entry[0]] : undefined;
|
||||
return entry && entry.length > 0 ? carac[entry[0]] : undefined;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -3179,7 +3197,7 @@ export class RdDActor extends Actor {
|
||||
let competence = this.getCompetence(arme.system.competence)
|
||||
if (arme || (competence.type == 'competencecreature' && competence.system.iscombat)) {
|
||||
if (competence.system.ispossession) {
|
||||
RdDPossession.managePossession(this, competence);
|
||||
RdDPossession.onAttaquePossession(this, competence);
|
||||
} else {
|
||||
RdDCombat.createUsingTarget(this)?.attaque(competence, arme);
|
||||
}
|
||||
@@ -3268,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)) {
|
||||
@@ -3304,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);
|
||||
@@ -3318,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 ?? {}
|
||||
});
|
||||
|
||||
@@ -3507,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;
|
||||
@@ -3532,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;
|
||||
}
|
||||
@@ -3581,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 });
|
||||
@@ -3650,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)
|
||||
@@ -3685,8 +3704,9 @@ export class RdDActor extends Actor {
|
||||
RdDActor.remoteActorCall({
|
||||
actorId: achat.vendeurId ?? achat.acheteurId,
|
||||
method: 'achatVente',
|
||||
args: [achat] },
|
||||
);
|
||||
args: [achat]
|
||||
},
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4057,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')) {
|
||||
@@ -4093,7 +4113,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getEffectByLabel(label) {
|
||||
getEffectByLabel(label) {
|
||||
return this.getActiveEffects().find(it => it.system?.label == label);
|
||||
}
|
||||
|
||||
@@ -4104,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,
|
||||
|
||||
@@ -30,7 +30,7 @@ export class RdDItemArme extends Item {
|
||||
switch (armeData ? armeData.type : '') {
|
||||
case 'arme': return armeData;
|
||||
case 'competencecreature':
|
||||
return RdDItemCompetenceCreature.toArme(armeData);
|
||||
return RdDItemCompetenceCreature.toActionArme(armeData);
|
||||
}
|
||||
return RdDItemArme.mainsNues();
|
||||
}
|
||||
@@ -186,7 +186,7 @@ export class RdDItemArme extends Item {
|
||||
categorie_parade: 'sans-armes'
|
||||
}
|
||||
};
|
||||
mergeObject(corpsACorps.system, actorData ??{}, { overwrite: false });
|
||||
mergeObject(corpsACorps.system, actorData ?? {}, { overwrite: false });
|
||||
return corpsACorps;
|
||||
}
|
||||
|
||||
|
||||
@@ -210,8 +210,11 @@ export class RdDItemCompetence extends Item {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static findCompetence(list, idOrName, options = {}) {
|
||||
if (idOrName == undefined) {
|
||||
return undefined;
|
||||
}
|
||||
options = mergeObject(options, {
|
||||
filter: it => RdDItemCompetence.isCompetence(it),
|
||||
preFilter: it => RdDItemCompetence.isCompetence(it),
|
||||
description: 'compétence',
|
||||
});
|
||||
return list.find(it => it.id == idOrName && RdDItemCompetence.isCompetence(it))
|
||||
|
||||
@@ -11,12 +11,12 @@ export class RdDItemCompetenceCreature extends Item {
|
||||
rollData.competence.system.categorie = "creature"
|
||||
rollData.selectedCarac = rollData.carac.carac_creature
|
||||
if (rollData.competence.system.iscombat) {
|
||||
rollData.arme = RdDItemCompetenceCreature.toArme(rollData.competence);
|
||||
rollData.arme = RdDItemCompetenceCreature.toActionArme(rollData.competence);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static toArme(item) {
|
||||
static toActionArme(item) {
|
||||
if (RdDItemCompetenceCreature.isCompetenceAttaque(item)) {
|
||||
// si c'est un Item compétence: cloner pour ne pas modifier lma compétence
|
||||
let arme = (item instanceof Item) ? item.clone(): item;
|
||||
@@ -28,11 +28,12 @@ export class RdDItemCompetenceCreature extends Item {
|
||||
dommagesReels: arme.system.dommages,
|
||||
penetration: 0,
|
||||
force: 0,
|
||||
rapide: true
|
||||
rapide: true,
|
||||
action: 'attaque'
|
||||
});
|
||||
return arme;
|
||||
}
|
||||
console.error("RdDItemCompetenceCreature.toArme(", item, ") : impossible de transformer l'Item en arme");
|
||||
console.error("RdDItemCompetenceCreature.toActionArme(", item, ") : impossible de transformer l'Item en arme");
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ export class Misc {
|
||||
if (!single) {
|
||||
single = subset[0];
|
||||
const choices = Misc.join(subset.map(it => options.mapper(it)), '<br>');
|
||||
options.info(`Plusieurs choix de ${options.description}s possibles:<br>${choices}<br>Le premier sera choisi: ${mapToValue(single)}`);
|
||||
options.onMessage(`Plusieurs choix de ${options.description}s possibles:<br>${choices}<br>Le premier sera choisi: ${options.mapper(single)}`);
|
||||
}
|
||||
return single;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ export class Misc {
|
||||
}
|
||||
value = Grammar.toLowerCaseNoAccent(value);
|
||||
const subset = elements.filter(options.preFilter)
|
||||
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it)).includes(value));
|
||||
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value));
|
||||
if (subset.length == 0) {
|
||||
options.onMessage(`Pas de ${options.description} correspondant à ${value}`);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
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";
|
||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
||||
@@ -26,7 +27,7 @@ const premierRoundInit = [
|
||||
{ pattern: 'epeegnome', init: 5.35 },
|
||||
{ pattern: 'masse', init: 5.30 },
|
||||
{ pattern: 'gourdin', init: 5.25 },
|
||||
{ pattern: 'fléau', init: 5.20 },
|
||||
{ pattern: 'fleau', init: 5.20 },
|
||||
{ pattern: 'dague', init: 5.15 },
|
||||
{ pattern: 'autre', init: 5.10 },
|
||||
];
|
||||
@@ -84,28 +85,23 @@ export class RdDCombatManager extends Combat {
|
||||
// calculate initiative
|
||||
for (let cId = 0; cId < ids.length; cId++) {
|
||||
const combatant = this.combatants.get(ids[cId]);
|
||||
//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);
|
||||
}
|
||||
let rollFormula = formula ?? RdDCombatManager.formuleInitiative(2, 10, 0, 0);
|
||||
if (!formula) {
|
||||
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.system.carac_value, competence.system.niveau, 0);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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.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);
|
||||
}
|
||||
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)";
|
||||
}
|
||||
}
|
||||
//console.log("Combatat", c);
|
||||
@@ -142,6 +138,10 @@ export class RdDCombatManager extends Combat {
|
||||
return this;
|
||||
};
|
||||
|
||||
static formuleInitiative(rang, carac, niveau, bonusMalus) {
|
||||
return `${rang} +( (${RdDCombatManager.calculInitiative(niveau, carac, bonusMalus)} )/100)`;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static calculInitiative(niveau, caracValue, bonusEcaille = 0) {
|
||||
let base = niveau + Math.floor(caracValue / 2);
|
||||
@@ -150,78 +150,95 @@ export class RdDCombatManager extends Combat {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** Retourne une liste triée d'armes avec le split arme1 main / arme 2 main */
|
||||
static finalizeArmeList(armes, competences, carac) {
|
||||
/** Retourne une liste triée d'actions d'armes avec le split arme1 main / arme 2 main */
|
||||
static listActionsArmes(armes, competences, carac) {
|
||||
// Gestion des armes 1/2 mains
|
||||
let armesEquipe = [];
|
||||
let actionsArme = [];
|
||||
for (const arme of armes) {
|
||||
let armeData = duplicate(arme)
|
||||
if (armeData.system.equipe) {
|
||||
let compData = competences.find(c => c.name.toLowerCase() == armeData.system.competence.toLowerCase())
|
||||
let action = duplicate(Misc.data(arme));
|
||||
if (action.system.equipe) {
|
||||
let compData = competences.find(c => c.name == action.system.competence)
|
||||
|
||||
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);
|
||||
actionsArme.push(action);
|
||||
action.action = 'attaque';
|
||||
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 (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)";
|
||||
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 = armeData.system.competence.replace(" 1 main", " 2 mains"); // Replace !
|
||||
const comp2m = action.system.competence.replace(" 1 main", " 2 mains"); // Replace !
|
||||
const comp = competences.find(c => c.name == comp2m)
|
||||
|
||||
const arme2main = duplicate(armeData)
|
||||
const arme2main = duplicate(action);
|
||||
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("/");
|
||||
arme2main.system.initiative = RdDCombatManager.calculInitiative(arme2main.system.niveau, carac[comp.system.defaut_carac].value);
|
||||
actionsArme.push(arme2main);
|
||||
const containsSlash = action.system.dommages.includes("/");
|
||||
if (containsSlash) {
|
||||
const tableauDegats = armeData.system.dommages.split("/");
|
||||
armeData.system.dommagesReels = Number(tableauDegats[0]);
|
||||
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 " + armeData.name + " ne sont pas corrects (ie sous la forme X/Y)");
|
||||
ui.notifications.info("Les dommages de l'arme à 1/2 mains " + action.name + " ne sont pas corrects (ie sous la forme X/Y)");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return armesEquipe.sort(Misc.ascending(armeData => armeData.name + (armeData.system.mainInfo ?? '')))
|
||||
return actionsArme.sort(Misc.ascending(armeData => armeData.name + (armeData.system.mainInfo ?? '')));
|
||||
}
|
||||
|
||||
static listActionsPossessions(actor) {
|
||||
return RdDCombatManager._indexActions(actor.getPossessions().map(p =>
|
||||
{
|
||||
return {
|
||||
name: p.name,
|
||||
action: 'conjurer',
|
||||
data: {
|
||||
competence: p.name,
|
||||
possessionid: p.data.data.possessionid,
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static buildListeActionsCombat(combatant) {
|
||||
if (combatant.actor == undefined) {
|
||||
ui.notifications.warn(`Le combatant ${combatant.name} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`)
|
||||
return [];
|
||||
static listActionsCombat(combatant) {
|
||||
const actor = combatant.actor;
|
||||
let actions = RdDCombatManager.listActionsPossessions(actor);
|
||||
if (actions.length>0) {
|
||||
return actions;
|
||||
}
|
||||
const actorData = combatant.actor
|
||||
let items = combatant.actor.items
|
||||
let actions = []
|
||||
if (combatant.actor.isCreature()) {
|
||||
let items = actor.items;
|
||||
if (actor.isCreature()) {
|
||||
actions = actions.concat(items.filter(it => RdDItemCompetenceCreature.isCompetenceAttaque(it))
|
||||
.map(competence => RdDItemCompetenceCreature.toArme(competence)));
|
||||
.map(competence => RdDItemCompetenceCreature.toActionArme(competence)));
|
||||
} else {
|
||||
// Recupération des items 'arme'
|
||||
let armes = items.filter(it => RdDItemArme.isArmeUtilisable(it))
|
||||
//.concat(RdDItemArme.empoignade())
|
||||
.concat(RdDItemArme.mainsNues());
|
||||
|
||||
let competences = items.filter(it => it.type == 'competence')
|
||||
actions = actions.concat(RdDCombatManager.finalizeArmeList(armes, competences, actorData.data.carac));
|
||||
let competences = items.filter(it => it.type == 'competence');
|
||||
actions = actions.concat(RdDCombatManager.listActionsArmes(armes, competences, actor.data.data.carac));
|
||||
|
||||
if (actorData.data.attributs.hautrevant.value) {
|
||||
actions.push({ name: "Draconic", data: { initOnly: true, competence: "Draconic" } });
|
||||
if (actor.data.data.attributs.hautrevant.value) {
|
||||
actions.push({ name: "Draconic", action: 'haut-reve', data: { initOnly: true, competence: "Draconic" } });
|
||||
}
|
||||
}
|
||||
|
||||
actions.push({ name: "Autre action", data: { initOnly: true, competence: "Autre action" } });
|
||||
return RdDCombatManager._indexActions(actions);
|
||||
}
|
||||
|
||||
static _indexActions(actions) {
|
||||
for (let index = 0; index < actions.length; index++) {
|
||||
actions[index].index = index;
|
||||
}
|
||||
@@ -235,15 +252,15 @@ export class RdDCombatManager extends Combat {
|
||||
let initMissing = game.combat.data.combatants.find(it => !it.initiative);
|
||||
if (!initMissing) { // Premier round !
|
||||
for (let combatant of game.combat.data.combatants) {
|
||||
let arme = combatant.initiativeData?.arme;
|
||||
let action = combatant.initiativeData?.arme;
|
||||
//console.log("Parsed !!!", combatant, initDone, game.combat.current, arme);
|
||||
if (arme && arme.type == "arme") {
|
||||
if (action && action.type == "arme") {
|
||||
for (let initData of premierRoundInit) {
|
||||
if (arme.data.initpremierround.toLowerCase().includes(initData.pattern)) {
|
||||
if (Grammar.toLowerCaseNoAccentNoSpace(action.data.initpremierround).includes(initData.pattern)) {
|
||||
let msg = `<h4>L'initiative de ${combatant.actor.name} a été modifiée !</h4>
|
||||
<hr>
|
||||
<div>
|
||||
Etant donné son ${arme.name}, son initative pour ce premier round est désormais de ${initData.init}.
|
||||
Etant donné son ${action.name}, son initative pour ce premier round est désormais de ${initData.init}.
|
||||
</div>`
|
||||
ChatMessage.create({ content: msg });
|
||||
game.combat.setInitiative(combatant._id, initData.init);
|
||||
@@ -281,7 +298,7 @@ export class RdDCombatManager extends Combat {
|
||||
].concat(options);
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static rollInitiativeCompetence(combatantId, arme) {
|
||||
static rollInitiativeAction(combatantId, action) {
|
||||
const combatant = game.combat.combatants.get(combatantId);
|
||||
if (combatant.actor == undefined) {
|
||||
ui.notifications.warn(`Le combatant ${combatant.name} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`)
|
||||
@@ -299,34 +316,40 @@ export class RdDCombatManager extends Combat {
|
||||
} else if (combatant.actor.getSurprise() == "demi") {
|
||||
initOffset = 0;
|
||||
initInfo = "Demi Surprise"
|
||||
} else if (arme.name == "Autre action") {
|
||||
} else if (action.action == 'conjurer') {
|
||||
initOffset = 10;
|
||||
caracForInit = combatant.actor.getReveActuel();
|
||||
initInfo = "Possession"
|
||||
} else if (action.action == 'autre') {
|
||||
initOffset = 2;
|
||||
initInfo = "Autre Action"
|
||||
} else if (arme.name == "Draconic") {
|
||||
} else if (action.action == 'haut-reve') {
|
||||
initOffset = 9;
|
||||
initInfo = "Draconic"
|
||||
} else {
|
||||
compData = RdDItemCompetence.findCompetence(combatant.actor.items, arme.system.competence);
|
||||
compNiveau = compData.system.niveau;
|
||||
initInfo = arme.name + " / " + arme.data.competence;
|
||||
if (combatant.actor.type == 'creature' || combatant.actor.type == 'entite') {
|
||||
caracForInit = compData.system.carac_value;
|
||||
if (compData.system.categorie == "lancer") {
|
||||
initOffset = 7;
|
||||
}
|
||||
else {
|
||||
initOffset = 5;
|
||||
}
|
||||
} else {
|
||||
caracForInit = combatant.actor.system.carac[compData.system.defaut_carac].value;
|
||||
initOffset = RdDCombatManager._baseInitOffset(compData.system.categorie, arme);
|
||||
initInfo = action.name + " / " + action.data.competence;
|
||||
|
||||
if (combatant.actor.type == 'creature' || combatant.actor.type == 'entite') {
|
||||
caracForInit = compData.data.carac_value;
|
||||
if (compData.system.categorie == "lancer") {
|
||||
initOffset = 7;
|
||||
}
|
||||
else {
|
||||
initOffset = 5;
|
||||
}
|
||||
} else {
|
||||
caracForInit = combatant.actor.system.carac[compData.system.defaut_carac].value;
|
||||
initOffset = RdDCombatManager._baseInitOffset(compData.system.categorie, action);
|
||||
}
|
||||
}
|
||||
|
||||
let malus = combatant.actor.getEtatGeneral(); // Prise en compte état général
|
||||
// Cas des créatures et entités vs personnages
|
||||
let rollFormula = initOffset + "+ ( (" + RdDCombatManager.calculInitiative(compNiveau, caracForInit) + " + " + malus + ") /100)";
|
||||
let rollFormula = RdDCombatManager.formuleInitiative(initOffset, caracForInit, compNiveau, malus);
|
||||
// Garder la trace de l'arme/compétence utilisée pour l'iniative
|
||||
combatant.initiativeData = { arme: arme } // pour reclasser l'init au round 0
|
||||
combatant.initiativeData = { arme: action } // pour reclasser l'init au round 0
|
||||
game.combat.rollInitiative(combatantId, rollFormula, { initInfo: initInfo });
|
||||
}
|
||||
|
||||
@@ -349,16 +372,21 @@ export class RdDCombatManager extends Combat {
|
||||
static displayInitiativeMenu(html, combatantId) {
|
||||
console.log("Combatant ; ", combatantId);
|
||||
const combatant = game.combat.combatants.get(combatantId);
|
||||
let armesList = RdDCombatManager.buildListeActionsCombat(combatant);
|
||||
if (! (combatant?.actor) ) {
|
||||
ui.notifications.warn(`Le combatant ${combatant.name ?? combatantId} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`)
|
||||
return;
|
||||
}
|
||||
|
||||
let actions = RdDCombatManager.listActionsCombat(combatant);
|
||||
|
||||
// Build the relevant submenu
|
||||
if (armesList) {
|
||||
if (actions) {
|
||||
let menuItems = [];
|
||||
for (let arme of armesList) {
|
||||
for (let action of actions) {
|
||||
menuItems.push({
|
||||
name: arme.data.competence,
|
||||
name: action.data.competence,
|
||||
icon: "<i class='fas fa-dice-d6'></i>",
|
||||
callback: target => { RdDCombatManager.rollInitiativeCompetence(combatantId, arme) }
|
||||
callback: target => { RdDCombatManager.rollInitiativeAction(combatantId, action) }
|
||||
});
|
||||
}
|
||||
new ContextMenu(html, ".directory-list", menuItems).render();
|
||||
@@ -427,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)
|
||||
@@ -771,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',
|
||||
@@ -1220,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -276,9 +276,11 @@ export class RdDCommands {
|
||||
diff = 0;
|
||||
}
|
||||
const caracName = params[0];
|
||||
const compName = length > 1 ? Misc.join(params.slice(1, length), ' ') : undefined;
|
||||
for (let actor of actors) {
|
||||
await actor.rollCaracCompetence(caracName, compName, diff);
|
||||
let competence = length > 1 ? actors[0].getCompetence(Misc.join(params.slice(1, length), ' ')) : undefined;
|
||||
if (competence) {
|
||||
for (let actor of actors) {
|
||||
await actor.rollCaracCompetence(caracName, competence.name, diff);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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});
|
||||
}
|
||||
}
|
||||
@@ -14,44 +14,44 @@ Donc la compétence Possession ne peut être démarrée que par le MJ.
|
||||
export class RdDPossession {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static init() {
|
||||
static init() {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static searchPossessionFromEntite( attacker, defender) {
|
||||
let poss = attacker.items.find( poss => poss.type == 'possession' && poss.system.possedeid == defender.id);
|
||||
static searchPossessionFromEntite(attacker, defender) {
|
||||
let poss = attacker.items.find(poss => poss.type == 'possession' && poss.system.possedeid == defender.id);
|
||||
if (!poss) {
|
||||
poss = defender.items.find( poss => poss.type == 'possession' && poss.system.possedeid == defender.id);
|
||||
poss = defender.items.find(poss => poss.type == 'possession' && poss.system.possedeid == defender.id);
|
||||
}
|
||||
return poss && duplicate(poss) || undefined;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static updateEtatPossession( possession ) {
|
||||
static updateEtatPossession(possession) {
|
||||
possession.ptsConjuration = 0
|
||||
possession.ptsPossession = 0
|
||||
console.log("Possession", possession)
|
||||
if ( possession.system.compteur > 0) {
|
||||
if (possession.system.compteur > 0) {
|
||||
possession.ptsPossession = possession.system.compteur
|
||||
}
|
||||
if ( possession.system.compteur < 0) {
|
||||
}
|
||||
if (possession.system.compteur < 0) {
|
||||
possession.ptsConjuration = Math.abs(possession.system.compteur)
|
||||
}
|
||||
}
|
||||
possession.isPosseder = false
|
||||
possession.isConjurer = false
|
||||
if (possession.ptsPossession >= 2 ) {
|
||||
if (possession.ptsPossession >= 2) {
|
||||
possession.isPosseder = true
|
||||
}
|
||||
if (possession.ptsConjuration >= 2 ) {
|
||||
if (possession.ptsConjuration >= 2) {
|
||||
possession.isConjurer = true
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async resultConjuration( rollData) {
|
||||
static async resultConjuration(rollData) {
|
||||
let actor = game.actors.get(rollData.possession.system.possedeid)
|
||||
if ( !rollData.rolled.isSuccess ) {
|
||||
if( rollData.isECNIDefender) {
|
||||
if (!rollData.rolled.isSuccess) {
|
||||
if (rollData.isECNIDefender) {
|
||||
rollData.possession.system.compteur--
|
||||
} else {
|
||||
rollData.possession.system.compteur++
|
||||
@@ -59,55 +59,41 @@ export class RdDPossession {
|
||||
let update = { _id: rollData.possession._id, "system.compteur": rollData.possession.system.compteur }
|
||||
await actor.updateEmbeddedDocuments('Item', [update])
|
||||
}
|
||||
|
||||
|
||||
this.updateEtatPossession(rollData.possession)
|
||||
await RdDResolutionTable.displayRollData(rollData, this, 'chat-resultat-possession.html')
|
||||
if ( rollData.possession.isPosseder || rollData.possession.isConjurer) {
|
||||
if (rollData.possession.isPosseder || rollData.possession.isConjurer) {
|
||||
actor.deleteEmbeddedDocuments("Item", [rollData.possession._id])
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async onDefensePossession( attackerId, defenderId, possessionId) {
|
||||
static async onDefensePossession(attackerId, defenderId, possessionId) {
|
||||
let attacker = game.actors.get(attackerId)
|
||||
let defender = game.actors.get(defenderId)
|
||||
|
||||
let possession = attacker.items.find( item => item.type =='possession' && item.system.possessionid == possessionId)
|
||||
if ( !possession ) {
|
||||
possession = defender.items.find( item => item.type =='possession' && item.system.possessionid == possessionId)
|
||||
if ( !possession) {
|
||||
ui.notifications.warn("Une erreur s'est produite : Aucune possession trouvée !!")
|
||||
return
|
||||
}
|
||||
let possession = attacker.getPossession(possessionId) ?? defender.getPossession(possessionId) ;
|
||||
if (!possession) {
|
||||
ui.notifications.warn("Une erreur s'est produite : Aucune possession trouvée !!")
|
||||
return
|
||||
}
|
||||
possession = duplicate(possession)
|
||||
|
||||
// Update for draconic roll
|
||||
let rollData = {
|
||||
possession: possession
|
||||
mode: "conjuration",
|
||||
isECNIDefender: defender.type == "entite",
|
||||
possession: duplicate(possession),
|
||||
attacker: attacker,
|
||||
defender: defender,
|
||||
competence: defender.getDraconicOuPossession(),
|
||||
selectedCarac: defender.system.data.carac.reve,
|
||||
forceCarac: { 'reve-actuel': { label: "Rêve Actuel", value: defender.getReveActuel() } }
|
||||
}
|
||||
rollData.actor = defender
|
||||
if ( defender.type == "personnage") {
|
||||
rollData.competence = duplicate(defender.getDraconicOrZero())
|
||||
rollData.competence.system.defaut_carac = 'reve-actuel'
|
||||
rollData.forceCarac = { 'reve-actuel': { label: "Rêve Actuel", value: defender.getReveActuel() } }
|
||||
rollData.selectedCarac = defender.system.carac.reve
|
||||
rollData.isECNIDefender = false
|
||||
} else {
|
||||
rollData.competence = duplicate(defender.getCompetence("Possession"))
|
||||
rollData.competence.system.defaut_carac = "reve"
|
||||
rollData.forceCarac = { 'reve': { label: "Rêve", value: defender.system.carac.reve.value } }
|
||||
rollData.selectedCarac = defender.system.carac.reve
|
||||
rollData.isECNIDefender = true
|
||||
//RdDItemCompetenceCreature.setRollDataCreature( rollData )
|
||||
}
|
||||
rollData.mode = "conjuration"
|
||||
rollData.possesseur = attacker.name
|
||||
rollData.competence.system.defaut_carac = 'reve-actuel'
|
||||
|
||||
|
||||
const dialog = await RdDRoll.create(defender, rollData,
|
||||
{
|
||||
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-defense-possession.html',
|
||||
options: { height: 400 }
|
||||
options: { height: 450 }
|
||||
},
|
||||
{
|
||||
name: 'conjurer',
|
||||
@@ -121,54 +107,38 @@ export class RdDPossession {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async _onRollPossession( rollData, isSuccess ) {
|
||||
let possession = rollData.possession
|
||||
possession.isSuccess = isSuccess
|
||||
this.updateEtatPossession( possession)
|
||||
await RdDResolutionTable.displayRollData(rollData, this, 'chat-resultat-possession.html');
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async managePossession(attacker, competence, possession=undefined) {
|
||||
|
||||
static async onAttaquePossession(attacker, competence, possession = undefined) {
|
||||
const target = RdDCombat.getTarget()
|
||||
if (target == undefined) {
|
||||
ui.notifications.warn((game.user.targets?.size ?? 0) > 1
|
||||
? "Vous devez choisir <strong>une seule</strong> cible à posséder!"
|
||||
: "Vous devez choisir une cible à posséder!");
|
||||
return;
|
||||
}
|
||||
|
||||
const defender = target.actor;
|
||||
if ( !possession) {
|
||||
possession = this.searchPossessionFromEntite( attacker, defender)
|
||||
if ( !possession) {
|
||||
possession = await this.createPossession(attacker, defender)
|
||||
}
|
||||
}
|
||||
possession = duplicate(possession);
|
||||
|
||||
const defender = target.actor;
|
||||
possession = duplicate(possession ?? this.searchPossessionFromEntite(attacker, defender) ??(await this.createPossession(attacker, defender)));
|
||||
|
||||
this.updateEtatPossession(possession)
|
||||
let rollData = {
|
||||
competence: competence.data.data.niveau >=0 ? competence : RdDPossession.competenceNonHautRevant(),
|
||||
mode: "possession",
|
||||
isECNIDefender: defender.type == "entite",
|
||||
competence: competence,
|
||||
possession: possession,
|
||||
possede: defender.name,
|
||||
possesseur: attacker.name,
|
||||
attackerId: attacker.id,
|
||||
defenderId: defender.id,
|
||||
mode: "possession"
|
||||
attacker: attacker,
|
||||
defender: defender
|
||||
};
|
||||
if ( attacker.isCreature()) {
|
||||
if (attacker.isCreature()) {
|
||||
RdDItemCompetenceCreature.setRollDataCreature(rollData)
|
||||
}
|
||||
|
||||
const dialog = await RdDRoll.create( attacker, rollData,
|
||||
const dialog = await RdDRoll.create(attacker, rollData,
|
||||
{
|
||||
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html',
|
||||
options: { height: 540 }
|
||||
}, {
|
||||
name: 'jet-possession',
|
||||
label: 'Possession: ',
|
||||
label: rollData.isECNIDefender ? 'Conjurer la possession' : 'Possession',
|
||||
callbacks: [
|
||||
{ condition: r => (r.rolled.isSuccess), action: async r => await this._onRollPossession(r, true) },
|
||||
{ condition: r => (r.rolled.isEchec), action: async r => await this._onRollPossession(r, false) },
|
||||
@@ -177,21 +147,15 @@ export class RdDPossession {
|
||||
dialog.render(true)
|
||||
}
|
||||
|
||||
static competenceNonHautRevant() {
|
||||
return {
|
||||
img: 'systems/foundryvtt-reve-de-dragon/icons/competence_vigilance.webp',
|
||||
name: 'non Haut-rêvant',
|
||||
data: {
|
||||
data: {
|
||||
niveau: 0,
|
||||
defaut_carac: "reve",
|
||||
}
|
||||
}
|
||||
};
|
||||
/* -------------------------------------------- */
|
||||
static async _onRollPossession(rollData, isSuccess) {
|
||||
rollData.possession.isSuccess = isSuccess;
|
||||
this.updateEtatPossession(rollData.possession);
|
||||
await RdDResolutionTable.displayRollData(rollData, this, 'chat-resultat-possession.html');
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async createPossession( attacker, defender ) {
|
||||
static async createPossession(attacker, defender) {
|
||||
let possessionData = {
|
||||
name: "Possession en cours de " + attacker.name, type: 'possession',
|
||||
img: "systems/foundryvtt-reve-de-dragon/icons/entites/possession2.webp",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -23,40 +23,63 @@ export class RdDTokenHud {
|
||||
let token = canvas.tokens.get(tokenId);
|
||||
let actor = token.actor;
|
||||
let combatant = game.combat.combatants.find(c => c.tokenId == tokenId);
|
||||
if (! (combatant?.actor) ) {
|
||||
ui.notifications.warn(`Le combatant ${token.name} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`)
|
||||
return;
|
||||
}
|
||||
app.hasExtension = true;
|
||||
|
||||
let armesList = RdDCombatManager.buildListeActionsCombat(combatant);
|
||||
let actionsCombat = RdDCombatManager.listActionsCombat(combatant);
|
||||
const hudData = {
|
||||
combatant: combatant, armes: armesList,
|
||||
commandes: [{ name: 'Initiative +1', command: 'inc', value: 0.01 }, { name: 'Initiative -1', command: 'dec', value: -0.01 }]
|
||||
combatant: combatant,
|
||||
actions: actionsCombat,
|
||||
commandes: [
|
||||
{ name: "Autre action", command: 'autre' },
|
||||
{ name: 'Initiative +1', command: 'inc', value: 0.01 },
|
||||
{ name: 'Initiative -1', command: 'dec', value: -0.01 }]
|
||||
};
|
||||
|
||||
const controlIconCombat = html.find('.control-icon[data-action=combat]');
|
||||
// initiative
|
||||
await RdDTokenHud._configureSubMenu(controlIconCombat, 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html', hudData,
|
||||
await RdDTokenHud._configureSubMenu(controlIconCombat,
|
||||
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html',
|
||||
hudData,
|
||||
(event) => {
|
||||
let initCommand = event.currentTarget.attributes['data-command'].value;
|
||||
let combatantId = event.currentTarget.attributes['data-combatant-id'].value;
|
||||
if (!initCommand) {
|
||||
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
||||
let arme = armesList[armeIndex];
|
||||
RdDCombatManager.rollInitiativeCompetence(combatantId, arme);
|
||||
} else if (initCommand == 'inc') {
|
||||
RdDCombatManager.incDecInit(combatantId, 0.01);
|
||||
} else if (initCommand == 'dec') {
|
||||
RdDCombatManager.incDecInit(combatantId, -0.01);
|
||||
}
|
||||
let initCommand = event.currentTarget.attributes['data-command']?.value;
|
||||
let combatantId = event.currentTarget.attributes['data-combatant-id']?.value;
|
||||
if (initCommand) {
|
||||
RdDTokenHud._initiativeCommand(initCommand, combatantId);
|
||||
} else {
|
||||
let index = event.currentTarget.attributes['data-action-index'].value;
|
||||
let action = actionsCombat[index];
|
||||
RdDCombatManager.rollInitiativeAction(combatantId, action);
|
||||
}
|
||||
});
|
||||
|
||||
const controlIconTarget = html.find('.control-icon[data-action=target]');
|
||||
// combat
|
||||
await RdDTokenHud._configureSubMenu(controlIconTarget, 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html', hudData,
|
||||
(event) => {
|
||||
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
||||
actor.rollArme(armesList[armeIndex]);
|
||||
const actionIndex = event.currentTarget.attributes['data-action-index']?.value;
|
||||
const action = actionsCombat[actionIndex];
|
||||
if (action.action == 'conjurer') {
|
||||
actor.conjurerPossession(actor.getPossession(action.data.possessionid));
|
||||
}
|
||||
else {
|
||||
actor.rollArme(action);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static _initiativeCommand(initCommand, combatantId) {
|
||||
switch (initCommand) {
|
||||
case 'inc': return RdDCombatManager.incDecInit(combatantId, 0.01);
|
||||
case 'dec': return RdDCombatManager.incDecInit(combatantId, -0.01);
|
||||
case 'autre': return RdDCombatManager.rollInitiativeAction(combatantId,
|
||||
{ name: "Autre action", action: 'autre', data: { initOnly: true, competence: "Autre action" } });
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async addTokenHudExtensions(app, html, tokenId) {
|
||||
const controlIconCombat = html.find('.control-icon[data-action=combat]');
|
||||
|
||||
@@ -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
|
||||
@@ -693,7 +694,7 @@ export class RdDUtility {
|
||||
actor.tmrApp.lancerSortEnReserve(coord, sortId);
|
||||
});
|
||||
|
||||
// gestion bouton tchat Acheter
|
||||
// gestion bouton tchat Possession
|
||||
html.on("click", '.defense-possession', event => {
|
||||
let attackerId = event.currentTarget.attributes['data-attackerId'].value
|
||||
let defenderId = event.currentTarget.attributes['data-defenderId'].value
|
||||
@@ -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
397
system.json
397
system.json
@@ -1,38 +1,43 @@
|
||||
{
|
||||
"name": "foundryvtt-reve-de-dragon",
|
||||
"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": {}
|
||||
}
|
||||
],
|
||||
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
|
||||
"license": "LICENSE.txt",
|
||||
"flags": {},
|
||||
"version": "10.0.0",
|
||||
"minimumCoreVersion": "10",
|
||||
"compatibleCoreVersion": "10",
|
||||
"scripts": [],
|
||||
"version": "10.0.6",
|
||||
"compatibility": {
|
||||
"minimum": "10"
|
||||
},
|
||||
"esmodules": [
|
||||
"module/rdd-main.js"
|
||||
],
|
||||
@@ -44,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": [
|
||||
@@ -57,453 +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": {}
|
||||
}
|
||||
],
|
||||
"system": [],
|
||||
"dependencies": [],
|
||||
"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.0.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>
|
||||
@@ -321,6 +321,7 @@
|
||||
{{!-- Liste de blessures --}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html" this}}
|
||||
|
||||
{{#if maladiesPoisons.length}}
|
||||
{{!-- Maladies & Poison --}}
|
||||
<h3 class="blessures-title">Maladies & Poisons:</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
@@ -354,28 +355,30 @@
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
||||
{{!-- Possession --}}
|
||||
<h3 class="blessures-title">Possession:</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="competence-title flex-grow competence-label">Nom</span>
|
||||
<span class="competence-title competence-label">Type</span>
|
||||
</li>
|
||||
{{#if possessions.length}}
|
||||
{{!-- Possession --}}
|
||||
<h3 class="blessures-title">Possession:</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="competence-title flex-grow competence-label">Nom</span>
|
||||
<span class="competence-title competence-label">Type</span>
|
||||
</li>
|
||||
{{#each possessions as |possession key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{possession._id}}">
|
||||
<span class="competence-label">
|
||||
<a class="sheet-possession-attack">{{possession.name}} (Conjurer)</a>
|
||||
</span>
|
||||
<span class="competence-label">{{possession.system.type}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
<li class="item flexrow list-item" data-item-id="{{possession._id}}">
|
||||
<span class="competence-label">
|
||||
<a class="sheet-possession-attack">{{possession.name}} (Conjurer)</a>
|
||||
</span>
|
||||
<span class="competence-label">{{possession.system.type}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{!-- Connaissances Tab --}}
|
||||
|
||||
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>
|
||||
|
||||
@@ -1,31 +1,38 @@
|
||||
<img class="chat-icon" src="{{competence.img}}" />
|
||||
<h4>
|
||||
{{#if (eq mode "possession")}}
|
||||
{{alias}} tente de posséder {{possede}}
|
||||
{{attacker.name}} tente de {{#if isECNIDefender}}conjurer la possession de{{else}}posséder{{/if}} {{defender.name}}
|
||||
{{else}}
|
||||
{{alias}} tente de conjurer la possession de {{possesseur}}
|
||||
{{defender.name}} tente de {{#if isECNIDefender}}résister à{{else}}conjurer la possession de{{/if}} {{attacker.name}}
|
||||
{{/if}}
|
||||
</h4>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
|
||||
<hr>
|
||||
|
||||
<div>
|
||||
<span class='chat-card-button-area'>
|
||||
<br>
|
||||
{{#if (eq mode "possession")}}
|
||||
{{#if possession.isSuccess}}
|
||||
<a class='defense-possession chat-card-button' data-attackerId='{{attackerId}}'
|
||||
data-defenderId='{{defenderId}}' data-possessionId='{{possession.system.possessionid}}'>Résister à la possession</a>
|
||||
</a>
|
||||
<a class='defense-possession chat-card-button'
|
||||
data-attackerId='{{attacker.id}}'
|
||||
data-defenderId='{{defender.id}}'
|
||||
data-possessionId='{{possession.system.possessionid}}'>
|
||||
{{#if isECNIDefender}}
|
||||
Résister à la conjuration
|
||||
{{else}}
|
||||
Résister à la possession
|
||||
{{/if}}
|
||||
</a>
|
||||
{{else}}
|
||||
La Tentative de Possession a échouée !
|
||||
La Tentative de {{#if isECNIDefender}}conjuration{{else}}possession{{/if}} a échoué !
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if rolled.isSuccess}}
|
||||
La Tentative de Possession a été conjurée ! {{alias}} résiste à la tentative de possession.
|
||||
{{else}}
|
||||
La Tentative de Possession n'a pas pu être conjurée !
|
||||
La tentative de {{#if isECNIDefender}}conjuration a été repoussée{{else}}possession a été conjurée{{/if}}!
|
||||
{{defender.name}} a résisté.
|
||||
{{else}}
|
||||
La tentative de {{#if isECNIDefender}}conjuration a réussi{{else}}possession n'a pas pu être conjurée{{/if}}!
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
<br>Points de Possession: {{possession.ptsPossession}}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<form class="skill-roll-dialog">
|
||||
<h2>Conjuration d'une Possession {{possession.name}}!</h2>
|
||||
<h2>
|
||||
{{defender.name}} tente de
|
||||
{{#if isECNIDefender}}maintenir{{else}}résister à{{/if}}
|
||||
la possession de {{attacker.name}}
|
||||
</h2>
|
||||
<div class="grid grid-2col">
|
||||
<div class="flex-group-left">
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<div class="control-icon rdd-combat ">
|
||||
<img class="rdd-hud-togglebutton" src="systems/foundryvtt-reve-de-dragon/icons/heures/hd06.svg" width="36" height="36" title="Attaque"/>
|
||||
<div class="rdd-hud-list tokenhudext left">
|
||||
{{#each armes as |arme key|}}
|
||||
{{#unless arme.data.initOnly}}
|
||||
<div class="control-icon tokenhudicon rdd-hud-menu rdd-attaque" data-combatant-id="{{../combatant.id}}" data-arme-id="{{arme.index}}" title="{{arme.name}}">
|
||||
<label>C:{{arme.name}} {{arme.data.mainInfo}}</label>
|
||||
{{#each actions as |action key|}}
|
||||
{{#unless action.data.initOnly}}
|
||||
<div class="control-icon tokenhudicon rdd-hud-menu rdd-attaque"
|
||||
data-combatant-id="{{../combatant.id}}"
|
||||
data-action-index="{{action.index}}"
|
||||
title="{{action.name}}">
|
||||
<label>{{action.name}} {{action.data.mainInfo}}</label>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
<div class="control-icon rdd-initiative ">
|
||||
<img class="rdd-hud-togglebutton" src="icons/svg/sword.svg" width="36" height="36" title="Initiative" />
|
||||
<div class="rdd-hud-list tokenhudext right">
|
||||
{{#each armes as |arme key|}}
|
||||
<div class="control-icon tokenhudicon rdd-hud-menu" data-command="{{arme.command}}" data-combatant-id="{{../combatant.id}}" data-arme-id="{{arme.index}}" title="{{arme.name}}">
|
||||
<label>I:{{arme.name}} {{arme.data.mainInfo}}</label>
|
||||
{{#each actions as |action key|}}
|
||||
{{log 'action-hud-init' action}}
|
||||
<div class="control-icon tokenhudicon rdd-hud-menu"
|
||||
data-combatant-id="{{../combatant.id}}"
|
||||
data-action-index="{{action.index}}"
|
||||
title="{{action.name}}">
|
||||
<label>init: {{action.name}} {{action.data.mainInfo}}</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#each commandes as |commande key|}}
|
||||
<div class="control-icon tokenhudicon rdd-hud-menu" data-command="{{commande.command}}" data-combatant-id="{{../combatant.id}}" data-arme-id="{{commande.index}}" title="{{commande.name}}">
|
||||
<label>I:{{commande.name}}</label>
|
||||
<div class="control-icon tokenhudicon rdd-hud-menu"
|
||||
data-command="{{commande.command}}"
|
||||
data-combatant-id="{{../combatant.id}}"
|
||||
data-action-index="{{commande.index}}"
|
||||
title="{{commande.name}}">
|
||||
<label>{{commande.name}}</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user