diff --git a/db/names.tsv b/db/names.tsv index 9f05f6f..d67d8e3 100644 --- a/db/names.tsv +++ b/db/names.tsv @@ -1130,7 +1130,7 @@ 00638170 FamiliarAI::mystery_egg ? Entity_Familiar::Update case 0x7c (124); 'Crack' event -> SpawnEx enemy, MakeChampion, AddCharmed, BloodExplode; FollowParent 006196e0 FamiliarAI::variant_53 ? Entity_Familiar::Update case 0x35 (53); moves along Entity_Player::GetShootingJoystick *1.25, Float/FloatSide/StoppedDown anims, PlayShootAnim, Room::CheckLine (Robo-Baby 2.0 like) 0061c3f0 FamiliarAI::variant_66 ? Entity_Familiar::Update case 0x42 (66); 'Walking', PathFinder, shoots (apply_tear_modifiers/convert_shot_for_enemy_owner), SpawnEx(3,0x49) -0064fd40 FamiliarAI::blood_puppy ? Entity_Familiar::Update case 0xf1 (241, entities2 3.241 Blood Puppy); Idle/Move Down/Hori/Up, PickEnemyTarget, FindGridPath, MakeSplat, AddPersistentEntity, cap 5 (10 with Mom's Wig 217) +0064fd40 FamiliarAI::blood_puppy Entity_Familiar::Update case 0xf1 (entities2 3.241 Blood Puppy): _coins (kills, AddCoins from the kill handler 0x6bbdc0: 1, 4 for a boss) >= 15 state 1, >= 40 state 2: spawns NPC 802.0 / 802.1 linked (+0x3bc parent), persistent, itself hidden; the linked one gone resets coins; else PickEnemyTarget(120, 6, 0) and FindGridPath(1.328) to it, or to the player beyond 80; friction x0.9; Move/Idle Hori/Up/Down at speed 2 00644780 FamiliarAI::variant_204 ? Entity_Familiar::Update case 0xcc (204); spawns child effect 1000.166 at +0x3c0 (scale .6, tinted), GetOrbitPosition, HasEntityFlags 00755470 Entity_Player::Init 'Got non existing player type %d in Player::Init!', '[Frame: %d] Initialized player with Variant %d and Subtype %d', Entity::Init, GetGlitchBabySubType; vtable (no direct callers) 00a87300 tdefl_optimize_huffman_table miniz: num_codes[33] memset 0x84, counts m_huff_code_sizes[table][i] when static_table, this=tdefl_compressor, EDX=table_num @@ -3471,4 +3471,4 @@ 0072fe80 ItemConfig::collectible_has_tags ? ECX = collectible id, (tagsLo, tagsHi): GetCollectible(id)->tags & mask != 0; transformation matching for the item info panel 0072fec0 ItemConfig::trinket_has_tags ? ECX = trinket id (& 0x7fff), (tagsLo, tagsHi): trinket +0xb8/+0xbc tags & mask != 0 00823be0 Room::is_reachable_from_player ? (Vector* pos, player (null = player 0), useCurrentPos): grid cell of pos must be collision 0 or 5, then Room::is_obstacle_path_valid(pos cell, player cell, 3); ItemInfo::is_pickup_known (cards) -00645bc0 FamiliarAI::lost_soul ? Entity_Familiar::Update case 0xd3 (entities2 3.211 Lost Soul); body not read +00645bc0 FamiliarAI::lost_soul Entity_Familiar::Update case 0xd3 (entities2 3.211 Lost Soul): state +0xd88 0 FloatDown, 1 trail 48 behind player _aimDirection (+0x1630; within 48 adds player velocity x 0.4, else (spot - pos) x 0.04 capped 5), 2 PreSpawn then Spawn + sound 268 + reward by GetCollectibleRNG(612).RandomFloat (<.25 angel pool item, <.5 treasure item, <.75 3 x 5.10.3, else 2 x 5.10.4), 3 Spawn, 4 Death (sound 217 at 1.5 on Sound); friction x0.8; entity collision 4 only in state 1 diff --git a/notes/items/parity_familiars2.md b/notes/items/parity_familiars2.md new file mode 100644 index 0000000..5a57671 --- /dev/null +++ b/notes/items/parity_familiars2.md @@ -0,0 +1,78 @@ +# Parity sweep: familiars2 cluster + +All four are raised by Entity_Player::EvaluateItems 0x763570's CheckFamiliar: Isaac's Heart (276, variant 0x3e) and +Lost Soul (612, 0xd3) at min(count, 1), Blood Puppy (565, 0xf1) and Cube Baby (652, 0xef) at count + effect count. + +## Lost Soul (COLLECTIBLE_LOST_SOUL 612) - ported + +- FamiliarAI::lost_soul 0x645bc0, state +0xd88: 0 plays FloatDown and goes to 1. 1: FloatDown; spot = player pos - + player _aimDirection (+0x1630) x 48; within 48 (2304 squared) velocity += player velocity x 0.4 x +0x39c, else + += clamp_len((spot - pos) x 0.04, 5) x +0x39c; friction x 0.8. 2: PreSpawn until finished, then Spawn, state 3, + sound 0x10c (268 thumbs up) and the reward by Entity_Player::GetCollectibleRNG(612).RandomFloat: < .25 a collectible + of pool 4 (angel), < .5 of pool 0 (treasure), < .75 three 5.10.3 (soul hearts), else two 5.10.4 (eternal), each at + Room::FindFreePickupSpawnPosition(its pos, 40). 3: back to 1 when Spawn ends. 4: Death; its Sound event plays 0xd9 + (217) at pitch 1.5 while visible; finished, invisible. Always grid collision 3; entity collision 4 in state 1 only; + flipX = velocity.x > 0. +- Entity_Familiar::CanBeDamagedByEnemy 0x60d8c0 (0x3e, 0x43, 0xd3, 100): Entity_NPC::HandleCollision 0x6cd410 calls its + TakeDamage on touch; Entity_Projectile::HandleCollision 0x65b670 kills the shot and calls TakeDamage(collision + damage, 0, shot, 30). CanBlockProjectiles 0x60d8e0 true. +- Entity_Familiar::TakeDamage 0x62cdc0: flags | 0x41 (NOKILL); with damage > 0 in state 1: _coins 0 -> sounds 0x1e + (30) and 0x37 (55) at pitch 1.5, state 4; _coins >= 1 (the mantle) -> sound 0x115 (277), 1000.16 subtype 11 poof + following it, _coins 0, damage countdown 30, overlay cleared. +- Entity_Familiar::room_enter 0x62bb70 case 0xd3: at the player, still; with BFFS! (0xf7) _coins 1 and PlayOverlay + Mantle. +- Entity_Familiar::level_start 0x62b360 case 0xd3: state 4 -> visible, state 1; else state 2 (the reward). + TriggerGlowingHourglass 0x651890: state 2 -> 0 (no reward). + +## Isaac's Heart (COLLECTIBLE_ISAACS_HEART 276) - ported + +- Entity_Familiar::Init 0x60de70: player +0x1448 = it; entity collision 4. +- Entity_Familiar::Update 0x61da10 case 0x3e (state 0): base = player pos - GetAimDirection x 60; place = + Room::GetClampedPosition(base + (pos - base).Resized(40), 6); farther than 40 from base: velocity = (place - pos) x + (d - 40) / d x 0.4, capped 15; friction x 0.8. Charge in _fireCooldown: held fire adds 1 up to 30 (not while + _fireCooldown < 1 and a non-looping animation still plays), > 18 while FloatDown plays -> ChargeStart, finished -> + ChargeLoop; let go with 30: ChargeAttack (forced), _fireCooldown 0, then the burst; let go short: FloatDown, the + charge kept. Burst: ButterBeanFart(pos, 120 or 180 with BFFS!, player, no effect, no super knockback); each + vulnerable enemy (QueryRadius partition 8) with mass > 0, not 0x4000000 / friendly: AddKnockback(dir x 16, + floor(assert_lerp_range(mass (sqrt with BFFS!) + dist - sizes, 10, 120, 20, 1, clamp)), impact) (asm 0x620463 .. + 0x620604); sounds 0x45 (69) at volume 2 and 0xb2 (178); 1000.2 subtype 3 (4 BFFS!) blood explosion (BFFS!: 3 more + 1000.2 flying out at 8-12); 1000.46 creep scale 1.2 (3) timeout 450; 8 tears 2.1 FromAngle(k x 45) x 12 with + SetCollisionDamage(8) (vtable 0x40); BFFS!: 10 more at a random way x 10 x (0.7 + 0.2 rand), fall speed -25 rand, + falling accel 0.8, scale 0.9-0.95 damage 8 or 1.3-1.35 damage 12 (Random(2)). Player dead: state 1, hidden, 1000.2 + subtype 1 and BloodExplode; revived: at player + (0, 10), 1000.15 poof. +- Entity_Familiar::TakeDamage 0x62cdc0 variant 0x3e: forwarded to the player's TakeDamage with | 0x800 + (DAMAGE_ISSAC_HEART), past the 0x280 filter. Entity_Projectile::HandleCollision: with Infamy (0xf2) a shot on it is + blocked 1 in 2. +- Entity_Player::update_effects 0x794e50 (HasCollectible 276): every NPC (or coop player) within its size + his + 8: + pushDir = offset / that reach (not normalized); dot = velocity . pushDir < 0 -> AddVelocity_divided(-dot x pushDir); + every projectile within its size + his + 20 and height > -90 dies. + +## Cube Baby (COLLECTIBLE_CUBE_BABY 652) - ported but for the throw + +- Init case 0xef: grid collision 5, _orbitAngleOffset = random, SetFrame(Spin, int(it x 8)). +- FamiliarAI::cube_baby 0x64f860: spin step = min(speed / 120, 0.125) (negative going left), _orbitAngleOffset = + frac(it + step + 1), Spin frame int(x 8). Airborne (_orbitSpeed < 0 or posOffset.y < 0, after TryThrow + 0x63c0a0's -force x 0.7, posOffset -15): gravity +0.7, grid collision 3/5, friction 1, dust 1000.0x36 / 1000.0x3b, + speed kept on wall hits. On the floor: friction = 0.94 + 0.06 x clamp(speed / 6, 0, 1). +- HandleCollision 0x6261f0 variant 0xef: damage multiplier = apply_tear_modifiers x clamp(speed / 3, 0, 5); a player + touching it with fire cooldown out, on the floor, faster than 2: velocity += (it - player).Resized(min(speed x 3, 14)), + sound 0x354 (852 cube baby kick); an enemy hit with multiplier > 0: hit list cleared, AddSlowing(15, 0.9, + Color(1,1,1,1,40,40,40)), AddIce(8). collisionDamage 3.5 (entities2). +- Entity_Tear::HandleCollision 0x673660 with 3.239: once per tear (hit list): cube velocity += unit(cube - tear, + reflected when receding) x |tear vel - cube vel| x (0.1 m_tear / (m_cube + 0.1 m_tear)); the tear passes. +- Entity::GetCollisionMass (0x6b2210, ICF-named IsCollisionIgnored): a player's mass x 10 against it. CanBlockProjectiles + true. Entity_Player::TryHoldEntity 0x7d2170 (Mom's Bracelet, moms_bracelet_grab) lifts it; room_enter puts it 15 + from Isaac toward the entry door. + +## Blood Puppy (COLLECTIBLE_BLOOD_PUPPY 565) - first form ported + +- FamiliarAI::blood_puppy 0x64fd40: see names.tsv. Entity_Familiar::PickEnemyTarget 0x615030 (flags 0): a held + vulnerable enemy is kept; else on IsFrame(6) the best enemy within 120 of it or of the player: max(0, 800 - dist) + + 3 x max(0, 400 - player dist) + 400 for the last target. +- Kill handler 0x6bbdc0 (named Entity_Pickup::Update; it walks the dead NPC's damage sources): a 3.0xf1 source gets + AddCoins(1, or 4 when the NPC's vtable 0x4c, IsBoss); an 802 source heals by the dead one's max HP (capped), sound + 0x8e, and its parent familiar gets the coins. +- Grown: NPC 802.0 at 15 kills, 802.1 at 40 (NpcAI::ENTITY_BLOOD_PUPPY 0x552d30: GetPlayerTarget, keeps 80 from a + player target while its _projectileDelay runs, else paths to it; damage from Isaac's side cut to 1% / 10%; + _i2 growth Spawn at 25, 35, then each 10). store_backup 0x630450 keeps its HP; room_enter / level_start move it. + Not ported: see the familiars2 questions.