@vibemancer/core 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/rules.ts CHANGED
@@ -61,6 +61,11 @@ export const RULES = {
61
61
  MISSILE_MIN_CAST_TIME: 0.1, // seconds
62
62
  MISSILE_BASE_RADIUS: 2, // base hitbox radius in units
63
63
  MISSILE_DAMAGE_RADIUS_SCALE: 0.1, // additional radius per damage point
64
+ // The real hitbox is THREE TIMES the base+scale figure. This lived as a bare `* 3` inside
65
+ // calculateMissileRadius, outside RULES, so no document could interpolate it — and five
66
+ // of them consequently stated the unmultiplied formula, understating the hit window by
67
+ // 43-57%. It is a rule, so it lives with the rules.
68
+ MISSILE_RADIUS_MULTIPLIER: 3,
64
69
  MISSILE_BASE_CAST: 0.1,
65
70
  MISSILE_DAMAGE_SCALE: 0.226,
66
71
  MISSILE_DAMAGE_POWER: 2 / 3, // sublinear: DPS always increases with damage
@@ -133,7 +138,7 @@ export const MISSILE_DAMAGE_RADIUS_SCALE = RULES.MISSILE_DAMAGE_RADIUS_SCALE;
133
138
  */
134
139
  export function calculateMissileRadius(damage: number): number
135
140
  {
136
- return (RULES.MISSILE_BASE_RADIUS + damage * RULES.MISSILE_DAMAGE_RADIUS_SCALE) * 3;
141
+ return (RULES.MISSILE_BASE_RADIUS + damage * RULES.MISSILE_DAMAGE_RADIUS_SCALE) * RULES.MISSILE_RADIUS_MULTIPLIER;
137
142
  }
138
143
 
139
144
  // === MISSILE CAST TIME FORMULA ===