37 lines
958 B
JavaScript
37 lines
958 B
JavaScript
|
import { Misc } from "./misc.js";
|
||
|
|
||
|
export class RdDItemSigneDraconique {
|
||
|
|
||
|
static prepareSigneDraconiqueMeditation(meditation, rolled) {
|
||
|
if (rolled.isSuccess != undefined) {
|
||
|
meditation = Misc.data(meditation);
|
||
|
return {
|
||
|
name: "de la " + meditation.name,
|
||
|
type: "signedraconique",
|
||
|
img: meditation.img,
|
||
|
data: {
|
||
|
"typesTMR": [Misc.upperFirst(meditation.data.tmr)],
|
||
|
"difficulte": RdDItemSigneDraconique.getDiffSigneMeditation(rolled.code),
|
||
|
"ephemere": true,
|
||
|
"duree": "1 round",
|
||
|
"valeur": { "norm": 3, "sign": 5, "part": 10 }
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
return undefined;
|
||
|
}
|
||
|
|
||
|
static getDiffSigneMeditation(code) {
|
||
|
switch (code) {
|
||
|
case "norm": return -7;
|
||
|
case "sign": return -3;
|
||
|
case "part": return 0;
|
||
|
}
|
||
|
return undefined;
|
||
|
}
|
||
|
|
||
|
static getXpSortSigneDraconique(code, signe) {
|
||
|
return Misc.data(signe).data.valeur[code] ?? 0;
|
||
|
}
|
||
|
|
||
|
}
|