@jjlmoya/utils-tabletop 1.11.0 → 1.13.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 (35) hide show
  1. package/package.json +1 -1
  2. package/src/entries.ts +4 -0
  3. package/src/tests/locale_completeness.test.ts +1 -1
  4. package/src/tests/tool_validation.test.ts +1 -1
  5. package/src/tool/dice-roller-simulator/component.astro +116 -26
  6. package/src/tool/scatter-direction-selector/animation.ts +278 -0
  7. package/src/tool/scatter-direction-selector/bibliography.astro +16 -0
  8. package/src/tool/scatter-direction-selector/bibliography.ts +12 -0
  9. package/src/tool/scatter-direction-selector/client.ts +293 -0
  10. package/src/tool/scatter-direction-selector/component.astro +183 -0
  11. package/src/tool/scatter-direction-selector/entry.ts +59 -0
  12. package/src/tool/scatter-direction-selector/history.ts +71 -0
  13. package/src/tool/scatter-direction-selector/i18n/de.ts +143 -0
  14. package/src/tool/scatter-direction-selector/i18n/en.ts +231 -0
  15. package/src/tool/scatter-direction-selector/i18n/es.ts +143 -0
  16. package/src/tool/scatter-direction-selector/i18n/fr.ts +143 -0
  17. package/src/tool/scatter-direction-selector/i18n/id.ts +143 -0
  18. package/src/tool/scatter-direction-selector/i18n/it.ts +143 -0
  19. package/src/tool/scatter-direction-selector/i18n/ja.ts +143 -0
  20. package/src/tool/scatter-direction-selector/i18n/ko.ts +143 -0
  21. package/src/tool/scatter-direction-selector/i18n/nl.ts +143 -0
  22. package/src/tool/scatter-direction-selector/i18n/pl.ts +143 -0
  23. package/src/tool/scatter-direction-selector/i18n/pt.ts +143 -0
  24. package/src/tool/scatter-direction-selector/i18n/ru.ts +143 -0
  25. package/src/tool/scatter-direction-selector/i18n/sv.ts +143 -0
  26. package/src/tool/scatter-direction-selector/i18n/tr.ts +143 -0
  27. package/src/tool/scatter-direction-selector/i18n/zh.ts +143 -0
  28. package/src/tool/scatter-direction-selector/index.ts +10 -0
  29. package/src/tool/scatter-direction-selector/logic.test.ts +62 -0
  30. package/src/tool/scatter-direction-selector/logic.ts +52 -0
  31. package/src/tool/scatter-direction-selector/scatter-direction-selector.css +809 -0
  32. package/src/tool/scatter-direction-selector/seo.astro +16 -0
  33. package/src/tool/scatter-direction-selector/settings.ts +81 -0
  34. package/src/tool/scatter-direction-selector/sound.ts +22 -0
  35. package/src/tools.ts +2 -0
