Commit Graph

16 Commits

Author SHA1 Message Date
funman300 47721d1acf Fix a backwards clash, and add 19 verified traps
Every entry here was checked against the running Steamodded source in
Mods/lovely/dump, not from memory.

The headline is a correction: the shipped CLASHES table warned that
Smeared Joker + Flower Pot "cannot make all four" suits. It is backwards.
Flower Pot fills its four suit slots with a greedy if/elseif chain
(card.lua:4256) and SMODS.smeared_check makes Hearts answer for Diamonds
and Spades for Clubs, so the second Heart falls through into the Diamond
slot: any two red + two black cards fill the pot. It is one of the
strongest combos in the game and the mod was steering players away from
it -- while simultaneously scoring the pair +2 via suit_flex, which
should have been the tell. It is now a famous pair.

New clashes (4 -> 22), all traced to the mechanism:
* Burglar zeroes discards_left on blind select (card.lua:2905), which
  switches off every discard-gated joker for the rest of the run: Banner,
  Delayed Gratification, Castle, Yorick, Hit the Road, Burnt, Mail-In
  Rebate, Faceless, Trading Card, and it wipes the discards Drunkard and
  Merry Andy hand you. Delayed Gratification is the cruellest -- "no
  discards used" reads like a synergy, but the code also requires
  discards_left > 0, so it pays exactly $0.
* Vampire strips enhancements in the `before` pass, ahead of the
  per-card `individual` pass where enhancement payoffs are read, so it
  eats what Golden Ticket, Glass, Stone Joker, Marble and Driver's
  License are counting.
* Joker Stencil scales on EMPTY slots, so Riff-Raff and Abstract Joker
  fight it.
* Splash makes every played card score, so a face card that used to be a
  harmless kicker now resets Ride the Bus.

New cautions (3 -> 15): the positional traps (Blueprint dead in the
rightmost slot, Brainstorm in the leftmost), Mime doing nothing without a
held-card payoff, and the decay timers, whose numbers are exact from
game.lua (Ice Cream 100/5 = 20 hands, Popcorn 20/4 = 5 rounds).

Also corrects the stale game path in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 11:22:35 -07:00
funman300 07cada9e49 Add a test suite, and fix the three dead-data bugs it found
There was no test file -- CLAUDE.md described the harness in prose and
referred to an "orphan-tag check" that did not exist. test.lua now stubs
the game globals and exercises the real engine, database and catalog tab
builders. It found three bugs on its first run:

* four_kind was the only theme in the catalog that could never be
  discovered. Theme discovery needs a giver and a wanter on two DIFFERENT
  fielded jokers, and The Family was its sole member -- so the Hands bar
  and the overall Progress bar could never reach 100%. DNA is the real
  enabler (copying a card is how you stack duplicate ranks, the only
  vanilla route to a reliable Four of a Kind), so it now gives the
  matching-hand tags as a pure enabler.

* hand_level was given by Space Joker and Burnt Joker and wanted by
  nobody, so it could never contribute to a score and its "want" tooltip
  text was unreachable. Nothing in vanilla rewards hand levels; the tag
  is dropped rather than faked.

* Invisible Joker had no tags at all, so it scored 0 against the entire
  game. Selling it duplicates one of your Jokers -- the same "stronger
  target, better payoff" logic Blueprint and Brainstorm already model --
  so it now wants copy_target.

The suite guards both directions of the tag contract (no orphan wants, no
dead gives), theme reachability, blurb widths, the inert-joker list, and
the card materialize fix from the previous commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 11:15:10 -07:00
funman300 f8bba13f28 Materialize catalog cards so pages animate on build
Card rows in the Combos/theme tabs emplaced their cards without ever
calling Card:start_materialize, so cards popped in with no animation
when a tab opened or a page was switched. Every vanilla collection page
materializes as it emplaces (create_UIBox_your_collection_jokers).

