gestion de l'age
This commit is contained in:
@@ -5,6 +5,11 @@ export const VERMINE = {};
|
||||
* @type {Object}
|
||||
*/
|
||||
|
||||
VERMINE.AgeTypes = {
|
||||
1:{ "name":"AGE_TYPES.young", "beginning": 0 },
|
||||
2:{ "name":"AGE_TYPES.adult", "beginning": 16 },
|
||||
3:{ "name":"AGE_TYPES.old", "beginning": 45 }
|
||||
}
|
||||
|
||||
VERMINE.SkillLevels = {
|
||||
1:{ "label":"VERMINE.skill_level.beginner", "dicePool":1, "reroll":0},
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
NoD += 1;
|
||||
}
|
||||
if (formData.abilityScore == 0){
|
||||
alert('veuillez saisir une caractéristique');
|
||||
ui.notifications.notify(`veuillez saisir une caractéristique`);
|
||||
} else return game.vermine2047.VermineRoll.roll(data.actorId, data.label, NoD, Reroll, data);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { VERMINE } from "./config.mjs";
|
||||
import { getActorSkillScore,updateActorSkillScore } from "./functions.mjs";
|
||||
import { CombatResultDialog } from "./dialogs.mjs";
|
||||
|
||||
export class VermineFight {
|
||||
|
||||
|
||||
@@ -70,6 +70,20 @@ export const registerHandlebarsHelpers = function () {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// return age type information
|
||||
Handlebars.registerHelper('ageType', function (property, level, options) {
|
||||
if (level < 1 || level > 3)
|
||||
return "";
|
||||
let ageData = CONFIG.VERMINE.AgeTypes[level];
|
||||
if (property == 'name'){
|
||||
return (ageData !== undefined) ? game.i18n.localize(ageData[property]) : "";
|
||||
} else {
|
||||
return (ageData !== undefined) ? ageData[property] : "";
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
Handlebars.registerHelper('getCombatTrackerColor', function (isPlayer, isNpc) {
|
||||
if (isPlayer) return "player";
|
||||
|
||||
Reference in New Issue
Block a user