@jjlmoya/utils-tabletop 1.24.0 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +2 -0
  3. package/src/entries.ts +2 -0
  4. package/src/tests/locale_completeness.test.ts +1 -1
  5. package/src/tests/tool_validation.test.ts +1 -1
  6. package/src/tool/dungeon-map-generator/component.astro +1 -0
  7. package/src/tool/dungeon-map-generator/controller.ts +1 -0
  8. package/src/tool/dungeon-map-generator/dom-views.ts +19 -14
  9. package/src/tool/dungeon-map-generator/i18n/en.ts +3 -2
  10. package/src/tool/dungeon-map-generator/i18n/es.ts +1 -0
  11. package/src/tool/dungeon-map-generator/logic.ts +42 -16
  12. package/src/tool/dungeon-map-generator/ui.ts +1 -0
  13. package/src/tool/encounter-difficulty-calculator/bibliography.astro +6 -0
  14. package/src/tool/encounter-difficulty-calculator/bibliography.ts +12 -0
  15. package/src/tool/encounter-difficulty-calculator/component.astro +53 -0
  16. package/src/tool/encounter-difficulty-calculator/controller.ts +133 -0
  17. package/src/tool/encounter-difficulty-calculator/dnd-5e-encounter-difficulty-calculator.css +389 -0
  18. package/src/tool/encounter-difficulty-calculator/dom-views.ts +54 -0
  19. package/src/tool/encounter-difficulty-calculator/entry.ts +27 -0
  20. package/src/tool/encounter-difficulty-calculator/evaluator.ts +12 -0
  21. package/src/tool/encounter-difficulty-calculator/i18n/de.ts +155 -0
  22. package/src/tool/encounter-difficulty-calculator/i18n/en.ts +155 -0
  23. package/src/tool/encounter-difficulty-calculator/i18n/es.ts +155 -0
  24. package/src/tool/encounter-difficulty-calculator/i18n/fr.ts +155 -0
  25. package/src/tool/encounter-difficulty-calculator/i18n/id.ts +155 -0
  26. package/src/tool/encounter-difficulty-calculator/i18n/it.ts +155 -0
  27. package/src/tool/encounter-difficulty-calculator/i18n/ja.ts +155 -0
  28. package/src/tool/encounter-difficulty-calculator/i18n/ko.ts +155 -0
  29. package/src/tool/encounter-difficulty-calculator/i18n/nl.ts +155 -0
  30. package/src/tool/encounter-difficulty-calculator/i18n/pl.ts +155 -0
  31. package/src/tool/encounter-difficulty-calculator/i18n/pt.ts +155 -0
  32. package/src/tool/encounter-difficulty-calculator/i18n/ru.ts +155 -0
  33. package/src/tool/encounter-difficulty-calculator/i18n/sv.ts +155 -0
  34. package/src/tool/encounter-difficulty-calculator/i18n/tr.ts +155 -0
  35. package/src/tool/encounter-difficulty-calculator/i18n/zh.ts +155 -0
  36. package/src/tool/encounter-difficulty-calculator/index.ts +11 -0
  37. package/src/tool/encounter-difficulty-calculator/logic.test.ts +37 -0
  38. package/src/tool/encounter-difficulty-calculator/logic.ts +174 -0
  39. package/src/tool/encounter-difficulty-calculator/seo.astro +16 -0
  40. package/src/tool/encounter-difficulty-calculator/storage.ts +26 -0
  41. package/src/tool/encounter-difficulty-calculator/ui.ts +45 -0
  42. package/src/tools.ts +2 -0
