Put Mulch behind config
This commit is contained in:
parent
bd354f28e3
commit
0d70d9951d
@ -40,12 +40,15 @@ BerryTree_EventScript_WantToPlant::
|
||||
end
|
||||
|
||||
BerryTree_EventScript_WantToMulch::
|
||||
.if OW_MULCH_USAGE == TRUE
|
||||
msgbox BerryTree_Text_WantToMulch, MSGBOX_YESNO
|
||||
goto_if_eq VAR_RESULT, YES, BerryTree_EventScript_ChooseMulchToUse
|
||||
goto_if_eq VAR_RESULT, NO, BerryTree_EventScript_CancelPlanting
|
||||
.endif
|
||||
end
|
||||
|
||||
BerryTree_EventScript_WantToPlantMulch::
|
||||
.if OW_MULCH_USAGE == TRUE
|
||||
message BerryTree_Text_ItsSoftLoamySoil
|
||||
waitmessage
|
||||
multichoice 0, 0, MULTI_BERRY_PLOT, FALSE
|
||||
@ -55,15 +58,6 @@ BerryTree_EventScript_WantToPlantMulch::
|
||||
case 2, BerryTree_EventScript_CancelPlanting
|
||||
case MULTI_B_PRESSED, BerryTree_EventScript_CancelPlanting
|
||||
|
||||
BerryTree_EventScript_ChooseBerryToPlant::
|
||||
fadescreen FADE_TO_BLACK
|
||||
closemessage
|
||||
special Bag_ChooseBerry
|
||||
waitstate
|
||||
goto_if_eq VAR_ITEM_ID, 0, BerryTree_EventScript_CancelPlanting
|
||||
removeitem VAR_ITEM_ID
|
||||
call BerryTree_EventScript_PlantBerry
|
||||
|
||||
BerryTree_EventScript_ChooseMulchToUse::
|
||||
fadescreen FADE_TO_BLACK
|
||||
closemessage
|
||||
@ -72,6 +66,16 @@ BerryTree_EventScript_ChooseMulchToUse::
|
||||
goto_if_eq VAR_ITEM_ID, 0, BerryTree_EventScript_CancelPlanting
|
||||
removeitem VAR_ITEM_ID
|
||||
call BerryTree_EventScript_UseMulch
|
||||
.endif
|
||||
|
||||
BerryTree_EventScript_ChooseBerryToPlant::
|
||||
fadescreen FADE_TO_BLACK
|
||||
closemessage
|
||||
special Bag_ChooseBerry
|
||||
waitstate
|
||||
goto_if_eq VAR_ITEM_ID, 0, BerryTree_EventScript_CancelPlanting
|
||||
removeitem VAR_ITEM_ID
|
||||
call BerryTree_EventScript_PlantBerry
|
||||
|
||||
BerryTree_EventScript_CancelPlanting::
|
||||
release
|
||||
@ -223,13 +227,6 @@ BerryTree_EventScript_PlantBerry::
|
||||
waitbuttonpress
|
||||
return
|
||||
|
||||
BerryTree_EventScript_UseMulch::
|
||||
special ObjectEventInteractionApplyMulch
|
||||
message BerryTree_Text_ScatteredMulch
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
return
|
||||
|
||||
BerryTree_Text_ItsSoftLoamySoil:
|
||||
.string "It's soft, loamy soil.$"
|
||||
|
||||
@ -237,18 +234,10 @@ BerryTree_Text_WantToPlant:
|
||||
.string "It's soft, loamy soil.\n"
|
||||
.string "Want to plant a BERRY?$"
|
||||
|
||||
BerryTree_Text_WantToMulch:
|
||||
.string "It's soft, loamy soil.\n"
|
||||
.string "Put down some fertilizer?$"
|
||||
|
||||
BerryTree_Text_PlantedOneBerry:
|
||||
.string "{PLAYER} planted one {STR_VAR_1} in\n"
|
||||
.string "the soft, loamy soil.$"
|
||||
|
||||
BerryTree_Text_ScatteredMulch:
|
||||
.string "{PLAYER} scattered the {STR_VAR_1}\n"
|
||||
.string "on the soft, loamy soil.$"
|
||||
|
||||
BerryTree_Text_BerryGrowthStage1:
|
||||
.string "One {STR_VAR_1} was planted here.$"
|
||||
|
||||
@ -364,5 +353,21 @@ BerryTree_Text_PutAwayBerry_Mutation:
|
||||
.string "BERRIES POCKET.\p"
|
||||
.string "The soil returned to its soft and\n"
|
||||
.string "loamy state.$"
|
||||
|
||||
.endif
|
||||
|
||||
.if OW_MULCH_USAGE == TRUE
|
||||
BerryTree_EventScript_UseMulch::
|
||||
special ObjectEventInteractionApplyMulch
|
||||
message BerryTree_Text_ScatteredMulch
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
return
|
||||
|
||||
BerryTree_Text_WantToMulch:
|
||||
.string "It's soft, loamy soil.\n"
|
||||
.string "Put down some fertilizer?$"
|
||||
|
||||
BerryTree_Text_ScatteredMulch:
|
||||
.string "{PLAYER} scattered the {STR_VAR_1}\n"
|
||||
.string "on the soft, loamy soil.$"
|
||||
.endif
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
// Berry settings
|
||||
#define OW_BERRY_MUTATIONS FALSE // If enabled, Berry plants can mutate based on berries planted next to them.
|
||||
#define OW_MULCH_USAGE TRUE // If enabled, Mulch can be used on soil to fertilize it. Otherwise, it is considered unusable.
|
||||
|
||||
// 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.
|
||||
|
||||
@ -1758,7 +1758,7 @@ static u8 CalcBerryYield(struct BerryTree *tree)
|
||||
u8 min = berry->minYield;
|
||||
u8 max = berry->maxYield;
|
||||
u8 result = CalcBerryYieldInternal(max, min, BerryTreeGetNumStagesWatered(tree));
|
||||
if (tree->mulch == ITEM_TO_MULCH(ITEM_RICH_MULCH) || tree->mulch == ITEM_TO_MULCH(ITEM_AMAZE_MULCH))
|
||||
if (OW_MULCH_USAGE && (tree->mulch == ITEM_TO_MULCH(ITEM_RICH_MULCH) || tree->mulch == ITEM_TO_MULCH(ITEM_AMAZE_MULCH)))
|
||||
result += 2;
|
||||
|
||||
return result;
|
||||
@ -1907,6 +1907,8 @@ void SetBerryTreesSeen(void)
|
||||
|
||||
bool8 PlayerHasMulch(void)
|
||||
{
|
||||
if (!OW_MULCH_USAGE)
|
||||
return FALSE;
|
||||
if (CheckBagHasItem(ITEM_GROWTH_MULCH, 1))
|
||||
return TRUE;
|
||||
if (CheckBagHasItem(ITEM_DAMP_MULCH, 1))
|
||||
|
||||
@ -2164,7 +2164,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Growth Mulch"),
|
||||
.price = 200,
|
||||
.description = sGrowthMulchDesc,
|
||||
.description = OW_MULCH_USAGE ? sGrowthMulchDesc : sGenericMulchDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||
@ -2176,7 +2176,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Damp Mulch"),
|
||||
.price = 200,
|
||||
.description = sDampMulchDesc,
|
||||
.description = OW_MULCH_USAGE ? sDampMulchDesc : sGenericMulchDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||
@ -2188,7 +2188,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Stable Mulch"),
|
||||
.price = 200,
|
||||
.description = sStableMulchDesc,
|
||||
.description = OW_MULCH_USAGE ? sStableMulchDesc : sGenericMulchDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||
@ -2200,7 +2200,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Gooey Mulch"),
|
||||
.price = 200,
|
||||
.description = sGooeyMulchDesc,
|
||||
.description = OW_MULCH_USAGE ? sGooeyMulchDesc : sGenericMulchDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||
@ -2212,7 +2212,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Rich Mulch"),
|
||||
.price = 200,
|
||||
.description = sRichMulchDesc,
|
||||
.description = OW_MULCH_USAGE ? sRichMulchDesc : sGenericMulchDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||
@ -2224,7 +2224,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("SurprseMulch"),
|
||||
.price = 200,
|
||||
.description = sSurpriseMulchDesc,
|
||||
.description = OW_MULCH_USAGE ? sSurpriseMulchDesc : sGenericMulchDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||
@ -2236,7 +2236,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Boost Mulch"),
|
||||
.price = 200,
|
||||
.description = sBoostMulchDesc,
|
||||
.description = OW_MULCH_USAGE ? sBoostMulchDesc : sGenericMulchDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||
@ -2248,7 +2248,7 @@ const struct Item gItems[] =
|
||||
{
|
||||
.name = _("Amaze Mulch"),
|
||||
.price = 200,
|
||||
.description = sAmazeMulchDesc,
|
||||
.description = OW_MULCH_USAGE ? sAmazeMulchDesc : sGenericMulchDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
|
||||
|
||||
@ -1008,6 +1008,11 @@ static const u8 sAmazeMulchDesc[] = _(
|
||||
"Surprising and\n"
|
||||
"Boosting as well.");
|
||||
|
||||
static const u8 sGenericMulchDesc[] = _(
|
||||
"A fertilizer that\n"
|
||||
"is unsuitable for\n"
|
||||
"local soil.");
|
||||
|
||||
// Apricorns
|
||||
static const u8 sRedApricornDesc[] = _(
|
||||
"A red apricorn.\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user