feat(feedback): report accepted combat effects
Release / release (push) Successful in 10m7s

This commit is contained in:
dmg committed 2026-09-21 14:48:24 -04:00
1 parent be8870502f
commit e16570cb35
30 files changed
+672 -27

No files matched your search

@@ -105,8 +105,12 @@ public final class SecondWind implements AbilityEffect {
if (!sessions.acknowledgeProgress(execution.input().session(), expected, persisted)) {
player.sendMessage("Second Wind was saved, but the session changed; no native healing was applied."); return;
}
double publish = Math.min(attribute.getValue(), Math.max(player.getHealth(), persisted.health().doubleValue()));
double nativeBefore = player.getHealth();
double publish = Math.min(attribute.getValue(), Math.max(nativeBefore, persisted.health().doubleValue()));
player.setHealth(publish);
double restored = publish - nativeBefore;
if (Double.isFinite(restored) && restored > 0) execution.report(AbilityReport.Type.HEALING,
player, BigDecimal.valueOf(restored).stripTrailingZeros());
} finally { execution.finish(); }
});
} catch (RuntimeException rejected) { execution.finish(); }