From 08867a378c06e7b9c382b751f5780bbbce406bcb Mon Sep 17 00:00:00 2001 From: Martin Sukany Date: Tue, 24 Mar 2026 18:37:18 +0100 Subject: [PATCH] =?UTF-8?q?Weapons/armor:=20rename=20fields=20to=20match?= =?UTF-8?q?=20hern=C3=AD=20karta=20columns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Weapons: :bonus → :modifier, Armor: :rating → :level. Character data verified against herní karta — all matches. Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 2 +- alien-rpg.el | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 5f04cf0..39abf24 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,7 +17,7 @@ Accessible tabletop RPG gaming engine for the Alien RPG space station USCSS CETO - **Corridors as rooms**: Long corridors are modeled as rooms (e.g., `F-chodba` spans entire deck F from centrální šachta to cely). Side rooms connect to the corridor. - **No průlez rooms**: Průlezy (hatches between decks) are NOT separate rooms. They are direct connections between the rooms they physically sit in. Cross-deck connections noted in room `:desc`. - **Dice calculator**: `SPC G r` — black base dice (attribute + skill) + yellow stress dice. Player rolls physical dice. -- **Weapons/Armor**: Structured plists — weapons: `(:name :bonus :damage :range :ammo :weight)`, armor: `(:name :rating :weight)`. +- **Weapons/Armor**: Structured plists — weapons: `(:name :modifier :damage :range :ammo :weight)`, armor: `(:name :level :weight)`. - **State**: Health, stress, resolve, story-points, injuries, conditions, weapons, armor, gear, tiny-items, notes. Auto-saves via `alien-rpg--autosave`. No buddy/rival/xp (not used in this campaign). - **Character**: prof. Héctor Navarre, biochemický inženýr, 74 let. Attributes and skills editable via `SPC G e`. - **Output**: All commands output to `*Alien RPG*` buffer via `switch-to-buffer` (not `pop-to-buffer` — avoids Doom popup behavior that confuses screen readers). diff --git a/alien-rpg.el b/alien-rpg.el index 834104f..42eb8f7 100644 --- a/alien-rpg.el +++ b/alien-rpg.el @@ -1087,9 +1087,9 @@ Průlezy G<->H: G3<->H3, G4<->H4, G7<->H7, G8<->H8, G9<->H9 (progn (insert "Zbraně:\n") (dolist (w weapons) - (insert (format " %s +%s/DMG%s/%s/%sks/W%s\n" + (insert (format " %s mod%+d/DMG%d/%s/%dks/W%d\n" (plist-get w :name) - (or (plist-get w :bonus) 0) + (or (plist-get w :modifier) 0) (or (plist-get w :damage) 0) (or (plist-get w :range) "?") (or (plist-get w :ammo) 0) @@ -1098,9 +1098,9 @@ Průlezy G<->H: G3<->H3, G4<->H4, G7<->H7, G8<->H8, G9<->H9 ;; Brneni (insert (format "Brnění: %s\n" (if armor - (format "%s (%s/W%s)" + (format "%s (L%d/W%d)" (or (plist-get armor :name) "?") - (or (plist-get armor :rating) 0) + (or (plist-get armor :level) 0) (or (plist-get armor :weight) 0)) "--"))) ;; Zraneni a stavy @@ -1279,28 +1279,28 @@ Průlezy G<->H: G3<->H3, G4<->H4, G7<->H7, G8<->H8, G9<->H9 "Přidej zbraň se všemi parametry." (interactive) (let* ((name (read-string "Zbraň: ")) - (bonus (read-number "Bonus: " 0)) + (modifier (read-number "Modifier: " 0)) (damage (read-number "Damage: " 1)) (range (completing-read "Range: " '("Engaged" "Short" "Medium" "Long" "Extreme") nil t)) (ammo (read-number "Ammo (0=neomezeno): " 0)) (weight (read-number "Weight: " 1)) - (weapon (list :name name :bonus bonus :damage damage + (weapon (list :name name :modifier modifier :damage damage :range range :ammo ammo :weight weight))) (setq alien-rpg-state (plist-put alien-rpg-state :weapons (append (plist-get alien-rpg-state :weapons) (list weapon)))) (alien-rpg--autosave) - (message "Zbraň: %s +%d/DMG%d/%s" name bonus damage range))) + (message "Zbraň: %s mod%+d/DMG%d/%s" name modifier damage range))) (defun alien-rpg-add-armor () "Nastav brnění." (interactive) (let* ((name (read-string "Brnění: ")) - (rating (read-number "Rating: " 1)) + (level (read-number "Level: " 1)) (weight (read-number "Weight: " 1)) - (armor (list :name name :rating rating :weight weight))) + (armor (list :name name :level level :weight weight))) (setq alien-rpg-state (plist-put alien-rpg-state :armor armor)) (alien-rpg--autosave) - (message "Brnění: %s (%d/W%d)" name rating weight))) + (message "Brnění: %s (L%d/W%d)" name level weight))) (defun alien-rpg-add-condition () "Přidej stav (Fatigued, Radiation, ...)."