-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlevel3.ts
More file actions
18 lines (16 loc) · 1.62 KB
/
level3.ts
File metadata and controls
18 lines (16 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Level } from './types';
export const level3: Level = {
id: 3,
title: "Pointers: The Witness",
description: "ADVANCED CONCEPT: Your Ammo value is stored in dynamic memory - its address changes frequently. Direct scanning will fail on next level load. Instead, find the STATIC POINTER that always points to the ammo location. This is a two-step process: First find the ammo value (50), then find what POINTS to it. The pointer address will be shown in GREEN and labeled 'THE_WITNESS'.",
requiredSkill: "Pointer Scanning & Multi-Level Dereferencing",
objective: (s) => s.ammo > 900,
hint: "STEP 1: Scan for current ammo (50) as Integer. STEP 2: Instead of modifying ammo directly, look for THE_WITNESS pointer in the memory layout (labeled as Static). STEP 3: The pointer at offset 0x0 contains the address of ammo. STEP 4: Modify THE AMMO VALUE (not the pointer) to 1000. Key insight: The green 'Static' address never changes, even though ammo's location does.",
tutorPersona: "Morpheus: Do not look at the object; it is fleeting. Look at the finger pointing to the object. That is the Pointer. The ammo lives at address 0x1C (offset 28), but this address can move. The Witness at 0x0 always knows where the ammo went. Find the Witness, follow its gaze, change what it sees.",
memoryLayout: [
{ key: 'baseAddress', label: 'THE_WITNESS (Static)', type: 'pointer', offset: 0x0, isStatic: true },
{ key: 'ammo', label: 'TRANSIENT_DATA', type: 'int', offset: 28 } // 0x1C is 28
],
initialState: { ammo: 50, baseAddress: '0x00400000' },
platforms: [{ id: 'p1', x: 0, y: 280, width: 800, height: 40, type: 'static' }]
};