Each card now materializes on emplace; begin_page() lets only the first
card of a page build play the sound, matching vanilla's i>1 or j>1
silence flag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 11:00:04 -07:00
funman300 38d4f5d1b7 Document the new features in README and CLAUDE.md
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:08:22 -07:00
funman300 cbbf9babf5 Public API: JCA.register / register_pair / register_clash
Other mods can teach the advisor their jokers (which otherwise score 0):
JCA.register(key, gives, wants, opts) adds a db entry with tag
validation — unknown tags are dropped with a log line so a typo can't
break anyone's load; opts.no_generic opts out of the mult/xmult
complement. register_pair adds a famous pair (discoverable, shown in
the Combos tab — its sort cache now invalidates via JCA._pairs_dirty)
and warns when a blurb exceeds the 34-char tooltip budget.
register_clash adds a warning-only trap line. Usage example in README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:06:43 -07:00
funman300 1d28180db0 Add Progress tab: discovery completion overview
Fifth catalog tab (also reachable from the in-run Combos button) showing
famous pairs fielded (x/31), per-group theme exploration bars
(Engine/Economy/Hands), pairs fielded in the current run, and an overall
discoveries tally with the how-to-discover hint. Text-only UI - no live
Card objects, no pager.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:04:49 -07:00
funman300 266a6dd399 Sell advisor: flag the weakest combo piece on a full board
JCA.weakest_link() scores each owned joker's total synergy against the
rest of the board (same capped scoring the shop advice uses) and returns
the lowest scorer — only when the board is full (that's when a cut
decision exists), has 3+ jokers, and one joker actually stands out
(uniform boards return nil). The owned-joker tooltip gains a red
'Weakest combo piece - a sell candidate' verdict line, suppressed in
learning mode like the other verdicts. Config toggle: sell_advisor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:03:15 -07:00
funman300 cc26ae6767 Add 12 famous pairs to the combo database (19 -> 31)
Blueprint+Brainstorm, Mime+Raised Fist, Mime+Shoot the Moon,
Hack+Fibonacci, Photograph+Sock and Buskin, Smiley+Sock and Buskin,
Four Fingers+Shortcut, Four Fingers+Smeared, Smeared+Bloodstone,
Bull+To the Moon, Marble+Hologram, Egg+Campfire. All blurbs within the
34-char tooltip budget; discovery and the Combos tab pick them up
automatically.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:01:20 -07:00
funman300 301d5288b5 Pulse a hovered joker's combo partners on the board
While hovering a shop/pack joker (or an owned one), the owned jokers it
synergizes with juice gently every ~0.9s, so the tooltip's partner names
are matched to cards by eye. Partner set is computed once per hover and
dropped when it ends. New config toggle: partner_highlight (default on);
stays active in learning mode since it explains rather than judges.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 13:59:38 -07:00
funman300 4a882e8101 Add anti-synergy warnings: CLASHES pairs and per-joker CAUTIONS
Warning-only data in synergies.lua — never touches the synergy score.
Tooltips gain a red 'Clashes - <owned joker>: <why>' line when a hovered
joker fights one you own (Ride the Bus + Pareidolia, Vampire vs Steel
Joker/Lucky Cat, Smeared vs Flower Pot), and a 'Caution:' line in the
buy area for jokers that harm a board you keep (Ceremonial Dagger,
Madness, Stencil). Learning mode keeps warnings — they teach.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 13:58:10 -07:00
funman300 e37b56471b Cap generic mult/xmult bonus per candidate; opt Stencil out of it
Any xMult joker used to pulse 'recommended' on a board of four unrelated
+Mult/+Chips jokers: the generic engine-complement +1 in JCA.score
accumulated once per owned joker in partners_for, reaching the threshold
of 4 with zero listable partners (pairwise scores never hit 2), so the
card pulsed while its own tooltip said 'No synergy with your jokers.'

- partners_for now counts the generic +1 once per candidate. Tag/pair
  scores are even, so the generic bonus can no longer flip a
  recommendation at all; a pulsing card always has a nameable partner.
- Joker Stencil is the one xMult joker the generic rule actively
  misreads (its multiplier grows with EMPTY slots), so entries support
  {no_generic = true} which suppresses the rule in score() and the
  generic fallback lines in explain(). Stencil also gains copy_target:
  its real famous synergy is being copied by Blueprint/Brainstorm.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 13:51:54 -07:00
Claude Code b588444304 Touch mode: enlarge in-run Combos HUD button
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 10:34:56 -07:00
Claude Code 172a716649 Touch mode: enlarge advice tooltip text (1.4x) with config toggle
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 10:34:36 -07:00
funman300 35e54e6976 Add theme-level discovery
A synergy theme counts as explored the first time two different
fielded jokers connect it (one gives the tag, one wants it; cluster
members carry both sides, so any two qualify). Explored themes
persist in config.themes_found, badge their catalog page with
"explored!", and feed a per-tab progress line. One toast per
emplacement, with famous pairs outranking themes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 21:58:47 -07:00
funman300 608e23ed14 Document Gitea remote and push auth in CLAUDE.md
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 21:54:58 -07:00
funman300 8783785283 Initial release: Joker Combo Advisor v1.0.0
Steamodded mod that teaches Balatro joker synergies: hover tooltips
explain why jokers combo (famous-pair blurbs + tag-based reasons),
combo discovery tracking with catalog grey-out and run recap, an
in-game synergy catalog with real card sprites, learning mode, and
a HUD shortcut.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 21:54:04 -07:00