5.1 KiB
Rotgut's maggot and crawl space (rif/ascent, 2026-10-25)
Rotgut maggot (NpcAI::ENTITY_ROTGUT_maggot 0x57e4a0, 911.1)
Init: green splat colour, "Idle", posOffset.y 36, TargetPosition = its place (velocity = target - pos every tick:
anchored), a 1000.6 effect with gfx/1000.006_rotgut detail.anm2 "Detail" as its child. above = Isaac not flying
(grid collision class != 5) and higher than its y - 80. State 3: after 15 idle ticks, 1 in 30 a tick: Isaac below it
and 2 in 3, or (else) a coin flip -> a head attack (rand % 3 + 3), else a butt attack (rand % 3); projectileCooldown
-1, stateFrame 0. Any attack's clip end -> state 3.
- 8 ButtAttack1 (Shoot 14): sounds 37 (fart) and 213 (0.8); one shot from ShootPos (FUN_0057e3b0), speed 10 + 6r at 30 degrees up-left, scale 2, FallingSpeed 0, FallingAccel 0.72 (NpcHelper::rotgut_fire_projectile 0x57e430 sets params +8/+0xc/+0x14 directly), a blood burst.
- 9 ButtAttack2 (Shoot 9) / 12 HeadAttack2 (Shoot 8): sound 317; for 21 ticks from Shoot, every 4th: one shot
velocity ((1.5 - min(1, f / 16) * 1.3) * -2, 0) (state 9 with
above: + 6..15 down), FallingAccel -0.1, scale ((5..7) - 3) / 3; state 9 the green preset (0xc34d20); a 1000.2 blood splat each. - 10 ButtAttack3 (Shoot 19): sound 37, shake 10; at once Game::Fart, ButterBeanFart radius 100 and DamageRadius 50
with the poison tear flag; for 6 ticks: 4 shots speed 10 + 6r at 25-40 degrees (
above: 16 + 6r at 30-55), FallingAccel 0.72, scale as above; 2 effects 1000.141 (smoke cloud) a tick; a green splat. - 11 HeadAttack1 (Shoot 40): Entity_Laser::ShootAngle(variant 1, ShootPos + (0, 12), angle 180, timeout 30, offset (0, -12)).
- 7 HeadAttack3 (sound 312 as it starts; Shoot 46, Sound 58): before Shoot, every tick a pull of 0.5 * 2 / (d^2 1e-5
-
- toward it on every player (1.4x, at most 0.8, / mass), bomb (0.7x), pickup (0.4x) and NPC, shake 4; at Shoot sound 11, shake 20, one -2 push; then 30 ticks, every other: 3 shots speed 10 + 11r at 10-25 degrees, FallingAccel 0.72, scale as above, 1 in 6 a small maggot (spawn_small_maggot 0x4d8b50: 853), else 1 in 6 an attack fly (18), blood. Sound 58: 72.
-
- Dead: its live projectiles with the parent flag 0x40000 die.
The face (NpcAI::ENTITY_ROTGUT_face 0x57bec0) swallows Isaac into ROOM_ROTGUT_DUNGEON1 (-14) after 20 ticks (beast.md); 00.special rooms 16.1010 (maggot at (12,5), the right wall) and 16.1020 (the heart 911.2) are crawl spaces: spawn entries 0.10 / 0.20 / 0.30 along their ladders (not read).
isaac-classic: rotgut_maggot as a scripted boss between the face and the heart in the boss room (the face's death spawns it, its death the heart); the side view (gravity, ladders) is not ported.
The crawl space chain (rif/side-view, 2026-10-25)
- Face death (NpcAI::ENTITY_ROTGUT_face 0x57bec0, its end): health <= 0 -> flags |= 0x11, state 0x10, _dead cleared, health 0.001, collision 0, invincible, projectileDelay -1, stateFrame -1, renderZOffset -500, sounds 0x70 and 0x1c, "Transition", a green blood explosion, BloodExplode. State 0x10: "TransitionLoop" once Transition ends; its Shoot (Transition frame 40) plays 0x133 (growl) and sets projectileDelay 0; then each tick: 1000.151 subtype 0 every 2nd, subtype 1 every 4th; strength 1, or (pd - 90) / 30 + 1 up to 8 past 90 ticks; every player, active enemy, tear and projectile: f = 2 / (d^2 1e-4 + 1) (players min(f 1.4, .8) / min(mass, 1); tears f .7), velocity += f * strength * speedMult * dir / friction. Within 20 (d^2 < 400): tears and projectiles removed, NPCs killed, a player plays "FallIn", controls off, pitfall state 4, stateFrame 0. stateFrame > 19: enterDoor -1, Level+0x18320 = its position, 0x57be90 saves the current room at Level+0x18328, StartRoomTransition(-14, -1, 2).
- Level::init_rotgut_dungeon_room (0x74beb0): descriptors -14 / -15 get RoomConfig::GetRandomRoom(stage 0, type 16, subtype 2 / 3).
- Maggot room exit: rotgut_death_spawn_effects (0x581200) on the maggot's kill spawns three 1000.119 timers with callback 0x580360 after 1, 6 and 11 ticks at the right wall's grid indices (w + 2) * 7, 6w + 14, 5w + 14 (rows 7, 6, 5): each removes the wall there for a GridEntity_Gravity, re-PostInits the cells above and below and spawns rock particles; the right edge then leads to -15 (Room::update_door_transitions). Its child (+0x3c0, the detail) dies.
- Head or butt (state 3):
above= player not flying and y < maggot.y - 80; 1 in 30 a tick: (!above and rand % 3 < 2) or a coin flip -> head (rand % 3 + 3), else butt. - HeadAttack3's volleys (every even projectileCooldown < 30): 3 shots velocity (-10 - 11r, 0) turned 10-25 degrees, FallingAccel .72, scale ((5..7) - 3) / 3, from ShootPos; then 1 in 6 spawn_small_maggot velocity (-6 - 4r, -4 - 4r), else 1 in 6 an attack fly (18) at (-10 - 10r, 0) turned 0-30 degrees.
- The heart room (subtype 3) returns on clear after roomClearDelay 20 to Level+0x18328 (Room::Update).
isaac-classic now: the face's death leaves rotgut_mouth (aura square/ramp/swallow), the maggot and heart are fought in their crawl spaces (crawlspace1010 / crawlspace1020, side view); see systems/side_view.md.