Weight jokers by rarity in the shop (#152)

* Added weight for the rarity of jokers in the shop

* Includes manual conflict resolution

---------

Co-authored-by: JustinL-12 <jlong30@uic.edu>
Co-authored-by: MeirGavish <meir.gavish@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
JustinL-12
2025-10-27 10:18:48 -07:00
committed by GitHub
parent 5a3e891e43
commit b38433d191
3 changed files with 71 additions and 4 deletions
+9
View File
@@ -35,6 +35,14 @@
#define RARE_JOKER 2
#define LEGENDARY_JOKER 3
// Percent chance to get a joker of each rarity
// Note that this deviates slightly from the Balatro wiki to allow legendary
// jokers to appear without spectral cards implemented
#define COMMON_JOKER_CHANCE 70
#define UNCOMMON_JOKER_CHANCE 25
#define RARE_JOKER_CHANCE 5
#define LEGENDARY_JOKER_CHANCE 0
#define MAX_JOKER_OBJECTS 32 // The maximum number of joker objects that can be created at once
#define DEFAULT_JOKER_ID 0
@@ -96,5 +104,6 @@ void joker_object_set_selected(JokerObject* joker_object, bool selected);
bool joker_object_is_selected(JokerObject* joker_object);
Sprite* joker_object_get_sprite(JokerObject* joker_object);
int joker_get_random_rarity();
#endif // JOKER_H