14 KiB
14 KiB
Group g6 notes (pass 5, 2026-10-24)
What each routine does, as read for isaac-classic branch rif/monster-fidelity-8. Numbers are exact from the decompile
unless marked otherwise. ./decompile.sh 0x<addr> reprints the code.
moms_hand: NpcAI::ENTITY_MOMS_HAND 00533b80 (213.0). Changed (grab reach)
- Init: state 4, StateFrame = -(rand % 150), JumpDown held on frame 0, collision classes 0, shadow 0; Mom's laugh (sound 0x54) and ShakeScreen(10).
- State 4 (shadow): StateFrame +1 a tick; shadow size = StateFrame / 90 * .4333 (capped). While StateFrame < 78 it is put on Isaac + (0, 1) each tick (CalcTargetPosition when charmed/confused/feared). At StateFrame > 89: sound 2, state 7, JumpDown. So a drop comes 90 ticks after each JumpUp (first 90 + rand%150) and tracking stops 12 ticks before it: our first_cooldown [90, 150], cooldown 90 and track_stop 12 already match.
- State 7 (JumpDown, 18 frames, Land on 12): Land -> sound 0x30 and EntityCollisionClass 4; end -> state 3 Stunned.
- State 3: StateFrame >= 51 -> state 6 JumpUp (Stunned 2-frame loop, 51 ticks; ours repeat 25 = 52 frames, kept).
- State 6 (JumpUp, Jump on 11): Jump -> collision 0, shadow * .7; end -> state 4, StateFrame 0.
- Grab: Entity_NPC::HandleCollision 006cd410 (asm 006cf8ad): type 0xd5 touching a player while in state 7 (after Land, frames 12-17) stores I1/I2 = the player's type/variant and sets state 16. State 16 plays Grab (invulnerable, health restored); at its end, I1 == 1 (a player) and I2 == 0 -> Game::StartRoomTransition(starting room), players' held items dropped.
- Changed: grab range 40 -> 50 (collision radius 40 + Isaac's 10, centre to centre). Not expressible: the grab staying live for the 6 ticks after Land (ours tests the Land tick only); the Grab clip before the teleport.
moms_dead_hand: NpcAI::ENTITY_MOMS_HAND 00533b80 (287.0). Changed (death spiders)
- Same machine as Mom's Hand without the grab (HandleCollision only grabs for 0xd5).
- Land (type 0x11f): 3 + (rand & 1) SHOCKWAVE_DIRECTIONAL effects (1000.72), spawner = the hand, angle field +0x474 = 0, 360/n, ... from 0 deg: our bolts directions {count 3, count_random 1, angle 0} match. The wave's own stepping is in Entity_Effect::Update (does not decompile), so spacing 30 / period 3 / offset 40 are unverified.
- Death (_dead, type 0x11f): (rand & 1) + 2 spiders, each ThrowSpider'd (height -30) to a free spot rand * 80 from it, whatever the overkill. Was: 2 spiders within 20, none on overkill 20. Now: death_spawn throws 2 spiders (radius 80) plus a 1 in 2 third (one_in 2, overkill_limit 1000000, radius 80; placed, not thrown).
revenant: NpcAI::ENTITY_REVENANT 004ecc10 (841.0; 841.1 Quad Revenant shares it). Changed
- Friction * .8 every tick in every state (so attacks keep .8 too). State 4: MoveRandomlyAxisAligned(.8); a 1 in 3 sound 0x74 on the interval tick. StateFrame < 0 counts up (the cooldown).
- Attack test, every tick once StateFrame >= 0: Isaac within 256 (a plain distance, not squared), the unit way to him dotted with its axis-aligned rounding > .9 (he stands within 25.8 deg of a row or column through it), and Room::CheckLine mode 3. V1.X = the axis' angle (the head's aim), state 8.
- State 8: AttackStart (17 frames, Shoot on 12): on Shoot sounds 0x131/0x130 and StateFrame = 60; then Attack overlay loops. Each tick StateFrame -1; on even StateFrame one projectile (four at 90 deg for 841.1) at V1.X + (rand - .5) * 10 deg, speed 8, Spawn(9, 2) fire (stage colour), FallingSpeed * .4. The head angle V1.X approaches (approach_angle 00682a50) Isaac + his velocity * .1 * distance by 5 deg a tick (841.1: +3 deg a tick, a spin). The Attack nn overlay is chosen from V1.X: floor((90 - a) / 30 + .5), 12 poses (3 for 841.1).
- StateFrame < 1: AttackEnd, then state 4 with StateFrame = -60 - rand%30.
- Changed: speed 1 -> .8; range 160 -> 256, period 4 -> 1; retention .5 (start 0) -> .8 in all three clips; shots every other frame (on 1, 3, 5, 7, 9 of the 10-frame loop) for 6 plays (repeat 4 -> 5) = 30 shots, speed 6 -> 8; cooldown 60 + random(30) after AttackEnd (was none).
- Not expressible: the 25.8 deg axis cone (proposal axis_cone in the port's engine_g6.md), the head turning 5 deg a tick (shots aim straight at Isaac), the +-5 deg jitter, the lead. The stream starting on AttackStart's frame 12 rather than after the clip (5 ticks later here).
- Port follow-up: engine attack
axis_cone(max(|ux|, |uy|) > cos) at .9 on 841.0 and 841.1.
coal_spider: NpcAI::ENTITY_ROCK_SPIDER 004f9ad0 (818.2). Changed (wake roll; also rock_spider 818.0)
- State 16 (IdleRock): falls in on V1.X (+.5 a tick, bounce * -.3), and wakes (state 7 Appear, then 3) once its grid
collision class is 5 (landed), |V1.X| < .6, speed < 2 and rand & 3 == 0: a 1 in 4 per tick. Our phase gate was
not_one_in 4(3 in 4); nowone_in 4, the same fix made to rock_spider (pass2_misc2's record). - State 3: friction * .6; StateFrame +2 a tick for variants 1/2 (+1 for 0, then +1 more on a 1 in 2 when odd, which never happens at +2); at 12, 24, 36: variants 1/2 draw a random way 20 px clear on rand & 3 == 0 (variant 0 rand % 6), else toward Isaac's CalcTargetPosition(60) (FindGridPath when no line) turned (rand - .5) * 30 deg; push 3 * 1.8 = 5.4 a tick (1.6 when spawned by 0x38b; variant 1 5.1) while a way is set; reset at 48. Our burst {cycle 48, rate 2, at [12, 24, 36], random_one_in 4, jitter 15} and speed 3.24 (5.4 under .6) match.
- With Bursting Sack (collectible 0x179 = 377, any player: FirstCollectibleOwner) the random way is never drawn (always at Isaac), and the push is 3 for every variant: not ported.
quake_grimace_804_0_3 (and 804.0.0/.1/.2): NpcAI::ENTITY_QUAKE_GRIMACE 004f8960 (804.0.subtype). Changed (timing)
- Init: invulnerable, state 3 with StateFrame 10; anchored on its cell (velocity = cell centre - pos each tick).
- State 3: Idle, StateFrame -1 a tick, at < 1 state 8. State 8: Slam (91 frames, Hit on 47): Hit -> sound 0x34, ShakeScreen(16), one SHOCKWAVE_DIRECTIONAL (1000.72) at the angle table 00b60b68[min(subtype, 3)] = 180, -90, 0, 90 (our bolts angles 180/270/0/90 match). Clip end -> Idle, StateFrame 10. So it slams 10 ticks after spawning and every 101 ticks after.
- Room cleared (room flag bit 1) in states 3/8 -> CloseEyes (state 16): our cleared_room_create_types.
- Was period 90 (a slam on ticks that are multiples of 90, so every 180 ticks behind a 91-tick clip). Now period 1, cooldown 10, first_cooldown [10, 0], for all four subtypes.
greed_gaper: NpcAI::ENTITY_GREED_GAPER 005a6b80 (299.0). Changed (Flash ground_chaser -> scripted path)
- Init: head overlay Head1..Head4 by npc->_index & 3 (the entity index, not the seed), state 4. Hits from its own type are zeroed (greed gapers do not hurt each other).
- State 4: AnimWalkFrame(WalkHori, WalkVert, .1); field 0xc34 = .6; FindGridPath(CalcTargetPosition, .6, 900, 1) (EvadeTarget with friction * .8 while feared/confused-off-target flags 0x1000800); a 1 in 30 groan (0xa5) on its groan ticks. No attack: the coin theft is the player's TakeDamage from this source (sins.cpp coinzz in the port).
- Was the Flash gaper model (ground_chaser acceleration .6). Now scripted move path .6, retention 1 (the convention of pass 1's Rebirth walkers), idle Head1, spawn clip HeadAppear, groans kept.
- Not done: the head picked by index & 3 (always Head1).
poot_mine: NpcAI::ENTITY_POOT_MINE 00562290 (875.0). Changed (poots only when hit)
- Friction * .7 every tick. No timed attack: a tick it takes damage (field 0x14 > 0) sets the way = unit(pos - the last hit's source position) (random if they coincide) and, in state 3, state 8 with PootOverlay, V1.Y = 4.
- PootOverlay (20 frames, Shoot on 2): Shoot -> sound 0x25, a gas cloud 1000.141 drifting at -2 * way (toward the attacker; its timeout fields 0x45c/0x460 = -1), every entity but itself within 60 of pos - 40 * way gets velocity -10 * way (a one-off shove), six 1000.99 dust puffs. From Shoot on: a wall hit reflects its velocity (1.8 * normal part), and each tick velocity += V1.Y * way / friction, V1.Y *= .8: a jet away from the attacker of net 4, 3.2, 2.56 ... a tick under .7 (peak about 6.8 px a tick, about 67 px in all). Clip end -> state 3.
- Death (not friendly-flag 0x1000000): BombExplosionEffects(pos, 25 damage, radius scale 1): a real bomb blast.
- Was a 1 in 3 every 30 ticks poot with no movement. Now: hurt-gated (attacks[].hurt), period 1; lunge -2 for lunge_ticks 10 (away from Isaac: about the same peak 6.5 and 67 px); retention .8 -> .7; death blast player_damage .5 -> 1 (as the other enemy blasts).
- Not expressible: away from the hit's source rather than Isaac; the decaying jet (lunge is flat); the wall reflect; the one-off shove of 10 near the attacker; the cloud drifting.
black_goat: NpcAI::ENTITY_GOAT 004f2c20 (891.1). Changed (brought in line with goat, pass3_b, plus its own volleys/laser)
- Same squad code as Goat (891.0, see pass3_b.md): FindGridPath .8 under * .97, the dash (rand & 3 == 0, |dy| < 24, CheckLine; push 10 a tick under .7 -> lunge 7, ends on a blocked cell ahead, ProjectileDelay 45) and the shot (IsTargetInAttackRange(1, 7): period 7, range 120, sight; brake .6; ProjectileDelay 45). Copied goat's data (was wander .5, a range-300 enemy_limit-3 repeat-on-speed dash, a 1 in 6 / period 5 / range 200 volley).
- Variant 1 volleys: Shoot FireProjectiles mode 3 (0, +-24 deg: count 3 spread .4189), Shoot2 mode 4 (+-8 deg at full speed and +-24 deg at .9 of it: count 4 spread .2793), at 10 (was 3 / 4 shots, spread .2, speed 7). The outer two's .9 speed is not expressible.
- Brimstone (variant 1 only): a goat in state 4 with Isaac within 20 on either axis, on rand % 12 == 0 and the squad leader's I2 >= 0, sets the leader's I2 = 8; the leader then puts every on-screen goat of its squad in state 4 into state 9 (Attack2, with four warning effects 1000.198 each) and I2 = -90 (counts back up: a 90-tick squad cooldown). Attack2 (54 frames, Shoot 4 = sound, Shoot2 31): four ShootAngle(variant 1, 0/90/180/270, timeout 15, PositionOffset (0, -18)) with _scale .75; end -> ProjectileDelay 60, brake .6. Now: period 1, one_in 12, alignment 20 (no range), laser from Shoot2 with lifetime 15, width 19 (25 * .75), cooldown 60.
- Not expressible: the squad roles (only the nearest dashes, the next shoots, the rest evade: pass3_b's
squadproposal), the shared laser of every Black Goat at once and its squad cooldown, the warning effects.
peeping_fatty: NpcAI::ENTITY_PEEPER_FATTY 005562b0 (835.0; its eyes 835.10 run in the same routine). Changed
- Init: state 4, ProjectileCooldown 60 + rand%150; two eyes 835.10 spawned at (-+30, +30), linked both ways.
- State 4: anim_walk_frame_4dir. Movement: if an eye holds a seen target (the eye's field +3000, nearest wins), FindGridPath to it at min(distance / 100, .5) (so .5 beyond 50 px); else PathFinder::update_chase_movement 007e6b90: friction * .6, push 1.2 along a heading that eases toward a target heading, redrawn every 45 + rand%120 ticks (and on a 1 in 4 when it hits a wall, reflected). A 1 in 40 sound 0xa7. Once the cooldown is out: rand % 60 == 0, or IsTargetInAttackRange(no lead, IsFrame 7, range 1000, CheckLine mode 3) -> state 8.
- State 8 (Attack, 33 frames, Shoot on 21): friction * .4; Shoot -> Game::ButterBeanFart(pos, 120) and FireProjectiles mode 9 (8, 6) = a ring of 6 at speed 8. End -> cooldown 60 + rand%150.
- Eye (835.10): friction .95; it looks along its angle (field 0xc34, starts 90) for a target within a .85 cone (Isaac within 200, or another entity more than 120 from the fatty), else wanders to points 200 out on its side (+-110 deg) every 15 + rand%60 ticks; tied to the fatty by a cord (pulled back past 75 px at .03 a tick of slack).
- Changed: move chase .3 / .8 -> path .5 / 1; attack period 7 with sight and range 1000 (was range 90, 1 in 4); cooldown 60 + random(150) drawn once, first_cooldown [60, 150]; retention .5 -> .4; ring speed 7 -> 8; fart radius 85 -> 120.
- Not expressible: chasing only what an eye sees and the blind heading wander otherwise; the 1 in 60 no-sight attack.
evis: NpcAI::ENTITY_EVIS 004df3f0 (865.0; the guts 865.10 in the same routine). Changed
- Friction * .8 every tick past init. State 3: AnimWalkFrame, MoveRandomlyAxisAligned(.7). On IsFrame(3): with Isaac |dx| < 30 (any distance), or |dy| < 30 and within 300 -> state 8, V1 = the offset to him.
- State 8 (Attack01, Shoot on 16, Pull on 33): Shoot spawns the guts 865.10 10 px out toward Isaac + his velocity
- .1 * distance, clamped to 50 deg either side of the cardinal way to him; sound 0xe2; cord length (0xc34) = 160. Clip end -> state 3.
- Guts: fly out and back over 15 ticks along that way, (1 - (2t - 1)^n) * 200 from the Evis; a player touching their capsule is caught (sound, ShakeScreen 6) and then dragged with them (velocity = player - guts). A miss: removed.
- While caught (state 7): friction * .8 again (.64), Pull loops; the cord shrinks .33 a tick to 10; past it, the excess * .14 is added to Isaac's velocity toward the Evis (and .25 of that taken off the Evis). It lasts while the guts hold him (they go only with the Evis).
- Changed: move chase .3 -> roam .7 (retention .8); attack period 5 / 1 in 4 / range 200 / sight -> period 3, alignment 30, range 300, no sight; retention .5 -> .8 (Pull .64); tether pull 1.5 -> .33 a tick; Pull repeat 6 -> 20.
- Not expressible: Pull only after a catch, and held until death (engine_g6.md
tether hold); the column-aligned case having no range; the lead and +-50 deg clamp of the throw; the cord's spring.
holy_eye: NpcAI::ENTITY_EYE 00522ef0 (60.2). Changed (timing)
- Variant 2 has its own branch: anchored (velocity = start - pos, friction * .8). Init: ProjectileCooldown 15 + rand%60. State 3: counts down; at <= 0 (not charmed/feared) -> Attack (44 frames, Shoot on 9, 16, 23, 30): no range or line-of-sight test. A hit takes damage * 10 off the cooldown.
- Each Shoot: sound 0x110, one light beam 1000.19 (CrackTheSky, subtype 2, SetSize 10, vtable +0x40 called with 7)
at Isaac + his velocity * 5 for the first; + vel * 15 + a random unit * rand * 100 for the second; + vel * 20
- rand * 70; + vel * 30 + rand * 50 for the fourth; clamped 20 inside the room. End: cooldown 60 + rand%60.
- Was period 30 / 1 in 3 / range 300. Now period 1, cooldown 60 + random(60) drawn once, first_cooldown [15, 60], hurt_cooldown 10, retention .8. The four bolts stay one volley at the first Shoot along his velocity (lead 10, count 4); Rep's are 7 ticks apart, each re-aimed with its own lead and scatter: not expressible as data.