1749210322
- Modèle sortilege enrichi (type, niveau, portée, durée, conditions, effets) - Personnage: champ rangMagie (ensorceleur/initié/thaumaturge) - Constantes: SORTILEGE_MODIFICATEURS (table 3x3), RANG_MAGICIEN - Dialogue de lancement: tirage MJ, sélection atouts + Coupe, total temps réel - Calcul difficulté: carte MJ + modificateur selon type × niveau - Table des échecs magiques (normal/critique selon rang) - Pioche automatique après succès, défausse après échec - Template chat avec résultat localisé Corrections post-review: - Boucle de défausse sur échec corrigée (itérait toujours sur [0]) - Clé de localisation HAMALRON.Roll.cast -> HAMALRON.Sortilege.cast - Ajout de la clé manquante noCoupe - Labels localisés dans le chat (categorieLabel, niveauLabel)
163 lines
5.5 KiB
JavaScript
163 lines
5.5 KiB
JavaScript
export const SYSTEM_ID = "fvtt-hamalron"
|
|
|
|
export const ASCII = `
|
|
, _
|
|
/| | | |
|
|
|___| __, _ _ _ __, | | ,_ __ _ _
|
|
| |\/ | / |/ |/ | / | |/ / | / \_/ |/ |
|
|
| |/\_/|_/ | | |_/\_/|_/|__/ |_/\__/ | |_/
|
|
|
|
`
|
|
|
|
export const TAROT_SYMBOLES = {
|
|
"coupe": { id: "coupe", label: "Coupe" },
|
|
"epee": { id: "epee", label: "Epée" },
|
|
"denier": { id: "denier", label: "Denier" },
|
|
"baton": { id: "baton", label: "Bâton" },
|
|
}
|
|
|
|
export const TAROT_TYPES = {
|
|
"atout": { id: "atout", label: "Atout" },
|
|
"figure": { id: "figure", label: "Figure" },
|
|
"numéro": { id: "numéro", label: "Numéro" },
|
|
}
|
|
|
|
export const TAROT_VALEURS = {
|
|
"11": { id: "11", label: "11", value: 11 },
|
|
"12": { id: "12", label: "12", value: 12 },
|
|
"13": { id: "13", label: "13", value: 13 },
|
|
"14": { id: "14", label: "14", value: 14 },
|
|
"15": { id: "15", label: "15", value: 15 },
|
|
"16": { id: "16", label: "16", value: 16 },
|
|
"17": { id: "17", label: "17", value: 17 },
|
|
"18": { id: "18", label: "18", value: 18 },
|
|
"19": { id: "19", label: "19", value: 19 },
|
|
"20": { id: "20", label: "20", value: 20 },
|
|
"21": { id: "21", label: "21", value: 21 },
|
|
"22": { id: "22", label: "22", value: 22 },
|
|
"roi": { id: "roi", label: "Roi", value: 14 },
|
|
"reine": { id: "reine", label: "Reine", value: 13 },
|
|
"cavalier": { id: "cavalier", label: "Cavalier", value: 12 },
|
|
"valet": { id: "valet", label: "Valet", value: 11 },
|
|
"lemat": { id: "lemat", label: "Le Mat", value: 23 },
|
|
"10": { id: "10", label: "10", value: 10 },
|
|
"9": { id: "9", label: "9", value: 9 },
|
|
"8": { id: "8", label: "8", value: 8 },
|
|
"7": { id: "7", label: "7", value: 7 },
|
|
"6": { id: "6", label: "6", value: 6 },
|
|
"5": { id: "5", label: "5", value: 5 },
|
|
"4": { id: "4", label: "4", value: 4 },
|
|
"3": { id: "3", label: "3", value: 3 },
|
|
"2": { id: "2", label: "2", value: 2 },
|
|
"1": { id: "1", label: "1", value: 1 },
|
|
}
|
|
|
|
export const DIFFICULTY_CHOICES = {
|
|
"soustension_oppose": { id: "soustension_oppose", label: "Sous Tension ou Opposé", standard: null, "soustension": null },
|
|
"tresfacile": { id: "tresfacile", label: "Très Facile", standard: 3, "soustension": -4 },
|
|
"facile": { id: "facile", label: "Facile", standard: 5, "soustension": -2 },
|
|
"moyenne": { id: "moyenne", label: "Moyenne", standard: 7, "soustension": 0 },
|
|
"difficile": { id: "difficile", label: "Difficile", standard: 10, "soustension": 3 },
|
|
"tresdifficile": { id: "tresdifficile", label: "Très Difficile", standard: 13, "soustension": 6 },
|
|
"heroique": { id: "heroique", label: "Héroïque", standard: 16, "soustension": 9 },
|
|
}
|
|
|
|
export const WEAPON_TYPES = {
|
|
"melee": { id: "melee", label: "Mêlée" },
|
|
"tir": { id: "tir", label: "Tir" },
|
|
}
|
|
|
|
export const COMPETENCE_TYPES = {
|
|
"commune": { id: "commune", label: "Commune" },
|
|
"faction": { id: "faction", label: "Faction" },
|
|
"peuple": { id: "peuple", label: "Peuple" },
|
|
}
|
|
|
|
export const ENEMY_TYPES = {
|
|
"mook": { id: "mook", label: "Sbire" },
|
|
"elite": { id: "elite", label: "Élite" },
|
|
"boss": { id: "boss", label: "Boss" },
|
|
}
|
|
|
|
export const SORTILEGE_CATEGORIES = {
|
|
"domestique": { id: "domestique", label: "Domestique" },
|
|
"specialise": { id: "specialise", label: "Spécialisé" },
|
|
"miraculeux": { id: "miraculeux", label: "Miraculeux" },
|
|
}
|
|
|
|
export const SORTILEGE_MODIFICATEURS = {
|
|
amateur: { domestique: 2, specialise: 6, miraculeux: 9 },
|
|
competent: { domestique: 0, specialise: 4, miraculeux: 7 },
|
|
expert: { domestique: -2, specialise: 2, miraculeux: 5 },
|
|
}
|
|
|
|
export const RANG_MAGICIEN = {
|
|
ensorceleur: { id: "ensorceleur", label: "Ensorceleur" },
|
|
initie: { id: "initie", label: "Initié" },
|
|
thaumaturge: { id: "thaumaturge", label: "Thaumaturge" },
|
|
}
|
|
|
|
export const NIVEAU_COMPETENCES = {
|
|
"inexperimente": {
|
|
"name": "Inexpérimenté",
|
|
"id": "inexperimente",
|
|
"abreviation": "I",
|
|
"modificateur": 0,
|
|
"cout_acquisition_points": 0,
|
|
"description": "Niveau de départ par défaut pour toutes les compétences non apprises."
|
|
},
|
|
"amateur": {
|
|
"name": "Amateur",
|
|
"id": "amateur",
|
|
"abreviation": "A",
|
|
"modificateur": 1,
|
|
"cout_acquisition_points": 1,
|
|
"description": "Le personnage possède des notions de base dans la compétence."
|
|
},
|
|
"competent": {
|
|
"name": "Compétent",
|
|
"id": "competent",
|
|
"abreviation": "C",
|
|
"modificateur": 3,
|
|
"cout_acquisition_points": 3,
|
|
"cout_progression_depuis_amateur": 2,
|
|
"description": "Le personnage maîtrise la compétence et résiste mieux aux actions adverses."
|
|
},
|
|
"expert": {
|
|
"name": "Expert",
|
|
"abreviation": "E",
|
|
"modificateur": 5,
|
|
"cout_acquisition_points": 5,
|
|
"cout_progression_depuis_competent": 2,
|
|
"description": "Le personnage est un maître absolu dans son domaine."
|
|
}
|
|
}
|
|
|
|
export const CHOICE_ADVANTAGES_DISADVANTAGES = {
|
|
"0": { id: "0", label: "Aucun" },
|
|
"1": { id: "1", label: "1" },
|
|
"2": { id: "2", label: "2" },
|
|
"3": { id: "3", label: "3" },
|
|
}
|
|
|
|
/**
|
|
* Include all constant definitions within the SYSTEM global export
|
|
* @type {Object}
|
|
*/
|
|
export const SYSTEM = {
|
|
id: SYSTEM_ID,
|
|
TAROT_SYMBOLES: TAROT_SYMBOLES,
|
|
DIFFICULTY_CHOICES: DIFFICULTY_CHOICES,
|
|
TAROT_TYPES: TAROT_TYPES,
|
|
TAROT_VALEURS: TAROT_VALEURS,
|
|
WEAPON_TYPES: WEAPON_TYPES,
|
|
COMPETENCE_TYPES: COMPETENCE_TYPES,
|
|
ENEMY_TYPES: ENEMY_TYPES,
|
|
SORTILEGE_CATEGORIES: SORTILEGE_CATEGORIES,
|
|
SORTILEGE_MODIFICATEURS: SORTILEGE_MODIFICATEURS,
|
|
RANG_MAGICIEN: RANG_MAGICIEN,
|
|
NIVEAU_COMPETENCES: NIVEAU_COMPETENCES,
|
|
CHOICE_ADVANTAGES_DISADVANTAGES,
|
|
ASCII
|
|
}
|