Files
isaac-port/notes/entities/shared_pass2_isaac.md
T

82 lines
8.0 KiB
Markdown

# Shared bosses pass 2: Satan and Isaac (Phase C, 2026-10-26)
isaac-classic branch rif/se2-isaac, finishing what shared_bosses_c.md left partial (Enemies = Repentance+). Clip lengths
and events from the Rep+ resources dump (084.000_satan.anm2, 084.010_satan stomp.anm2, 102.000/102.001 anm2s).
## satan: NpcAI::ENTITY_SATAN 0x47f640 (84.0, feet 84.10). Done
- I1 2 with health - pending damage < 0 -> I1 3, state 4, health 0, sound 0xf2, "Death" (123 frames: BloodStart 5,
BloodStop 25, Shoot 29 = MakeGroundPoof + ShakeScreen 12, Sound 83 = 0xf1, Shoot2 87 = three 1000.16 gibs from the
0xc5c5cc offsets); collision class 0 and invincible meanwhile. At its end two SpawnEx(84, variant + 10) at (0, 0):
the first (A) is the second's parent, A's child is B; both state 0 -> I1 4, invisible, StateFrame 0; Satan removed.
- Feet, state 3: invisible, no collision; rand % 9 == 0 starts a stomp unless (has parent and own StateFrame != 0 and
parent StateFrame < 21) or (has child and child StateFrame < 21). StateFrame only counts in state 7 and is frozen
while hidden, so B (child) stomps first, A waits for B's StateFrame 21, then B waits for A's: they alternate.
- Stomp (state 7, StateFrame 0, "Stomp" 88 frames: Stomp event 26, Lift 75): snapped onto Isaac, pushed to 111 from
parent and child (only within 0 < d < 111); below 4 alive enemies rand & 1 == 0 a 55.1 at
FindFreePickupSpawnPosition(Isaac, 200). Collidable while WasEventTriggered(Stomp) and not Lift (frames 26-74). On
Stomp: sound 0x34, Game::BombDamage(pos, 300, 70, no line check, DAMAGE_CRUSH 0x1000000) (0x6ff2a0: entities within
70 + their size; a player takes 2 halves since 300 >= 85), shockwave, poof. Clip end: invisible, state 3.
- Health: a child takes min(its, parent's) for both every tick; a dead foot kills its partner and every entity.
- Hover (state 4 "Walk"): velocity = GetClampedPositionImpl(pos + v, top 0, right 120, bottom 0, left 120) - pos
(0x812f50: x in [TopLeft.x + 120, BottomRight.x - 120], y in [TopLeft.y, BottomRight.y]); Rep's Satan stands 80 lower
than Flash's for the same art, so in Flash's frame x 180-460, y 60-340.
- Radii (entities2.xml): 84.0 collisionRadius 30, 84.10 collisionRadius 55, baseHP 600 each.
- Port: radius 30, foot_radius 55, hover_bounds [[180, 60], [460, 340]], clip_lengths {GrowFeet: 123 (Death),
Stomp: 88}, stomp {together, on 27, touchable [27, 75] (frames from 1), blast {70, 300, player 1}}, stomp_wait
partner_frames 21 counted as StateFrame (fire), the child looking only once it has stomped.
Left: none of the routine; the Death clip's poof / shake / gibs are Flash's GrowFeet art's.
## isaac: NpcAI::ENTITY_ISAAC 0x463100 (102.0, ??? 102.1). Partial
- No difficulty branch anywhere in the routine.
- State 0: targetPosition = pos, I2 = 0, StateFrame 0, state 3, I2 byte 2 = rand % 60 + 60 (102.1 with seed effect
0x4f: shield 90); returns.
- Every tick: stage 0 rand % 20 == 0 whimper 0x8f with delay rand % 100 + 45; damage events from 1000.19 zeroed;
thresholds (strictly below): stage 0 -> 1 at 75% (102.1/2 70%, spawning two 96.0 parented), 1 -> 2 at 50%, each
state 16 (1StandUp, sound 0x36 at 20 / 2Evolve, 0x10a at 17; state 3 at the clip's end). Stage < 2: velocity =
targetPosition - pos, friction *.6; else friction *.9. V2 return fire (shared_bosses_c.md), not in state 8, winged
only in state 3, one ProjectileParams per volley: 102.1/2 rand % 10 == 0 SMART scale 1.2, else Variant 4.
- 102.1/2: GetIntervalTicks(30), rand & 7 == 0, alive enemies (Room +0x12c0 + 0x12c4) < 9, health < 90%: count
(rand & 3) + 2 (9 - enemies when that reaches 10) at angle rand 2 pi + i 2 pi / count: type 18, or 80 when
rand & 3 == 0, or below 70% with rand & 3 != 0 type 14 subtype 2 (else subtype 1), at pos + 15 dir moving 3 dir.
Subtype != 0 with spawner 102 runs NpcAI::ENTITY_FLY_isaac_spawned 0x4568d0: orbit radius 55 / 85, speed 8 / 6,
a 20 lead along the orbit, velocity lerp .6.
- Stage 1, variant 0: ProjectileCooldown < 0: rand & 3 == 0 StateFrame 10, cooldown 40; else rand % 10 == 0 with
fewer than 2 alive enemies cooldown 120 and two 38.1 at FindFreePickupSpawnPosition(pos + 100 dir) + rand 10 at a
random angle. Each tick at stage 1 StateFrame-- and when it was > 0 and is now % 5 == 0 a 1000.19 (subtype 2,
SetSize 10): GetRandomPosition(20) -> free spot + rand 20 at a random angle, 1 in 3 instead Isaac + distance * .2 *
his velocity clamped 20 in; the cell's path value set 900.
- State 3: Play 1Idle / 2Idle / 3Idle; byte 2 == 0 (or would reach < 1) below full health -> state 8, cooldown 40,
byte 2 = 0, I1 = rand % 5 + rand % 6 * 5 (stage 1: (I1 + 1) & 1), V1.x = rand pi; else byte 2 counts down.
102.1/2 winged: (frameCount - spawnFrame) % 100 == 0 and rand & 1 == 0 -> state 6, I1 0. Variant 0: I2 2..6 below
50 / 40 / 30 / 20 / 10% -> I2 + 1, state 9, I1 0. Winged: GetIntervalTicks(15) V1.y = rand 80 + 120 (variant 1: 0);
target Isaac + V1.y * unit(pos - Isaac) (variant 0: its main axis only); farther than 32: velocity += unit at
floor(atan2 / 45 + .5) * 45 * 1.3 (102.1/2 x .175) / friction (status effects: EvadeTarget / MoveRandomly).
- State 8, stages 0 and >= 2: 1Attack (Play) / byte 2 == 0 3FBAttack4Start (sound 0x81 at 17), its end 3FBAttack4Loop;
per tick start = 3 (19 winged), waves = I1 / 5 + 3, period = (int)(clamp(I1 / 5 / 5, 0, 1) * 3 + 3): byte 2 > start,
(byte 2 - start) % period == 0, wave (byte 2 - start) / period < waves fires (sounds 0x10b .5, 0xb2): variant 0
FireProjectiles mode 9 (speed, count) Variant 4, CircleAngle V1.x, FSmod -.1, FAmod -.06, curving .002: I1 % 5 0 =
(7, 10) CURVE_LEFT + (11, 10) CURVE_RIGHT curving .015 FAmod .15; 1 the mirror; 2 (7, 10); 3 (7, 8) + pi / 8 on even
waves; 4 (12, 8) CURVE_LEFT | NO_WALL_COLLIDE curving .009. 102.1/2: (int)V1.x & 3 + 6 shots mode 0 at 7 from pos +
(0, 20), angle V1.x + (i + 1) step, FSmod -.1, FAmod -.05 (102.2 -.15), below 90% CURVE_RIGHT .007 (102.2 .0035),
I1 < 3 and rand % 5 == 0 SMART scale 1.5, else Variant 4 (ProjectileParams defaults: HomingStrength 1, Acceleration
1.01 without ACCELERATE). Stage 0 restarts 1Attack on each wave; winged, the last wave sets 3FBAttack4End. byte 2++.
Stage 1: Play 2Attack, frame 6 sounds 0x10c, 0xb2, mode 9 scale 1.5 CircleAngle V1.x: variant 0 Variant 4 I1 0 BURST
(7, 4), I1 1 (10, 8); 102.1/2 SMART I1 0 (10, 4), I1 1 (8, 8). End: stage < 2 and the clip done, or 3FBAttack4End
done -> state 3, byte 2 = rand % 90 + 15 (102.2 / 3).
- State 9 (variant 0, winged): I1 0 3FBAttack3 (sound 0xd7 at 19), its end I1 = (rand & 1 + 1) * 1000, I2 byte 1 =
rand, ProjectileDelay = rand, invisible, collision 0, pos and velocity 0. I1 1000s / 2000s, per tick n = I1 - 1000 /
2000, step (75 / -75, 0) + RNG(ProjectileDelay) unit * rand * 20 (fixed per sweep), start (TopLeft.x + 10,
TopLeft.y + 10) / (BottomRight.x - 10, TopLeft.y + 10), row (-60 / 60, 60): every n % 8 == 0, k = n / 8, ten
1000.19 at start + k step + byte1 / 255 * k * (-+75, 75) + j row where IsPositionInRoom(10) (0x813360, inclusive);
none -> I1 1; else I1++. I1 1: 3Appear, on its first frame visible, collision 4, random room spot (y then x) with no
player within 100 (20 tries), sound 0xd6; its end I1 27, state 8, byte 2 0.
- State 6 (102.1/2): I1 0 3FBAttack3, its end I1 1; I1 1 3Appear, first frame Isaac + max(V1.y, 151) * unit(his
velocity) (still: MusicManager::RandomVector) clamped by its size; while a player is within 150 up to 20 tries at
rand 360 + (try & 3) 90 degrees, 151 + try 12.5; sound 0xd6; its end I1 0, state 3.
- 102.2 dead: Hush (407.0) at room top + 60, music 0x1b.
- Port (isaac.cpp routine, constants named there): routine {rings, stage_attacks, burst, curve_pull, bolt, child_type,
sweeps, near_teleport, dash, fly_types, eternal_flies} by form (Isaac 1, ??? 2); return_volley homing_one_in 10.
Left: the summons' orbit (0x4568d0), BURST's random-way .6-size split (ours 4 cardinal full-size), Crack the Sky's
own timing (Effect::Update does not decompile; Flash's light beam bolt, radius 10 + 10), 3Appear and
3FBAttack4Start / Loop / End (no Flash clip), the delayed whimper, the path-value 900 marks, status-effect moves.