@@ -0,0 +1,143 @@
1
+ import { bibliography } from '../bibliography';
2
+ import type { ScatterSelectorLocaleContent } from '../entry';
3
+
4
+ const ui = {
5
+ title: 'Streuwahl Richtung',
6
+ setupTitle: 'Streueinstellungen',
7
+ sectorsLabel: 'Kompasssektoren',
8
+ sectors8: '8 Richtungen',
9
+ sectors12: '12 Richtungen (Uhr)',
10
+ diceLabel: 'Abweichungsdistanz',
11
+ diceD6: '1W6 Zoll',
12
+ dice2D6: '2W6 Zoll',
13
+ diceD10: '1W10 Zoll',
14
+ diceCustom: 'Benutzerdefinierter Bereich',
15
+ customMaxLabel: 'Maximale Distanz',
16
+ hitChanceLabel: 'Direkttrefferwahrscheinlichkeit (%)',
17
+ rollButton: 'Streuwurf',
18
+ hitResult: 'Direkttreffer!',
19
+ scatterResult: 'Streuung!',
20
+ distanceLabel: 'Distanz',
21
+ angleLabel: 'Winkel',
22
+ dragHint: 'Ziehe den Kompass, um die Windrichtung manuell einzustellen',
23
+ historyTitle: 'Letzte Würfe',
24
+ clearHistory: 'Verlauf löschen',
25
+ presetTitle: 'Wargaming-Voreinstellungen',
26
+ soundOn: 'Sound an',
27
+ soundOff: 'Sound aus',
28
+ guideStep1: 'Ziehe den Kompass, um ihn an deiner Tischausrichtung auszurichten',
29
+ guideStep2: 'Wähle Sektoren, Würfel und Direkttrefferchance',
30
+ guideStep3: 'Mitte = dein Ziel. Grünes Leuchten bedeutet Volltreffer',
31
+ guideStep3Scatter: 'Pfeil = Abweichungsrichtung. Versetze den Schuss von der Mitte um die angegebenen Zoll entlang des Pfeils',
32
+ scatterModeLabel: 'Streurichtung',
33
+ scatterModeRandom: 'Zufällig',
34
+ scatterModeWind: 'Winddrift',
35
+ scatterModeWindHint: 'Der Pfeil folgt immer dem Kompass - nur die Distanz ist zufällig',
36
+ };
37
+
38
+ const faq = [
39
+ {
40
+ question: 'Wie funktioniert der Streuwahl Richtung-Wähler?',
41
+ answer: 'Er berechnet einen zufälligen Winkel (0-359 Grad) und eine Distanz basierend auf der gewählten Würfelkonfiguration. Außerdem simuliert er einen Streuwürfel und prüft auf Direkttreffer.',
42
+ },
43
+ {
44
+ question: 'Kann ich das Sektorformat ändern?',
45
+ answer: 'Ja, du kannst zwischen 8-Richtungs-Kardinalsektoren und 12-Richtungs-Uhrzeitsektoren umschalten.',
46
+ },
47
+ {
48
+ question: 'Was ist die Direkttrefferwahrscheinlichkeit?',
49
+ answer: 'Sie gibt die Chance an, dass das Projektil genau dort landet, wo gezielt wurde, ohne Abweichung. Dies simuliert ein "Treffer"-Ergebnis eines normalen Streuwürfels.',
50
+ },
51
+ {
52
+ question: 'Ist das mit Warhammer oder Bolt Action kompatibel?',
53
+ answer: 'Ja, es unterstützt die üblichen 8-Richtungs-Kardinalvorlagen und 12-Richtungs-Uhrzeitausrichtungen der meisten taktischen Tabletop-Spiele.',
54
+ },
55
+ {
56
+ question: 'Was zeigt die Projektilbahn-Animation?',
57
+ answer: 'Ein leuchtendes Projektil fliegt von der Kompassmitte zum Streulandeplatz und hinterlässt eine gestrichelte Spur. Bei einem Direkttreffer bleibt das Projektil zentriert und grüne Ringe breiten sich pulsend aus.',
58
+ },
59
+ {
60
+ question: 'Wie wird die Streudistanz visuell dargestellt?',
61
+ answer: 'Die Distanz in Zoll erscheint als schwebende Markierung am Einschlagpunkt entlang der Abweichungsrichtung. Der rote Kompasspfeil fixiert sich auf den endgültigen Winkel für eine schnelle Schablonenausrichtung.',
62
+ },
63
+ ];
64
+
65
+ const howTo = [
66
+ {
67
+ name: 'Regeln konfigurieren',
68
+ text: 'Wähle Kompasssektoren, einen Distanzwürfel und stelle die Direkttrefferwahrscheinlichkeit ein.',
69
+ },
70
+ {
71
+ name: 'Würfeln oder Ziehen',
72
+ text: 'Klicke auf Streuwurf, um die Abweichung zu simulieren, oder ziehe am Kompassrad, um die Richtung manuell anzupassen.',
73
+ },
74
+ {
75
+ name: 'Ergebnis ablesen',
76
+ text: 'Überprüfe die zentrale Anzeige und den Vektorpfeil, um die genaue Distanz, den Winkel und die Richtung der Streuung zu ermitteln.',
77
+ },
78
+ {
79
+ name: 'Bahn beobachten',
80
+ text: 'Beobachte nach dem Wurf das animierte Projektil über den Kompass fliegen. Die gestrichelte Spur zeigt den Abweichungspfad, und der Einschlagpunkt zeigt die Distanz in Zoll an.',
81
+ },
82
+ {
83
+ name: 'Ergebnis interpretieren',
84
+ text: 'Ein grüner Puls mit "DIRECT HIT" bedeutet keine Abweichung. Eine rote Explosion mit Distanzangabe bedeutet Streuung - platziere deine Schablone in Pfeilrichtung in dieser Entfernung vom Ziel.',
85
+ },
86
+ ];
87
+
88
+ export const content: ScatterSelectorLocaleContent = {
89
+ slug: 'streuwahl-richtung',
90
+ title: 'Streuwahl Richtung: Taktischer Kompass für Tabletop Wargames',
91
+ description: 'Ermittle zufällige Abweichungen, Winddrift und Streurichtungen für Miniaturen-Wargames mit einem taktilen 3D-Kompass.',
92
+ ui,
93
+ seo: [
94
+ { type: 'title', text: 'Interaktiver Streukompass mit Echtzeit Projektilanimation', level: 2 },
95
+ { type: 'paragraph', html: 'Der Streuwahl Richtung-Wähler geht über die reine Zahlengenerierung hinaus, indem er eine animierte Projektilbahn direkt auf der Kompassüberlagerung darstellt. Beim Klicken auf Streuwurf fliegt ein leuchtendes Projektil vom Zentrum entlang des Abweichungswinkels, hinterlässt eine gestrichelte Spur und zerplatzt am Einschlagpunkt in Partikel.' },
96
+ { type: 'stats', items: [
97
+ { value: '2', label: 'Sektorsysteme', icon: 'mdi:compass-rose' },
98
+ { value: '4', label: 'Würfelvoreinstellungen', icon: 'mdi:dice-d6' },
99
+ { value: '0-100%', label: 'Trefferwahrscheinlichkeit', icon: 'mdi:target' },
100
+ { value: '10', label: 'Letzte Würfe', icon: 'mdi:history' },
101
+ ], columns: 4 },
102
+ { type: 'title', text: 'Wie die Flugbahn Animation die Entscheidungsfindung beim Wargaming verbessert', level: 3 },
103
+ { type: 'paragraph', html: 'Herkömmliche Streuwerkzeuge zeigen einen numerischen Winkel und eine Distanz an, sodass Spieler den Versatz auf dem Spieltisch mental visualisieren müssen. Die animierte Bahn schließt diese Lücke, indem sie den exakten Flugweg vom Zielpunkt bis zur Streulandszone einzeichnet.' },
104
+ { type: 'diagnostic', variant: 'success', title: 'Direkttreffer', html: 'Wenn der Wurf die Trefferwahrscheinlichkeit übertrifft, erstrahlt die Kompassmitte in pulsierenden grünen Ringen und einer "DIRECT HIT"-Textanimation. Das Projektil kehrt zur Mitte zurück und bestätigt einen perfekten Treffer ohne Abweichung.' },
105
+ { type: 'diagnostic', variant: 'error', title: 'Streuung', html: 'Bei einem Streuergebnis folgt das Projektil einer gestrichelten Bahn zum Einschlagspunkt. Eine Partikelexplosion, eine leuchtende Markierung und die Distanz in Zoll (z. B. <strong>5"</strong>) erscheinen am Landeort.' },
106
+ { type: 'tip', title: 'Profi Tipp: Winddrift Modus nutzen', html: 'Aktiviere Winddrift, um die Streurichtung auf den manuell eingestellten Kompasswinkel zu fixieren. Simuliert vorherrschenden Wind oder einen festen Verschiebungsvektor - ideal für ungelenkte Raketen, Gaswolken oder fehlgeschlagene Teleportationen.' },
107
+ ],
108
+ faq,
109
+ bibliography,
110
+ howTo,
111
+ schemas: [
112
+ {
113
+ '@context': 'https://schema.org',
114
+ '@type': 'FAQPage',
115
+ 'mainEntity': faq.map((f) => ({
116
+ '@type': 'Question',
117
+ 'name': f.question,
118
+ 'acceptedAnswer': {
119
+ '@type': 'Answer',
120
+ 'text': f.answer,
121
+ },
122
+ })),
123
+ },
124
+ {
125
+ '@context': 'https://schema.org',
126
+ '@type': 'SoftwareApplication',
127
+ 'name': 'Streuwahl Richtung',
128
+ 'operatingSystem': 'All',
129
+ 'applicationCategory': 'UtilitiesApplication',
130
+ 'browserRequirements': 'Requires HTML5. Requires JavaScript.',
131
+ },
132
+ {
133
+ '@context': 'https://schema.org',
134
+ '@type': 'HowTo',
135
+ 'name': 'So verwendest du den Streuwahl Richtung-Wähler',
136
+ 'step': howTo.map((h) => ({
137
+ '@type': 'HowToStep',
138
+ 'name': h.name,
139
+ 'text': h.text,
140
+ })),
141
+ },
142
+ ],
143
+ };
@@ -0,0 +1,231 @@
1
+ import { bibliography } from '../bibliography';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { ScatterSelectorUI } from '../entry';
4
+
5
+ const ui: ScatterSelectorUI = {
6
+ title: 'Scatter Direction Selector',
7
+ setupTitle: 'Scatter Settings',
8
+ sectorsLabel: 'Compass Sectors',
9
+ sectors8: '8 Directions',
10
+ sectors12: '12 Directions (Clock)',
11
+ diceLabel: 'Deviation Distance Roll',
12
+ diceD6: '1D6 Inches',
13
+ dice2D6: '2D6 Inches',
14
+ diceD10: '1D10 Inches',
15
+ diceCustom: 'Custom Range',
16
+ customMaxLabel: 'Maximum Distance',
17
+ hitChanceLabel: 'Direct Hit Probability (%)',
18
+ rollButton: 'Roll Scatter',
19
+ hitResult: 'Direct Hit!',
20
+ scatterResult: 'Scatter!',
21
+ distanceLabel: 'Distance',
22
+ angleLabel: 'Angle',
23
+ dragHint: 'Drag the compass to set wind direction manually',
24
+ historyTitle: 'Recent Rolls',
25
+ clearHistory: 'Clear History',
26
+ presetTitle: 'Wargaming Presets',
27
+ soundOn: 'Sound On',
28
+ soundOff: 'Sound Off',
29
+ guideStep1: 'Drag the compass to match your table orientation',
30
+ guideStep2: 'Pick sectors, dice and direct hit chance',
31
+ guideStep3: 'Center = your target. Green glow means it landed there exactly',
32
+ guideStep3Scatter: 'Arrow = deviation direction. Move the shot from center that many inches along the arrow',
33
+ scatterModeLabel: 'Scatter Direction',
34
+ scatterModeRandom: 'Random',
35
+ scatterModeWind: 'Wind Drift',
36
+ scatterModeWindHint: 'Arrow always follows compass - only distance is random',
37
+ };
38
+
39
+ const faq = [
40
+ {
41
+ question: 'How does the Scatter Direction Selector work?',
42
+ answer: 'It calculates a random angle (0-359 degrees) and distance based on selected dice configurations. It also simulates a scatter die, checking for direct hits.',
43
+ },
44
+ {
45
+ question: 'Can I change the sector format?',
46
+ answer: 'Yes, you can toggle between 8-direction cardinal sectors and 12-direction clock-face sectors.',
47
+ },
48
+ {
49
+ question: 'What is the direct hit probability?',
50
+ answer: 'It represents the chance that the projectile lands exactly where targeted without any deviation or scatter, simulating a "Hit" result on a standard scatter die.',
51
+ },
52
+ {
53
+ question: 'Is this compatible with Warhammer or Bolt Action?',
54
+ answer: 'Yes, it supports standard 8-direction templates and 12-direction clock alignments used in most tactical wargames and miniature rulesets.',
55
+ },
56
+ {
57
+ question: 'What does the projectile trajectory animation show?',
58
+ answer: 'A glowing projectile travels from the centre of the compass to the scatter landing point, leaving a dashed trail. On a direct hit, the projectile stays centred and expanding green rings pulse outward.',
59
+ },
60
+ {
61
+ question: 'How is the scatter distance displayed visually?',
62
+ answer: 'The distance in inches appears as a floating label at the impact point, positioned along the deviation direction. The red compass arrow also locks to the final angle for quick template alignment.',
63
+ },
64
+ {
65
+ question: 'Can I disable the animation to get faster results?',
66
+ answer: 'The animation lasts approximately two seconds, after which the final result is displayed in the centre and the compass arrow locks. There is currently no skip option, but the delay is designed to match the pace of rolling physical dice.',
67
+ },
68
+ {
69
+ question: 'Does the Wind Drift mode affect the animation?',
70
+ answer: 'Yes. In Wind Drift mode, the trajectory follows the compass angle you set manually instead of a random direction. The projectile animation always respects the selected mode, so you see the exact path your shot will take.',
71
+ },
72
+ ];
73
+
74
+ const howTo = [
75
+ {
76
+ name: 'Configure Rules',
77
+ text: 'Select compass sectors, choose a distance dice preset, and adjust the direct hit chance.',
78
+ },
79
+ {
80
+ name: 'Roll or Drag',
81
+ text: 'Click Roll Scatter to simulate the deviation, or drag the compass wheel to adjust the direction manually.',
82
+ },
83
+ {
84
+ name: 'Read Outcome',
85
+ text: 'Check the central display and vector arrow to find the exact distance, angle, and direction of the scatter.',
86
+ },
87
+ {
88
+ name: 'Watch the Trajectory',
89
+ text: 'After rolling, observe the animated projectile travel across the compass. The dashed trail shows the deviation path, and the impact point displays the distance in inches.',
90
+ },
91
+ {
92
+ name: 'Interpret the Result',
93
+ text: 'A green pulse with "DIRECT HIT" means zero deviation. A red burst with a distance label means the shot scattered - place your template that many inches from the target in the arrow\'s direction.',
94
+ },
95
+ ];
96
+
97
+ export const content: ToolLocaleContent<ScatterSelectorUI> = {
98
+ slug: 'scatter-direction-selector',
99
+ title: 'Scatter Direction Selector: Tabletop Wargaming Compass',
100
+ description: 'Determine random deviations, wind drift, and scatter directions for miniature wargames using a 3D tactile compass.',
101
+ ui,
102
+ seo: [
103
+ { type: 'title', text: 'Interactive Scatter Compass with Real Time Projectile Animation', level: 2 },
104
+ { type: 'paragraph', html: 'The Scatter Direction Selector goes beyond static number generation by rendering an animated projectile trajectory directly on the compass overlay. When you click Roll Scatter, a glowing projectile travels from the centre along the deviation angle, leaving a dashed trail and bursting into particles at the impact point. For direct hits, expanding green rings pulse outward while a "DIRECT HIT" label scales into view with a dramatic glow. This real-time visual feedback eliminates ambiguity, letting you see exactly where your shot lands and how far it deviates.' },
105
+ { type: 'stats', items: [
106
+ { value: '2', label: 'Sector Systems', icon: 'mdi:compass-rose' },
107
+ { value: '4', label: 'Dice Presets', icon: 'mdi:dice-d6' },
108
+ { value: '0-100%', label: 'Hit Probability Range', icon: 'mdi:target' },
109
+ { value: '10', label: 'Recent Roll History', icon: 'mdi:history' },
110
+ ], columns: 4 },
111
+ { type: 'title', text: 'How the Trajectory Animation Improves Wargame Decision Making', level: 3 },
112
+ { type: 'paragraph', html: 'Traditional scatter tools display a numeric angle and distance, forcing players to mentally visualise the offset on the tabletop. The animated trajectory bridges this gap by drawing the exact flight path from the aim point to the scatter landing zone. The distance in inches appears as an overlay label at the impact location, while the compass arrow remains locked to the final deviation angle. This makes it instantly clear whether a shot clips a building corner, drifts into an allied unit, or lands in open ground - without reaching for a tape measure.' },
113
+ { type: 'diagnostic', variant: 'success', title: 'Direct Hit', html: 'When the roll beats the hit probability, the compass centre erupts with pulsing green rings and a "DIRECT HIT" text animation. The projectile returns to centre, confirming a perfect impact with zero deviation.' },
114
+ { type: 'diagnostic', variant: 'error', title: 'Scatter', html: 'On a scatter result, the projectile follows a dashed trajectory to its landing point. An impact burst of particles, a glowing marker, and the distance in inches (e.g. <strong>5"</strong>) appear at the landing site, while the red compass arrow shows the direction for easy template placement.' },
115
+ { type: 'tip', title: 'Pro Tip: Using Wind Drift Mode', html: 'Toggle Wind Drift to lock the scatter direction to your manually rotated compass angle. This simulates a prevailing wind or a fixed displacement vector - ideal for unguided rockets, gas clouds, or teleportation mishaps where the drift direction is known but the distance remains random.' },
116
+ { type: 'title', text: 'Resolving Scatter and Deviation Mechanics in Tabletop Wargames', level: 2 },
117
+ { type: 'paragraph', html: 'Many tactical wargames and miniature combat rulesets incorporate deviation to simulate the unpredictable nature of artillery fire, wind drift, teleportation failures, or grenade bounces. The resolution usually requires rolling a direction-based scatter die combined with a distance roll (such as 2D6 or a D6). This digital assistant consolidates both rolls into an instantaneous, animated vector.' },
118
+ {
119
+ type: 'table',
120
+ headers: ['Game Category', 'Typical Direction Format', 'Standard Distance Roll', 'Common Application'],
121
+ rows: [
122
+ ['Sci-Fi Skirmish', '8 Direction Radial', '2D6 Inches', 'Deep strike teleportation deviation'],
123
+ ['Historical Wargames', '12 Direction Clock Face', '1D6 Inches', 'Off-board mortar and artillery scatter'],
124
+ ['Fantasy Battle Games', '8 Direction Radial', '1D10 / 2D6 Inches', 'Catapult shots and magical vortex movement'],
125
+ ['Post-Apocalyptic Survival', '8 Direction Cardinal', '1D6 Inches', 'Thrown grenade and gas cylinder drift'],
126
+ ],
127
+ },
128
+ { type: 'title', text: 'Tactical Management of Wind and Drift Deviation', level: 2 },
129
+ { type: 'paragraph', html: 'When deploying template weapons, players must account for deviation margins. By establishing a direct hit percentage, you determine the reliability of the firing unit. An experienced mortar crew may have a high hit probability, reducing scatter chance, whereas an unguided rocket pod might rely entirely on random dispersion. Adjusting these parameters on the fly speeds up measurement times and keeps the game flow continuous.' },
130
+ {
131
+ type: 'comparative',
132
+ items: [
133
+ {
134
+ title: 'Radial 8 Direction System',
135
+ description: 'Uses cardinal and ordinal headings (N, NE, E, SE, S, SW, W, NW) to resolve template offsets.',
136
+ icon: 'mdi:compass-outline',
137
+ highlight: true,
138
+ points: [
139
+ 'Ideal for square and hexagonal grids',
140
+ 'Easy to align with standard battlefield edges',
141
+ 'Provides fast visual identification of quadrants',
142
+ ],
143
+ },
144
+ {
145
+ title: 'Clock Face 12 Direction System',
146
+ description: 'Translates directions into clock hours (1 to 12), offering finer precision for micro-measurements.',
147
+ icon: 'mdi:clock-outline',
148
+ highlight: false,
149
+ points: [
150
+ 'Standard for many historical rulesets',
151
+ 'Allows precise directional degrees',
152
+ 'Easy translation from table orientation',
153
+ ],
154
+ },
155
+ ],
156
+ columns: 2,
157
+ },
158
+ {
159
+ type: 'glossary',
160
+ items: [
161
+ {
162
+ term: 'Deviation Vector',
163
+ definition: 'The combined angle and distance indicating the final position of a scattered template.',
164
+ },
165
+ {
166
+ term: 'Direct Hit',
167
+ definition: 'A roll outcome indicating the projectile hit the target target exactly, bypassing deviation.',
168
+ },
169
+ {
170
+ term: 'Template Weapon',
171
+ definition: 'An area-of-effect weapon that uses physical templates (like circles or tears) to determine hit units.',
172
+ },
173
+ {
174
+ term: 'Wind Drift',
175
+ definition: 'A static or variable modifier that shifts templates in a set direction regardless of the initial aim.',
176
+ },
177
+ {
178
+ term: 'Projectile Trajectory',
179
+ definition: 'The animated dashed line drawn from the compass centre to the scatter landing point, visualising the exact flight path of the deviation.',
180
+ },
181
+ {
182
+ term: 'Impact Point',
183
+ definition: 'The final position where the animated projectile lands, marked by a glowing particle burst and a distance-in-inches label.',
184
+ },
185
+ {
186
+ term: 'Hit Probability',
187
+ definition: 'A percentage configured before rolling that determines the likelihood of a Direct Hit. When the roll falls within this threshold, the projectile hits centre with zero scatter distance.',
188
+ },
189
+ {
190
+ term: 'Compass Lock',
191
+ definition: 'In Wind Drift mode, the scatter direction is locked to the user-rotated compass angle, overriding random direction generation.',
192
+ },
193
+ ],
194
+ },
195
+ ],
196
+ faq,
197
+ bibliography,
198
+ howTo,
199
+ schemas: [
200
+ {
201
+ '@context': 'https://schema.org',
202
+ '@type': 'FAQPage',
203
+ 'mainEntity': faq.map((f) => ({
204
+ '@type': 'Question',
205
+ 'name': f.question,
206
+ 'acceptedAnswer': {
207
+ '@type': 'Answer',
208
+ 'text': f.answer,
209
+ },
210
+ })),
211
+ },
212
+ {
213
+ '@context': 'https://schema.org',
214
+ '@type': 'SoftwareApplication',
215
+ 'name': 'Scatter Direction Selector',
216
+ 'operatingSystem': 'All',
217
+ 'applicationCategory': 'UtilitiesApplication',
218
+ 'browserRequirements': 'Requires HTML5. Requires JavaScript.',
219
+ },
220
+ {
221
+ '@context': 'https://schema.org',
222
+ '@type': 'HowTo',
223
+ 'name': 'How to use the Scatter Direction Selector',
224
+ 'step': howTo.map((h) => ({
225
+ '@type': 'HowToStep',
226
+ 'name': h.name,
227
+ 'text': h.text,
228
+ })),
229
+ },
230
+ ],
231
+ };
@@ -0,0 +1,143 @@
1
+ import { bibliography } from '../bibliography';
2
+ import type { ScatterSelectorLocaleContent } from '../entry';
3
+
4
+ const ui = {
5
+ title: 'Selector de Dirección de Desviación',
6
+ setupTitle: 'Configuración de Desviación',
7
+ sectorsLabel: 'Sectores de la Brújula',
8
+ sectors8: '8 Direcciones',
9
+ sectors12: '12 Direcciones (Reloj)',
10
+ diceLabel: 'Tirada de Distancia de Desviación',
11
+ diceD6: '1D6 Pulgadas',
12
+ dice2D6: '2D6 Pulgadas',
13
+ diceD10: '1D10 Pulgadas',
14
+ diceCustom: 'Rango Personalizado',
15
+ customMaxLabel: 'Distancia Máxima',
16
+ hitChanceLabel: 'Probabilidad de Impacto Directo (%)',
17
+ rollButton: 'Tirar Desviación',
18
+ hitResult: '¡Impacto Directo!',
19
+ scatterResult: '¡Desviación!',
20
+ distanceLabel: 'Distancia',
21
+ angleLabel: 'Ángulo',
22
+ dragHint: 'Arrastra la brújula para ajustar la dirección del viento manualmente',
23
+ historyTitle: 'Tiradas Recientes',
24
+ clearHistory: 'Limpiar Historial',
25
+ presetTitle: 'Preajustes de Wargaming',
26
+ soundOn: 'Sonido Activado',
27
+ soundOff: 'Sonido Desactivado',
28
+ guideStep1: 'Arrastra la brújula para alinearla con tu mesa de juego',
29
+ guideStep2: 'Elige sectores, dados y probabilidad de impacto directo',
30
+ guideStep3: 'Centro = tu objetivo. El resplandor verde indica que cayó exactamente ahí',
31
+ guideStep3Scatter: 'Flecha = dirección de desviación. Mueve el disparo desde el centro esa cantidad de pulgadas a lo largo de la flecha',
32
+ scatterModeLabel: 'Dirección de Desviación',
33
+ scatterModeRandom: 'Aleatoria',
34
+ scatterModeWind: 'Deriva del Viento',
35
+ scatterModeWindHint: 'La flecha siempre sigue la brújula - solo la distancia es aleatoria',
36
+ };
37
+
38
+ const faq = [
39
+ {
40
+ question: '¿Cómo funciona el Selector de Dirección de Desviación?',
41
+ answer: 'Calcula un ángulo aleatorio (0-359 grados) y una distancia basada en la configuración de dados seleccionada. También simula un dado de desviación, comprobando si hay impactos directos.',
42
+ },
43
+ {
44
+ question: '¿Puedo cambiar el formato de sectores?',
45
+ answer: 'Sí, puedes alternar entre sectores cardinales de 8 direcciones y sectores de 12 direcciones con formato de reloj.',
46
+ },
47
+ {
48
+ question: '¿Qué es la probabilidad de impacto directo?',
49
+ answer: 'Representa la posibilidad de que el proyectil caiga exactamente donde se apuntó, sin desviación alguna, simulando un resultado de "Impacto" en un dado de desviación estándar.',
50
+ },
51
+ {
52
+ question: '¿Es compatible con Warhammer o Bolt Action?',
53
+ answer: 'Sí, admite plantillas estándar de 8 direcciones y alineaciones de reloj de 12 direcciones utilizadas en la mayoría de los wargames tácticos y sistemas de miniaturas.',
54
+ },
55
+ {
56
+ question: '¿Cómo se muestra visualmente la distancia de desviación?',
57
+ answer: 'La distancia en pulgadas aparece como una etiqueta flotante en el punto de impacto, posicionada en la dirección de desviación. La flecha roja de la brújula también se bloquea en el ángulo final para alinear la plantilla rápidamente.',
58
+ },
59
+ {
60
+ question: '¿Puedo desactivar la animación para obtener resultados más rápidos?',
61
+ answer: 'La animación dura aproximadamente dos segundos, tras los cuales el resultado final se muestra en el centro y la flecha de la brújula se bloquea. Actualmente no hay opción de salto, pero la demora está diseñada para igualar el ritmo de tirar dados físicos.',
62
+ },
63
+ ];
64
+
65
+ const howTo = [
66
+ {
67
+ name: 'Configurar Reglas',
68
+ text: 'Selecciona los sectores de la brújula, elige un dado de distancia y ajusta la probabilidad de impacto directo.',
69
+ },
70
+ {
71
+ name: 'Tirar o Arrastrar',
72
+ text: 'Haz clic en Tirar Desviación para simular la desviación, o arrastra la rueda de la brújula para ajustar la dirección manualmente.',
73
+ },
74
+ {
75
+ name: 'Leer el Resultado',
76
+ text: 'Revisa la pantalla central y la flecha vectorial para conocer la distancia, el ángulo y la dirección exactos de la desviación.',
77
+ },
78
+ {
79
+ name: 'Observar la Trayectoria',
80
+ text: 'Después de tirar, observa el proyectil animado viajar a través de la brújula. La estela discontinua muestra el camino de desviación y el punto de impacto muestra la distancia en pulgadas.',
81
+ },
82
+ {
83
+ name: 'Interpretar el Resultado',
84
+ text: 'Un pulso verde con "DIRECT HIT" significa desviación cero. Una explosión roja con una etiqueta de distancia significa que el disparo se desvió - coloca tu plantilla esa cantidad de pulgadas desde el objetivo en la dirección de la flecha.',
85
+ },
86
+ ];
87
+
88
+ export const content: ScatterSelectorLocaleContent = {
89
+ slug: 'selector-de-direccion-de-desviacion',
90
+ title: 'Selector de Dirección de Desviación: Brújula Táctil para Wargames de Miniaturas',
91
+ description: 'Determina desviaciones aleatorias, deriva del viento y direcciones de dispersión para wargames de miniaturas con una brújula táctil 3D.',
92
+ ui,
93
+ seo: [
94
+ { type: 'title', text: 'Brújula Interactiva de Desviación con Animación de Proyectil en Tiempo Real', level: 2 },
95
+ { type: 'paragraph', html: 'El Selector de Dirección de Desviación va más allá de la simple generación de números al renderizar una trayectoria animada del proyectil directamente sobre la brújula. Al hacer clic en Tirar Desviación, un proyectil brillante viaja desde el centro a lo largo del ángulo de desviación, dejando una estela discontinua y estallando en partículas en el punto de impacto.' },
96
+ { type: 'stats', items: [
97
+ { value: '2', label: 'Sistemas de Sectores', icon: 'mdi:compass-rose' },
98
+ { value: '4', label: 'Preajustes de Dados', icon: 'mdi:dice-d6' },
99
+ { value: '0-100%', label: 'Rango de Probabilidad de Impacto', icon: 'mdi:target' },
100
+ { value: '10', label: 'Historial de Tiradas Recientes', icon: 'mdi:history' },
101
+ ], columns: 4 },
102
+ { type: 'title', text: 'Cómo la Animación de Trayectoria Mejora la Toma de Decisiones en Wargames', level: 3 },
103
+ { type: 'paragraph', html: 'Las herramientas tradicionales muestran un ángulo y una distancia numéricos, obligando a los jugadores a visualizar mentalmente el desplazamiento en la mesa. La trayectoria animada cierra esta brecha dibujando la ruta de vuelo exacta desde el punto de mira hasta la zona de impacto de la desviación.' },
104
+ { type: 'diagnostic', variant: 'success', title: 'Impacto Directo', html: 'Cuando la tirada supera la probabilidad de impacto, el centro de la brújula estalla con anillos verdes pulsantes y una animación de texto "DIRECT HIT". El proyectil regresa al centro, confirmando un impacto perfecto sin desviación.' },
105
+ { type: 'diagnostic', variant: 'error', title: 'Desviación', html: 'En un resultado de desviación, el proyectil sigue una trayectoria discontinua hasta su punto de aterrizaje. Una explosión de partículas, un marcador brillante y la distancia en pulgadas (ej. <strong>5"</strong>) aparecen en el lugar del impacto.' },
106
+ { type: 'tip', title: 'Consejo: Usar el Modo de Deriva del Viento', html: 'Activa la Deriva del Viento para bloquear la dirección de desviación al ángulo de la brújula que ajustes manualmente. Simula viento predominante o un vector de desplazamiento fijo - ideal para cohetes no guiados, nubes de gas o teletransportaciones fallidas.' },
107
+ ],
108
+ faq,
109
+ bibliography,
110
+ howTo,
111
+ schemas: [
112
+ {
113
+ '@context': 'https://schema.org',
114
+ '@type': 'FAQPage',
115
+ 'mainEntity': faq.map((f) => ({
116
+ '@type': 'Question',
117
+ 'name': f.question,
118
+ 'acceptedAnswer': {
119
+ '@type': 'Answer',
120
+ 'text': f.answer,
121
+ },
122
+ })),
123
+ },
124
+ {
125
+ '@context': 'https://schema.org',
126
+ '@type': 'SoftwareApplication',
127
+ 'name': 'Selector de Dirección de Desviación',
128
+ 'operatingSystem': 'All',
129
+ 'applicationCategory': 'UtilitiesApplication',
130
+ 'browserRequirements': 'Requires HTML5. Requires JavaScript.',
131
+ },
132
+ {
133
+ '@context': 'https://schema.org',
134
+ '@type': 'HowTo',
135
+ 'name': 'Cómo usar el Selector de Dirección de Desviación',
136
+ 'step': howTo.map((h) => ({
137
+ '@type': 'HowToStep',
138
+ 'name': h.name,
139
+ 'text': h.text,
140
+ })),
141
+ },
142
+ ],
143
+ };