Files
isaac-port/notes/items/trinkets_cards.md
T

4.0 KiB

Trinkets, cards and pills (rif/trinkets-cards)

Findings from porting Rebirth trinkets, cards/runes/souls and pills to isaac-classic. Addresses are the dump's.

Entity_Player::take_damage_impl 0x7729d0 (trinkets)

  • Walnut (0x6c): hit with damage flag 4 (explosion), rng % 100 < 33: spawns trinket (350), heart (10), key (30), coin (20), subtype 0, each GetTrinketMultiplier times (table 0xb6bcc0 = 350, 10, 30, 20), then TryRemoveTrinket.
  • Torn Pocket (0x9e): multiplier + 1 times a WeightedOutcomePicker over coins (0), keys (1), bombs (2), Bethany's soul charge (3) and Tainted Bethany's blood charge (4), weighted by count; the drawn one is spent and dropped (variant 20/30/40 subtype 0; charges as a half soul or half red heart 9 in 10 times).

Entity_Player::EvaluateItems 0x763570

  • Cracked Crown (0x5c): factor 1 + 0.2 * mult (x0.75 for player type 36). Final fire rate above 2.7272727 (30/11), damage above 3.5, shot speed above 1, range above 260 and speed above 1 each gain (stat - base) * (factor - 1).
  • Black Feather (0x50): damage-up accumulator (before the curve) += 0.5 * mult * (count of 654, 344, 339, 262, 260, 230, 216, 215, 80, 79 + trinket mult of 17 Black Lipstick and 22 Daemon's Tail).

Champion roll (0x6bb790, ZHL-misnamed Game::RestoreState; it is the NPC init champion roll)

  • Base 0.05, Champion Belt (0xd0) 0.2, challenge-ish state 0.75/1.0. Purple Heart (trinket 5): normal enemies chance *= 3 * mult; bosses' champion chance (0.1 / 0.3 / 0.6 by state) *= 2 * mult.

Entity_Player::GetTrinketMultiplier 0x7cb6e0

  • Mysterious Paper (0x15): for trinket 0x30 (A Missing Page) counts when frameCount % 4 == 2 (or 3 with golden). HasCollectible 0x7706e0 gives The Polaroid (0x147) at % 4 == 0 and The Negative (0x148) at % 4 == 1 (golden: both on 0 and 1); 0x782af0 handles the Missing Poster revive at % 4 == 3.
  • Rainbow Worm (0x40): the worm table_0xb6bad0[(frameCount / 90) % 10] counts at Rainbow Worm's multiplier. Table: 9 Pulse, 11 Ring, 65 Tape, 27 Whip, 10 Wiggle, 12 Flat, 26 Hook, 66 Lazy, 96 Ouroboros, 144 Brain (also the daily 0x1c special list).
  • Error (0x4b): a trinket id equal to room descriptor RNG.RandomInt(189) + 1 counts (one per room; Challenge 0x29 excludes 0x7a).

Room enter 0x7a6c50 and the Twins duplicator 0x7dbeb0 (ZHL-misnamed HistoryHUD::RecomputeAll)

  • The Twins (0xb7): RandomInt(mult + 1) copies; candidates are owned familiar-type (4) items except 0, 43, 61, 235; none owned: Brother Bobby (8) and Sister Maggy (0x43). One is added for the room as a temporary collectible effect. Skipped when more than 59 familiars (type 3 entities) exist.

Post active use 0x7abf80

  • 'M (0x8a): after a main-slot use of a valid active (no TMTRAINER: glitched one), removes it and adds a random other active (type 3, not quest-flagged, available via 0x7300d0) uncharged, weighted by table_0xb6bc60[quality] = 5, 4, 3, 2, 1. Golden: 10% (x2) / 20% (x3) refills the charge.

Player active update 0x791a40

  • Panic Button (0x95): when not using an item, not 0x4000-flagged, active held and charged, collidable, damage cooldown < 2 and not invincible: QueryRadius(pos + vel * speedMultiplier * field_0x36c, 10 (14 in coop)) for NPCs (type 10..999, not Pitfall 33.4) or projectiles (9) with collision damage / not friendly; a hit uses the active. Golden x2: 1 in 10 keeps the charge, x3 1 in 5.

Entity_Player::UseCard 0x7b2230 (switch on card id)

  • IX - The Hermit? (0x41): over free, existing, visible, non-shop, timeout-free, rerollable pickups: worth by variant/ subtype: hearts 10 eternal/gold, 6 black/bone/double, 5 soul, 2 half soul/rotten, 1 half red, else 3; keys 10 golden/ ring/charged else 5; bombs 10 double/golden(4)/giga(7) else 5; pill 5, sack (69) 7, battery (90) 5, card 5, trinket 5, collectible (subtype != 0) 15; coins and chests are skipped. Paid at the pickup as (worth - 5) / 5 nickels (if worth > 9) and the rest pennies, random velocity * 5, a poof (1000.15); items emptied (pedestal kept). Nothing sold: one penny at the room centre.