fix: lebaron james implementation using SMODS.calculate_main_scoring …#830
fix: lebaron james implementation using SMODS.calculate_main_scoring …#830atendev wants to merge 2 commits intoSpectralPack:mainfrom
Conversation
|
Any possible update? |
|
bump for update. |
|
🤖 |
|
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? |
|
Sorry, just random bolding & useless comments are usually ai but you’re right I was rude sorry |
|
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. |
LeBaron James Implementation Fix
What was wrong
The previous implementation tried to make played Kings trigger held-in-hand effects by patching
eval_card(via Lovely) andCard:calculate_enhancement(via Lua). None of that worked worked becausecontext.cardareawas never set toG.hand, so SMODS enhancement calculations saw the card as played and returnednil.What changed
lovely/misc_joker.toml— the Lovely patches that tried to modifyeval_cardconditionsinitpatch onCard:calculate_enhancementwith a hook onSMODS.calculate_main_scoringthat feeds played Kings throughSMODS.score_cardwithcontext.cardarea = G.handafter the normal held-in-hand passBasically, 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
Lebaron + Mime
Testing