#27 Gestion des rencontres

This commit is contained in:
2020-11-20 16:45:20 +01:00
parent 7ff428d1c2
commit 34acf9e00c
7 changed files with 44 additions and 26 deletions

View File

@ -265,6 +265,20 @@ export class TMRUtility {
return TMRMapping[coordTMR];
}
/* -------------------------------------------- */
/** Some debug functions */
static setForceRencontre( id, force ) {
this.forceRencontre = { id: id, force: force}
}
/* -------------------------------------------- */
static clearForceRencontre( id, force ) {
this.forceRencontre = undefined
}
/* -------------------------------------------- */
static isForceRencontre() {
return this.forceRencontre
}
/* -------------------------------------------- */
static async rencontreTMRRoll( coordTMR, cellDescr )
{
@ -275,10 +289,12 @@ export class TMRUtility {
rencontre.force = this.evaluerForceRencontre(rencontre);
rencontre.coord = coordTMR;
}
// Forced
//rencontre = rencontresTable[0];
//rencontre.force = 2;
//rencontre.coord = coordTMR;
if ( this.forceRencontre ) {
// Forced
rencontre = rencontresTable[this.forceRencontre.id];
rencontre.force = this.forceRencontre.force;
rencontre.coord = coordTMR;
}
return rencontre;
}