@vibemancer/core 1.0.6 → 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/LICENSE +21 -0
- package/dist/{chunk-M6E6IP7L.js → chunk-MUU3ELH5.js} +20 -4
- package/dist/chunk-MUU3ELH5.js.map +1 -0
- package/dist/{index-browser-q0eR90H1.d.ts → index-browser-ClmR9SkR.d.ts} +40 -2
- package/dist/index-browser.d.ts +1 -1
- package/dist/index-browser.js +5 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/manual-match.ts +3 -1
- package/src/engine/simulation.ts +4 -1
- package/src/engine-version.ts +14 -1
- package/src/hooks/threat-analysis.ts +396 -389
- package/src/index-browser.ts +1 -0
- package/src/index.ts +1 -0
- package/src/replay-compat.ts +35 -0
- package/src/rules.ts +6 -1
- package/dist/chunk-M6E6IP7L.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Low Entry
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -51,6 +51,11 @@ var RULES = {
|
|
|
51
51
|
// base hitbox radius in units
|
|
52
52
|
MISSILE_DAMAGE_RADIUS_SCALE: 0.1,
|
|
53
53
|
// additional radius per damage point
|
|
54
|
+
// The real hitbox is THREE TIMES the base+scale figure. This lived as a bare `* 3` inside
|
|
55
|
+
// calculateMissileRadius, outside RULES, so no document could interpolate it — and five
|
|
56
|
+
// of them consequently stated the unmultiplied formula, understating the hit window by
|
|
57
|
+
// 43-57%. It is a rule, so it lives with the rules.
|
|
58
|
+
MISSILE_RADIUS_MULTIPLIER: 3,
|
|
54
59
|
MISSILE_BASE_CAST: 0.1,
|
|
55
60
|
MISSILE_DAMAGE_SCALE: 0.226,
|
|
56
61
|
MISSILE_DAMAGE_POWER: 2 / 3,
|
|
@@ -95,7 +100,7 @@ var MISSILE_MIN_CAST_TIME = RULES.MISSILE_MIN_CAST_TIME;
|
|
|
95
100
|
var MISSILE_BASE_RADIUS = RULES.MISSILE_BASE_RADIUS;
|
|
96
101
|
var MISSILE_DAMAGE_RADIUS_SCALE = RULES.MISSILE_DAMAGE_RADIUS_SCALE;
|
|
97
102
|
function calculateMissileRadius(damage) {
|
|
98
|
-
return (RULES.MISSILE_BASE_RADIUS + damage * RULES.MISSILE_DAMAGE_RADIUS_SCALE) *
|
|
103
|
+
return (RULES.MISSILE_BASE_RADIUS + damage * RULES.MISSILE_DAMAGE_RADIUS_SCALE) * RULES.MISSILE_RADIUS_MULTIPLIER;
|
|
99
104
|
}
|
|
100
105
|
var MISSILE_BASE_CAST = RULES.MISSILE_BASE_CAST;
|
|
101
106
|
var MISSILE_DAMAGE_SCALE = RULES.MISSILE_DAMAGE_SCALE;
|
|
@@ -208,7 +213,16 @@ function currentRuleset() {
|
|
|
208
213
|
}
|
|
209
214
|
|
|
210
215
|
// src/engine-version.ts
|
|
211
|
-
var ENGINE_VERSION =
|
|
216
|
+
var ENGINE_VERSION = 3523070221336433;
|
|
217
|
+
var EQUIVALENT_ENGINE_VERSIONS = [1688330189011034];
|
|
218
|
+
|
|
219
|
+
// src/replay-compat.ts
|
|
220
|
+
function canReplayMatch(matchEngineVersion) {
|
|
221
|
+
if (typeof matchEngineVersion !== "number") return false;
|
|
222
|
+
if (!Number.isSafeInteger(matchEngineVersion)) return false;
|
|
223
|
+
if (matchEngineVersion === ENGINE_VERSION) return true;
|
|
224
|
+
return EQUIVALENT_ENGINE_VERSIONS.includes(matchEngineVersion);
|
|
225
|
+
}
|
|
212
226
|
|
|
213
227
|
// src/engine/hooks-runtime.ts
|
|
214
228
|
var _g = globalThis;
|
|
@@ -1914,7 +1928,7 @@ function analyzeThreats(myPos, projectiles, myProjectiles, ticksUntilReady) {
|
|
|
1914
1928
|
return threats;
|
|
1915
1929
|
}
|
|
1916
1930
|
function analyzeOneThreat(targetPos, projectile, ticksUntilReady) {
|
|
1917
|
-
const missileRadius =
|
|
1931
|
+
const missileRadius = calculateMissileRadius(projectile.damage);
|
|
1918
1932
|
const collisionDist = COLLISION_RADIUS + missileRadius;
|
|
1919
1933
|
const dodgeCollisionDist = collisionDist + projectile.speed * 0.5;
|
|
1920
1934
|
const { willHit, ticksToImpact } = simulateMissileToTarget(
|
|
@@ -10518,6 +10532,8 @@ export {
|
|
|
10518
10532
|
resetRuleset,
|
|
10519
10533
|
currentRuleset,
|
|
10520
10534
|
ENGINE_VERSION,
|
|
10535
|
+
EQUIVALENT_ENGINE_VERSIONS,
|
|
10536
|
+
canReplayMatch,
|
|
10521
10537
|
validateHookCall,
|
|
10522
10538
|
runWithHooks,
|
|
10523
10539
|
runWizardWithContext,
|
|
@@ -10682,4 +10698,4 @@ export {
|
|
|
10682
10698
|
diagnoseTrace,
|
|
10683
10699
|
formatDiagnosis
|
|
10684
10700
|
};
|
|
10685
|
-
//# sourceMappingURL=chunk-
|
|
10701
|
+
//# sourceMappingURL=chunk-MUU3ELH5.js.map
|