diff --git a/db/names.tsv b/db/names.tsv index 5d5352c..eca9bf3 100644 --- a/db/names.tsv +++ b/db/names.tsv @@ -748,3 +748,6 @@ 007178c0 GridEntity_Poop::spawn_drops the poop drop table by variant (0/2/3/6 roll), not MenuManager::Render (room-features) 00716760 GridEntity_Poop::spawn_hit_gibs poop gib particles 1000.58 by variant on a damage stage (room-features) 00716b10 GridEntity_Poop::destroy_effects break sound 0xed (giga: half pitch), 1000.43 splat, tinted by variant (room-features) +0056cd60 NpcAI::ENTITY_MOTHER_2 912.10 by the 912 variant table at 006c4964 (boss_approx_3) +00565e00 NpcAI::ENTITY_MOTHER_worm 912.30 by the 912 variant table (boss_approx_3) +00566810 NpcAI::ENTITY_MOTHER_ball 912.100 by the 912 variant table (boss_approx_3) diff --git a/notes/entities/boss_approx_3.md b/notes/entities/boss_approx_3.md new file mode 100644 index 0000000..2828b64 --- /dev/null +++ b/notes/entities/boss_approx_3.md @@ -0,0 +1,74 @@ +# Boss gaps, third pass (rif/boss-approx-3) + +What these bosses do beyond boss_approx_2.md, read from the decompile; each says what the port does with it. + +## hush: NpcAI::ENTITY_HUSH 004bfd30, state 400 (laser looks), Entity_Effect::Update 005d4380 variants 96/101 +- LaserStart finished: LaserLoop, stateFrame -10 - rand%10; per eye null (Eye1, Eye2) an effect 1000.101 spawned at + Hush's position with _spriteOffset (Entity 0xdc) = the null's frame position, depth offset (0x358) 1000, Timeout + (0x45c) and 0x460 = -1, parent Hush; sound 0x1a5, screen shake. Every LaserLoop tick each 101's sprite offset is set to + its null again. In the countdown (stateFrame 60 + rand%120 down): at 10 every 101 gets _dead (0x173) = 1; at 0 every + 1000.96 ground beam gets _dead and Hush plays LaserEnd. +- Effect 101 (asm 005ea366): parent gone -> Remove; first tick Play("Start"); IsFinished("Start") -> Play("Loop"); + Timeout counts down while > 0; IsPlaying("Loop") and (Timeout == 0 or _dead) -> Play("End"); IsFinished("End") -> + Remove. So _dead on an effect means "play your End", not removal. +- Effect 96 (asm 005ea523..): the same Start/Loop/End handling; each tick, if its parent has flags 0x20000100 + (charmed/friendly) it hurts enemies, else each player within (player size + its size) takes TakeDamage(2.0 + [0xbaa630], flags 0, source it, countdown 30). Every 5 ticks (IsFrame(5)) something more (0x67f060, not read). +- Port: Hush's eye_laser / beam_look held effects (Start, Loop, End; removed when Hush goes), its beam strikes one light + bolt a tick per beam, radius 30 + 10. + +## hush_fly: NpcAI::ENTITY_HUSH_FLY 004bf310, its own init (state 0) +- Every Hush Fly, Hush's or a room's: grid collision 0, state 3, sheet Monster_010_Fly_Hush_1-3 at random, I1 (place) + = random 0-999, group (Entity_NPC 0xc7c) = the game's frame count (Game +0x264f8, the same counter that turns the + shapes a degree a tick), V1 = Room::GetCenterPos, I2 bytes 0 and 1 = rand%6 + 1 each, byte 2 = radius 80, health += + 400 + rand%200. Hush's cast (state 100) spawns, sets collision class 2 and velocity 30 random, calls the fly's + vtable +0xc (its update: the init above runs) and only then overwrites group, V1, V2 and the I2 bytes: so its armour + and place are the fly's own. +- Port: hush_flies_step runs this for every fly (an orbit with shapes) once a tick; spawn_armor gives the armour. + +## mother: NpcAI::ENTITY_MOTHER 00569170; type 912 variant table (006c4071: index bytes 0x6c497c, jumps 0x6c4964) +- 912 dispatches by variant: 0 -> ENTITY_MOTHER, 10 -> 0056cd60 (Mother 2), 20 -> NpcAI::ENTITY_ROTTEN_GAPER 004da590 + (Dead Isaac: its `_type == 0x390` branch, friction *.75, velocity.y -1 a tick, 1 in 10 sound 0xa5), 30 -> 00565e00 + (Mother Worm), 100 -> 00566810 (Mother Ball). npc_ai.tsv only shows the first call (ENTITY_MOTHER). +- State 0 (subtype 0): two effects 1000.140 at (Room TopLeft.x - 80, BottomRight.y) loading + gfx/backdrop/07x_corpse_bottomwall.anm2 (Idle, one frame, stopped). The first shows layer 0 alone ("floor") with + LayerState 0x78 BlendMode = (equation 0, rgbSrc 0, rgbDst 2, alphaSrc 1, alphaDst 1): dst * srcColour, a multiply + (the floor's shade under the wall), 0x35c 0; the second hides layer 0 (walls 1-3). Room descriptor +0x18 = 0, doors + removed, players teleported to (centre, BottomRight.y - 120). +- Wrist attack (state 10) on Shoot: 8 worms (i = 0..7) at ShootPos + (0, 60) + 4 dir, dir at 30 + 120 i/7 degrees, + velocity dir * (6 + 4 rand), target the player, 0xba4 (its weave timer) = 15 + 8i, scale (0xc38) .7 + .2 rand and + size scaled by it; blood explosions, 5 gibs, sounds 0x284 and 0x278/0x27a. +- Port: decor (held effect over everything, its multiplied layer converted to a black shade by rebirth_backdrops.py), + Mother Worm spawns (spawn_at/spawn_velocity/spawn_cone speed_random 4). + +## mother_worm: 00565e00 (912.30) +- Init: flags |= 0x2008 (+0x16c), 0x3b0 = 1, flags 0x80100011, collision and grid collision 0, state 3; 6 + rand%3 shots + (Game::SpawnEx 9.0 at its position, spawner its own spawner) kept in a deque: colour ColorMod at 0xc34cf4 (tint 1,1,1,1, + colorize 4, 3.5, 3.2, 1), ProjectileFlags 0x2000 (NO_WALL_COLLIDE), FallingAccel (0x418) -0.098, scale (0x420) = + worm scale * (first: .6 + .2 rand; i > 0: 1.7 - .1 i + .2 rand). +- Each tick: no shot left -> Remove. Timer 0xba4 counts down while > -100. Spawner alive and not dead: timer > 0: v = + v + 2 rand (cos r, sin r) + rotate(unit v, cos(FrameCount * .1) * 60 deg), speed (.88 + .12 clamp(t/15)) |v|, at least + 5; else if target and t > -30: v += unit(target - pos); speed (1 + .1 clamp(t/-30)) |v|, at most 14; t <= -60 and out + of the room (margin -10): Remove. Spawner gone: Remove. +- Body: its position pushed on a 64-deep trail; each shot's velocity = its place along the trail (10 * scale apart from + the head back) - its position. Dead (0x173): every shot's ProjectileFlags 0 and _dead. + +## mother_2: 0056cd60 (912.10) +- State 3: FindGridPath(target, .2, 900); projectileCooldown -= ticks; at <= 0, 1 in 15 a tick (or below -60): rand&3: + 0 -> 12 JumpUp (sound 0x286, cooldown 240), 1 -> 10 ShootBegin (aim angle in V1.X, 240), 2 -> 9 swipes (sound 0x27d, + I2 = rand&3 the first wall, 90), 3 -> 8 SpinBegin (sound 0x27c, 90). +- 8: friction .7; from SpinBegin's Shoot, per tick: every 3 gibs + a blood explosion 70 out; every 4 three arms at + (stateFrame * 47.52 + 120k) degrees, each a string of 4 shots 60 out (speed 4, growing *1.25, a cos wave sideways; + every 12th tick 3 shots at 2.8, scale *.7); past 209 SpinEnd -> 3. +- 9: five swipes (I1 0-4): SwipeLeft/Up/Right/Down by I2; effects 1000.190 (mother tracer) every 80 along the wall + lined up with Isaac (CalcTargetPosition fmod 80); Warn sets their 0x450 to 2, Shoot to 3 and lunges 10 toward the wall + (shake 7); next I2 = I2 + 1 or + 3 at random, the fourth I2 + 2; then 3. +- 10/11: ShootLoop pulls enemies/players/pickups within .9 of its aim (2 / (d^2 * 1e-4 + 1) * .2), drifts toward the + room centre at most .8, approach_angle to Isaac; every 3 ticks effects 1000.151 and from 31 to 119 shots 280-680 out + that hover toward it; past 179 ShootEnd; 11 on Shoot: one boss shot at Isaac at 14 (height -23, accel -.08, scale + .5..1), recoil -15. +- 12: JumpUp; Shoot: collision off; past 30 ticks placed above the room (x = left + 140 or right - 140 by Isaac's half), + ChargeLoop at 8 down (state 6: v.y += 4.5 a tick, friction .85, layers fade by distance), past bottom + 400: + ChargeUpLoop at the mirrored x going up; past top - 400: JumpDown at the room centre (state 7): on Shoot 16 crackwaves + (1000.72) in a ring 80 out, a ground poof, shake 18. +- 16 (arriving from Mother): camera focus (pos + (0, 100)), ChargeEnd after 30 ticks.