Merge pull request #159 from MathisMartin31/main
Add Pareidolia and Acrobat Jokers
This commit is contained in:
+34
-3
@@ -192,6 +192,18 @@ List *get_jokers(void) {
|
||||
return jokers;
|
||||
}
|
||||
|
||||
bool is_joker_owned(int joker_id) {
|
||||
for (int k = 0; k < list_get_size(jokers); k++)
|
||||
{
|
||||
JokerObject *joker = list_get(jokers, k);
|
||||
if (joker->joker->id == joker_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void add_joker(JokerObject *joker_object)
|
||||
{
|
||||
list_append(jokers, joker_object);
|
||||
@@ -202,15 +214,23 @@ void remove_held_joker(int joker_idx)
|
||||
list_remove_by_idx(jokers, joker_idx);
|
||||
}
|
||||
|
||||
int get_deck_top(void) {
|
||||
int get_deck_top(void)
|
||||
{
|
||||
return deck_top;
|
||||
}
|
||||
|
||||
int get_num_discards_remaining(void) {
|
||||
int get_num_discards_remaining(void)
|
||||
{
|
||||
return discards;
|
||||
}
|
||||
|
||||
int get_money(void) {
|
||||
int get_num_hands_remaining(void)
|
||||
{
|
||||
return hands;
|
||||
}
|
||||
|
||||
int get_money(void)
|
||||
{
|
||||
return money;
|
||||
}
|
||||
|
||||
@@ -518,6 +538,17 @@ enum HandType hand_get_type()
|
||||
return res_hand_type; // should be HIGH_CARD
|
||||
}
|
||||
|
||||
// Returns true if the card is *considered* a face card
|
||||
bool card_is_face(Card *card) {
|
||||
// Card is a face card, or Pareidolia is present
|
||||
return (
|
||||
card->rank == JACK ||
|
||||
card->rank == QUEEN ||
|
||||
card->rank == KING ||
|
||||
is_joker_owned(PAREIDOLIA_JOKER_ID)
|
||||
);
|
||||
}
|
||||
|
||||
/* Copies the appropriate item into the top left panel (blind/shop icon)
|
||||
* from where it was put outside the screenview
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user