diff --git a/packs/sla-drugs/000015.ldb b/packs/sla-drugs/000015.ldb new file mode 100644 index 0000000..5c18aeb Binary files /dev/null and b/packs/sla-drugs/000015.ldb differ diff --git a/packs/sla-drugs/000016.log b/packs/sla-drugs/000016.log new file mode 100644 index 0000000..3c83339 Binary files /dev/null and b/packs/sla-drugs/000016.log differ diff --git a/packs/sla-drugs/CURRENT b/packs/sla-drugs/CURRENT index ef20c6d..23b73d9 100644 --- a/packs/sla-drugs/CURRENT +++ b/packs/sla-drugs/CURRENT @@ -1 +1 @@ -MANIFEST-000012 +MANIFEST-000014 diff --git a/packs/sla-drugs/LOG b/packs/sla-drugs/LOG index 148aa49..072fb3d 100644 --- a/packs/sla-drugs/LOG +++ b/packs/sla-drugs/LOG @@ -1,9 +1,13 @@ -2026/06/10-19:00:40.626229 ef3d6afdefa0 Recovering log #11 -2026/06/10-19:00:40.632846 ef3d6afdefa0 Delete type=0 #7 -2026/06/10-19:00:40.633093 ef3d6afdefa0 Delete type=0 #4 -2026/06/10-19:00:40.633425 ef3d6afdefa0 Delete type=0 #11 -2026/06/10-19:00:40.633539 ef3d6afdefa0 Delete type=3 #8 -2026/06/10-19:00:40.633698 ef3d6afdefa0 Delete type=3 #6 -2026/06/10-19:00:40.633835 ef3d6afdefa0 Delete type=3 #10 -2026/06/10-19:00:40.633940 ef3d6afdefa0 Delete type=3 #2 -2026/06/10-19:00:40.634055 ef3d6afdefa0 Delete type=0 #9 +2026/06/10-21:19:08.220245 eb1634f9efa0 Recovering log #13 +2026/06/10-21:19:08.220734 eb1634f9efa0 Level-0 table #15: started +2026/06/10-21:19:08.222419 eb1634f9efa0 Level-0 table #15: 2401 bytes OK +2026/06/10-21:19:08.224826 eb1634f9efa0 Delete type=0 #13 +2026/06/10-21:19:08.225002 eb1634f9efa0 Delete type=0 #7 +2026/06/10-21:19:08.225252 eb1634f9efa0 Delete type=0 #4 +2026/06/10-21:19:08.225418 eb1634f9efa0 Delete type=0 #11 +2026/06/10-21:19:08.225568 eb1634f9efa0 Delete type=3 #12 +2026/06/10-21:19:08.225685 eb1634f9efa0 Delete type=3 #8 +2026/06/10-21:19:08.225823 eb1634f9efa0 Delete type=3 #6 +2026/06/10-21:19:08.225963 eb1634f9efa0 Delete type=3 #10 +2026/06/10-21:19:08.226081 eb1634f9efa0 Delete type=3 #2 +2026/06/10-21:19:08.226189 eb1634f9efa0 Delete type=0 #9 diff --git a/packs/sla-drugs/LOG.old b/packs/sla-drugs/LOG.old index 5068fd9..148aa49 100644 --- a/packs/sla-drugs/LOG.old +++ b/packs/sla-drugs/LOG.old @@ -1,7 +1,9 @@ -2026/06/10-18:57:57.727392 f90bb1f9efa0 Recovering log #9 -2026/06/10-18:57:57.730975 f90bb1f9efa0 Delete type=0 #7 -2026/06/10-18:57:57.731180 f90bb1f9efa0 Delete type=0 #4 -2026/06/10-18:57:57.731359 f90bb1f9efa0 Delete type=3 #8 -2026/06/10-18:57:57.731591 f90bb1f9efa0 Delete type=3 #6 -2026/06/10-18:57:57.731898 f90bb1f9efa0 Delete type=3 #2 -2026/06/10-18:57:57.732147 f90bb1f9efa0 Delete type=0 #9 +2026/06/10-19:00:40.626229 ef3d6afdefa0 Recovering log #11 +2026/06/10-19:00:40.632846 ef3d6afdefa0 Delete type=0 #7 +2026/06/10-19:00:40.633093 ef3d6afdefa0 Delete type=0 #4 +2026/06/10-19:00:40.633425 ef3d6afdefa0 Delete type=0 #11 +2026/06/10-19:00:40.633539 ef3d6afdefa0 Delete type=3 #8 +2026/06/10-19:00:40.633698 ef3d6afdefa0 Delete type=3 #6 +2026/06/10-19:00:40.633835 ef3d6afdefa0 Delete type=3 #10 +2026/06/10-19:00:40.633940 ef3d6afdefa0 Delete type=3 #2 +2026/06/10-19:00:40.634055 ef3d6afdefa0 Delete type=0 #9 diff --git a/packs/sla-drugs/MANIFEST-000014 b/packs/sla-drugs/MANIFEST-000014 new file mode 100644 index 0000000..249bdde Binary files /dev/null and b/packs/sla-drugs/MANIFEST-000014 differ diff --git a/system.json b/system.json index 07c334a..19e956d 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "zero-engine", "title": "Zero Engine (SLA Industries)", "description": "A basic game system for SLA Industries using the Zero Engine rules.", - "version": "1.7.4", + "version": "1.7.5", "compatibility": { "minimum": 13, "verified": "14.359" diff --git a/zero-engine.mjs b/zero-engine.mjs index fafba5e..027a676 100644 --- a/zero-engine.mjs +++ b/zero-engine.mjs @@ -870,8 +870,11 @@ class ZeroEngineActorSheet extends foundry.appv1.sheets.ActorSheet { const panicReduction = Number(isWithdrawal ? s.wdPanicReduction : s.panicReduction) || 0; const injuryIgnore = Number(isWithdrawal ? s.wdInjuryPenaltyIgnore : s.injuryPenaltyIgnore) || 0; + const healthHeal = (!isWithdrawal) ? (Number(s.healthHeal) || 0) : 0; + const parts = []; - if (health !== 0) parts.push(`Health ${health > 0 ? "+" : ""}${health}`); + if (healthHeal > 0) parts.push(`Heals ${healthHeal} HP`); + if (health !== 0) parts.push(`Max Health ${health > 0 ? "+" : ""}${health}`); if (resolve !== 0) parts.push(`Resolve ${resolve > 0 ? "+" : ""}${resolve}`); if (stat !== 0) parts.push(`Physical ${stat > 0 ? "+" : ""}${stat}`); if (skillAll !== 0) parts.push(`All Skills ${skillAll > 0 ? "+" : ""}${skillAll}`); @@ -958,6 +961,22 @@ class ZeroEngineActorSheet extends foundry.appv1.sheets.ActorSheet { } } + // ── Instant HP heal (healthHeal): restore current HP, clamped at max ──────── + const healthHeal = Math.max(0, Number(item.system?.healthHeal) || 0); + if (healthHeal > 0 && this.actor) { + const rawHp = this.actor.system?.derivedStats?.health; + const currentHp = Number((typeof rawHp === "object" ? rawHp?.value : rawHp) ?? 0); + const hpMax = Number(this.actor.system?.derivedStats?.health?.max ?? 0); + if (hpMax > 0) { + const newHp = Math.min(hpMax, currentHp + healthHeal); + const actual = newHp - currentHp; + if (actual > 0) { + await this.actor.update({ "system.derivedStats.health.value": newHp }); + ui.notifications.info(`${item.name}: healed ${actual} HP (${currentHp} → ${newHp} / ${hpMax})`); + } + } + } + await this._notifyDrugState(item, "is ACTIVE", String(item.system?.activeDuration || "")); } @@ -3960,7 +3979,7 @@ Hooks.once('ready', function() { if (data.withdrawalDuration === undefined || data.withdrawalDuration === null) updates["system.withdrawalDuration"] = ""; const numericPaths = [ - "healthMod", "resolveMod", "statPhysicalMod", "skillAllMod", "panicReduction", + "healthMod", "healthHeal", "resolveMod", "statPhysicalMod", "skillAllMod", "panicReduction", "injuryPenaltyIgnore", "stressRecoveryBonus", "postUseStaminaDamage", "wdHealthMod", "wdResolveMod", "wdStatPhysicalMod", "wdSkillAllMod", "wdPanicReduction", "wdInjuryPenaltyIgnore", "wdStressRecoveryBonus", "wdPostUseStaminaDamage"