Commit Graph

13 Commits

Author SHA1 Message Date
e511bff882 Add weapon images, full rule scraping, and expanded quick reference
- scripts/generate-weapon-images.js: AI image generation for weapon cards
  supporting HuggingFace FLUX.1-schnell, OpenAI DALL-E 3, and Gemini Imagen;
  images served from public/weapon-images/ via new static route in server.js
- public/cards.html: load manifest.json and show AI art on weapon cards
- scripts/scrape-rules-from-pdfs.py: PyMuPDF scraper extracting full rule
  text from all five rulebook PDFs with bold-span heading detection
- scripts/tag-and-dedup-rules.js: standalone dedup helper (JS-side grouping)
- database/routes/rulesRoutes.js: remove content truncation in search/random,
  add admin dedup endpoint (JS-side, fast), fix RulesTab to fetch full content
- src/components/RulesTab.jsx: fetch full rule content on modal open
- public/print.html: expanded quick reference with pre-gen character stat
  blocks (Sepheran + Lucian), Astartes traits sheet with correct derived SBs
  and TBs, full Critical Hit Tables for all 4 locations × 4 damage types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 22:50:50 +01:00
83a1aeaebe Refine card layout: smaller art box, bigger stats text, footer bar
- Art box reduced from 32mm to 26mm height, icon enlarged to 22pt
- Stats font increased from 6pt to 7pt with more line spacing
- Replaced floating source pip with proper footer bar showing
  renown requirement (left) and source book (right)
- Footer bar colour-coded by weapon category to match title bar

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 21:22:32 +01:00
373b7f5333 Add printable weapon card sheets at /cards.html
Poker-card sized (63×88mm) cards matching the physical Deathwatch card format:
- Req cost badge top-left
- Title bar with weapon name
- Dark art box with category icon and class label
- Type line (Weapon – Melee, Weapon – Ranged, Equipment, etc.)
- Stats block (Dmg, Pen, Range, RoF, Clip, Rld, Special, Renown)
- Source abbreviation bottom-right

9 cards per A4 sheet, cut-ready.
Filter by category (Melee/Ranged/Grenade/Armour/Other).
Data loaded live from /api/weapons.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 21:08:03 +01:00
f94095b22f Add printable quick reference page at /print.html
5 printable sheets for the Deathwatch RPG:
- Sheet 1: Core Mechanics (tests, DoS/DoF, damage formula, hit locations)
- Sheet 2: Combat Actions (half/full actions, ranged/melee modifiers)
- Sheet 3: Weapons (melee, ranged, grenades - loaded live from /api/weapons)
- Sheet 4: Squad Mode & Cohesion rules
- Sheet 5: Weapon Special Qualities (Tearing, Power Field, Blast, etc.)

Print-optimised CSS with page-break-after per sheet.
Weapons table fetches live from the API for up-to-date data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 20:58:13 +01:00
7d41ec8205 Fix public/index.html template - remove hardcoded script tags
The template had a stale hardcoded <script> tag from a previous build
output, causing react-scripts to inject a second script reference on
every new build. Restored to proper CRA template with %PUBLIC_URL%
placeholders.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 20:09:50 +01:00
40fdd113e8 Add missing items to shop: Heavy Bolter, Crozius Arcanum, Servo-arm, Mechadendrite, Rosarius
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 18:43:00 +01:00
b6135640e1 Refactor code structure for improved readability and maintainability 2025-08-20 15:29:22 +02:00
caf8a03553 feat: Add scripts for upserting and validating bestiary data
- Implemented `upsert-allewis-from-5001.js` to fetch and update Allewis data from API.
- Created `upsert-missing-movement-from-5001.js` to fill missing movement and wounds data from API.
- Developed `upsert-missing-movement-from-pdfs.js` to extract movement and wounds from PDF text.
- Added `upsert-missing-profiles-from-pdfs.js` to fill missing profiles from PDF data.
- Introduced `upsert-missing-wounds-from-pdfs.js` to update wounds data from PDF sources.
- Created `validate-bestiary.js` to validate the structure of the bestiary JSON.
- Updated `BestiaryTab.jsx` component to display bestiary data with improved structure and search functionality.
- Added tests for `BestiaryTab` to ensure proper rendering and functionality.
2025-08-17 16:21:00 +02:00
dde3abda55 feat: Add validation and normalization utilities for player records
- Implemented `validatePlayer` and `normalizeTabInfo` functions in `database/validate.js` for player data validation and normalization.
- Added error handling for required fields and enforced data types and constraints.
- Introduced standardization for characteristics and skills.

feat: Create script for extracting rules from PDF files

- Developed `extract-rules.js` to extract text from PDF rulebooks and categorize rules.
- Integrated `pdftotext` for PDF processing and created a searchable rules database.
- Implemented rule categorization and indexing for efficient searching.

feat: Implement RulesTab component for rule searching

- Created `RulesTab.jsx` for searching and displaying rules with filtering options.
- Added recent searches and quick reference buttons for user convenience.
- Integrated API calls for fetching rules and displaying results dynamically.

feat: Add test script for Rules API

- Created `test-rules.js` to test the functionality of the Rules API endpoints.
- Included tests for search and stats endpoints to ensure proper response handling.
2025-08-16 12:15:32 +02:00
73e44ffcdb Add comprehensive weapons dataset and scraper for 40k RPG Tools
- Implemented a comprehensive weapons dataset in `comprehensive-weapons.js` with detailed weapon stats, categories, and requirements.
- Created a new scraper script `scrape-40k-tools.js` to fetch and parse weapon data from the 40k RPG Tools website, including categorization and conversion to game format.
- Added functionality to write the scraped data to JSON files for further use in the application.
- Included error handling and logging for better debugging and user feedback during the scraping process.
2025-08-15 23:36:06 +02:00
cd10ab0718 fix1 2025-08-15 16:23:34 +02:00
90f2a94974 new version 2025-08-15 10:35:27 +02:00
Alex Polo
125d4e2f8b Initial commit 2025-08-14 23:55:55 +02:00