2017-09-02 20:43:53 +01:00
|
|
|
#ifndef GUARD_GLOBAL_BERRY_H
|
|
|
|
#define GUARD_GLOBAL_BERRY_H
|
|
|
|
|
2018-09-01 21:03:21 +01:00
|
|
|
#define BERRY_NAME_LENGTH 6
|
2017-10-01 00:12:42 +01:00
|
|
|
#define BERRY_ITEM_EFFECT_COUNT 18
|
|
|
|
|
2017-09-02 20:43:53 +01:00
|
|
|
struct Berry
|
|
|
|
{
|
2018-09-01 21:03:21 +01:00
|
|
|
const u8 name[BERRY_NAME_LENGTH + 1];
|
2023-12-05 01:16:22 +00:00
|
|
|
u8 firmness:4;
|
|
|
|
u8 color:4;
|
2023-12-07 22:50:08 +00:00
|
|
|
u16 size:10;
|
|
|
|
u16 weedsBonus:3;
|
|
|
|
u16 pestsBonus:3;
|
2017-09-02 20:43:53 +01:00
|
|
|
u8 maxYield;
|
2023-12-07 22:50:08 +00:00
|
|
|
u8 minYield:4;
|
|
|
|
u8 waterBonus:4;
|
2017-09-02 20:43:53 +01:00
|
|
|
const u8 *description1;
|
|
|
|
const u8 *description2;
|
2023-12-07 12:22:01 +00:00
|
|
|
u8 growthDuration;
|
2017-09-02 20:43:53 +01:00
|
|
|
u8 spicy;
|
|
|
|
u8 dry;
|
|
|
|
u8 sweet;
|
|
|
|
u8 bitter;
|
|
|
|
u8 sour;
|
|
|
|
u8 smoothness;
|
2023-12-05 01:16:22 +00:00
|
|
|
u8 drainRate;
|
2017-09-02 20:43:53 +01:00
|
|
|
};
|
|
|
|
|
2017-09-04 20:43:13 +01:00
|
|
|
// with no const fields
|
|
|
|
|
|
|
|
struct Berry2
|
|
|
|
{
|
2018-09-01 21:03:21 +01:00
|
|
|
u8 name[BERRY_NAME_LENGTH + 1];
|
2023-12-05 01:16:22 +00:00
|
|
|
u8 firmness:4;
|
|
|
|
u8 color:4;
|
2023-12-07 22:50:08 +00:00
|
|
|
u16 size:10;
|
|
|
|
u16 weedsBonus:3;
|
|
|
|
u16 pestsBonus:3;
|
2017-09-04 20:43:13 +01:00
|
|
|
u8 maxYield;
|
2023-12-07 22:50:08 +00:00
|
|
|
u8 minYield:4;
|
|
|
|
u8 waterBonus:4;
|
2017-09-04 20:43:13 +01:00
|
|
|
u8 *description1;
|
|
|
|
u8 *description2;
|
2023-12-07 12:22:01 +00:00
|
|
|
u8 growthDuration;
|
2017-09-04 20:43:13 +01:00
|
|
|
u8 spicy;
|
|
|
|
u8 dry;
|
|
|
|
u8 sweet;
|
|
|
|
u8 bitter;
|
|
|
|
u8 sour;
|
|
|
|
u8 smoothness;
|
2023-12-05 01:16:22 +00:00
|
|
|
u8 drainRate;
|
2017-09-04 20:43:13 +01:00
|
|
|
};
|
|
|
|
|
2017-09-02 20:43:53 +01:00
|
|
|
struct EnigmaBerry
|
|
|
|
{
|
2017-09-04 20:43:13 +01:00
|
|
|
struct Berry2 berry;
|
2017-10-01 00:12:42 +01:00
|
|
|
u8 itemEffect[BERRY_ITEM_EFFECT_COUNT];
|
2017-09-02 20:43:53 +01:00
|
|
|
u8 holdEffect;
|
|
|
|
u8 holdEffectParam;
|
|
|
|
u32 checksum;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct BattleEnigmaBerry
|
|
|
|
{
|
2018-09-01 21:03:21 +01:00
|
|
|
/*0x00*/ u8 name[BERRY_NAME_LENGTH + 1];
|
2017-09-02 20:43:53 +01:00
|
|
|
/*0x07*/ u8 holdEffect;
|
2017-10-01 00:12:42 +01:00
|
|
|
/*0x08*/ u8 itemEffect[BERRY_ITEM_EFFECT_COUNT];
|
2017-09-02 20:43:53 +01:00
|
|
|
/*0x1A*/ u8 holdEffectParam;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct BerryTree
|
|
|
|
{
|
2023-11-29 12:26:43 +00:00
|
|
|
u8 berry:7;
|
|
|
|
u8 weeds:1;
|
|
|
|
u8 stage:3;
|
|
|
|
u8 mulch:4;
|
2021-01-26 10:16:01 +00:00
|
|
|
u8 stopGrowth:1;
|
2023-11-29 12:26:43 +00:00
|
|
|
u16 minutesUntilNextStage:14;
|
|
|
|
u16 mutationA:2;
|
|
|
|
u8 berryYield:5;
|
|
|
|
u8 pests:1;
|
|
|
|
u8 mutationB:2;
|
2017-09-02 20:43:53 +01:00
|
|
|
u8 regrowthCount:4;
|
2023-12-07 23:22:12 +00:00
|
|
|
u8 watered:4; // Used to keep track of bonuses in case of gradient watering
|
2023-11-29 12:26:43 +00:00
|
|
|
u16 moistureLevel:7;
|
2023-12-05 20:54:17 +00:00
|
|
|
u16 moistureClock:7;
|
|
|
|
u16 padding:2;
|
2017-09-02 20:43:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GUARD_GLOBAL_BERRY_H
|