Commit Graph
8 Commits
Author SHA1 Message Date
tevans 7de21e290d fix: split bullet tax credit update into standalone call (v1.4.4)
Foundry v14 rejects actor.update() silently when one field in the payload
has a schema conflict. The combined update (credits + finances nested paths)
was being dropped entirely, so credits never changed.

Fix: two separate actor.update() calls
1. Credit deduction: update("system.details.credits") alone — critical
2. Finances tracking: update(finances paths) — non-critical, caught silently

Added console.log so GMs can confirm credit deductions in browser console:
  Zero Engine | Bullet Tax: Joe credits 500c -> 440c (-60c)
2026-06-02 22:40:17 +01:00
tevans 86df96132e fix: bullet tax doubled + full caliber catalog + fix undefined/undefined (v1.4.3)
Bullet tax rules (per user spec):
- Tax is now 2x base round cost on every shot (ammo cost + levy)
- e.g. 7mm standard = 10c/round -> 20c charged per round fired
- Applied immediately on ATTACK press, not deferred to REST
- Weapon locking still only on push + bane (unchanged)

Ammo catalog expanded (was missing 9 calibers -> 0 tax for those weapons):
- .44 (Revolver): 8/24/45c standard/AP/HE
- .454 (Heavy Pistol): 10/28/50c
- .50 (Heavy Pistol): 12/35/60c
- 3mm (Machine Pistol): 3/9/20c
- 7mm (SLA Carbine/LMG): 10/28/55c
- 8mm (Sniper Rifle): 14/40/75c
- 12g (Shotgun): 18/45/80c
- 40mm (Grenade/Launcher): 80/180/140c
- Rail (Rail Gun): 50/120/200c

SLA_WEAPON_DEFAULT_CALIBER expanded to cover all weapon types

Chat display: removed undefined/undefined (Remaining X/Y) - weapons are
always assumed loaded; display now shows Rounds fired + tax cost only

Tax notification updated to show 2x calculation clearly
2026-06-02 22:32:11 +01:00
tevans 4e3554c28b fix: readability — solid dark backgrounds on all chat cards (v1.4.2)
Root cause: all chat card containers used rgba() with 0.2-0.4 opacity,
which becomes nearly transparent on Foundry v14 parchment chat bg.
Light text (white, cyan, yellow, green) was invisible on the result.

CSS fixes (solid dark backgrounds replacing transparent rgba):
- .panic-result: rgba(139,0,0,0.2) -> #1c0808 + color: #e0e0e0
- .panic-success: rgba(0,128,0,0.2) -> #081c08 + green text toned to #55ee55
- .panic-effect: rgba(0,0,0,0.4) -> #111111 + color: #e0e0e0
- .critical-injury: rgba(220,20,60,0.2) -> #1c080d + color: #e0e0e0
- .crit-effects/.crit-healing/.crit-recovery: rgba(0,0,0,0.3) -> #111111
- .time-limit: rgba(255,170,0,0.2) -> #1a1200

New CSS classes added (were missing entirely):
- .instability-result with dark bg, border, and sub-element rules
- .instability-no-effect, .instability-effect-text, .instability-auto-note
- .panic-auto (auto-applied row)
- .drug-gm-alert, .weapon-reload-chat

JS inline style fixes:
- Rest card: rgba(0,60,30,0.3) -> #0a1a0e (solid)
- Ammo empty card: rgba(80,20,0,0.3) -> #1a0800 (solid)
- Instability effect text: color:#333 (dark on dark) -> CSS class #d8d8d8
- Instability auto-note: color:#ffcc44 inline -> CSS class
2026-06-02 22:05:05 +01:00
tevans 76e086ca6c feat: Body Blocker armor + drug credit deduction on use (v1.4.1)
- Add Body Blocker armor (AR 1, Dice 1, 120c) with custom SVG icon
  Concealable civilian vest, sits between Street Clothes and Downtown Jacket
- _activateDrug now automatically deducts drug cost from actor credits
  Shows notification: drug name, cost charged, old and new credit total
  Credits cannot go below 0
- Set costs on 7 drugs that were missing them (cost was 0):
  Painkillers 30c, Stimulant 40c, Sedative 35c, Redline 110c,
  Calm-Line 65c, Rush 85c, UV 200c
- Rebuild: sla-armors (18), sla-drugs (16)
2026-06-02 21:42:29 +01:00
tevans e155a2dd1b fix: correct DSN dice skins + UI tweaks (v1.3.9)
- DSN: register ze-stress-dice system separately so normal/stress d6 presets dont overwrite each other
- DSN: use term.options.appearance.system to force correct preset on every roll - bypasses user saved DSN system preference
- Remove v1.3.8 flag-patching ready hook (no longer needed)
- UI: dice icon on attribute header enlarged (13px to 20px) with glow
- UI: attr-btn smaller (24px to 16px), skill +/- smaller (20px to 14px)
- UI: clicking attribute name, skill name, or weapon name now triggers roll
2026-06-02 21:12:02 +01:00
tevans 6edce3ed77 fix: force zero-engine dice system for all users on load (v1.3.8) 2026-06-02 19:46:45 +00:00
tevans 225255ec13 fix: or Handlebars helper works as both block and inline (v1.3.7) 2026-06-02 20:29:50 +01:00
tevans 2ebd5803fc Initial commit — full system source + zero-engine-state.md reference 2026-06-01 23:19:46 +01:00