@@ -0,0 +1,155 @@
1
+ import type { FAQPage, HowTo, SoftwareApplication, WithContext } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
3
+ import type { EncounterDifficultyLocaleContent, EncounterDifficultyUI } from '../entry';
4
+
5
+ const ui: EncounterDifficultyUI = {
6
+ intro: 'Set the party and the threat. The calculator weighs the encounter against the D&D 5e 2014 thresholds so you can spot the pressure before initiative starts.',
7
+ partySection: 'The party',
8
+ partyLevel: 'Character level',
9
+ partyLevelHint: 'Use one level for a party with characters of similar level.',
10
+ partySize: 'Characters',
11
+ partySizeHint: 'The rules adjust the monster multiplier for very small or large groups.',
12
+ threatSection: 'The threat',
13
+ monsterCr: 'Monster challenge rating',
14
+ monsterCrHint: 'Choose the CR of one repeated monster. Mixed groups need a separate calculation.',
15
+ moreCr: 'Show higher CR',
16
+ lessCr: 'Show fewer CR values',
17
+ monsterCount: 'Number of monsters',
18
+ monsterCountHint: 'More creatures increase the action pressure even when their total XP is modest.',
19
+ presets: 'Start with a scene',
20
+ presetClassic: 'Classic patrol',
21
+ presetBoss: 'Boss alone',
22
+ presetSwarm: 'Crowd of minions',
23
+ resultSection: 'Encounter pressure',
24
+ belowEasyHint: 'A light scene that may preserve resources for what comes next.',
25
+ easyHint: 'A manageable scene with limited pressure on the party.',
26
+ mediumHint: 'A meaningful test that may cost hit points or useful resources.',
27
+ hardHint: 'A dangerous scene where tactics and resource choices matter.',
28
+ deadlyHint: 'A lethal pressure signal. Check escape routes, terrain, and the cost of one bad round.',
29
+ adjustedXp: 'Adjusted XP',
30
+ baseXp: 'Base XP',
31
+ multiplier: 'Group multiplier',
32
+ partyThreshold: 'Medium threshold',
33
+ belowEasy: 'Below easy',
34
+ easy: 'Easy',
35
+ medium: 'Medium',
36
+ hard: 'Hard',
37
+ deadly: 'Deadly',
38
+ warning: 'Read this',
39
+ partyAdjustment: 'The monster multiplier has been adjusted because the party has fewer than three or more than five characters.',
40
+ highCr: 'A monster with a CR above the party level can drop a character quickly. Treat this label as a danger signal, not a prediction.',
41
+ manyMonsters: 'Eleven or more monsters can make a fight much harder to run and can create swingy action economy.',
42
+ rulesNote: 'This is an estimate for the D&D 5e 2014 encounter method. It does not account for terrain, tactics, spells, magic items, or player experience.',
43
+ rulesLinkLabel: 'Read the source rules',
44
+ reset: 'Reset to the sample',
45
+ xpUnit: 'XP',
46
+ sceneLabel: 'Encounter pressure visual',
47
+ partyMarker: 'Party',
48
+ threatMarker: 'Threat',
49
+ };
50
+
51
+ const faq = [
52
+ {
53
+ question: 'What rules does this encounter difficulty calculator use?',
54
+ answer: 'It uses the D&D 5e 2014 method from the Basic Rules. It adds the party thresholds for easy, medium, hard, and deadly encounters, then compares them with the adjusted XP of the monsters.',
55
+ },
56
+ {
57
+ question: 'Why is adjusted XP different from the XP awarded by a monster?',
58
+ answer: 'The rules multiply the total monster XP to reflect the danger of several creatures acting in the same round. Adjusted XP is a comparison value for encounter difficulty, not the XP characters receive.',
59
+ },
60
+ {
61
+ question: 'Can I use this for a mixed group of monsters?',
62
+ answer: 'Use it as a quick estimate for repeated monsters. For a mixed group, add the XP of each creature and apply the multiplier to the total number of meaningful monsters. The calculator keeps one CR visible so the input stays fast and easy to read.',
63
+ },
64
+ {
65
+ question: 'Does a deadly result mean the party will die?',
66
+ answer: 'No. Deadly means the adjusted XP reaches the deadly threshold in this rules method. Terrain, tactics, rests, spells, magic items, monster abilities, and player decisions can change the actual result.',
67
+ },
68
+ {
69
+ question: 'Why does party size change the multiplier?',
70
+ answer: 'The Basic Rules recommend increasing the multiplier for parties of fewer than three characters and decreasing it for parties of six or more. This accounts for the different action economy of unusually small or large groups.',
71
+ },
72
+ ];
73
+
74
+ const howTo = [
75
+ {
76
+ name: 'Set the party level',
77
+ text: 'Choose the level shared by most characters in the party. If levels vary widely, treat the result as a starting point and check the lowest level separately.',
78
+ },
79
+ {
80
+ name: 'Set the group size',
81
+ text: 'Choose the number of characters who will enter the encounter. Small and large parties receive a multiplier adjustment.',
82
+ },
83
+ {
84
+ name: 'Describe the threat',
85
+ text: 'Choose one monster challenge rating and the number of meaningful monsters. Use the scene presets when you want a fast baseline.',
86
+ },
87
+ {
88
+ name: 'Read the pressure',
89
+ text: 'Compare adjusted XP with the threshold bands. Use warnings as prompts to inspect high CR, action economy, terrain, and the resources available before the fight.',
90
+ },
91
+ ];
92
+
93
+ const faqSchema: WithContext<FAQPage> = {
94
+ '@context': 'https://schema.org',
95
+ '@type': 'FAQPage',
96
+ mainEntity: faq.map((item) => ({
97
+ '@type': 'Question',
98
+ name: item.question,
99
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
100
+ })),
101
+ };
102
+
103
+ const appSchema: WithContext<SoftwareApplication> = {
104
+ '@context': 'https://schema.org',
105
+ '@type': 'SoftwareApplication',
106
+ name: 'D&D 5e Encounter Difficulty Calculator',
107
+ operatingSystem: 'All',
108
+ applicationCategory: 'GameApplication',
109
+ description: 'Estimate encounter difficulty for a D&D 5e 2014 party using character level, party size, monster challenge rating, monster count, XP, and official threshold bands.',
110
+ };
111
+
112
+ const howToSchema: WithContext<HowTo> = {
113
+ '@context': 'https://schema.org',
114
+ '@type': 'HowTo',
115
+ name: 'How to estimate D&D 5e encounter difficulty',
116
+ step: howTo.map((item) => ({
117
+ '@type': 'HowToStep',
118
+ name: item.name,
119
+ text: item.text,
120
+ })),
121
+ };
122
+
123
+ export const content: EncounterDifficultyLocaleContent = {
124
+ slug: 'dnd-5e-encounter-difficulty-calculator',
125
+ title: 'D&D 5e Encounter Difficulty Calculator',
126
+ description: 'Estimate encounter pressure for D&D 5e 2014 using party level, group size, monster CR, monster count, adjusted XP, and official difficulty thresholds.',
127
+ ui,
128
+ seo: [
129
+ { type: 'title', text: 'Read Encounter Difficulty Before Initiative Starts', level: 2 },
130
+ { type: 'paragraph', html: 'A D&D encounter is more than the number printed beside a monster. This calculator turns party size, character level, challenge rating, and monster count into the adjusted XP value used by the D&D 5e 2014 encounter method. The visual result shows where the scene sits against the easy, medium, hard, and deadly thresholds.' },
131
+ { type: 'title', text: 'How the D&D 5e Encounter Formula Works', level: 2 },
132
+ { type: 'paragraph', html: 'The method first adds one XP threshold for every character at each difficulty band. It then adds the XP values of the monsters and applies a multiplier based on the number of meaningful creatures. Parties with fewer than three characters use the next higher multiplier, while parties of six or more use the next lower multiplier.' },
133
+ {
134
+ type: 'table',
135
+ headers: ['Signal', 'What to inspect at the table'],
136
+ rows: [
137
+ ['Below easy', 'The encounter may be a warm up, a travel beat, or a resource saving scene.'],
138
+ ['Easy', 'The party should usually win without spending many resources.'],
139
+ ['Medium', 'Expect pressure and at least one meaningful choice about resources.'],
140
+ ['Hard', 'Plan for characters to lose hit points, spell slots, or position.'],
141
+ ['Deadly', 'Check tactics, terrain, escape routes, and the cost of one bad round.'],
142
+ ],
143
+ },
144
+ { type: 'title', text: 'Why Monster Count Matters', level: 2 },
145
+ { type: 'paragraph', html: 'Several monsters can create more danger than their base XP suggests because they bring more attacks, reactions, positions, and chances to focus fire. That is why a pair of creatures uses a higher multiplier than one creature with the same combined XP. The result is a warning light for action economy, not a promise about how the encounter will feel.' },
146
+ { type: 'tip', title: 'Treat High CR as a Specific Danger Signal', html: 'A monster whose CR is above the party level may be able to remove a character with one strong action. Inspect its damage, control effects, saving throw difficulty, and mobility instead of relying on the final difficulty word alone.' },
147
+ { type: 'title', text: 'Use the Result as a Preparation Prompt', level: 2 },
148
+ { type: 'paragraph', html: 'Before using a hard or deadly encounter, look at the full situation. A cramped room, cover, surprise, environmental damage, concentration spells, legendary actions, and an exhausted party can all move the real danger away from the table value. A lower result can still become memorable when the objective, terrain, or time pressure creates a meaningful choice.' },
149
+ { type: 'tip', title: 'Mixed Monster Groups Need a Wider Check', html: 'This quick calculator keeps one CR visible so the interface stays fast. For a mixed group, total the XP of every meaningful monster, apply the multiplier to that total, and compare the adjusted XP with the same party thresholds.' },
150
+ ],
151
+ faq,
152
+ bibliography,
153
+ howTo,
154
+ schemas: [faqSchema, appSchema, howToSchema] as unknown as Record<string, unknown>[],
155
+ };
@@ -0,0 +1,155 @@
1
+ import type { FAQPage, HowTo, SoftwareApplication, WithContext } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
3
+ import type { EncounterDifficultyLocaleContent, EncounterDifficultyUI } from '../entry';
4
+
5
+ const ui: EncounterDifficultyUI = {
6
+ intro: 'Ajusta el grupo y la amenaza. La calculadora mide el encuentro con los umbrales de D&D 5e 2014 para detectar la presión antes de la iniciativa.',
7
+ partySection: 'El grupo',
8
+ partyLevel: 'Nivel del personaje',
9
+ partyLevelHint: 'Usa un nivel uniforme para un grupo con personajes de nivel similar.',
10
+ partySize: 'Personajes',
11
+ partySizeHint: 'Las reglas ajustan el multiplicador de monstruos para grupos muy pequeños o grandes.',
12
+ threatSection: 'La amenaza',
13
+ monsterCr: 'Desafío del monstruo (CR)',
14
+ monsterCrHint: 'Elige el CR de un monstruo repetido. Los grupos mixtos requieren un cálculo independiente.',
15
+ moreCr: 'Mostrar más CR',
16
+ lessCr: 'Mostrar menos CR',
17
+ monsterCount: 'Cantidad de monstruos',
18
+ monsterCountHint: 'Más criaturas aumentan la presión de acciones aunque su experiencia base sea modesta.',
19
+ presets: 'Empezar con una escena',
20
+ presetClassic: 'Patrulla clásica',
21
+ presetBoss: 'Jefe en solitario',
22
+ presetSwarm: 'Horda de esbirros',
23
+ resultSection: 'Presión del encuentro',
24
+ belowEasyHint: 'Una escena ligera que permite conservar recursos para los siguientes retos.',
25
+ easyHint: 'Una escena asequible con poca presión sobre el grupo.',
26
+ mediumHint: 'Una prueba significativa que puede costar puntos de golpe o recursos.',
27
+ hardHint: 'Una escena peligrosa donde la táctica y la gestión de recursos importan.',
28
+ deadlyHint: 'Señal de presión mortal. Revisa rutas de escape, terreno y el coste de un mal asalto.',
29
+ adjustedXp: 'XP Ajustada',
30
+ baseXp: 'XP Base',
31
+ multiplier: 'Multiplicador de grupo',
32
+ partyThreshold: 'Umbral Medio',
33
+ belowEasy: 'Inferior a fácil',
34
+ easy: 'Fácil',
35
+ medium: 'Medio',
36
+ hard: 'Difícil',
37
+ deadly: 'Mortal',
38
+ warning: 'Ten en cuenta',
39
+ partyAdjustment: 'Se ha ajustado el multiplicador de monstruos porque el grupo tiene menos de tres o más de cinco personajes.',
40
+ highCr: 'Un monstruo con CR superior al nivel del grupo puede derribar a un personaje rápidamente. Trata esta etiqueta como una alerta.',
41
+ manyMonsters: 'Once o más monstruos pueden dificultar la gestión del combate y crear gran volatilidad en la economía de acciones.',
42
+ rulesNote: 'Esta estimación se basa en las reglas de D&D 5e 2014. No contempla terreno, táctica, conjuros, objetos mágicos o experiencia del jugador.',
43
+ rulesLinkLabel: 'Leer las reglas de origen',
44
+ reset: 'Restablecer ejemplo',
45
+ xpUnit: 'XP',
46
+ sceneLabel: 'Gráfico visual de presión',
47
+ partyMarker: 'Grupo',
48
+ threatMarker: 'Amenaza',
49
+ };
50
+
51
+ const faq = [
52
+ {
53
+ question: '¿Qué reglas utiliza esta calculadora de dificultad de encuentros?',
54
+ answer: 'Utiliza el método oficial de D&D 5e 2014 de las Reglas Básicas. Suma los umbrales del grupo para encuentros fáciles, medios, difíciles y mortales, y los compara con la XP ajustada de los monstruos.',
55
+ },
56
+ {
57
+ question: '¿Por qué la XP ajustada es diferente de la XP que otorga un monstruo?',
58
+ answer: 'Las reglas multiplican la XP total de los monstruos para reflejar el peligro de varias criaturas actuando en el mismo asalto. La XP ajustada es un valor comparativo de dificultad, no la XP que reciben los personajes.',
59
+ },
60
+ {
61
+ question: '¿Puedo usar esto para un grupo mixto de monstruos?',
62
+ answer: 'Úsala como una estimación rápida para monstruos idénticos. Para grupos mixtos, suma la XP de cada criatura y aplica el multiplicador al número total de monstruos significativos.',
63
+ },
64
+ {
65
+ question: '¿Un resultado mortal significa que el grupo morirá?',
66
+ answer: 'No. Mortal significa que la XP ajustada alcanza el umbral mortal en las reglas. El terreno, las tácticas, los descansos, conjuros, objetos mágicos y decisiones pueden alterar el resultado real.',
67
+ },
68
+ {
69
+ question: '¿Por qué el tamaño del grupo cambia el multiplicador?',
70
+ answer: 'Las Reglas Básicas recomiendan aumentar el multiplicador para grupos de menos de tres personajes y reducirlo para grupos de seis o más, equilibrando la economía de acciones.',
71
+ },
72
+ ];
73
+
74
+ const howTo = [
75
+ {
76
+ name: 'Establece el nivel del grupo',
77
+ text: 'Elige el nivel predominante de los personajes. Si los niveles varían mucho, toma el resultado como orientación y evalúa el nivel más bajo por separado.',
78
+ },
79
+ {
80
+ name: 'Indica el tamaño del grupo',
81
+ text: 'Introduce el número de personajes en el encuentro. Los grupos pequeños y grandes reciben un ajuste en el multiplicador.',
82
+ },
83
+ {
84
+ name: 'Describe la amenaza',
85
+ text: 'Selecciona el desafío (CR) y la cantidad de monstruos. Usa las plantillas predefinidas para una comprobación rápida.',
86
+ },
87
+ {
88
+ name: 'Interpreta la presión',
89
+ text: 'Compara la XP ajustada con las franjas de umbral y revisa las advertencias sobre economía de acciones, terreno y recursos antes del combate.',
90
+ },
91
+ ];
92
+
93
+ const faqSchema: WithContext<FAQPage> = {
94
+ '@context': 'https://schema.org',
95
+ '@type': 'FAQPage',
96
+ mainEntity: faq.map((item) => ({
97
+ '@type': 'Question',
98
+ name: item.question,
99
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
100
+ })),
101
+ };
102
+
103
+ const appSchema: WithContext<SoftwareApplication> = {
104
+ '@context': 'https://schema.org',
105
+ '@type': 'SoftwareApplication',
106
+ name: 'Calculadora de Dificultad de Encuentros D&D 5e',
107
+ operatingSystem: 'All',
108
+ applicationCategory: 'GameApplication',
109
+ description: 'Calcula la dificultad de encuentros para grupos de D&D 5e 2014 basándote en nivel, tamaño de grupo, desafío de monstruos (CR), cantidad, XP y umbrales oficiales.',
110
+ };
111
+
112
+ const howToSchema: WithContext<HowTo> = {
113
+ '@context': 'https://schema.org',
114
+ '@type': 'HowTo',
115
+ name: 'Cómo calcular la dificultad de un encuentro en D&D 5e',
116
+ step: howTo.map((item) => ({
117
+ '@type': 'HowToStep',
118
+ name: item.name,
119
+ text: item.text,
120
+ })),
121
+ };
122
+
123
+ export const content: EncounterDifficultyLocaleContent = {
124
+ slug: 'calculadora-dificultad-encuentros-dnd-5e',
125
+ title: 'Calculadora de Dificultad de Encuentros D&D 5e',
126
+ description: 'Estima la presión de encuentros en D&D 5e 2014 mediante nivel del grupo, tamaño, CR de monstruos, cantidad, XP ajustada y umbrales oficiales.',
127
+ ui,
128
+ seo: [
129
+ { type: 'title', text: 'Analiza la dificultad del combate antes de tirar iniciativa', level: 2 },
130
+ { type: 'paragraph', html: 'Un encuentro de D&D es más que el número impreso junto a un monstruo. Esta calculadora convierte el tamaño del grupo, nivel, desafío (CR) y número de monstruos en el valor de XP ajustada utilizado por el sistema oficial de D&D 5e 2014.' },
131
+ { type: 'title', text: 'Cómo funciona la fórmula de encuentros de D&D 5e', level: 2 },
132
+ { type: 'paragraph', html: 'El método suma el umbral de XP de cada personaje para cada nivel de dificultad. Luego suma la XP base de los monstruos y aplica un multiplicador según el número de criaturas. Los grupos de menos de tres personajes usan un multiplicador superior y los de seis o más usan uno inferior.' },
133
+ {
134
+ type: 'table',
135
+ headers: ['Señal', 'Qué evaluar en la mesa'],
136
+ rows: [
137
+ ['Inferior a fácil', 'El encuentro puede ser un calentamiento, un evento de viaje o una escena de desgaste menor.'],
138
+ ['Fácil', 'El grupo debería ganar sin gastar apenas recursos.'],
139
+ ['Medio', 'Espera cierta presión y al menos una decisión importante sobre el uso de recursos.'],
140
+ ['Difícil', 'Planifica que los personajes pierdan puntos de golpe, espacio de conjuros o posición.'],
141
+ ['Mortal', 'Revisa tácticas, terreno, vías de escape y el impacto de un mal turno.'],
142
+ ],
143
+ },
144
+ { type: 'title', text: 'Por qué importa la cantidad de monstruos', level: 2 },
145
+ { type: 'paragraph', html: 'Varios monstruos crean más peligro del que indica su XP base porque aportan más ataques, reacciones y capacidad de concentrar el daño sobre un personaje. Por eso dos criaturas aplican un multiplicador mayor que una sola con la misma XP acumulada.' },
146
+ { type: 'tip', title: 'Considera un CR alto como una alerta específica', html: 'Un monstruo cuyo CR supere el nivel del grupo puede dejar KO a un personaje en una sola acción potente. Revisa su daño, efectos de control y movilidad en lugar de confiar solo en la palabra de dificultad final.' },
147
+ { type: 'title', text: 'Utiliza el resultado como guía de preparación', level: 2 },
148
+ { type: 'paragraph', html: 'Antes de plantear un encuentro difícil o mortal, evalúa el contexto general. Habitaciones estrechas, coberturas, sorpresa, trampas ambientales y conjuros de concentración pueden modificar sustancialmente el peligro real.' },
149
+ { type: 'tip', title: 'Los grupos mixtos requieren un ajuste manual', html: 'Esta calculadora mantiene un único CR para agilizar la entrada de datos. Si el combate incluye criaturas distintas, suma la XP base de cada una, aplica el multiplicador al total de monstruos y compáralo con los umbrales del grupo.' },
150
+ ],
151
+ faq,
152
+ bibliography,
153
+ howTo,
154
+ schemas: [faqSchema, appSchema, howToSchema] as unknown as Record<string, unknown>[],
155
+ };
@@ -0,0 +1,155 @@
1
+ import type { FAQPage, HowTo, SoftwareApplication, WithContext } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
3
+ import type { EncounterDifficultyLocaleContent, EncounterDifficultyUI } from '../entry';
4
+
5
+ const ui: EncounterDifficultyUI = {
6
+ intro: 'Réglez le groupe et la menace. Le calculateur évalue la rencontre selon les seuils D&D 5e 2014.',
7
+ partySection: 'Le groupe',
8
+ partyLevel: 'Niveau des personnages',
9
+ partyLevelHint: 'Utilisez un niveau moyen pour un groupe de niveau similaire.',
10
+ partySize: 'Personnages',
11
+ partySizeHint: 'Les règles ajustent le multiplicateur pour les très petits ou grands groupes.',
12
+ threatSection: 'La menace',
13
+ monsterCr: 'Facteur de puissance (CR)',
14
+ monsterCrHint: 'Choisissez le CR d un monstre. Les groupes mixtes nécessitent un calcul séparé.',
15
+ moreCr: 'Afficher plus de CR',
16
+ lessCr: 'Afficher moins de CR',
17
+ monsterCount: 'Nombre de monstres',
18
+ monsterCountHint: 'Plus de créatures augmentent la pression d action même avec un XP de base modeste.',
19
+ presets: 'Commencer par une scène',
20
+ presetClassic: 'Patrouille classique',
21
+ presetBoss: 'Boss en solo',
22
+ presetSwarm: 'Horde de sbires',
23
+ resultSection: 'Pression de la rencontre',
24
+ belowEasyHint: 'Une scène légère pour préserver les ressources.',
25
+ easyHint: 'Une scène gérable avec une faible pression sur le groupe.',
26
+ mediumHint: 'Un test significatif pouvant coûter des points de vie ou ressources.',
27
+ hardHint: 'Une scène dangereuse où la tactique et la gestion des ressources comptent.',
28
+ deadlyHint: 'Signal de pression mortelle. Vérifiez les voies de repli et le terrain.',
29
+ adjustedXp: 'XP Ajusté',
30
+ baseXp: 'XP de Base',
31
+ multiplier: 'Multiplicateur de groupe',
32
+ partyThreshold: 'Seuil Moyen',
33
+ belowEasy: 'Sub-facile',
34
+ easy: 'Facile',
35
+ medium: 'Moyen',
36
+ hard: 'Difficile',
37
+ deadly: 'Mortel',
38
+ warning: 'Attention',
39
+ partyAdjustment: 'Le multiplicateur est ajusté car le groupe compte moins de trois ou plus de cinq personnages.',
40
+ highCr: 'Un monstre avec un CR supérieur au niveau du groupe peut mettre un personnage à terre rapidement.',
41
+ manyMonsters: 'Onze monstres ou plus rendent le combat difficile à gérer et créent une forte volatilité.',
42
+ rulesNote: 'Estimation selon les règles D&D 5e 2014. Ne prend pas en compte le terrain ou la tactique.',
43
+ rulesLinkLabel: 'Lire les règles d origine',
44
+ reset: 'Réinitialiser l exemple',
45
+ xpUnit: 'XP',
46
+ sceneLabel: 'Graphique de pression du combat',
47
+ partyMarker: 'Groupe',
48
+ threatMarker: 'Menace',
49
+ };
50
+
51
+ const faq = [
52
+ {
53
+ question: 'Quelles règles ce calculateur de difficulté utilise-t-il?',
54
+ answer: 'Il utilise la méthode officielle D&D 5e 2014 des Règles de Base en comparant les seuils du groupe avec l XP ajusté des monstres.',
55
+ },
56
+ {
57
+ question: 'Pourquoi l XP ajusté diffère-t-il de l XP accordé par le monstre?',
58
+ answer: 'Les règles multiplient l XP total des monstres pour refléter le danger de plusieurs créatures agissant au même tour.',
59
+ },
60
+ {
61
+ question: 'Puis-je l utiliser pour un groupe mixte de monstres?',
62
+ answer: 'Utilisez-le comme estimation rapide pour des monstres identiques. Pour un groupe mixte, additionnez l XP de chaque créature et appliquez le multiplicateur.',
63
+ },
64
+ {
65
+ question: 'Un résultat mortel signifie-t-il que le groupe va mourir?',
66
+ answer: 'Non. Mortel signifie que l XP ajusté atteint le seuil mortel. Le terrain, la tactique et les sorts modifient le résultat réel.',
67
+ },
68
+ {
69
+ question: 'Pourquoi la taille du groupe modifie-t-elle le multiplicateur?',
70
+ answer: 'Les règles recommandent d augmenter le multiplicateur pour les groupes de moins de trois personnages et de le réduire à partir de six.',
71
+ },
72
+ ];
73
+
74
+ const howTo = [
75
+ {
76
+ name: 'Régler le niveau du groupe',
77
+ text: 'Choisissez le niveau moyen des personnages du groupe.',
78
+ },
79
+ {
80
+ name: 'Indiquer la taille du groupe',
81
+ text: 'Entrez le nombre de personnages participant au combat.',
82
+ },
83
+ {
84
+ name: 'Décrire la menace',
85
+ text: 'Choisissez le niveau de danger (CR) et le nombre de monstres.',
86
+ },
87
+ {
88
+ name: 'Lire la pression',
89
+ text: 'Comparez l XP ajusté aux différents seuils de difficulté.',
90
+ },
91
+ ];
92
+
93
+ const faqSchema: WithContext<FAQPage> = {
94
+ '@context': 'https://schema.org',
95
+ '@type': 'FAQPage',
96
+ mainEntity: faq.map((item) => ({
97
+ '@type': 'Question',
98
+ name: item.question,
99
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
100
+ })),
101
+ };
102
+
103
+ const appSchema: WithContext<SoftwareApplication> = {
104
+ '@context': 'https://schema.org',
105
+ '@type': 'SoftwareApplication',
106
+ name: 'Calculateur de Difficulté de Rencontre D&D 5e',
107
+ operatingSystem: 'All',
108
+ applicationCategory: 'GameApplication',
109
+ description: 'Estimez la difficulté des rencontres D&D 5e 2014 selon le niveau, la taille du groupe, le CR des monstres, le nombre et les seuils officiels.',
110
+ };
111
+
112
+ const howToSchema: WithContext<HowTo> = {
113
+ '@context': 'https://schema.org',
114
+ '@type': 'HowTo',
115
+ name: 'Comment calculer la difficulté d une rencontre D&D 5e',
116
+ step: howTo.map((item) => ({
117
+ '@type': 'HowToStep',
118
+ name: item.name,
119
+ text: item.text,
120
+ })),
121
+ };
122
+
123
+ export const content: EncounterDifficultyLocaleContent = {
124
+ slug: 'calculateur-difficulte-rencontre-dnd-5e',
125
+ title: 'Calculateur de Difficulté de Rencontre D&D 5e',
126
+ description: 'Évaluez la pression des combats D&D 5e 2014 grâce au niveau, à la taille du groupe, au CR des monstres, à l XP ajusté et aux seuils officiels.',
127
+ ui,
128
+ seo: [
129
+ { type: 'title', text: 'Évaluez la difficulté du combat avant de lancer l initiative', level: 2 },
130
+ { type: 'paragraph', html: 'Un combat D&D représente plus que le chiffre à côté d un monstre. Ce calculateur transforme la taille du groupe, le niveau, le CR et le nombre de monstres en XP ajusté selon les règles D&D 5e 2014. Le résultat visuel vous montre clairement où se situe la rencontre par rapport aux seuils facile, moyen, difficile et mortel.' },
131
+ { type: 'title', text: 'Comment fonctionne la formule de rencontre D&D 5e', level: 2 },
132
+ { type: 'paragraph', html: 'La méthode additionne le seuil d XP de chaque personnage pour chaque niveau de difficulté, puis applique le multiplicateur au total des monstres. Les groupes de moins de trois personnages utilisent le multiplicateur supérieur suivant, tandis que les groupes de six personnages ou plus utilisent le multiplicateur inférieur suivant.' },
133
+ {
134
+ type: 'table',
135
+ headers: ['Signal', 'Que vérifier autour de la table'],
136
+ rows: [
137
+ ['Sub-facile', 'Le combat sert d échauffement ou de dépense mineure.'],
138
+ ['Facile', 'Le groupe devrait l emporter sans dépenser beaucoup de ressources.'],
139
+ ['Moyen', 'Prévoyez une pression modérée et au moins un choix de ressources.'],
140
+ ['Difficile', 'Prévoyez une perte de points de vie et d emplacements de sorts.'],
141
+ ['Mortel', 'Vérifiez la tactique, le terrain et les voies de repli.'],
142
+ ],
143
+ },
144
+ { type: 'title', text: 'Pourquoi le nombre de monstres est primordial', level: 2 },
145
+ { type: 'paragraph', html: 'Plusieurs monstres créent un danger supérieur à leur XP de base car ils multiplient les attaques et réactions au même tour. C est pourquoi une paire de créatures utilise un multiplicateur plus élevé qu une seule créature avec le même XP combiné.' },
146
+ { type: 'tip', title: 'Un CR élevé constitue une alerte spécifique', html: 'Un monstre avec un CR supérieur au niveau du groupe peut neutraliser un personnage en une seule action puissante. Inspectez ses dégâts et ses capacités d contrôle plutôt que de vous fier uniquement à l étiquette de difficulté.' },
147
+ { type: 'title', text: 'Utilisez le résultat comme outil de préparation', level: 2 },
148
+ { type: 'paragraph', html: 'Avant de proposer un combat difficile ou mortel, prenez en compte l environnement, la surprise et la fatigue du groupe. Une pièce étroite, la couverture, les pièges et les sorts de concentration peuvent modifier la difficulté réelle autour de la table.' },
149
+ { type: 'tip', title: 'Ajustement pour les groupes de monstres mixtes', html: 'Additionnez l XP de base de chaque créature et appliquez le multiplicateur correspondant au nombre total de monstres.' },
150
+ ],
151
+ faq,
152
+ bibliography,
153
+ howTo,
154
+ schemas: [faqSchema, appSchema, howToSchema] as unknown as Record<string, unknown>[],
155
+ };
@@ -0,0 +1,155 @@
1
+ import type { FAQPage, HowTo, SoftwareApplication, WithContext } from 'schema-dts';
2
+ import { bibliography } from '../bibliography';
3
+ import type { EncounterDifficultyLocaleContent, EncounterDifficultyUI } from '../entry';
4
+
5
+ const ui: EncounterDifficultyUI = {
6
+ intro: 'Atur grup dan ancaman. Kalkulator mengukur pertarungan terhadap ambang batas D&D 5e 2014.',
7
+ partySection: 'Grup',
8
+ partyLevel: 'Tingkat karakter',
9
+ partyLevelHint: 'Gunakan tingkat rata-rata untuk grup dengan karakter berlevel serupa.',
10
+ partySize: 'Karakter',
11
+ partySizeHint: 'Aturan menyesuaikan pengganda monster untuk grup sangat kecil atau besar.',
12
+ threatSection: 'Ancaman',
13
+ monsterCr: 'Peringkat tantangan monster (CR)',
14
+ monsterCrHint: 'Pilih CR dari satu monster yang sejenis. Grup campuran memerlukan perhitungan terpisah.',
15
+ moreCr: 'Tampilkan CR lebih tinggi',
16
+ lessCr: 'Tampilkan lebih sedikit CR',
17
+ monsterCount: 'Jumlah monster',
18
+ monsterCountHint: 'Lebih banyak makhluk meningkatkan tekanan aksi meskipun XP dasar rendah.',
19
+ presets: 'Mulai dengan adegan',
20
+ presetClassic: 'Patroli klasik',
21
+ presetBoss: 'Bos tunggal',
22
+ presetSwarm: 'Kawanan anak buah',
23
+ resultSection: 'Tekanan pertarungan',
24
+ belowEasyHint: 'Adegan ringan untuk menghemat sumber daya sebelum tantangan berikutnya.',
25
+ easyHint: 'Adegan yang mudah dikelola dengan sedikit tekanan pada grup.',
26
+ mediumHint: 'Ujian berarti yang dapat menghabiskan poin HP atau sumber daya.',
27
+ hardHint: 'Adegan berbahaya di mana taktik dan pilihan sumber daya sangat penting.',
28
+ deadlyHint: 'Sinyal tekanan mematikan. Periksa rute melarikan diri dan medan.',
29
+ adjustedXp: 'XP Disesuaikan',
30
+ baseXp: 'XP Dasar',
31
+ multiplier: 'Pengganda grup',
32
+ partyThreshold: 'Ambang Menengah',
33
+ belowEasy: 'Di bawah mudah',
34
+ easy: 'Mudah',
35
+ medium: 'Menengah',
36
+ hard: 'Sulit',
37
+ deadly: 'Mematikan',
38
+ warning: 'Perhatian',
39
+ partyAdjustment: 'Pengganda telah disesuaikan karena grup memiliki kurang dari tiga atau lebih dari lima karakter.',
40
+ highCr: 'Monster dengan CR di atas tingkat grup dapat menjatuhkan karakter dengan cepat.',
41
+ manyMonsters: 'Sebelas monster atau lebih membuat pertarungan jauh lebih rumit untuk dikelola.',
42
+ rulesNote: 'Perkiraan sesuai aturan D&D 5e 2014. Tidak memperhitungkan medan atau taktik.',
43
+ rulesLinkLabel: 'Baca aturan sumber',
44
+ reset: 'Atur ulang ke contoh',
45
+ xpUnit: 'XP',
46
+ sceneLabel: 'Tampilan visual tekanan pertarungan',
47
+ partyMarker: 'Grup',
48
+ threatMarker: 'Ancaman',
49
+ };
50
+
51
+ const faq = [
52
+ {
53
+ question: 'Aturan apa yang digunakan kalkulator kesulitan pertarungan ini?',
54
+ answer: 'Alat ini menggunakan metode resmi D&D 5e 2014 dari Aturan Dasar, membandingkan ambang batas grup dengan XP monster yang disesuaikan.',
55
+ },
56
+ {
57
+ question: 'Mengapa XP yang disesuaikan berbeda dari XP imbalan monster?',
58
+ answer: 'Aturan mengalikan total XP monster untuk mencerminkan bahaya beberapa makhluk yang bertindak dalam putaran yang sama.',
59
+ },
60
+ {
61
+ question: 'Bisakah saya menggunakannya untuk grup monster campuran?',
62
+ answer: 'Gunakan sebagai perkiraan cepat untuk monster sejenis. Untuk grup campuran, jumlahkan XP setiap makhluk dan terapkan pengganda.',
63
+ },
64
+ {
65
+ question: 'Apakah hasil mematikan berarti grup pasti akan mati?',
66
+ answer: 'Tidak. Mematikan berarti XP yang disesuaikan mencapai ambang mematikan. Medan, taktik, dan mantra dapat mengubah hasil sebenarnya.',
67
+ },
68
+ {
69
+ question: 'Mengapa ukuran grup mengubah pengganda?',
70
+ answer: 'Aturan Dasar menyarankan peningkatan pengganda untuk grup kurang dari tiga karakter dan pengurangannya untuk enam karakter atau lebih.',
71
+ },
72
+ ];
73
+
74
+ const howTo = [
75
+ {
76
+ name: 'Atur tingkat grup',
77
+ text: 'Pilih tingkat rata-rata karakter dalam grup.',
78
+ },
79
+ {
80
+ name: 'Atur ukuran grup',
81
+ text: 'Masukkan jumlah karakter yang memasuki pertarungan.',
82
+ },
83
+ {
84
+ name: 'Jelaskan ancaman',
85
+ text: 'Pilih peringkat tantangan (CR) dan jumlah monster.',
86
+ },
87
+ {
88
+ name: 'Baca tekanan',
89
+ text: 'Bandingkan XP yang disesuaikan dengan rentang ambang resmi.',
90
+ },
91
+ ];
92
+
93
+ const faqSchema: WithContext<FAQPage> = {
94
+ '@context': 'https://schema.org',
95
+ '@type': 'FAQPage',
96
+ mainEntity: faq.map((item) => ({
97
+ '@type': 'Question',
98
+ name: item.question,
99
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
100
+ })),
101
+ };
102
+
103
+ const appSchema: WithContext<SoftwareApplication> = {
104
+ '@context': 'https://schema.org',
105
+ '@type': 'SoftwareApplication',
106
+ name: 'Kalkulator Kesulitan Pertarungan D&D 5e',
107
+ operatingSystem: 'All',
108
+ applicationCategory: 'GameApplication',
109
+ description: 'Hitung kesulitan pertarungan D&D 5e 2014 berdasarkan tingkat, ukuran grup, CR monster, jumlah, dan ambang batas resmi.',
110
+ };
111
+
112
+ const howToSchema: WithContext<HowTo> = {
113
+ '@context': 'https://schema.org',
114
+ '@type': 'HowTo',
115
+ name: 'Cara menghitung kesulitan pertarungan D&D 5e',
116
+ step: howTo.map((item) => ({
117
+ '@type': 'HowToStep',
118
+ name: item.name,
119
+ text: item.text,
120
+ })),
121
+ };
122
+
123
+ export const content: EncounterDifficultyLocaleContent = {
124
+ slug: 'kalkulator-kesulitan-pertarungan-dnd-5e',
125
+ title: 'Kalkulator Kesulitan Pertarungan D&D 5e',
126
+ description: 'Estimasi tekanan pertarungan D&D 5e 2014 menggunakan tingkat grup, ukuran, CR monster, XP yang disesuaikan, dan ambang batas resmi.',
127
+ ui,
128
+ seo: [
129
+ { type: 'title', text: 'Evaluasi kesulitan pertarungan sebelum inisiatif dimulai', level: 2 },
130
+ { type: 'paragraph', html: 'Pertarungan D&D lebih dari sekadar angka di samping monster. Kalkulator ini mengubah ukuran grup, tingkat, CR, dan jumlah monster menjadi nilai XP yang disesuaikan menurut aturan D&D 5e 2014. Hasil visual memperlihatkan dengan jelas posisi pertarungan terhadap ambang batas mudah, sedang, sulit, dan mematikan.' },
131
+ { type: 'title', text: 'Cara kerja rumus pertarungan D&D 5e', level: 2 },
132
+ { type: 'paragraph', html: 'Metode ini menjumlahkan ambang XP setiap karakter untuk setiap tingkat kesulitan, lalu menerapkan pengganda pada total XP monster. Grup dengan kurang dari tiga karakter menggunakan pengganda satu tingkat lebih tinggi, sedangkan grup enam karakter atau lebih menggunakan pengganda satu tingkat lebih rendah.' },
133
+ {
134
+ type: 'table',
135
+ headers: ['Sinyal', 'Hal yang perlu diperiksa di meja'],
136
+ rows: [
137
+ ['Di bawah mudah', 'Pertarungan berfungsi sebagai pemanasan atau penghematan sumber daya.'],
138
+ ['Mudah', 'Grup biasanya menang tanpa menghabiskan banyak sumber daya.'],
139
+ ['Menengah', 'Harapkan tekanan sedang dan setidaknya satu keputusan penting tentang sumber daya.'],
140
+ ['Sulit', 'Rencanakan kehilangan poin HP dan slot mantra.'],
141
+ ['Mematikan', 'Periksa taktik, medan, dan rute melarikan diri.'],
142
+ ],
143
+ },
144
+ { type: 'title', text: 'Mengapa jumlah monster sangat penting', level: 2 },
145
+ { type: 'paragraph', html: 'Beberapa monster menimbulkan bahaya lebih besar daripada XP dasar mereka karena melakukan lebih banyak serangan dan reaksi dalam satu putaran. Oleh karena itu sepasang makhluk menggunakan pengganda lebih tinggi dibanding satu makhluk dengan kombinasi XP sama.' },
146
+ { type: 'tip', title: 'Anggap CR tinggi sebagai peringatan khusus', html: 'Monster dengan CR di atas tingkat grup dapat menjatuhkan karakter dalam satu aksi kuat. Periksa kerusakan dan efek kontrol ketimbang hanya mengandalkan label kesulitan.' },
147
+ { type: 'title', text: 'Gunakan hasil sebagai bantuan persiapan', level: 2 },
148
+ { type: 'paragraph', html: 'Sebelum menyiapkan pertarungan sulit atau mematikan, evaluasi lingkungan, kejutan, dan kondisi umum grup. Ruangan sempit, perlindungan, jebakan, dan mantra konsentrasi dapat menggeser bahaya sebenarnya di meja permainan.' },
149
+ { type: 'tip', title: 'Grup monster campuran', html: 'Jumlahkan XP dasar setiap makhluk dan terapkan pengganda pada jumlah total monster.' },
150
+ ],
151
+ faq,
152
+ bibliography,
153
+ howTo,
154
+ schemas: [faqSchema, appSchema, howToSchema] as unknown as Record<string, unknown>[],
155
+ };