feat: crimson metronome lends ½ heart, repaid on a clean room clear
This commit is contained in:
1 parent
39d89fbc53
commit
f77b4fd402
5 files changed
+68
-25
No files matched your search
+1
-1
@@ -94,7 +94,7 @@ const ITEMS = {
|
||||
butchersoath: { name: "Butcher's Oath", desc: '+80% damage, but max HP set to 2', rarity: 'legendary', cap: 1, apply: (s, p) => { s.dmgMul *= 1.8; s.maxHp = Math.min(s.maxHp, 2); p.hp = Math.min(p.hp, s.maxHp); } },
|
||||
secondskin: { name: 'Second Skin', desc: 'Revive once per floor at ½ heart', rarity: 'legendary', cap: 1, apply: s => { s.secondSkin += 1; } },
|
||||
twinsidearm: { name: 'Twin Sidearm', desc: 'Bone Popper double-taps; specials burn 2× ammo', rarity: 'legendary', cap: 1, apply: s => { s.twinSidearm += 1; } },
|
||||
crimsonmetronome:{ name: 'Crimson Metronome', desc: '+60% fire rate; every 8th shot costs ½ heart', rarity: 'legendary', cap: 1, apply: s => { s.rateMul *= 1.6; s.crimsonMetronome += 1; } },
|
||||
crimsonmetronome:{ name: 'Crimson Metronome', desc: '+60% fire rate; every 8th shot lends ½ heart, repaid if you clear the room clean', rarity: 'legendary', cap: 1, apply: s => { s.rateMul *= 1.6; s.crimsonMetronome += 1; } },
|
||||
abattoirengine:{ name: 'Abattoir Engine', desc: 'Pressure rises 2× faster; score and luck ×1.5', rarity: 'legendary', cap: 1, apply: s => { s.abattoirEngine += 1; s.luck += 0.5; } },
|
||||
gorecrown: { name: 'Gore Crown', desc: 'Free nova on every kill, −25% damage', rarity: 'legendary', cap: 1, apply: s => { s.goreCrown += 1; s.dmgMul *= 0.75; } },
|
||||
thousandteeth: { name: 'Thousand Teeth', desc: '+6 shards that can crit, −40% base bullet damage', rarity: 'legendary', cap: 1, apply: s => { s.thousandTeeth += 1; s.dmgMul *= 0.6; } },
|
||||
|
||||
+9
-2
@@ -31,6 +31,7 @@ function initPlayer() {
|
||||
animT: 0, attackT: 0, actionT: 0, hitT: 0, deathT: 0,
|
||||
weapon: { id: 'bonepopper', ammo: Infinity },
|
||||
holstered: null, // a special weapon set aside while the pistol is out
|
||||
metronomeTmp: 0, // ½-hearts lent by Crimson Metronome, repaid on a clean clear
|
||||
level: 1, xp: 0,
|
||||
items: {}, // iid -> quality tier (1..3)
|
||||
perks: [], // perk ids drafted this run, in grant order
|
||||
@@ -155,10 +156,16 @@ function updatePlayer(dt) {
|
||||
p.choirCount = (p.choirCount || 0) + 1;
|
||||
if (p.choirCount >= 4) { p.choirCount = 0; fireWeapon(p, w); }
|
||||
}
|
||||
// Crimson Metronome: every 8th shot costs ½ heart
|
||||
// Crimson Metronome: every 8th shot lends ½ heart, repaid when the room clears clean
|
||||
if (st.crimsonMetronome > 0) {
|
||||
p.metronomeCount = (p.metronomeCount || 0) + 1;
|
||||
if (p.metronomeCount >= 8) { p.metronomeCount = 0; p.hp = Math.max(0.5, p.hp - 1); spawnText(p.x, p.y - 14, '-½', '#e2472f'); }
|
||||
if (p.metronomeCount >= 8) {
|
||||
p.metronomeCount = 0;
|
||||
const loss = Math.min(1, Math.max(0, p.hp - 0.5));
|
||||
p.hp = Math.max(0.5, p.hp - 1);
|
||||
p.metronomeTmp += loss; // on loan: restored by a clean room clear
|
||||
spawnText(p.x, p.y - 14, '-½', '#e2472f');
|
||||
}
|
||||
}
|
||||
p.recoil = Math.min(1, p.recoil + (w.behavior === 'slam' ? 1 : 0.45));
|
||||
p.muzzleT = 0.07;
|
||||
|
||||
@@ -88,6 +88,7 @@ function enterRoom(gx, gy) {
|
||||
G.roomLayerKey = '';
|
||||
G.roomDamaged = false;
|
||||
G.roomEnterT = G.time;
|
||||
if (G.player) G.player.metronomeTmp = 0; // fresh per-room Crimson-Metronome loan ledger
|
||||
|
||||
const room = G.rooms[roomKey(gx, gy)];
|
||||
G.cur = room;
|
||||
@@ -221,6 +222,13 @@ function recordRoomClear(room) {
|
||||
}
|
||||
// active items charge on room clears: +1 per combat room, +2 per boss
|
||||
const p = G.player;
|
||||
// Crimson Metronome: a ½-heart loan is repaid when the room clears clean
|
||||
if (!G.roomDamaged && p.metronomeTmp > 0) {
|
||||
const back = Math.min(p.metronomeTmp, p.stats.maxHp - p.hp);
|
||||
p.hp += back;
|
||||
p.metronomeTmp = 0;
|
||||
if (back > 0) spawnText(p.x, p.y - 26, 'LOAN REPAID +' + back, '#d98991');
|
||||
}
|
||||
if (p && p.active) {
|
||||
const a = ACTIVES[p.active.iid];
|
||||
if (a) {
|
||||
|
||||
Reference in new issue
Block a user