Normalize ammo economy: per-weapon refill, stream drain, behavior fixes
- Every special weapon gets an explicit 'refill' (units per ammo pickup,
tuned so one pickup funds ~10 kills) replacing the ammoRefillFraction
log2 heuristic and ammoWeight overrides
- Bile Blunderbuss + The Cauterizer join Red Right Hand as time-denominated
stream weapons ('drain' per second) instead of per-shot cost
- Sawblades ricochet through enemies (bounce fix), traps catch 3 victims,
lobbed projectiles arc overhead and always trigger at the target point
(Flesh Masher / Trap Queen / Swarm Jar payloads now actually deploy)
- Boss rooms stock one ammo on entry and drop one guaranteed on death
- Cauterizer burn trimmed (2.2s x2 -> 1.5s x0.8), bile acid pools trimmed
(3.5s x1.5 -> 2.5s x0.8), Marrow Draught now covers stream drain
- New tools/ammo_sim.js calibrates every weapon into the 8-13 kills/refill
band (all 15 pass); smoke test guards the ammo structure
- v0.3.0, cache bump v=44
This commit is contained in:
1 parent
7d33e36c1e
commit
d9eae34df4
18 files changed
+380
-101
No files matched your search
@@ -111,11 +111,26 @@ function updatePlayer(dt) {
|
||||
if (w.behavior === 'saw') {
|
||||
if (Input.mdown && p.weapon.ammo > 0) {
|
||||
sawTick(p, w, p.weapon, dt);
|
||||
if (!(p.marrowDraughtT > 0)) p.weapon.ammo -= dt * (w.drain || 18) / st.ammoEff;
|
||||
p.muzzleT = 0.04; p.recoil = 0.18 + Math.sin(G.time * 45) * 0.05;
|
||||
if (p.attackT <= 0) p.actionT = 0;
|
||||
p.attackT = 0.2;
|
||||
}
|
||||
else p.fireT = 0;
|
||||
} else if (w.drain) {
|
||||
// cone / flame streams: projectiles are free, ammo is time-denominated
|
||||
if (Input.mdown && p.weapon.ammo > 0 && !(p.panicRoomT > 0)) {
|
||||
if (p.fireT <= 0) {
|
||||
fireWeapon(p, w);
|
||||
p.recoil = Math.min(1, p.recoil + 0.45);
|
||||
p.muzzleT = 0.07;
|
||||
p.attackT = 0.4; p.actionT = 0;
|
||||
p.fireT = rate;
|
||||
Sfx.shoot(w);
|
||||
}
|
||||
if (!(p.marrowDraughtT > 0)) p.weapon.ammo -= dt * w.drain / st.ammoEff;
|
||||
}
|
||||
else p.fireT = 0;
|
||||
} else if (w.behavior === 'beam') {
|
||||
if (Input.mdown && p.weapon.ammo > 0) {
|
||||
p.charge = Math.min(p.charge + dt * effectiveRate * Math.sqrt(st.shotSpeedMul), w.chargeTime);
|
||||
|
||||
Reference in new issue
Block a user