feat(traps): activation VFX/SFX, explosion effect, and help section

Wire mimic/pit/arrow/laser media on activate, poison/explosion via effects, and document the scene editor and traps in Instructions.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-25 12:35:22 +08:00
parent 02d73ddf81
commit fed5674468
36 changed files with 697 additions and 34 deletions
+19
View File
@@ -82,3 +82,22 @@ void test('pruneExpired: яд удаляется после lifetime', () => {
assert.equal(store.pruneExpired(), true);
assert.equal(store.getState().instances.length, 0);
});
void test('pruneExpired: взрыв удаляется после lifetime', () => {
const store = new EffectsStore();
store.dispatch({
kind: 'instance.add',
instance: {
id: 'ex_test',
type: 'explosion',
seed: 1,
createdAtMs: Date.now() - 20_000,
at: { x: 0.5, y: 0.5 },
radiusN: 0.08,
intensity: 1,
lifetimeMs: 4200,
},
});
assert.equal(store.pruneExpired(), true);
assert.equal(store.getState().instances.length, 0);
});
+1
View File
@@ -52,6 +52,7 @@ export class EffectsStore {
i.type === 'lightning' ||
i.type === 'sunbeam' ||
i.type === 'poisonCloud' ||
i.type === 'explosion' ||
i.type === 'darkness'
) {
return now - i.createdAtMs < i.lifetimeMs;