diff --git a/db/names.tsv b/db/names.tsv index 8adc0ac..dd5d62d 100644 --- a/db/names.tsv +++ b/db/names.tsv @@ -3472,3 +3472,6 @@ 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) 00814980 Room::shop_ware_roll ? (&variant, &subtype, &price, seed): the next shop ware: its shop item id (the restock deque front, else descriptor +0xac cycling 0..7, init_shop_item_slots first), pickup_roll_random_variant, GetShopItemPrice, ResolveHeartSubType; returns the id +0063f9f0 Entity_Familiar::ai_blood_oath Entity_Familiar::Update case 0xcb (Blood Oath familiar 203): Idle..Idle4 by stab count, stab state hurts its player; parity_defensive +0042bc20 is_player_jelly_belly HasCollectible(param_2, 0x2b2) callback (Init, TakeDamage); parity_defensive +00429560 DeathmatchManager::is_mode_4 returns *this == 4 (Game+0x26614 via GetField26614); TakeDamage Jelly Belly odds Random(2 - it); parity_defensive diff --git a/notes/items/parity_defensive.md b/notes/items/parity_defensive.md new file mode 100644 index 0000000..ccd7f6f --- /dev/null +++ b/notes/items/parity_defensive.md @@ -0,0 +1,81 @@ +# Parity sweep: defensive cluster (Repentance+ 1.9.7.17) + +Items: Trinity Shield 243, Betrayal 391, Camo Undies 497, Broken Modem 514, Blood Oath 569, Akeldama 641, +Spirit Shackles 674, Jelly Belly 690 (port key belly_jelly), Salvation 696. + +## Jelly Belly (0x2b2) — ported +Entity_Player::TakeDamage 0x7729d0, after the invincibility returns and before Holy Mantle: +- Skipped for damage flags 0x2200000 (DAMAGE_FAKE | DAMAGE_NO_MODIFIERS). +- Source must be an entity of type 1, 9, or 10..999. Random(2 - (deathmatch == 4)) must be 0 (one in 2 out of + deathmatch). +- Source a player (deathmatch only): velocity-based push, flag 1<<36, return. +- Source an enemy (IsEnemy): only if Distance(src pos, Isaac pos) <= src size * max(size multi) + Isaac size + 10, + else the hit lands normally. AddKnockback(src, Isaac, (src - Isaac).Resized(20), 15, true); sound 0x24c (588, + JellyBounce1-3) vol 1; _jellyBellyBounceTimer (+0x1efc) = 20. +- Source a projectile: Entity_Projectile::Reflect 0x652fa0 with (src - Isaac).Resized(10) (sets HIT_ENEMIES and bit 31, + clears parent, revives it, falling speed * -0.85); sound 3 (blobby wiggle) vol 0.8 pitch 1.25; timer 14. + (A tear branch calls Entity_Projectile::Deflect 0x67a080, unreachable: type 2 fails the source test.) +- Then SetMinDamageCooldown(8) (asm 0x7735aa / 0x7736f2: PUSH 8), entity flag 1<<36 (FLAG_NO_DAMAGE_BLINK), return 0. +- Look: Entity_Player::Update 0x782af0 decrements +0x1efc by the speed multiplier and wobbles the sprite: + s = 1 - (t / 20) sin(2 pi t / 10) 0.4 (t then t + 1 for the second layer), x scale * (2 - s), y scale * s, + offset y + (s - 1) * 3. Not ported yet. +- FUN_0042bc20 = HasCollectible(param, 0x2b2) (a callback from Init and TakeDamage). + +## Salvation (0x2b8) +- TakeDamage: after an accepted hit, if held and GetCollectibleEffectNum(0x2b8) < 10, AddCollectibleEffect(0x2b8, 1, 1). +- update_effects 0x794e50: while held keeps a halo effect 1000.123 subtype 6 (_salvationEffect), parent Isaac, + position offset (0, -15), sprite rotation = FrameCount % 360 (+ 0.5 with entity flag 0x4000); removed without it. +- What the halo does is in Entity_Effect::Update 0x5d4380's case 123 (jump table 0x606f8c, entry 0x6064cc); the + function times out in Ghidra (600 s), not yet read. + +## Trinity Shield (0xf3) +- update_shooting 0x77b020: while held keeps effect 1000.47 (+0x1428), parent Isaac, rotation = aim angle - 90 + (+0x1404), lerped by 0.5 (0.8 while not firing) toward it, placed 30 out along angle + 90, coloured by tear colour; + blinkTime max 7. Removed without the item. Its behaviour is Entity_Effect::Update case 47 (0x5f2add), not yet read. + +## Camo Undies (0x1f1) +- TriggerNewRoom_TemporaryEffects 0x7a8350: variant 0 and held -> AddEffect(collectible 0x1f1, its maxCooldown). +- Entity_Player::Update 0x782af0: with the effect, any of the four fire inputs or a mouse aim target removes it; if + the room's frame count > 6: RemoveNullEffect(0x30, -1), AddNullEffect(0x30 camo boost, 0, 30), sound 0x50 (80, + black_heart_burst), ShakeScreen(10), ground poof 0.8, Game::DamageRadius(pos, Isaac, 50, flags none, 15, 80), + EvaluateItems. (A deathmatch-only branch re-adds it after 15 s and confuses other players 90.) +- update_effects: RemoveNullEffect(0x30, 1) each update (the boost's count of 30 runs down). +- EvaluateItems 0x763570: speed + 0.5 with the effect (+1 with Dark Arts' 0x2c1 instead); camo boost count * 0.25 to + the tears sum and * 0.35 to the damage sum. +- Entity_Player::IsInvisible 0x7c32c0: the effect (or null 0x45, or player type 0x23). Entity_NPC::Update 0x6c4b30: + an enemy whose player target is invisible gets AddConfusion(-2) each update (countdown at least 2, grey tint). + Other IsInvisible callers: Entity_Familiar::PickEnemyTarget, Entity_Tear::Update, NpcHelper::is_target_valid, + Game::GetNearestTargetPlayer, Entity_Player::Render, Small Maggot, Faceless. + +## Broken Modem (0x202) +- Entity_Projectile::Update 0x653070: Random(max(50, 67 - total luck)) == 0 and not landing (+0x173) -> store pos + (+0x460), FLAG_FREEZE, velocity 0. Frozen with freezeCountdown < 1: IsFrame(Random() % 7 + 12) unfreezes it; + else velocity 0 and only Entity::Update runs. +- Entity_NPC::Update 0x6c4b30: n = max(38, 55 - luck), x3 for a boss (vfunc 0x4c) else x2; a vulnerable living + enemy freezes on Random(n) == 0 (status target, CopyStatusEffects). An active frozen enemy with freezeCountdown < 1 + thaws on IsFrame(50) and, if moving, jumps (1..2) * 14 - 21 = +-7 on each axis (clamped into the room if it was in). +- Room::SpawnClearAward 0x7fb250: held, awardRng.RandomInt(4) == 0, count >= 1 and variant 20/10/30/69/40 -> the + first pickup spawned gets FLAG_GLITCH (1<<40). What a glitched pickup does is in Entity_Pickup, not yet read. + +## Blood Oath (0x239) +- EvaluateItems: CheckFamiliar(0xcb, min(count, 1)). Familiar AI FUN_0063f9f0 (Entity_Familiar::Update case 0xcb): + state 3 idle (Idle..Idle4 by stab count / 23 past 0, .25, .5; splats), state 4 stab: moves onto Isaac, on event + sound 0x4d; unless invincible, TakeDamage(1.0, 0x2042821, 30) repeated while hearts > the kept 1-2 halves, counting + stabs (+0x...); blood gibs 1000.2 sub 3, 8-15 particles 1000.5; BFFS! +4. State 5 back to 3. Where state 4 starts + (room entry) and how the count becomes damage (null 0x36 "blood oath secondary": damage, speed) not yet read. + +## Akeldama (0x281) +- Entity_Player::Update: every 3 interval ticks while alive enemies: counts its own tears with flags DAT_00c34810; + < 12: spawn chance 1/2 + 1/2 * 1/5, 12..19: 1/5, else none. Tear 2.1 at Isaac, velocity = his + dir(+0x1624) * 3, + damage from his damage around 3.5, flags | spectral, scale 0.9..1.1, height -6, falling accel -0.03. +- update_effects: suppresses the low-health blood splats. + +## Betrayal (0x187) +- Entity_NPC::TakeDamage 0x6d60a0: with an owner, walking the source's spawner chain to an enemy (10..999): not + itself, other status target, frame since its spawn > 0, vulnerable, and no forced target / the same / Random & 3 + == 0 -> TryForceTarget(source, 150); a new target and pending damage < health: effect 1000.49 at (0, -24) offset. + +## Spirit Shackles (0x2a2) +- try_trigger_astral_projection 0x7afc20: on death with no hearts, held, null effects 0x66 and 0x65 not on: adds + both, clears soul/black/eternal/bone/rotten, one heart back (by health type), cooldown 30, corpse 1000.6 copying the + sprite (Death, ghost layer hidden), chain 1000.114 to it. try_end_astral_projection 0x7d35b0 not yet read.