Nouveaux effets de rencontre
Gain de 1 point de rêve Perte de (force) points de vie Gain de 1 point de moral Perte de 1 point de moral Gain de (force) xp sort Perte de 1 point d'endurance Perte de (force) points d'endurance Coup de fatigue de 1 point Coup de fatigue de (force) points Récupération de 1 point de fatigue Récupération de (force) points de fatigue Perte de chance actuelle Perte de 1 point de chance actuelle Gain de 1 point de stress
This commit is contained in:
parent
be57a52f61
commit
191d23e903
@ -22,7 +22,6 @@ import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
||||
import { RdDItemSigneDraconique } from "./item-signedraconique.js";
|
||||
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
||||
import { TMRRencontres } from "./tmr-rencontres.js";
|
||||
import { Poetique } from "./poetique.js";
|
||||
import { EffetsDraconiques } from "./tmr/effets-draconiques.js";
|
||||
import { Draconique } from "./tmr/draconique.js";
|
||||
import { RdDCarac } from "./rdd-carac.js";
|
||||
|
@ -21,13 +21,47 @@ export class EffetsRencontre {
|
||||
dialog.setRencontreState('persistant', []);
|
||||
}
|
||||
|
||||
static reve_plus_f = async (dialog, context) => { await EffetsRencontre.$reve_plus(context.actor, context.rencontre.system.force) }
|
||||
static reve_plus_force = async (dialog, context) => { await EffetsRencontre.$reve_plus(context.actor, context.rencontre.system.force) }
|
||||
static reve_plus_1 = async (dialog, context) => { await EffetsRencontre.$reve_plus(context.actor, 1) }
|
||||
static reve_moins_f = async (dialog, context) => { await EffetsRencontre.$reve_plus(context.actor, -context.rencontre.system.force) }
|
||||
static reve_moins_force = async (dialog, context) => { await EffetsRencontre.$reve_plus(context.actor, -context.rencontre.system.force) }
|
||||
static reve_moins_1 = async (dialog, context) => { await EffetsRencontre.$reve_plus(context.actor, -1) }
|
||||
static $reve_plus = async (actor, valeur) => { await actor.reveActuelIncDec(valeur) }
|
||||
|
||||
static vie_moins_1 = async (dialog, context) => { await EffetsRencontre.$vie_plus(context.actor, -1) }
|
||||
static vie_moins_force = async (dialog, context) => { await EffetsRencontre.$vie_plus(context.actor, -context.rencontre.system.force) }
|
||||
static $vie_plus = async (actor, valeur) => { await actor.santeIncDec("vie", valeur) }
|
||||
|
||||
static moral_plus_1 = async (dialog, context) => { await EffetsRencontre.$vie_plus(context.actor, 1) }
|
||||
static moral_moins_1 = async (dialog, context) => { await EffetsRencontre.$vie_plus(context.actor, -1) }
|
||||
static $moral_plus = async (actor, valeur) => { await actor.moralIncDec(valeur) }
|
||||
|
||||
static end_moins_1 = async (dialog, context) => { await EffetsRencontre.$vie_plus(context.actor, -1) }
|
||||
static end_moins_force = async (dialog, context) => { await EffetsRencontre.$vie_plus(context.actor, -context.rencontre.system.force) }
|
||||
static $end_plus = async (actor, valeur) => { await actor.santeIncDec("endurance", valeur) }
|
||||
|
||||
static fatigue_plus_1 = async (dialog, context) => { await EffetsRencontre.$fatigue_plus(context.actor, 1) }
|
||||
static fatigue_plus_force = async (dialog, context) => { await EffetsRencontre.$fatigue_plus(context.actor, context.rencontre.system.force) }
|
||||
static fatigue_moins_1 = async (dialog, context) => { await EffetsRencontre.$fatigue_plus(context.actor, -1) }
|
||||
static fatigue_moins_force = async (dialog, context) => { await EffetsRencontre.$fatigue_plus(context.actor, -context.rencontre.system.force) }
|
||||
static $fatigue_plus = async (actor, valeur) => { await actor.santeIncDec("fatigue", valeur) }
|
||||
|
||||
static perte_chance = async (dialog, context) => {
|
||||
const perte = context.rolled.isETotal ? context.rencontre.system.force : 1;
|
||||
await context.actor.chanceActuelleIncDec("fatigue", -perte);
|
||||
}
|
||||
|
||||
static xp_sort_force = async (dialog, context) => {
|
||||
let competence = context.competence;
|
||||
if (competence) {
|
||||
const xpSort = Misc.toInt(competence.system.xp_sort) + context.rencontre.system.force;
|
||||
await this.updateEmbeddedDocuments("Item", [{ _id: compData._id, 'system.xp_sort': xpSort }]);
|
||||
await this.updateExperienceLog("XP Sort", xpSort, `Rencontre d'un ${context.rencontre.name} en TMR`);
|
||||
}
|
||||
}
|
||||
|
||||
static stress_plus_1 = async (dialog, context) => {
|
||||
await context.actor.addCompteurValue('stress', 1, `Rencontre d'un ${context.rencontre.name} en TMR`);
|
||||
}
|
||||
|
||||
static reinsertion = async (dialog, context) => {
|
||||
await EffetsRencontre.$reinsertion(dialog, context.actor, it => true)
|
||||
@ -94,14 +128,6 @@ export class EffetsRencontre {
|
||||
await context.actor.regainPointDeSeuil()
|
||||
}
|
||||
|
||||
static $reve_plus = async (actor, valeur) => {
|
||||
await actor.reveActuelIncDec(valeur);
|
||||
}
|
||||
|
||||
static $vie_plus = async (actor, valeur) => {
|
||||
await actor.santeIncDec("vie", valeur);
|
||||
}
|
||||
|
||||
static async $reinsertion(dialog, actor, filter) {
|
||||
const newTMR = await TMRUtility.getTMRAleatoire(filter);
|
||||
await actor.forcerPositionTMRInconnue(newTMR);
|
||||
|
@ -3,14 +3,14 @@ import { EffetsRencontre } from "./effets-rencontres.js";
|
||||
const tableEffets = [
|
||||
{ code: "messager", resultat: "succes", description: "Envoie un message à (force) cases", method: EffetsRencontre.messager },
|
||||
{ code: "passeur", resultat: "succes", description: "Déplacer le demi-rêve à (force) cases", method: EffetsRencontre.passeur},
|
||||
{ code: "reve+f", resultat: "succes", description: "Gain de (force) points de rêve" , method: EffetsRencontre.reve_plus_f},
|
||||
{ code: "reve+f", resultat: "succes", description: "Gain de (force) points de rêve" , method: EffetsRencontre.reve_plus_force},
|
||||
{ code: "teleport", resultat: "succes", description: "Déplacer le demi-rêve (même type)", method: EffetsRencontre.teleportation_typecase },
|
||||
{ code: "part+tete", resultat: "succes", description: "Tête de dragon sur réussite particulière", method: EffetsRencontre.rdd_part_tete },
|
||||
{ code: "part+xp", resultat: "succes", description: "Expérience sur réussite particulière", method: EffetsRencontre.experience_particuliere },
|
||||
{ code: "seuil", resultat: "succes", description: "Récupération de seuil de rêve", method: EffetsRencontre.regain_seuil },
|
||||
|
||||
{ code: "reve-1", resultat: "echec", description: "Perte de 1 point de rêve", method: EffetsRencontre.reve_moins_1 },
|
||||
{ code: "reve-f", resultat: "echec", description: "Perte de (force) points de rêve", method: EffetsRencontre.reve_moins_f },
|
||||
{ code: "reve-f", resultat: "echec", description: "Perte de (force) points de rêve", method: EffetsRencontre.reve_moins_force },
|
||||
{ code: "vie-1", resultat: "echec", description: "Perte de 1 point de vie", method: EffetsRencontre.vie_moins_1 },
|
||||
{ code: "reinsere", resultat: "echec", description: "Réinsertion aléatoire", method: EffetsRencontre.reinsertion },
|
||||
{ code: "persistant", resultat: "echec", description: "Bloque le demi-rêve", method: EffetsRencontre.rencontre_persistante },
|
||||
@ -20,18 +20,19 @@ const tableEffets = [
|
||||
{ code: "rompu", resultat: "echec", description: "Demi-rêve interrompu", method: EffetsRencontre.demireve_rompu },
|
||||
{ code: "echec-queue", resultat: "echec", description: "Queue(s) de dragon sur échec", method: EffetsRencontre.rdd_echec_queue },
|
||||
|
||||
// { code: "moral+1", resultat: "succes", description: "Gain de 1 point de moral" },
|
||||
// { code: "reve+1", resultat: "succes", description: "Gain de 1 point de rêve" },
|
||||
// { code: "xpsort+f", resultat: "succes", description: "Gain de (force) xp sort" },
|
||||
// { code: "stress+1", resultat: "succes", description: "Gain de 1 point de stress" },
|
||||
// { code: "vie-f", resultat: "echec", description: "Perte de (force) point de vie" },
|
||||
// { code: "endurance-1", resultat: "echec", description: "Perte de 1 point d'endurance" },
|
||||
// { code: "endurance-f", resultat: "echec", description: "Perte de (force) point d'endurance" },
|
||||
// { code: "fatigue-1", resultat: "echec", description: "Perte de 1 point de fatigue" },
|
||||
// { code: "fatigue-f", resultat: "echec", description: "Perte de (force) point de fatigue" },
|
||||
// { code: "moral-1", resultat: "echec", description: "Perte de 1 point de moral" },
|
||||
// { code: "chance-1", resultat: "echec", description: "Perte de 1 point de chance actuelle" },
|
||||
// { code: "chance-f", resultat: "echec", description: "Perte de (force) point de chance" },
|
||||
{ code: "reve+1", resultat: "succes", description: "Gain de 1 point de rêve", method: EffetsRencontre.reve_plus_1 },
|
||||
{ code: "vie-f", resultat: "echec", description: "Perte de (force) points de vie", method: EffetsRencontre.vie_moins_force },
|
||||
{ code: "moral+1", resultat: "succes", description: "Gain de 1 point de moral", method: EffetsRencontre.moral_plus_1 },
|
||||
{ code: "moral-1", resultat: "echec", description: "Perte de 1 point de moral", method: EffetsRencontre.moral_moins_1 },
|
||||
{ code: "xpsort+f", resultat: "succes", description: "Gain de (force) xp sort", method: EffetsRencontre.xp_sort_force },
|
||||
{ code: "endurance-1", resultat: "echec", description: "Perte de 1 point d'endurance", method: EffetsRencontre.end_moins_1 },
|
||||
{ code: "endurance-f", resultat: "echec", description: "Perte de (force) points d'endurance", method: EffetsRencontre.end_moins_force },
|
||||
{ code: "fatigue+1", resultat: "echec", description: "Coup de fatigue de 1 point", method: EffetsRencontre.fatigue_plus_1},
|
||||
{ code: "fatigue+f", resultat: "echec", description: "Coup de fatigue de 1 (force) points", method: EffetsRencontre.fatigue_plus_force },
|
||||
{ code: "fatigue-1", resultat: "succes", description: "Récupération de 1 point de fatigue", method: EffetsRencontre.fatigue_moins_1},
|
||||
{ code: "fatigue-f", resultat: "succes", description: "Récupération de 1 (force) points de fatigue", method: EffetsRencontre.fatigue_moins_force },
|
||||
{ code: "perte-chance", resultat: "echec", description: "Perte de chance actuelle", method: EffetsRencontre.perte_chance },
|
||||
{ code: "stress+1", resultat: "succes", description: "Gain de 1 point de stress", method: EffetsRencontre.stress_plus_1 },
|
||||
// { code: "epart-souffle", resultat: "echec", description: "Souffle de dragon sur échec particulier" },
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user