add blue joker

This commit is contained in:
theturtlemafia
2025-08-02 13:25:04 -04:00
parent dcaf025e63
commit ee0591562f
3 changed files with 16 additions and 0 deletions
+4
View File
@@ -264,6 +264,10 @@ int get_jokers_top(void) {
return jokers_top;
}
int get_deck_top(void) {
return deck_top;
}
int get_num_discards_remaining(void) {
return discards;
}
+10
View File
@@ -287,6 +287,15 @@ static JokerEffect blackboard_joker_effect(Joker *joker, Card *scored_card) {
return effect;
}
static JokerEffect blue_joker_effect(Joker *joker, Card *scored_card) {
JokerEffect effect = {0};
if (scored_card != NULL)
return effect; // if card != null, we are not at the end-phase of scoring yet
effect.chips = (get_deck_top() + 1) * 2;
return effect;
}
const JokerInfo joker_registry[] = {
{ COMMON_JOKER, 2, default_joker_effect }, // DEFAULT_JOKER_ID = 0
{ COMMON_JOKER, 5, greedy_joker_effect }, // GREEDY_JOKER_ID = 1
@@ -311,6 +320,7 @@ const JokerInfo joker_registry[] = {
{ COMMON_JOKER, 5, banner_joker_effect },
{ COMMON_JOKER, 5, mystic_summit_joker_effect },
{ UNCOMMON_JOKER, 6, blackboard_joker_effect },
{ COMMON_JOKER, 5, blue_joker_effect },
};
static const size_t joker_registry_size = NUM_ELEM_IN_ARR(joker_registry);