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

65 lines
5.7 KiB
Markdown

# Boss gaps, second pass (rif/boss-approx-2)
What these bosses do beyond the first boss pass, read from the decompile; each says what the port does with it.
## the_frail_2: NpcAI::ENTITY_PIN 00476860 (variant 2, state 9: the two beams)
- State 9 counts I2's high half down from 120 (state 8, the turning beam: 80). At 110 and 60 it aims at the target
(CalcTargetPosition), stores the angle in V2.X and spawns a following tracer (Entity::SpawnFollowingEffect198, 24
ticks, colour .8); at 100 and 50 Entity_Laser::ShootAngle(1, pos, V2.X, 20 ticks) along it, offset (+-25 by way, -70).
Eyes/Effect1 layers glow at 90-110 and 40-60. Ported: a thin harmless sweep beam aimed at Isaac 10 ticks, then the
20-tick beam keeping its angle.
## wormwood: NpcAI::ENTITY_WORMWOOD_main 005af800 + Entity_NPC::HandleCollision 006cd410 (asm only)
- HandleCollision (asm 006cf795): type 62 variant 3, head (no parent), state 4 or 6 and I1 == 2, touching a bomb
(type 4): state 5, bomb fuse (0x410/0x414) 35, flags, held at its position (SetRef_bec). I1 == 2 only from its wall
burst (state 16 -> 6) until it is back under (state 3 sets I1 0), and after a stun.
- State 5: friction *.85, plays HeadBackStunned (velocity.y < 0) or HeadFrontStunned (35 frames), sound 0x8e; the bomb
rides its position; when the clip ends the bomb's fuse is set 0 and updated (goes off), then state 4, stateFrame 1,
I1 2, velocity 10 toward its next segment turned +-15 degrees.
## hush: NpcAI::ENTITY_HUSH 004bfd30, state 100 (flies) and 400 (laser)
- Flies: each tick of the cast, a WeightedOutcomePicker (seeded alike every tick, so one pick a cast): 0 round Hush
(weight 100 only while group 1 has < 10 flies; shapes 2 and 6, radius size + 40, V2 0, group 1), 1 launched (100;
V2 = 2 toward Isaac turned +-20 degrees by frame parity, shapes rand%6+1 twice, radius 80, group = a seeded id),
2 the same homing (100, I2 byte 3 = 1). 1 in 3 a tick, while the group has < 20: 1-4 Hush Flies (0x128) 9.5 out of
(0, -10), collision class 2, velocity 30 random, V1 = Hush's edge toward the launch (pos + V2 * size / |V2|).
- NpcAI::ENTITY_HUSH_FLY 004bf310: the group's first fly to update places all (QueryNPCsGroup): V1 += V2; homing turns
V2 a tenth toward Isaac keeping its speed; group 1's V1 is the spawner's position. Each member: I1 += 10, then +2 if
its nearest member (FUN_004be670, by position) is behind on the path, -2 if ahead; t = I1 * .001;
p = shape(t) of both shapes (FUN_009bfd40 builds: 6 a 31-gon, 1 a 10-point star inner .382, 2 a 12-point star inner
.577, 3-5 polygons; FUN_009bffb0 reads a share of the outline by length), turned by the frame count in degrees, y * .7,
blended by clamp((sin(t * .1) + .5) * .7, 0, 1); target = V1 + blend. Out of the room by 200: removed. Velocity +=
(target - pos + V2 - v) * .3, capped 10. Spawn armour: health += 400 + rand%200, -4 a tick down to max.
- Laser (state 400): LaserLoop spawns two effect 1000.101 (Hush Laser Up, look only: Start/Loop/End) on the eye
nulls, moved there every tick, removed at stateFrame 10; after -10-rand%10 ticks two effect 1000.96 (ground beams)
halfway to Isaac either side of his line, target the player, stateFrame 60 + rand%120.
- Entity_Effect::Update 005d4380 (asm; jump table at 0x606f8c, index variant - 1): variant 96 at 005ea523. First tick:
play its clip, velocity = unit(target - pos). Every 10 ticks (IsFrame(10)): target = player pos + player velocity * 5,
plus perpendicular (of unit(target - pos)) * 40 to the side by its index & 1. Every tick: velocity += unit(target -
pos), then * .8 (pow by the time scale): at most 4 a tick. Variant 101 at 005ea366 only plays its clips.
## big_horn: NpcAI::ENTITY_BIG_HORN 00453140, an empty hole (subtype 0, state 3)
- Once SmallHoleOpen ends: collision class 3, contact damage 1; per player FUN_00452c60 (falling in), FUN_00452d40
counts bombs eaten into I1; past 30 ticks: 1 -> state 9 (HandThrow), 2+ -> state 10 (HandBombs), 0 -> SmallHoleClose;
sound 0x375. Ported as big_horn_empty_hole (attacks[]/spawn_beyond, ticks_held, swallow/many_next).
## turdlet: NpcAI::ENTITY_TURDLET 0059c830, state 6 (flung)
- State 8's end: every segment state 6, velocity Resized(target - pos, 12), age 0. State 6, each segment: friction
.98, age += 1; a grid hit is shared by all; velocity += (target - pos - v) * .5 with target = for an end its
neighbour's pos + vel + Resized(own - neighbour's, 24), for a middle the mean of its neighbours' pos + vel. Mean V,
centroid C, spin w = mean cross(unit(p - C), v). s = clamp((age - 60) / 90, 0, 1): L = (1 - s) * 10 (* 1.35 under
4 segments): when L > .5 and |V| < L, v += V * (L - |V|) * .2 / |V|; W = (1 - s)^2 * 6: when W > .5 and |w| < W,
v += perp(p - C) * clamp(sign(w) W - w, -.5, .5) * .05. The head ends it past 150 ticks under 3: all state 4.
## delirium: NpcAI::ENTITY_DELIRIUM 004a6500
- Entering a form: _deliriumRemainingAttacks = 2 + rand%3; the form's state 6, 7, 8-11, 13-16 on stateFrame 1 takes
one off; at 0 (or the transformation timer) it goes back (state 0x10).
- Every tick: shieldStrength = (1 - health / max) * 80, 0 while its form is itself (0x19c).
## siren: NpcHelper::siren_pick 0058e680 (her chooser)
- FUN_0058e490 counts Isaac's familiars (type 3, charmable): a free, b charmed (flag 0x100), total.
FUN_0058e590 counts charmed ones following her. Outcomes (state): 1 scream (8): 100 - 33 n while n < 2 (her
charmed); 3 charm (10): clamp(33 a - 15 b, 1, 150) while b < 6 and a > 0; 4 Recall (12): clamp(33 c, 33, 100);
5 burrow (6): 100 * (clamp(x into the right 80) + clamp(x into the left 80) + clamp(y down the lower half)) while
b == 0; 0 idle: 100 with b >= 1 (or when the list is empty). Flags 0xbb9/0xbbb/0xbbc/0xbbd block each.