# 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. ## hornfel: Entity_NPC::Hornfel_UpdateAI 004b92e0, NpcHelper::hornfel_attack 004b8ca0 - hornfel_attack (when projectileDelay runs out in state 3): WeightedOutcomePicker, weight 1 each: 0 a throw (state 8, Attack1Left/Right, _Back when Isaac is above by .2), 1 the double throw, 2 the mines (only while 0xba0 is 0; sets it 150): state 9 Attack2, on Shoot 3 (4 when the room's width * height > 135) brimstone bombs (4.15, flag 0x188) thrown (FUN_004b90e0) to free spots each the best of 10 random positions 40 in by summed distance from the others. - State 8's throw: Isaac + his velocity * (.1 + .2 rand) * distance, the free spot there. After it, 1 in 10 a Taunt (150-tick rest) while above half health. - State 10 (ChargeLeft/Right/Up/Down by the cart's velocity): the cart's speed + .08 a tick up to 30; every 15 ticks in the room a normal bomb thrown to a free spot by him. State 11 ChargeFinish: on Shoot one boss shot at Isaac's lead (.1 of distance) at 10, flags 8, fall -3 + .7, gravity 2. What sets state 10 is not in Hornfel_UpdateAI, hornfel_minecart or ENTITY_MINECART (the room controller, 1281, probably). - State 16 (decoy) death: explosion 1000.1, crater 1000.18, BombDamage 110 / 75, six troll bombs (4.3) at 5-20 random. ## ultra_greed: NpcAI::ENTITY_ULTRA_GREED 0059edb0 - shieldStrength 65 (Greedier 45); 85/60 when PersistentGameData+0x142 or (+8 == 2 and a co-op player). Doubled in states 100 (slot), 400 (guard), 510 (spin). Greedier sets 45 at the morph and keeps it. - Each tick it sums the coin pickups' values (5.20 subtypes 1-7, table DAT_00b67e34) on the floor (local_148). - Entity_Pickup::HandleCollision: a coin touched by Ultra Greed (406) or 916 heals UltraGreed_Heal(value): hp += max * .00125 * n (capped at max), I2 (anger) += n up to 25, a gold flash. - NpcHelper::UltraGreed_Smash 0059e730: states 700/16 draw 0 (weight 100: 1 to n random doors) or 1 (70: n draws), state 710 one; each door drawn opens (state 8) with UltraDoor_Opposite's (state 9). ## mother: NpcAI::ENTITY_MOTHER 00569170 - State 16 (Transition): each Shoot event (frames 25, 31, 102, 150) by I1: 0 and 1 remove an arm (gibs, blood, 0x8d), 2 Entity_Laser::ShootAngle(variant 6, ShootPos + (0, 10), 90 degrees, 47 ticks), tint (2, 2.2, 1), max distance 1000, blood cloud; 3 Morph(912, 10) with full health, velocity (0, 16), offset (0, 60), camera focus 100 below. - Wrist attack (state 10) on Shoot: eight Mother Worms (912.30) from ShootPos + (0, 60) + 4 out, angles 30 + 120 * i/7 degrees, speed 6-10, target the player, a field 15 + 8i, scale .7-.9. - State 0 (subtype 0): two effects 1000.140 loading gfx/backdrop/07x_corpse_bottomwall.anm2 (layer 0 alone, under; the other layers over, 0x35c 1), removes the doors, teleports players to the room's bottom centre - 120.