Fixed build error from previous merge and applied review comments
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
#define NUM_RANKS 13
|
#define NUM_RANKS 13
|
||||||
#define RANK_OFFSET 2 // Because the first rank is 2 and ranks start at 0
|
#define RANK_OFFSET 2 // Because the first rank is 2 and ranks start at 0
|
||||||
|
|
||||||
#define IMPOSSIBLY_HIGH_CARD_VALUE 99
|
#define IMPOSSIBLY_HIGH_CARD_VALUE 100
|
||||||
|
|
||||||
// Card types
|
// Card types
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|||||||
+8
-10
@@ -313,15 +313,15 @@ static JokerEffect raised_fist_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
// Aces are always considered high value, even in an ace-low straight
|
// Aces are always considered high value, even in an ace-low straight
|
||||||
u8 lowest_value = IMPOSSIBLY_HIGH_CARD_VALUE;
|
u8 lowest_value = IMPOSSIBLY_HIGH_CARD_VALUE;
|
||||||
CardObject** hand = get_hand_array();
|
CardObject** hand = get_hand_array();
|
||||||
int hand_top = get_hand_top();
|
int hand_size = hand_get_size();
|
||||||
for (int i = 0; i < hand_top; i++ )
|
for (int i = 0; i < hand_size; i++ )
|
||||||
{
|
{
|
||||||
u8 value = card_get_value(hand[i]->card);
|
u8 value = card_get_value(hand[i]->card);
|
||||||
if (lowest_value > value)
|
if (lowest_value > value)
|
||||||
lowest_value = value;
|
lowest_value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lowest_value != 99)
|
if (lowest_value != IMPOSSIBLY_HIGH_CARD_VALUE)
|
||||||
effect.mult = lowest_value * 2;
|
effect.mult = lowest_value * 2;
|
||||||
|
|
||||||
return effect;
|
return effect;
|
||||||
@@ -333,8 +333,8 @@ static JokerEffect reserved_parking_joker_effect(Joker *joker, Card *scored_card
|
|||||||
return effect; // if card != null, we are not at the end-phase of scoring yet
|
return effect; // if card != null, we are not at the end-phase of scoring yet
|
||||||
|
|
||||||
CardObject** hand = get_hand_array();
|
CardObject** hand = get_hand_array();
|
||||||
int hand_top = get_hand_top();
|
int hand_size = hand_get_size();
|
||||||
for (int i = 0; i < hand_top; i++ )
|
for (int i = 0; i < hand_size; i++ )
|
||||||
{
|
{
|
||||||
switch (hand[i]->card->rank) {
|
switch (hand[i]->card->rank) {
|
||||||
case KING: case QUEEN: case JACK:
|
case KING: case QUEEN: case JACK:
|
||||||
@@ -356,13 +356,11 @@ static JokerEffect business_card_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
switch (scored_card->rank) {
|
switch (scored_card->rank) {
|
||||||
case KING: case QUEEN: case JACK:
|
case KING: case QUEEN: case JACK:
|
||||||
if (random() % 2 == 0)
|
if (random() % 2 == 0)
|
||||||
effect.money = 1;
|
effect.money = 2;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
effect.chips = 1;
|
|
||||||
|
|
||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,8 +398,8 @@ static JokerEffect abstract_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
return effect; // if card != null, we are not at the end-phase of scoring yet
|
return effect; // if card != null, we are not at the end-phase of scoring yet
|
||||||
|
|
||||||
// +1 xmult per occupied joker slot
|
// +1 xmult per occupied joker slot
|
||||||
int jokers_top = get_jokers_top();
|
int num_jokers = list_get_size(get_jokers());
|
||||||
effect.mult = (jokers_top + 1) * 3;
|
effect.mult = num_jokers * 3;
|
||||||
|
|
||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user