p
This commit is contained in:
parent
d14550dad6
commit
63e10af865
86 changed files with 5400 additions and 1209 deletions
|
|
@ -6,8 +6,15 @@
|
|||
(function (global) {
|
||||
function updateMotion(item, dt, worldRef) {
|
||||
if (!item || item.dead || item.type !== "zunchi") return false;
|
||||
if (item.playerHeld || item._heldByPlayer) {
|
||||
if (item.achievementBurstOwnerId) item.achievementBurstNeverStopped = false;
|
||||
item.prevX = item.x;
|
||||
item.prevY = item.y;
|
||||
return true;
|
||||
}
|
||||
const speed = Math.hypot(item.vx || 0, item.vy || 0);
|
||||
if (speed < 0.08) {
|
||||
if (item.achievementBurstOwnerId) item.achievementBurstNeverStopped = false;
|
||||
item.vx = 0; item.vy = 0;
|
||||
global.TarinaiItemDynamicBallSystem.resolveObstacleCollisions(item, dt, worldRef);
|
||||
return true;
|
||||
|
|
@ -30,8 +37,10 @@
|
|||
worldRef.drawListDirty = true;
|
||||
}
|
||||
global.TarinaiItemDynamicBallSystem.resolveObstacleCollisions(item, dt, worldRef);
|
||||
resolveHighSpeedTarinaiCollision(item, dt, worldRef, speed);
|
||||
item.spin = (item.spin || 0) + speed * dt / Math.max(8, item.r || 14);
|
||||
const collisionSpeed = Math.hypot(item.vx || 0, item.vy || 0);
|
||||
if (collisionSpeed < 0.08 && item.achievementBurstOwnerId) item.achievementBurstNeverStopped = false;
|
||||
resolveHighSpeedTarinaiCollision(item, dt, worldRef, collisionSpeed);
|
||||
item.spin = (item.spin || 0) + collisionSpeed * dt / Math.max(8, item.r || 14);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -54,6 +63,9 @@
|
|||
if (speed >= 185) {
|
||||
const damage = Math.min(18, Math.max(1, (speed - 185) / 22));
|
||||
worldRef.applyImpactDamage?.(t, damage, "\u885d\u7a81", { source: item }) || t.damage?.(damage, "\u885d\u7a81");
|
||||
if (t.dead && item.achievementBurstOwnerId === t.id && item.achievementBurstNeverStopped !== false) {
|
||||
globalThis.TarinaiAchievements?.recordSelfZunchiDeath?.({ world: worldRef, tarinai: t, zunchi: item, speed });
|
||||
}
|
||||
}
|
||||
t.fallTimer = Math.max(t.fallTimer || 0, 0.85);
|
||||
t.fallMax = Math.max(t.fallMax || 0.85, t.fallTimer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue