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

175 lines
16 KiB
Markdown

# Group h4 notes (pass 6, 2026-10-25)
Bosses (Forsaken, Adversary, Gabriel, Clutch, Heretic, Gideon, Scourge, Visage, Rotgut's heart, Mega Satan's hands),
read for isaac-classic branch rif/monster-fidelity-9. Speed convention as pass4_00.md / pass2_misc2.md (drift =
MoveRandomlyBoss: speed .5 / the friction it is called under, retention = the tick's friction).
## the_forsaken: NpcAI::ENTITY_FORSAKEN 0048f110 (403.0, champion subtype 1). Changed
- Init: state 13 (Summon), grid collision 3. Friction *.9 every tick; MoveRandomlyBoss(0) in every state but the
blast (drift .5 / .9 matches) and the faded seek; the blast state brakes *.7 on top (.63).
- Bony count = live members of its own NPC group (QueryNPCsGroup by its index; spawns get +0xc7c = its index).
- State 13 Summon (37 frames, Summon events 8 and 14, sound 0x1a1 laugh as it starts): needed = 1, 2 below 25 % hp;
on each Summon event, if bonies < needed or it was touched (i2), one Bony 227.0 (Black Bony 277.0 for subtype 1)
at a random angle 70 px out (FindFreePickupSpawnPosition); i2 cleared. Clip end -> state 16.
- State 16: FadeOut (sound 0x3cd) -> untouchable, no collision; Faded: i2 = Isaac within size + his size (26 + 10);
bonies == 0 or touched -> seek: pull 1.2/friction toward the room centre (or a door cell for the long shapes 9-12),
capped 3.2, until within 45 or 121 ticks -> FadeIn, touchable again. FadeIn end: touched and bonies <= 3 ->
Summon again; else (no bonies, or over 3): subtype 0 -> Blast (sound 0x1a2), subtype 1 -> state 3 if its sublist
count (read as its Dank Death's Heads) is non-zero, else state 14.
- Blast (state 8): v1 = angle to Isaac + 180 + rand*60-30. BlastStart (25 frames, Blast on 23): ShootAngle variant 1,
timeout 120, offset (0,-30), at v1 + i*120 for i 0..3 (the fourth repeats the first), rotation delay 15 + rand%30,
RotationDegrees 1800, speed +-(n * .25 + 1) * 2 with n the group count (2 with none, 4 with four); when another
enemy's rotating laser is up its speed is copied and the delay is 5 + rand%10. Blasting until StateFrame > 120
(121 ticks), BlastEnd, then state 3 (Idle, drifting) for 151 ticks -> Summon.
- State 14 (subtype 1): Summon clip, 2 Dank Death's Heads (212.1) per Summon event at random angles 70 px (4), then
state 16. No blast for the champion.
- No code kills the Bonies at the blast (the data's enemy_slay at Blast is wiki-based, left in).
- Port: Blasting repeat 22 -> 14 for the over-three blast too (121 ticks either way), FadeIn touch range 40 -> 36,
the FadeOut's 30-tick cooldown removed (the faded touch test runs at once), scream sound on Blast for the
over-three blast, the vulnerable rest now drifts (phase move still -> drift). Champion: its over-three case summons
four Dank Death's Heads (capped) instead of blasting. Not expressed: the seek to the room centre before the blast,
the sweep speed's continuous n * .25 term (rates 2 and 4 kept), the copied rotation.
## the_adversary: NpcAI::ENTITY_ADVERSARY 0045e050 (268.0). Changed
- Friction = .85 set each tick; state 4: Walk, MoveRandomlyBoss(0) -> drift .588 / .85 (matches).
- P = 30 (15 below 30 % hp). Scream: (frame + index) % 2P == 0, rand&3 < 3 (3 in 4), and only while no darkness is
up (Game darkness modifier <= 0) -> Scream clip; sound 0x7a on its event; darkness strength 1, timeout 180 set when
the clip ends (data: 210 from the event, frame 21 of 50: the same end).
- Brimstone: on camera, IsFrame(P), rand%3 == 0, i2 <= 0 -> Attack2<dir> by Isaac's major axis, sound 0x76, a
warning line; every other Adversary gets i2 = 90. On Shoot: ShootAngle variant 1, timeout 10, offset (+-30 or 0,
-25; down (0,-5)), HomingType 2.
- Spiders: enemies (Room+0x12c0 + 0x12c4) < 3, IsFrame(P), rand%3 == 0 -> Attack1, sound 0x74; Skin Pull sound 0x13a;
Shoot: 4 - n spiders (85.0) leaping from it to free spots 100 px out (velocity .04 of the offset, v2.y -8).
- Fly: IsFrame(P), rand%3 == 0 -> FlyUp (sound 0x70); from Fly velocity += unit(target - pos) * 1.3, no collision;
after the clip, once StateFrame > 75 -> FlyDown; Land: collision back, shockwave 1000.61 (radius 20 -> 95,
timeout 20), ShakeScreen 15, sound 0x30, BombDamage 50 within its size (20).
- Port: the laser now goes out after 10 ticks (laser lifetime 10; it lasted to LaserEnd, 25). Left: the scream's
3 in 4 and darkness gate (one_in 4 at 60 kept as the rate), the sibling cooldown, the spider count 4 - n, the
shockwave's timing (bolts 16 x 4 steps).
## gabriel / fallen_gabriel: NpcAI::ENTITY_URIEL 0051e0f0 (272.0 / 272.1). Changed
- Shared with Uriel (271, type checks inside). Variant 1 swaps every "Angel" sheet for "Angel Black.png" at init.
- Friction .8 set each tick. State 4 Float: d = Isaac - pos, dy *= -1.2 when |dy| < |dx| (Uriel only also zeroes
dy near the top wall / the Mega Satan room's y 320); v += unit(d) * 1.65 (Uriel 1.5): hover 1.65/.8, flip 1.2 match.
- Choice: when StateFrame crosses a multiple of 30 and rand%3 == 0: rand % (4 while alive enemies < 3, else 3):
0 Shield+SpreadShot (state 8), 1 Charging + 4 cardinal beams (9), 2 Charging2 + 4 diagonal beams (10), 3 Shield+Pray
(13). Each beam gets a warning line (SpawnFollowingEffect198 type 0x20).
- SpreadShot Shoot: FireProjectiles mode 9 (12 around at 10), HeightModifier -17, FallingSpeedModifier 1.3, sounds
0x10b and 0xb2. (Uriel: mode 5 aimed at 8.)
- Beams: Charging(2) until StateFrame > 25 (26 ticks), LaserShot; Shoot: ShootAngle variant 5, timeout 30, at
pos + 7 * dir, offset (0,-50), angles 0/90/180/270 (+45); back to Float at StateFrame 51.
- Pray: an Angelic Baby (38.1) when StateFrame reaches 10 (alive enemies < 3), sound 0x109 at 1.5 pitch.
- Port: choice one_in 90 a tick -> period 30, one_in 3 (Rep's cadence); the ring's fall_velocity -1.7 (-3 + 1.3).
Matches: hover, 26-tick charges, beams (30 ticks via the Back->Again loop), the ring, the baby. Left: the
HeightModifier -17, the 3-option draw while 3+ enemies live (the Pray pick then fails its enemy_limit).
## clutch: NpcAI::ENTITY_CLUTCH 00573030 (921.0). Partial (quarter phase checked)
- The possession cycle was ported earlier from this routine (reference comment); re-checked only the drift and the
state-16 phase here.
- Idle states (3 and the phase's 4): MoveRandomlyBoss(0), friction *.9 -> drift .5 / .9 (was .6 / .8).
- Phase (state 16 Transition, Shoot on 26): sounds 0x10b, 0x139, 0x1a2, ShakeScreen 16, a shockwave; afterwards each
live Clickety Clack it owns in state 16 gets a fire (NpcHelper::clutch_spawn_fire); incoming damage is cut to .1
while the clip plays.
- State 4 (phase idle): after StateFrame > 8 (9 ticks, no roll) it rushes: TargetPosition = Isaac, MoveStart2, from
its Shoot (frame 5) velocity = .5 * (target - pos) capped at min(1.2 * StateFrame, 30) each tick (MoveLoop2 while
far), within 20 -> AttackStart, then Attack: friction *.9, on Shoot FireProjectiles mode 9 (6 around at 9, variant
2), CircleAngle 30 deg on even counts, six rings (StateFrame > 5) -> state 4.
- Port: drift .5/.9; phase rush 1 in 40 a tick -> every 9 idle ticks (cooldown 9 after Transition and the rings);
the rush leap 15 at retention .9 (reached a third of the way) -> leap 7 at retention 1 (arrives as MoveStart2
ends), AttackStart retention .5 (Rep's arrival speed ~10 brakes at .72). Left: the 1.2 t ramp, the alternating
30-degree ring turn, the orbitals' own routine (not located: no separate NpcAI entry for 921.1).
## the_heretic: NpcAI::ENTITY_HERETIC 004b43c0 (905.0). Changed (below-half phase)
- Earlier port (reference comment) re-checked on its numbers. State 3 (idle): MoveRandomlyBoss(0); the wait counter
(StateFrame's high short) passes 60, or 30 below half health -> FUN_004b40d0 (the weighted pick).
- Lob (state 14, Attack2): on Shoot sound 0x6a/0x6c alternating, FireProjectiles mode 0 with Scale 2, HeightModifier
+25, FallingAccelModifier 1.5, FallingSpeedModifier -60, explosive flag 2, the launch speed solved (20 halving steps
of a friction-.9 flight model) to land on Isaac's spot, a target mark 1000.153; the 7th lob -> Divebomb toward
Isaac clamped to 300 px.
- Beam (state 8): ShootAngle variant 1 timeout 40 straight down (offset (0,-20)) or along the fire chain; at its end a
counter increments: below half and the counter at 1 -> state 7 (point at fires again) and a second beam; else idle.
FUN_004b3ec0 counts purple fires (33.3) put out (health +0x380 < 1.5): the data's terrain_out.
- Port: phase 2 (below half) now carries the attacks with their 60-tick waits at 30 (it only re-set the choice, so
the wait stayed 60) and a second Point + Attack1 round after the first beam. Left: the lob's land-on-Isaac speed
solve (data: aimed 7 with fall -14 / .7), the 3-link chain test, the afterimages (reference comment's list).
## great_gideon: NpcAI::ENTITY_GIDEON 004b1ee0 (907.0). Skipped (matches within its listed approximations)
- State 3 (idle): aiCounter++; with a wave pending (i1) and the counter >= 31: rand&7 == 0 -> sound 0x7a, Summon
(state 13); otherwise counter > 90 and rand%15 == 0 -> NpcHelper::gideon_choose_attack.
- Big shot (state 8, Shoot): FireBossProjectiles one at 10 toward Isaac, height -23, no fall, scale 2, flags 0x60
(velocity .94/tick: 0x3f70a3d7), plus two FireProjectiles at +-20 deg (10): data matches (fan .9397/.342).
- Flames (state 9 -> 6): ProjectileCooldown 50 on Shoot (the 50-tick stream). Data matches.
- Not changed: the wave's 1 in 8 a tick after 31 idle ticks (data: the choice's 1 in 15 forcing it, 31-tick
cooldown) and the attack pick's 90-tick floor after a wave (data cooldown 31 then the 1 in 15).
## the_scourge: NpcAI::ENTITY_SCOURGE 00587aa0 (909.0), pick NpcAI::ENTITY_SCOURGE_main 005864b0. Changed
- Idle (state 3): friction *.8; target = Isaac + V1, V1 = (0, -(160..200)) turned +-45 deg, redrawn on rand%20 == 0,
clamped into the room; v += clamp1((target - pos) * .1) * 1.2 (a hover holding a spot above Isaac). After the idle
counter passes 30, rand%10 == 0 a tick -> the pick.
- Pick (WeightedOutcomePicker): Isaac predicted = pos + vel * .1 * distance; 1 TrapDown weight 100 when that unit
way's y > .95 (straight below); 2 SliceBoth and 3 Slice<side> weight 10 when he is below; 4 BroccoliAttack 10,
5 Hover 10, 0 idle 1. Each option has its own cooldown byte (v2 bytes) while non-zero it is left out: set to
0/90/90/54/15/90 when picked (Broccoli below half 15 - 106 as a byte: 165).
- Trap (TrapDown, SliceBoth): the tendrils hold up to 240 ticks (60 for the one-sided slice), and only for the trap
and the double slice a FireProjectiles mode 9 ring (12 at 6, FallingAccelModifier -.12) every 30 ticks, sound
0xb2; TrapEndDown after.
- Broccoli (state 11) Shoot: FireBossProjectiles one at 14 toward Isaac, height -23, fallingAccel -.08 (it floats),
homing .5, subtype 14 (5 and scale .6 below half), flag 0x200000; the Scourge recoils at -10 (x.8 a tick); below
half three shots (the clip is set back after frame 56 while i1 > 0).
- Port: choice 1 in 30 a tick -> 1 in 10, attack cooldowns 20 -> 31 (the idle floor), per-option rests
90/90/54/15/90 (rest_weight 0); Broccoli speed 7 -> 14, fall 0 / -.18 (net -.08); TrapDown now holds: a new
TrapLoopDown (220 ticks, the beam held, a ring of 12 at 6 every 30 ticks) and TrapEndDown. Left: the below-Isaac
gates and TrapDown's weight 100 (no player-below choice gate), the hover over Isaac (still drift), the double
slice's hold and rings, the three broccoli shots below half, the chain entities.
## the_visage: NpcAI::ENTITY_VISAGE 005a7b20 (903.0). Partial (read, not changed)
- State 100 (chained): MoveRandomlyBoss, friction *.8, tether v1.y = 150 to the mask.
- Chain gone (entityRef null): 0x67 Transition (friction *.1; on Break particles, sound 0x89, flags cleared,
vulnerable) -> 0x69. Health - pending <= half: from 0x69 -> 0x70 Transition2, else the damage is clipped at half.
- 0x69 (above half, freed): with the mask alive and not stunned (0x6d): v += unit(target - pos) * min(.1 d, 2),
friction *.8, FUN_005a7920 re-aims on rand%20 or (hurt and rand&3); ProjectileCooldown < 1, rand%20 and over 256
from the mask -> 0x6a. Without the mask: MoveRandomlyBoss, friction *.8, ProjectileCooldown < 1 and rand%40 -> 0x6a.
0x6a Unwind2 / 0x6b Rewind2: the whip-dash: friction *.5, on Wind the mask (state 4 -> 5) is flung toward Isaac
+ his velocity * distance * .06 (or the heart's spot), sound 0x1f7; while the mask flies (state 6) the heart is
pulled 8 a tick toward it, a wall hit: sound 0x34, ShakeScreen 15, two FireBossProjectiles (5 or 6 each), stop.
- 0x72 (below half): friction *.75, homing at its target (cap 3) or MoveRandomlyBoss; ProjectileCooldown 0 and
rand%15 -> by n = live plasmas (903.20): n >= 3 -> 1 in 2 Attack4 (absorb, 24 shots at the end); n > 0 -> 1 in 3
(or n >= FUN_005a7510's cap) Attack3: 16 projectiles at 10, 22.5 deg apart, orbit flag 0x2000, held 60 ticks then
let go; else Attack: one visage_plasma at 10 along a random diagonal (45 + 90k), sounds 0x1d7, 0xd5. After each:
ProjectileCooldown 30 + rand%30.
- Port status: the data's freed phase (JumpUp/JumpDown pounce with rock waves, a 3-shot spread) has no counterpart
in the routine (JumpUp/JumpDown are in the sheet but unused by 903); below half its Attack3 spawns three plasmas
and Attack4 is a ring + pull. Not changed: a faithful port needs the whip-dash (mask flung, heart dragged) and the
orbiting ring; see engine_h4.md.
## rotgut_heart: NpcAI::ENTITY_ROTGUT 00581730 (911.2). Changed
- Friction .6 set. State 3: Heartbeat (HeartbeatFast below half) looping; each Shoot: ShakeScreen 6, sound
0x141/0x142; with ProjectileDelay < 1 NpcAI::rotgut_fire_projectiles 00581430: from pos + (0, 20) ((0, -20)
retracted) a 12-ring at Isaac's angle + rand*30 - 15, only the headings within -20..200 deg (the lower half),
FireBossProjectiles speed 7, fallingSpeed 0, fallingAccel -.1 (they float). With ProjectileDelay > 0 (the 10
beats after Summon) instead 3 yellow shots at random x along the room's top edge, velocity (0, rand*4), accel .48,
scale 1.6.
- Pick: StateFrame > 29 and rand%60 == 0 a tick -> WeightedOutcomePicker: SpitDown 10, Summon 5 (only with
ProjectileDelay < 1), Retract 5 (only with i1 >= 0, its cooldown after a retract). Summon sound 0xa7 and
ProjectileDelay 10.
- Port: the beat shots now float (fall 0, fall_acceleration -.2: net -.1) instead of dropping at the default
arc. Matches: speed 7, the half ring (as a 7-way fan round the aim), the pick odds (data 20 in 80 per beat vs
Rep ~33 % per 24-tick beat). Left: the +-15 jitter and the absolute -20..200 filter, the Summon's shots raining
from the top edge (data: boss volleys from the heart).
## mega_satans_left_hand / mega_satans_right_hand: NpcAI::ENTITY_MEGA_SATAN_hand 004cca10 (274.1 / 274.2). Partial (not changed)
- The hands never start an attack themselves: the head (NpcAI::ENTITY_MEGA_SATAN 004c8090) sets a hand's state to
8 (SmashHand1, sound 0xef) or both to 14 (SmashQuake). Head pick: every 30 of its StateFrame, rand%100 <= 69, a
draw over summed weights: head attacks by Isaac's x within 120 / distance 180 / 300, its last attack (i2) damping
repeats (x.1, x.6), a hand smash 12 (one hand, +9 with both, more within 260), the hand for a smash 6 in 10 the
left (+0x288) else the right.
- Escort (state 3) re-checked: goal = head + (-+120, 100 (variant 1) / 110 (variant 2)), drawn to (-+35, ...) as
Isaac goes 260..330 below the head, the middle when alone, held wide during the head's state 8: matches escort.
- Not changed: the data's independent one_in 260 / 400 rolls per hand stand in for the head's draw (moving the
smashes onto mega_satan's choice needs a "command a partner" attack: engine_h4.md).
## clutch_orbital (921.1), visage_mask / visage_chain / visage_plasma (903.1 / 903.10 / 903.20). Skipped
- clutch_orbital: no NpcAI entry of its own (921 dispatches only to NpcAI::ENTITY_CLUTCH, which never tests the
variant); its motion is not located. visage parts: the mask (NpcAI::ENTITY_VISAGE_mask 005ab4d0) and chain were
ported earlier from their routines (reference comments); not re-read this pass.