(Manual conflict res) merged main into ttm/joker-scope-joker-1

This commit is contained in:
MeirGavish
2025-08-17 11:03:27 +03:00
9 changed files with 199 additions and 71 deletions
+7 -3
View File
@@ -2,6 +2,7 @@
#include "joker.h"
#include "util.h"
#include "hand_analysis.h"
#include "list.h"
#include <stdlib.h>
static JokerEffect default_joker_effect(Joker *joker, Card *scored_card) {
@@ -191,16 +192,19 @@ static JokerEffect joker_stencil_effect(Joker *joker, Card *scored_card) {
if (scored_card != NULL)
return effect; // if card != null, we are not at the end-phase of scoring yet
List* jokers = get_jokers();
// +1 xmult per empty joker slot...
int num_jokers = get_jokers_top() + 1;
int num_jokers = list_get_size(jokers);
effect.xmult = (MAX_JOKERS_HELD_SIZE) - num_jokers;
// ...and also each stencil_joker adds +1 xmult
JokerObject** jokers = get_jokers();
for (int i = 0; i < num_jokers; i++ )
{
if (jokers[i]->joker->id == JOKER_STENCIL_ID)
JokerObject* joker_object = list_get(jokers, i);
if (joker_object->joker->id == JOKER_STENCIL_ID)
effect.xmult++;
}