Ghidra 12.2 project and full dump of isaac-ng.exe v1.9.7.17, query scripts, notes indexed by entity, anm2/rooms reimplementations, and db/ (names + fields) that build.sh re-applies. Fixes awk numeric address comparison in find.sh/decompile.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 KiB
12 KiB
Group 03 notes (pass 4)
Decompiles are in ./decompile.sh 0x<addr>. The Leper's AI really lives at 00547b60, which the toolkit names GameOver::Show (a mis-name).
The patch was dry-run on parsed records only, without the loader. Every key it uses is in a keys_check list.
corn_mine: ENTITY_CORN_MINE 0048ee30. Changed
- Repentance has no health drain. In state 3 it pulses when Isaac comes within 60 (euclidean), or after 181 ticks (
_stateFrame >= 0xb5). State 8 plays Pulse (59 frames) to its end, then explodes: Fart radius 85, BombDamage radius 40, and FireProjectiles mode 8 (eight-way) at 10 (projectile variant 5, corn). Friction is *0.1 every tick. - Removed
regenand thephases. The attacks are now Pulserange 60, dieand Pulsewhen after_tick 181, die. Retention .5 -> .1. death_effects enemy_shots speed 8 -> 10. - Approximations:
- after_tick counts the room's ticks, not the mine's age. Mines spawned later in the room (Dangle's) therefore go off early. Proposed gate
when[]/age_at_least N: open once the actor has lived N ticks. - The range test in
attacks[]/rangemay be per-axis. Repentance's is round. - The gas death effect (radius 60, Flash's) is left as it was. Repentance's is a fart of radius 85 plus a bomb blast of radius 40.
- after_tick counts the room's ticks, not the mine's age. Mines spawned later in the room (Dangle's) therefore go off early. Proposed gate
brownie_corn (217.2): NpcAI::ENTITY_DIP 00534860. Changed
- Same as the dip: a
rand%10==0roll each tick; then velocity += random dir * (5 + rand*5) / friction (no doubling, which only variant 1 gets). Moving: friction *.95 until speed < 1. Idle: *.8. - Copied the dip's attack: period 1, one_in 10, impulse 5 + lunge_spread 5, retention .95, end_below 1, base retention .8. It was period 4, 1/3, lunge .5 at .92.
turdling (237.2): NpcAI::ENTITY_MAGGOT 0052db50 (type 0xed branch). Changed
- Walk: MoveRandomlyAxisAligned(0.6), friction *.85 -> roam .6 / .85 (as on the gurgling record).
- Charge check
IsFrame(4): Isaac (plus velrand16) within 20 of the row or column, dist² < 40000 (200), a clear line. Then each tick AddVelocity(dir*1.3) with friction *.9, until it is stuck 6 ticks or hits a wall. That gives period 4, range 200, lunge 1.3, retention .9, lunge_ticks/repeat as on the gurgling record, on_wall end. charge_speed 8 and range 400 are dropped. - Charge end -> Stop (friction *.85). On Shoot, while fewer than 9 enemies are alive: 4 brownie corns at 90° steps, placed size+5 = 18 out and moving at 10 (was 8). Otherwise a ButterBeanFart of radius 120.
- The pick_next 3/1 fart branch and the duplicate charges are removed. The attacks are now [charge -> Stop/spawn]. The Stop cooldown 30 is removed (state 3 goes straight back to walking).
- Proposed:
attacks[]/next_when: [{when: [...], next: i}], a first-match override ofnextevaluated as the attack ends. Turdling:{when: [{enemies_above: 8}], next: <fart gas radius 120>}. With it, re-add the old gas attack (radius 85 -> 120). - Creep: Repentance drops brown slippery creep 0x5e (scale 1.23) while speed > 3, and 1/3 of the time plays sound 0x25. The trail creep on the charge is kept as is.
tainted_mulligan (22.3): NpcAI::ENTITY_HIVE 0050c370. Changed
- Clock v1: while it is <= 0, with Isaac within 300 and a clear line, it plays HeadAttack and the clock is set to 210 (variant 3). With the line blocked: 7. Out of range: 3. On HeadAttack's event: 6 linked Ring Flies (each with +200..299 on a timer) - matches.
- Attack: range 150 -> 300, sight true, period 7 / one_in 10 -> period 3, no roll, cooldown 60 -> 210.
- Death (health > -20): variant 3 spawns ONE fixed batch of 13, each at a random angle 5-15 px out: boom fly 25.0, red boom fly 25.1, sucker 61.0, spit 61.1, ink 61.3, attack fly 18 x2, fly 13 x2, army fly 868 x4. The count is 1 batch regardless of crowding (minus field c76).
- Set count 13, crowd_scale 0, radius 15, and weights matching the batch.
- Proposed:
death_spawn/list: [create_type...], spawned in order, one each (no weighted draw).
- Not expressed: the crowd delay (
rand%5+4 <= aliveadds 20..69 to the clock; ring flies on serial%5 are not counted), and the flee-vs-MoveRandomlyBoss switch.
grilled_gyro (824.1): NpcAI::ENTITY_GYRO 004ff620. Changed
- Wander: each tick velocity += heading * 1.2 with friction .8. The heading is redrawn every rand%40+10 ticks: 1/3 toward Isaac if the line is clear, else random. -> move turns, speed 1.2.8 = .96, retention .8, turns {period 10, random 40}. It was wander .4/.85.
- Dash roll: a clear line, dot(heading, raw delta to Isaac) > .7 (raw, so effectively the front half-plane), and
rand%14==0. -> cone {cos 0}, one_in 14, period 1. - Dash: velocity zeroed, heading at Isaac. Each tick += heading*1 (variant 1; variant 0 has a .9 on x only), friction *.96, for 80 ticks (variant 0: 60). It reflects off walls. -> lunge .45 -> 1, retention .96, ticks 80, repeat removed.
- After: i2 = -30 - rand%30 -> cooldown 1 -> 30 + cooldown_random [30,1], once.
- Not expressed:
- Fire: on IsFrame(4) with
rand&3==0it spawns a fire (33.10) scaled .4-.6. The existing bolts effect is kept. - The heading slews toward Isaac during the dash (FUN_00682a50; rate unread). The existing seek .07 is kept.
- Fire: on IsFrame(4) with
cross_stone_shooter_always_on_202_11_1: ENTITY_CONSTANT_STONE_SHOOTER 00506320. Changed
- Variants 10/11: the first shot comes after cooldown 22. projectileCooldown is never reset after that, so it fires back to back. ShootAndRotate1/2 alternate (subtype toggles), and on Shoot it fires FireProjectiles mode 6 (subtype 0, cardinal) or mode 7 (subtype 1, diagonal) at 10.
- attack0: period 7/one_in 6 -> period 1,
when after_tick 22, speed 7 -> 10, next 1. attack1: speed 10, next 0 (an endless loop).
leper, leper_stage_2 (310.0/310.1): 00547b60 (named GameOver::Show). Changed
- Timer t. With t <= 0 (and not variant 3) it uses EvadeTarget, friction *.8. A negative t counts up. At 0,
rand%10==0sets t = 90. - With t > 0: FindGridPath(.5; variant 2: .7, variant 3: .9), friction .9, t counting down. At 0, t = -30 - rand%60. Damage takes ceil(2dmg) off a positive t (min 1).
- move chase -> path .5, retention .8 -> .9. Flee patch retention .8.
- The fixed 150-tick clock (90 chase / 60 flee) is kept. Repentance is 90 chase, then 30-89 flee, then a 1/10 per tick roll.
- Proposed:
phases[]/hold {ticks, random}(a phase stays open that long once opened), pluswhen[]/one_into open it. Or else achase_flee {chase, flee, flee_random, resume_one_in}behaviour field.
- Proposed:
dangle (261.1): NpcAI::ENTITY_DINGLE 004855b0. Changed (mirrors pass 3's Dingle)
- Idle: after 15 ticks, a 1 in 10 a tick (1 in 5 when hit). Then 1/3 Whistle(->Spit), else 1/2 BeforeSlide, else Dance. -> choice [0,4,5], a new Dance attack (cooldown 15). Off-slide retention .7.
- Slide: on the Slide event, impulse 10 at Isaac. Then +1 per tick (divided by friction) until the clip ends, friction .98. -> impulse 10, lunge 9 -> 1, lunge_end removed.
- Count: variant 1 slides twice (
i1 < 1). repeat limit 1 is kept. - Variant 1 does not poop. On the first slide only, a
rand%5==0spawns a Corn Mine (295). The poop is removed. BeforeSlide's next is now [1,1,1,1,6], where 6 is a Slide copy with spawn corn_mine, spawn_most 1. - Tired: (60+rand%30)/2 ticks for variant 1 -> ticks 30, ticks_random [15,1], repeat removed.
- Spit: mode 2 (3 shots) at 10 (was 8), projectile variant 5 (corn). rolled false.
- Whistle: 1-2 brownie corns (217.2), placed pos + dir*30 + random 10, moving at 15 toward Isaac. -> spawn_count_random 3 -> 2, spawn_speed 15, spawn_toward 30.
- Not expressed:
- A 12+rand%4 tick pause (friction .9) between the two slides.
- A Fart of radius size+20 (.5 damage) on a periodic tick during the slide.
- Whistle's limit of 5 enemies.
elleech (855.1): NpcAI::ENTITY_CHARGER_L2 004e38c0. Changed
- Walk: MoveRandomlyAxisAligned(.65), friction *.85, vertical *.9647 more -> acceleration .6 -> .65, retention [.85,.7] -> [.85, .82]. corridor_walker adds then brakes, as Repentance does.
- Charge test every tick (no period): Isaac + velrand16, clamped. It needs alignment 20, in front, and a CheckLine. -> charge_period 4 -> 1, prediction 8 -> 16.
- Charge: velocity += v1/f with f = f*.8, and v1 = dir*2 (variant 1). That nets v = .8v + 2 -> charge acceleration 1.3 -> 2, retention .85 -> .8. Repentance has no lane snapping -> lane_retention .9 -> 1. It ends when stuck 6 ticks or colliding.
- Not expressed (the defining Elleech trait): variant 1 re-paths during the charge (FindGridPath at 10). When the path's direction changes, the charge stops. Then, after a 4-tick pause (friction .85), it charges again along the path's next axis direction (FindGridPath at 2), with no alignment test. It chases around corners.
- Proposed corridor_walker
charge/follow_path {pause: 4}: on a charge end, if the grid path to Isaac turns, start a new charge along the path's next cardinal direction afterpauseticks.
- Proposed corridor_walker
- Side note, not mine: level_2_charger (855.0) uses lunge 1.3 under retention .8. The decompile divides by friction (net .8v + 1.3), so the scripted lunge (added before the brake) should be 1.3/.8 = 1.625.
rainmaker: NpcAI::ENTITY_RAINMAKER 00578a70. Changed (small)
- The rolls match:
rand%20, then 1/3 each Attack1 / Attack2 / Attack3, so 1/60 each. - Attack1 drops: k = 0..5, both sides. The line is at x ±30(k+1). The arc has radius 70 at angle k*30° (+180 for the other side). Each drop's delay is *(9-k)8, the same formula for line and arc. The arc's hover ticks ran the wrong way (24 at k=0). They now follow the line's: 64-8k.
- Not expressed:
- The drops are laid one pair every 3 ticks (projectileCooldown 12,15,...,27), not all on Shoot. Hover is offset 8 below Repentance's 72..32, presumably to absorb that. Line vs arc: the line is used if |dir.y| < .25 or on a coin flip.
- Attack3's volley count is max(4, sum over absorbed drops of 2+rand%2). With all 9 drops absorbed that is 18..27, against the data's 8..13. Not changed (it depends on the drops reaching it). Proposed
boss_volley count_from: "absorbed".
Skipped (already match, or out of scope)
- special_shopkeeper, special_secret_room_keeper (ENTITY_SHOPKEEPER 006c2220): pinned in place, friction .8, look
rand%9+1, loot on death. Matches. - moms_dresser, couch, moms_vanity, tv (960 generic props): no AI. Matches.
- mr_fred 00486db0: matches. Idle rand%30+30; .4 Dissapear (hidden rand%30+15, Appear frame 5 mode 8 at 8); .4-.666 Squirt (frame 15 mode 6 at 10, scale 2); otherwise 70% Cord if a homunculus waits, else Barf (Fred < 4, frame 8). After each: rand%30+30.
- mama_gurdy 0048ae30: the volley (12 boss shots, traj 10, aimed 70% of the way to Isaac), waves 1/3/5/7 of mode 5 at 8.5 every 5/3/2 frames, and the 20 spikes all match. The idle timer is
(int)(hp/max*.5+.5) * (rand%25+30). As decompiled, the int cast truncates to 0 below full health (attacks every ~2 ticks once hurt). Worth a check against the asm (decompile.sh --asm 0x48ae30). Unchanged. - lil_blub 00450da0: the rolls (40/70 or 40 under 30% hp/45/110, or 10 under 30%), hop counts and spiral match. The spiral's per-shot ±6° jitter and speed 10*(.8+.2r) are not expressed (minor).
- rotten_gaper (10.3, ground_chaser): Repentance FindGridPath(.6, or .72 while its head overlay plays). The flaming gaper's .7 against Repentance's .5478 suggests the ground_chaser scale differs, so left alone.
- singes_ball (915.1) 0058d8b0: friction is
.7 + .29*clamp((speed-.5)/3.5, 0, 1)(.7 slow, .99 at speed >= 4). Explosions kick it. Kept retention .95.- Proposed
retention_by_speed {min .7, max .99, from .5, to 4}.
- Proposed
- henry 00565bc0: snaps to a free pit, then leaves (Leave, sound 0x18c) once a counter of (maxhp - hp) per tick passes 30. Its pit placement is not expressible. Left alone.
- reap_creep 00579890: Repentance's is a reworked 3-phase AI (by hp thirds): a projectileCooldown idle, Summon1 vs Attack1Start 3/4 when no wall creep, Summon2/Attack2, Dash left/right, and an Attack3 beam. That is far from the Flash-style data. A rewrite was out of this pass's scope; it needs a dedicated pass.