Refactor growth time and add six stage toggle
This commit is contained in:
parent
c8d356a3f1
commit
9d09b367a0
@ -6,6 +6,8 @@ BerryTreeScript::
|
||||
case BERRY_STAGE_PLANTED, BerryTree_EventScript_CheckBerryStage1
|
||||
case BERRY_STAGE_SPROUTED, BerryTree_EventScript_CheckBerryStage2
|
||||
case BERRY_STAGE_TALLER, BerryTree_EventScript_CheckBerryStage3
|
||||
case BERRY_STAGE_TRUNK, BerryTree_EventScript_CheckBerryStageTrunk
|
||||
case BERRY_STAGE_BUDDING, BerryTree_EventScript_CheckBerryStageBudding
|
||||
case BERRY_STAGE_FLOWERING, BerryTree_EventScript_CheckBerryStage4
|
||||
case BERRY_STAGE_BERRIES, BerryTree_EventScript_CheckBerryFullyGrown
|
||||
end
|
||||
@ -105,6 +107,22 @@ BerryTree_EventScript_CheckBerryStage3::
|
||||
waitbuttonpress
|
||||
goto BerryTree_EventScript_WantToWater
|
||||
|
||||
BerryTree_EventScript_CheckBerryStageTrunk::
|
||||
lockall
|
||||
special ObjectEventInteractionGetBerryName
|
||||
message BerryTree_Text_BerryGrowthStageTrunk
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
goto BerryTree_EventScript_WantToWater
|
||||
|
||||
BerryTree_EventScript_CheckBerryStageBudding::
|
||||
lockall
|
||||
special ObjectEventInteractionGetBerryName
|
||||
message BerryTree_Text_BerryGrowthStageBudding
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
goto BerryTree_EventScript_WantToWater
|
||||
|
||||
BerryTree_EventScript_CheckBerryStage4::
|
||||
call BerryTree_EventScript_GetCareAdverb
|
||||
lockall
|
||||
@ -245,17 +263,39 @@ BerryTree_Text_PlantedOneBerry:
|
||||
.string "the soft, loamy soil.$"
|
||||
|
||||
BerryTree_Text_BerryGrowthStage1:
|
||||
.if OW_BERRY_SIX_STAGES == TRUE
|
||||
.string "This is where you planted the\n{STR_VAR_1} BERRY!$"
|
||||
.else
|
||||
.string "One {STR_VAR_1} was planted here.$"
|
||||
.endif
|
||||
|
||||
BerryTree_Text_BerryGrowthStage2:
|
||||
.if OW_BERRY_SIX_STAGES == TRUE
|
||||
.string "The {STR_VAR_1} is sprouting!$"
|
||||
.else
|
||||
.string "{STR_VAR_1} has sprouted.$"
|
||||
.endif
|
||||
|
||||
BerryTree_Text_BerryGrowthStage3:
|
||||
.if OW_BERRY_SIX_STAGES == TRUE
|
||||
.string "The {STR_VAR_1}'s seedling is growing well!$"
|
||||
.else
|
||||
.string "This {STR_VAR_1} plant is growing taller.$"
|
||||
.endif
|
||||
|
||||
BerryTree_Text_BerryGrowthStageTrunk:
|
||||
.string "The {STR_VAR_1}'s trunk is getting bigger!$"
|
||||
|
||||
BerryTree_Text_BerryGrowthStageBudding:
|
||||
.string "The {STR_VAR_1} tree has buds!$"
|
||||
|
||||
BerryTree_Text_BerryGrowthStage4:
|
||||
.if OW_BERRY_SIX_STAGES == TRUE
|
||||
.string "The {STR_VAR_1} tree is in bloom!$"
|
||||
.else
|
||||
.string "These {STR_VAR_1} flowers are blooming\n"
|
||||
.string "{STR_VAR_2}.$"
|
||||
.endif
|
||||
|
||||
BerryTree_Text_CareAdverbGreat:
|
||||
.string "very beautifully$"
|
||||
|
||||
@ -18,7 +18,8 @@
|
||||
#define OW_BERRY_WEEDS FALSE // If enabled, weeds may grow on Berry plants that the player needs to take care of.
|
||||
#define OW_BERRY_PESTS FALSE // If enabled, pests may approach Berry plants that the player needs to take care of.
|
||||
#define OW_BERRY_MOISTURE FALSE // If enabled, Berry watering is not a matter of watering it once per stage, but rather of keeping the soil moist.
|
||||
#define OW_BERRY_VARIABLE_DRAIN_RATE FALSE // If moisture is enabled, this setting uses the Gen4 drain rates for different berries
|
||||
#define OW_BERRY_VARIABLE_DRAIN_RATE FALSE // If moisture is enabled, this setting uses the Gen4 drain rates for different berries.
|
||||
#define OW_BERRY_SIX_STAGES FALSE // In XY, Berries go through six stages instead of four. This toggle does not affect the time it takes for a tree to be ready for harvest. Without OW_BERRY_MOISTURE, the two extra stages count as BERRY_STAGE_TALLER for watering purposes.
|
||||
|
||||
// Out-of-battle Ability effects
|
||||
#define OW_SYNCHRONIZE_NATURE GEN_LATEST // In Gen8, if a Pokémon with Synchronize is leading the party, it's 100% guaranteed that wild Pokémon will have the same Nature, as opposed to 50% previously. Stationary Pokémon are excluded in Gen3. In Gen6, all No Eggs Discovered gift Pokémon will have the same Nature, while in Gen7 all gift Pokémon will, regardless of Egg Group - In Gen 8, no gift Pokémon are affected. In Gen9, this ability has no out-of-battle effect.
|
||||
|
||||
@ -30,6 +30,8 @@
|
||||
#define BERRY_STAGE_TALLER 3
|
||||
#define BERRY_STAGE_FLOWERING 4
|
||||
#define BERRY_STAGE_BERRIES 5
|
||||
#define BERRY_STAGE_TRUNK 6 // These follow BERRY_STAGE_BERRIES to preserve save compatibility
|
||||
#define BERRY_STAGE_BUDDING 7
|
||||
#define BERRY_STAGE_SPARKLING 255
|
||||
|
||||
// Berries can be watered in the following stages:
|
||||
|
||||
@ -14,7 +14,7 @@ struct Berry
|
||||
u8 minYield;
|
||||
const u8 *description1;
|
||||
const u8 *description2;
|
||||
u8 stageDuration;
|
||||
u8 growthDuration;
|
||||
u8 spicy;
|
||||
u8 dry;
|
||||
u8 sweet;
|
||||
@ -36,7 +36,7 @@ struct Berry2
|
||||
u8 minYield;
|
||||
u8 *description1;
|
||||
u8 *description2;
|
||||
u8 stageDuration;
|
||||
u8 growthDuration;
|
||||
u8 spicy;
|
||||
u8 dry;
|
||||
u8 sweet;
|
||||
|
||||
151
src/berry.c
151
src/berry.c
@ -178,7 +178,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Cheri,
|
||||
.description2 = sBerryDescriptionPart2_Cheri,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -198,7 +198,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Chesto,
|
||||
.description2 = sBerryDescriptionPart2_Chesto,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 0,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -218,7 +218,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Pecha,
|
||||
.description2 = sBerryDescriptionPart2_Pecha,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 10,
|
||||
@ -238,7 +238,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Rawst,
|
||||
.description2 = sBerryDescriptionPart2_Rawst,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -258,7 +258,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Aspear,
|
||||
.description2 = sBerryDescriptionPart2_Aspear,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -278,7 +278,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Leppa,
|
||||
.description2 = sBerryDescriptionPart2_Leppa,
|
||||
.stageDuration = 4,
|
||||
.growthDuration = 16,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 10,
|
||||
@ -298,7 +298,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Oran,
|
||||
.description2 = sBerryDescriptionPart2_Oran,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 10,
|
||||
.dry = 10,
|
||||
.sweet = 10,
|
||||
@ -318,7 +318,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Persim,
|
||||
.description2 = sBerryDescriptionPart2_Persim,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 10,
|
||||
.dry = 10,
|
||||
.sweet = 10,
|
||||
@ -338,7 +338,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Lum,
|
||||
.description2 = sBerryDescriptionPart2_Lum,
|
||||
.stageDuration = 12,
|
||||
.growthDuration = 48,
|
||||
.spicy = 10,
|
||||
.dry = 10,
|
||||
.sweet = 10,
|
||||
@ -358,7 +358,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Sitrus,
|
||||
.description2 = sBerryDescriptionPart2_Sitrus,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 10,
|
||||
.dry = 10,
|
||||
.sweet = 10,
|
||||
@ -378,7 +378,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Figy,
|
||||
.description2 = sBerryDescriptionPart2_Figy,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -398,7 +398,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Wiki,
|
||||
.description2 = sBerryDescriptionPart2_Wiki,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 0,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -418,7 +418,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Mago,
|
||||
.description2 = sBerryDescriptionPart2_Mago,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 10,
|
||||
@ -438,7 +438,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Aguav,
|
||||
.description2 = sBerryDescriptionPart2_Aguav,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -458,7 +458,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Iapapa,
|
||||
.description2 = sBerryDescriptionPart2_Iapapa,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -478,7 +478,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 3,
|
||||
.description1 = sBerryDescriptionPart1_Razz,
|
||||
.description2 = sBerryDescriptionPart2_Razz,
|
||||
.stageDuration = 1,
|
||||
.growthDuration = 4,
|
||||
.spicy = 10,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -498,7 +498,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 3,
|
||||
.description1 = sBerryDescriptionPart1_Bluk,
|
||||
.description2 = sBerryDescriptionPart2_Bluk,
|
||||
.stageDuration = 1,
|
||||
.growthDuration = 4,
|
||||
.spicy = 0,
|
||||
.dry = 10,
|
||||
.sweet = 10,
|
||||
@ -518,7 +518,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 3,
|
||||
.description1 = sBerryDescriptionPart1_Nanab,
|
||||
.description2 = sBerryDescriptionPart2_Nanab,
|
||||
.stageDuration = 1,
|
||||
.growthDuration = 4,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 10,
|
||||
@ -538,7 +538,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 3,
|
||||
.description1 = sBerryDescriptionPart1_Wepear,
|
||||
.description2 = sBerryDescriptionPart2_Wepear,
|
||||
.stageDuration = 1,
|
||||
.growthDuration = 4,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -558,7 +558,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 3,
|
||||
.description1 = sBerryDescriptionPart1_Pinap,
|
||||
.description2 = sBerryDescriptionPart2_Pinap,
|
||||
.stageDuration = 1,
|
||||
.growthDuration = 4,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -578,7 +578,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Pomeg,
|
||||
.description2 = sBerryDescriptionPart2_Pomeg,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 10,
|
||||
@ -598,7 +598,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Kelpsy,
|
||||
.description2 = sBerryDescriptionPart2_Kelpsy,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 0,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -618,7 +618,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Qualot,
|
||||
.description2 = sBerryDescriptionPart2_Qualot,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 10,
|
||||
@ -638,7 +638,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Hondew,
|
||||
.description2 = sBerryDescriptionPart2_Hondew,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 10,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -658,7 +658,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Grepa,
|
||||
.description2 = sBerryDescriptionPart2_Grepa,
|
||||
.stageDuration = 3,
|
||||
.growthDuration = 12,
|
||||
.spicy = 0,
|
||||
.dry = 10,
|
||||
.sweet = 10,
|
||||
@ -678,7 +678,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Tamato,
|
||||
.description2 = sBerryDescriptionPart2_Tamato,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 20,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -698,7 +698,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Cornn,
|
||||
.description2 = sBerryDescriptionPart2_Cornn,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 0,
|
||||
.dry = 20,
|
||||
.sweet = 10,
|
||||
@ -718,7 +718,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Magost,
|
||||
.description2 = sBerryDescriptionPart2_Magost,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 20,
|
||||
@ -738,7 +738,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Rabuta,
|
||||
.description2 = sBerryDescriptionPart2_Rabuta,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -758,7 +758,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Nomel,
|
||||
.description2 = sBerryDescriptionPart2_Nomel,
|
||||
.stageDuration = 6,
|
||||
.growthDuration = 24,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -778,7 +778,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Spelon,
|
||||
.description2 = sBerryDescriptionPart2_Spelon,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 40,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -798,7 +798,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Pamtre,
|
||||
.description2 = sBerryDescriptionPart2_Pamtre,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 40,
|
||||
.sweet = 10,
|
||||
@ -818,7 +818,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Watmel,
|
||||
.description2 = sBerryDescriptionPart2_Watmel,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 40,
|
||||
@ -838,7 +838,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Durin,
|
||||
.description2 = sBerryDescriptionPart2_Durin,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -858,7 +858,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Belue,
|
||||
.description2 = sBerryDescriptionPart2_Belue,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -878,7 +878,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Chilan,
|
||||
.description2 = sBerryDescriptionPart2_Chilan,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 25,
|
||||
.sweet = 10,
|
||||
@ -898,7 +898,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Occa,
|
||||
.description2 = sBerryDescriptionPart2_Occa,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 15,
|
||||
.dry = 0,
|
||||
.sweet = 10,
|
||||
@ -918,7 +918,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Passho,
|
||||
.description2 = sBerryDescriptionPart2_Passho,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 15,
|
||||
.sweet = 0,
|
||||
@ -938,7 +938,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Wacan,
|
||||
.description2 = sBerryDescriptionPart2_Wacan,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 15,
|
||||
@ -958,7 +958,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Rindo,
|
||||
.description2 = sBerryDescriptionPart2_Rindo,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -978,7 +978,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Yache,
|
||||
.description2 = sBerryDescriptionPart2_Yache,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -998,7 +998,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Chople,
|
||||
.description2 = sBerryDescriptionPart2_Chople,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 15,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -1018,7 +1018,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Kebia,
|
||||
.description2 = sBerryDescriptionPart2_Kebia,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 15,
|
||||
.sweet = 0,
|
||||
@ -1038,7 +1038,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Shuca,
|
||||
.description2 = sBerryDescriptionPart2_Shuca,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 15,
|
||||
@ -1058,7 +1058,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Coba,
|
||||
.description2 = sBerryDescriptionPart2_Coba,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -1078,7 +1078,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Payapa,
|
||||
.description2 = sBerryDescriptionPart2_Payapa,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 10,
|
||||
@ -1098,7 +1098,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Tanga,
|
||||
.description2 = sBerryDescriptionPart2_Tanga,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 20,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -1118,7 +1118,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Charti,
|
||||
.description2 = sBerryDescriptionPart2_Charti,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 10,
|
||||
.dry = 20,
|
||||
.sweet = 0,
|
||||
@ -1138,7 +1138,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Kasib,
|
||||
.description2 = sBerryDescriptionPart2_Kasib,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 10,
|
||||
.sweet = 20,
|
||||
@ -1158,7 +1158,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Haban,
|
||||
.description2 = sBerryDescriptionPart2_Haban,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 10,
|
||||
@ -1178,7 +1178,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Colbur,
|
||||
.description2 = sBerryDescriptionPart2_Colbur,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -1198,7 +1198,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Babiri,
|
||||
.description2 = sBerryDescriptionPart2_Babiri,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 25,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -1218,7 +1218,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Roseli,
|
||||
.description2 = sBerryDescriptionPart2_Roseli,
|
||||
.stageDuration = 18,
|
||||
.growthDuration = 72,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 25,
|
||||
@ -1238,7 +1238,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Liechi,
|
||||
.description2 = sBerryDescriptionPart2_Liechi,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 40,
|
||||
.dry = 0,
|
||||
.sweet = 40,
|
||||
@ -1258,7 +1258,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Ganlon,
|
||||
.description2 = sBerryDescriptionPart2_Ganlon,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 0,
|
||||
.dry = 40,
|
||||
.sweet = 0,
|
||||
@ -1278,7 +1278,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Salac,
|
||||
.description2 = sBerryDescriptionPart2_Salac,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 40,
|
||||
@ -1298,7 +1298,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Petaya,
|
||||
.description2 = sBerryDescriptionPart2_Petaya,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 40,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -1318,7 +1318,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Apicot,
|
||||
.description2 = sBerryDescriptionPart2_Apicot,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 0,
|
||||
.dry = 40,
|
||||
.sweet = 0,
|
||||
@ -1338,7 +1338,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Lansat,
|
||||
.description2 = sBerryDescriptionPart2_Lansat,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 10,
|
||||
.dry = 10,
|
||||
.sweet = 10,
|
||||
@ -1358,7 +1358,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Starf,
|
||||
.description2 = sBerryDescriptionPart2_Starf,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 10,
|
||||
.dry = 10,
|
||||
.sweet = 10,
|
||||
@ -1378,7 +1378,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Enigma,
|
||||
.description2 = sBerryDescriptionPart2_Enigma,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 40,
|
||||
.dry = 10,
|
||||
.sweet = 0,
|
||||
@ -1398,7 +1398,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Micle,
|
||||
.description2 = sBerryDescriptionPart2_Micle,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 0,
|
||||
.dry = 40,
|
||||
.sweet = 10,
|
||||
@ -1418,7 +1418,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Custap,
|
||||
.description2 = sBerryDescriptionPart2_Custap,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 40,
|
||||
@ -1438,7 +1438,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Jaboca,
|
||||
.description2 = sBerryDescriptionPart2_Jaboca,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 0,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -1458,7 +1458,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Rowap,
|
||||
.description2 = sBerryDescriptionPart2_Rowap,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 10,
|
||||
.dry = 0,
|
||||
.sweet = 0,
|
||||
@ -1478,7 +1478,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Kee,
|
||||
.description2 = sBerryDescriptionPart2_Kee,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 30,
|
||||
.dry = 30,
|
||||
.sweet = 10,
|
||||
@ -1498,7 +1498,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 2,
|
||||
.description1 = sBerryDescriptionPart1_Maranga,
|
||||
.description2 = sBerryDescriptionPart2_Maranga,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 10,
|
||||
.dry = 10,
|
||||
.sweet = 30,
|
||||
@ -1518,7 +1518,7 @@ const struct Berry gBerries[] =
|
||||
.minYield = 1,
|
||||
.description1 = sBerryDescriptionPart1_Enigma,
|
||||
.description2 = sBerryDescriptionPart2_Enigma,
|
||||
.stageDuration = 24,
|
||||
.growthDuration = 96,
|
||||
.spicy = 40,
|
||||
.dry = 40,
|
||||
.sweet = 40,
|
||||
@ -1608,7 +1608,7 @@ static u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry)
|
||||
|
||||
bool32 IsEnigmaBerryValid(void)
|
||||
{
|
||||
if (!gSaveBlock1Ptr->enigmaBerry.berry.stageDuration)
|
||||
if (!gSaveBlock1Ptr->enigmaBerry.berry.growthDuration)
|
||||
return FALSE;
|
||||
if (!gSaveBlock1Ptr->enigmaBerry.berry.maxYield)
|
||||
return FALSE;
|
||||
@ -1650,6 +1650,8 @@ bool32 ObjectEventInteractionWaterBerryTree(void)
|
||||
tree->watered |= (1 << 1);
|
||||
break;
|
||||
case BERRY_STAGE_TALLER:
|
||||
case BERRY_STAGE_TRUNK:
|
||||
case BERRY_STAGE_BUDDING:
|
||||
tree->watered |= (1 << 2);
|
||||
break;
|
||||
case BERRY_STAGE_FLOWERING:
|
||||
@ -1700,9 +1702,16 @@ bool32 BerryTreeGrow(struct BerryTree *tree)
|
||||
tree->berryYield = tree->berryYield + CalcBerryYield(tree);
|
||||
case BERRY_STAGE_PLANTED:
|
||||
case BERRY_STAGE_SPROUTED:
|
||||
case BERRY_STAGE_TALLER:
|
||||
case BERRY_STAGE_TRUNK:
|
||||
case BERRY_STAGE_BUDDING:
|
||||
tree->stage++;
|
||||
break;
|
||||
case BERRY_STAGE_TALLER:
|
||||
if (OW_BERRY_SIX_STAGES)
|
||||
tree->stage = BERRY_STAGE_TRUNK;
|
||||
else
|
||||
tree->stage++;
|
||||
break;
|
||||
case BERRY_STAGE_BERRIES:
|
||||
tree->watered = 0;
|
||||
tree->berryYield = 0;
|
||||
@ -1953,7 +1962,7 @@ static u8 GetBerryCountByBerryTreeId(u8 id)
|
||||
|
||||
static u16 GetStageDurationByBerryType(u8 berry)
|
||||
{
|
||||
return GetBerryInfo(berry)->stageDuration * 60;
|
||||
return GetBerryInfo(berry)->growthDuration * 60 / (OW_BERRY_SIX_STAGES ? 6 : 4);
|
||||
}
|
||||
|
||||
static u16 GetDrainRateByBerryType(u8 berry)
|
||||
|
||||
@ -1105,6 +1105,8 @@ static const union AnimCmd *const sAnimTable_BerryTree[] = {
|
||||
[BERRY_STAGE_PLANTED - 1] = sAnim_BerryTreeStage0,
|
||||
[BERRY_STAGE_SPROUTED - 1] = sAnim_BerryTreeStage1,
|
||||
[BERRY_STAGE_TALLER - 1] = sAnim_BerryTreeStage2,
|
||||
[BERRY_STAGE_TRUNK - 1] = sAnim_BerryTreeStage2,
|
||||
[BERRY_STAGE_BUDDING - 1] = sAnim_BerryTreeStage2,
|
||||
[BERRY_STAGE_FLOWERING - 1] = sAnim_BerryTreeStage3,
|
||||
[BERRY_STAGE_BERRIES - 1] = sAnim_BerryTreeStage4,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user