forked from public/foundryvtt-reve-de-dragon
Bonus de sorts en fleuve
Le bonus de sort en fleuve est identique pour toutes les cases fleuve.
This commit is contained in:
@ -226,9 +226,6 @@ export const TMRType = {
|
||||
desolation: { name: "désolation", genre: "f" }
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const caseSpecificModes = ["attache", "trounoir", "debordement", "reserve_extensible", "maitrisee"];
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const tmrRandomMovePatten =
|
||||
[{ name: 'top', col: 0, row: -1 },
|
||||
@ -239,8 +236,6 @@ const tmrRandomMovePatten =
|
||||
{ name: 'topleft', col: -1, row: -1 }
|
||||
]
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class TMRUtility {
|
||||
static init() {
|
||||
@ -258,32 +253,25 @@ export class TMRUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static verifyTMRCoord(coord) {
|
||||
let TMRregexp = new RegExp(/([A-M])(\d+)/g);
|
||||
let res = TMRregexp.exec(coord);
|
||||
if (res && res[1] && res[2]) {
|
||||
if (res[2] > 0 && res[2] < 16) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return Grammar.equalsInsensitive(coord, 'Fleuve') || TMRUtility.getTMR(coord);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getTMR(coord) {
|
||||
return TMRMapping[coord];
|
||||
return coord == 'Fleuve' ? TMRMapping['D1'] : TMRMapping[coord];
|
||||
}
|
||||
|
||||
static getTMRLabel(coord) {
|
||||
return TMRMapping[coord]?.label ?? (coord + ": case inconnue");
|
||||
return TMRUtility.getTMR(coord)?.label ?? (coord + ": case inconnue");
|
||||
}
|
||||
|
||||
static getTMRType(coord) {
|
||||
const tmr = TMRMapping[coord];
|
||||
const tmr = TMRUtility.getTMR(coord);
|
||||
return Misc.upperFirst(TMRType[tmr.type].name);
|
||||
}
|
||||
|
||||
static getTMRDescr(coord) {
|
||||
const tmr = TMRMapping[coord];
|
||||
const tmr = TMRUtility.getTMR(coord);
|
||||
return Grammar.articleDetermine(tmr.type) + ' ' + tmr.label;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user