BlueGit

timfa questward

Merge branch 'feature/ranged-dim-stamp'

timfa Tim Falken · pushed by timfa

Authored 2026-09-07 · 2 months ago

Hash
2bfc664294d8fbde9827a715a8542f0654fd44dd
2 files changed +14 −3
server/src/combat/service.js +12 −2
@@ -1906,7 +1906,11 @@ export function resolveRangedShot (world, attackerId, targetId, profile, now = D
1906 1906 ? { ...profile, attackType: tipElement }
1907 1907 : profile;
1908 1908
1909 const snapshot = { tileX: targetPos.tileX, tileY: targetPos.tileY };
1909 const snapshot = {
1910 tileX: targetPos.tileX,
1911 tileY: targetPos.tileY,
1912 dimensionId: normalizeDimensionId(from.dimensionId ?? targetPos.dimensionId ?? OVERWORLD_ID)
1913 };
1910 1914 const target = resolveCombatTarget(world, targetId);
1911 1915 if (!target)
1912 1916 { return events; }
@@ -2310,7 +2314,13 @@ function applyLocalMeleeHit (
2310 2314 const resolved = resolvePhysicalAttack({
2311 2315 hitSkillLevel: effectiveHitSkillInDarkness(
2312 2316 attackerLevels.hitLevel,
2313 tileLightAt(world, to.tileX, to.tileY)
2317 tileLightAt(
2318 world,
2319 to.tileX,
2320 to.tileY,
2321 now,
2322 normalizeDimensionId(to.dimensionId ?? OVERWORLD_ID)
2323 )
2314 2324 ),
2315 2325 agilitySkillLevel: agilityLevel,
2316 2326 damageSkillLevel: attackerLevels.damageLevel,
@@ -1906,7 +1906,11 @@ export function resolveRangedShot (world, attackerId, targetId, profile, now = D
1906 ? { ...profile, attackType: tipElement }
1906 ? { ...profile, attackType: tipElement }
1907 : profile;
1907 : profile;
1908
1908
1909 const snapshot = { tileX: targetPos.tileX, tileY: targetPos.tileY };
1909 const snapshot = {
1910 tileX: targetPos.tileX,
1911 tileY: targetPos.tileY,
1912 dimensionId: normalizeDimensionId(from.dimensionId ?? targetPos.dimensionId ?? OVERWORLD_ID)
1913 };
1910 const target = resolveCombatTarget(world, targetId);
1914 const target = resolveCombatTarget(world, targetId);
1911 if (!target)
1915 if (!target)
1912 { return events; }
1916 { return events; }
@@ -2310,7 +2314,13 @@ function applyLocalMeleeHit (
2310 const resolved = resolvePhysicalAttack({
2314 const resolved = resolvePhysicalAttack({
2311 hitSkillLevel: effectiveHitSkillInDarkness(
2315 hitSkillLevel: effectiveHitSkillInDarkness(
2312 attackerLevels.hitLevel,
2316 attackerLevels.hitLevel,
2313 tileLightAt(world, to.tileX, to.tileY)
2317 tileLightAt(
2318 world,
2319 to.tileX,
2320 to.tileY,
2321 now,
2322 normalizeDimensionId(to.dimensionId ?? OVERWORLD_ID)
2323 )
2314 ),
2324 ),
2315 agilitySkillLevel: agilityLevel,
2325 agilitySkillLevel: agilityLevel,
2316 damageSkillLevel: attackerLevels.damageLevel,
2326 damageSkillLevel: attackerLevels.damageLevel,
server/src/spells/service.js +2 −1
@@ -665,7 +665,8 @@ function applySpellImpact (world, impact, now)
665 665 tileY: impact.targetTileY,
666 666 radiusTiles: castFlashRadiusTiles(def.tier),
667 667 durationMs: CAST_FLASH_MS,
668 tier: def.tier
668 tier: def.tier,
669 dimensionId: normalizeDimensionId(impact.dimensionId ?? OVERWORLD_ID)
669 670 });
670 671
671 672 const effect = def.effect ?? impact.spellId;
@@ -665,7 +665,8 @@ function applySpellImpact (world, impact, now)
665 tileY: impact.targetTileY,
665 tileY: impact.targetTileY,
666 radiusTiles: castFlashRadiusTiles(def.tier),
666 radiusTiles: castFlashRadiusTiles(def.tier),
667 durationMs: CAST_FLASH_MS,
667 durationMs: CAST_FLASH_MS,
668 tier: def.tier
668 tier: def.tier,
669 dimensionId: normalizeDimensionId(impact.dimensionId ?? OVERWORLD_ID)
669 });
670 });
670
671
671 const effect = def.effect ?? impact.spellId;
672 const effect = def.effect ?? impact.spellId;