Skip to content

fix: lebaron james implementation using SMODS.calculate_main_scoring …#830

Open
atendev wants to merge 2 commits intoSpectralPack:mainfrom
atendev:feature/lebaron-james-fix
Open

fix: lebaron james implementation using SMODS.calculate_main_scoring …#830
atendev wants to merge 2 commits intoSpectralPack:mainfrom
atendev:feature/lebaron-james-fix

Conversation

@atendev
Copy link
Copy Markdown

@atendev atendev commented Feb 1, 2026

LeBaron James Implementation Fix

  • Fixed LeBaron James not triggering held-in-hand effects (Steel, etc.) on played Kings
  • Hand size bonus was working, but enhancement effects like Steel's x1.5 mult never fired

What was wrong

The previous implementation tried to make played Kings trigger held-in-hand effects by patching eval_card (via Lovely) and Card:calculate_enhancement (via Lua). None of that worked worked because context.cardarea was never set to G.hand, so SMODS enhancement calculations saw the card as played and returned nil.

What changed

  • Deleted lovely/misc_joker.toml — the Lovely patches that tried to modify eval_card conditions
  • Replaced the init patch on Card:calculate_enhancement with a hook on SMODS.calculate_main_scoring that feeds played Kings through SMODS.score_card with context.cardarea = G.hand after the normal held-in-hand pass

Basically, played Kings now go through the same scoring line as cards actually held in hand (triggering after all cards in hand), so all held-in-hand effects work correctly - enhancements, editions, and retriggers. It should also support modded jokers and enhancements. This has been tested with the Teal enhancement from More Fuff

Examples

Just Lebaron

  1. Get Lebaron
  2. Play a non steel king - Scores king, plus 1 hand size.
  3. Play a steel king - Scores king, plus 1 hand size, scores rest of cards, steel triggers.
  4. Play a steel king with steel king in hand - Scores king, plus 1 hand size, steel in hand triggers, steel played triggers.
  5. Play a red steel king - Score king, 1 hand size, Score king, 1 hand size, steel trigger, steel trigger again.

Lebaron + Mime

  1. Play steel king - Score king, plus 1 hand size, steel trigger, mime trigger steel in hand.
  2. Play steel with steel in hand - Score king, 1 hand size, steel in hand trigger, mime trigger in hand, steel played trigger, mime trigger played

Testing

  • - Tested with blueprint
  • - Tested with mime
  • - Tested with multiple retriggers
  • - Test with other 'in-hand' effect jokers.

@atendev
Copy link
Copy Markdown
Author

atendev commented Feb 25, 2026

Any possible update?

@atendev
Copy link
Copy Markdown
Author

atendev commented Mar 12, 2026

bump for update.

@colonthreeing
Copy link
Copy Markdown

🤖

Copy link
Copy Markdown

@colonthreeing colonthreeing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is AI generated slop

@atendev
Copy link
Copy Markdown
Author

atendev commented Apr 7, 2026

Would rather not get called slop, thats kind of rude. What, is it the fact that I actually wrote a diff that explained things? Would you have preferred me to have just said 'fixed bug' without explaining what was wrong and properly testing to make sure it worked? I'm sorry that my education taught me that?

@colonthreeing
Copy link
Copy Markdown

Sorry, just random bolding & useless comments are usually ai but you’re right I was rude sorry

@atendev
Copy link
Copy Markdown
Author

atendev commented Apr 12, 2026

I also apologize if I sounded turse, it's just that this happens relatively frequently to me when people look at my code. In reality, because I tend to cycle between like 10 different projects at a time, if I don't cleanly document my code I forget what I was doing or even how things function without taking a bunch of extra time to re-learn what I was doing at the time.

I resolved the conflicts from main and it should be good to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants