Make Bone Knit a chance-based room heal

The perk now grants a 3% roll per stack to mend half a heart on combat
room clears instead of a guaranteed heal. Worm Gut's guaranteed room
heal is unchanged; the new roomHealChance stat is separate.
This commit is contained in:
MeatSlicer Developer committed 2026-07-29 20:50:08 +10:00
1 parent 956f1161fb
commit 8cf9932999
4 files changed
+30 -2

No files matched your search

+7
View File
@@ -180,6 +180,13 @@ function recordRoomClear(room) {
healPlayer(G.player.stats.roomHeal);
if (G.player.hp > before) spawnText(G.player.x, G.player.y - 18, 'ROOM KNIT +' + (G.player.hp - before), '#d98991');
}
// Bone Knit perk: small chance of a half-heart mend on each combat clear
if (room.type === 'combat' && G.player.stats.roomHealChance > 0 && G.player.hp < G.player.stats.maxHp &&
chance(Math.min(0.9, G.player.stats.roomHealChance))) {
const before = G.player.hp;
healPlayer(1);
if (G.player.hp > before) spawnText(G.player.x, G.player.y - 30, 'BONE KNIT +' + (G.player.hp - before), '#d98991');
}
}
function nextFloor() {