17#define MAX_DEFINABLE_JOKERS 150
32#define COMMON_JOKER_CHANCE 70
33#define UNCOMMON_JOKER_CHANCE 25
34#define RARE_JOKER_CHANCE 5
35#define LEGENDARY_JOKER_CHANCE 0
41 JOKER_EVENT_ON_JOKER_CREATED,
43 JOKER_EVENT_ON_HAND_PLAYED,
45 JOKER_EVENT_ON_CARD_SCORED,
47 JOKER_EVENT_ON_CARD_SCORED_END,
49 JOKER_EVENT_ON_CARD_HELD,
50 JOKER_EVENT_INDEPENDENT,
52 JOKER_EVENT_ON_HAND_SCORED_END,
54 JOKER_EVENT_ON_HAND_DISCARDED,
55 JOKER_EVENT_ON_ROUND_END,
56 JOKER_EVENT_ON_BLIND_SELECTED,
63#define JOKER_EFFECT_FLAG_NONE 0
64#define JOKER_EFFECT_FLAG_CHIPS (1 << 0)
65#define JOKER_EFFECT_FLAG_MULT (1 << 1)
66#define JOKER_EFFECT_FLAG_XMULT (1 << 2)
67#define JOKER_EFFECT_FLAG_MONEY (1 << 3)
68#define JOKER_EFFECT_FLAG_RETRIGGER (1 << 4)
69#define JOKER_EFFECT_FLAG_EXPIRE (1 << 5)
70#define JOKER_EFFECT_FLAG_MESSAGE (1 << 6)
72#define MAX_JOKER_OBJECTS 32
75#define STENCIL_JOKER_ID 15
76#define SHORTCUT_JOKER_ID 48
77#define BRAINSTORM_JOKER_ID 41
78#define PAREIDOLIA_JOKER_ID 46
79#define FOUR_FINGERS_JOKER_ID 50
80#define BLUEPRINT_JOKER_ID 52
86 enum JokerRarity rarity;
116typedef u32 (*JokerEffectFunc)(
119 enum JokerEvent joker_event,
123typedef int (*JokerDescFunc)(
Joker* joker, Rect dest_rect);
128 enum JokerRarity rarity;
130 bool is_desc_dynamic;
132 JokerDescFunc joker_print_desc;
133 JokerEffectFunc joker_effect_func;
135const JokerInfo* get_joker_registry_entry(
int joker_id);
136size_t get_joker_registry_size(
void);
140Joker* joker_new(u8
id);
141void joker_destroy(
Joker** joker);
147u32 joker_get_score_effect(
150 enum JokerEvent joker_event,
187void joker_object_destroy(
JokerObject** joker_object);
189void joker_object_shake(
JokerObject* joker_object, mm_word sound_id);
Graphic utility functions.
The core structure for items in the shop and inventory. Provides a common API for the shop and invent...
void joker_object_dispose(Item **joker_object)
Destroy a JokerObject item, free its resources, and make it available to be rolled.
int joker_get_buy_price(const Joker *joker)
Returns the buy price of the joker.
Item * joker_object_roll_new(enum RngSequence key)
Roll and create a new JokerObject item.
int joker_object_print_description(Item *joker_object, Rect dest_rect)
Print the description of the requested Joker centered within the specified Rect.
int joker_object_get_buy_price(Item *joker_object)
Returns the buy price of the joker object.
const char * joker_object_get_name(Item *joker_object)
Get Joker name.
void joker_object_add_to_owned(Item *joker_object)
Add a Joker to the list of owned Jokers and place it in the joker row.
int joker_roll_id(enum JokerRarity joker_rarity, enum RngSequence key)
Rolls a random Joker among the available ones of a certain rarity.
ItemDescSubtypeInfo joker_object_get_rarity_info(Item *joker_object)
Get Joker rarity name and associated panel color.
void joker_reset_rollable_jokers(void)
Reset rollable jokers to include all jokers in the registry.
int joker_roll_id_with_rarity(int joker_rarity)
Rolls a random Joker among the available ones of a certain rarity.
int joker_get_sell_value(const Joker *joker)
Returns the sell value of the joker.
int joker_object_get_sell_price(Item *joker_object)
Returns the sell price of the joker object.
void joker_set_rollable(int joker_id, bool rollable)
Set whether a Joker is available to be rolled for the shop, packs, etc.
Common functions to handle RNG manipulation. Using this interface has three goals:
RngSequence
Keys to different independent RNG sequences.
Structure containing the main and shadow colors, and the name string associated with an Item's subtyp...
A generic interface for all items that can appear in the shop or be in the inventory....
Sprite struct for GBA hardware specifics.