diff --git a/Pages/Guide.php b/Pages/Guide.php index 3b9c7ec..84fc0a4 100644 --- a/Pages/Guide.php +++ b/Pages/Guide.php @@ -19,8 +19,9 @@ $PageSection = "Guide";

A quick guide to growing plants, earning Dew, - and discovering mutations. You do not need to - know everything here before you start playing. + discovering mutations, and using the Garden's + tools and upgrades. You do not need to know + everything here before you start playing. (But it's useful to do..)

@@ -53,9 +54,9 @@ $PageSection = "Guide";

In the Garden, - select a seed and then choose an empty plot. - Plants continue growing with real time, even while - you are away from the page. + select a seed and then choose an empty plot with + the Trowel. Plants continue growing with real time, + even while you are away from the page.

@@ -82,7 +83,9 @@ $PageSection = "Guide"; More valuable seeds usually give more Dew. The Shop shows the current seed cost, harvest reward, growth time, and how many seeds you - already own. So you can be smart in your plant investments! + already own. The Garden can also quick-buy the selected + seed without making you leave the page. So you can be + smart in your plant investments!

@@ -102,7 +105,9 @@ $PageSection = "Guide"; Mutation-derived seed prices are based on their recipes, so discovering and performing mutations is often a useful alternative to simply buying the - resulting seed. + resulting seed. The Shop also contains tools, Garden + expansions, additional Gardens, and optional information + upgrades.

@@ -186,6 +191,9 @@ $PageSection = "Guide"; additional seeds in the Shop, so you can skip creating them through mutations. Though it always costs more to buy the seeds than create them by mutation.. + Your discoveries are also recorded in the + Plant encyclopedia and + Mutation encyclopedia.

@@ -212,7 +220,8 @@ $PageSection = "Guide"; The Magic trowel fills as many empty plots as it can with the selected seed. If you have fewer seeds than empty plots, it simply plants every - seed you have. + seed you have. Use it on a mature plant to harvest every + mature plant of that same type in the active Garden.

@@ -243,6 +252,49 @@ $PageSection = "Guide";

+
+

Gardens and rotation

+ +

+ You can buy additional Gardens from the Shop. Each Garden + has its own name, plots, mutation cooldowns, and expansion + size. Use the arrows beside the Garden name to switch + between the Gardens you own. +

+ +

+ The Plot rotation upgrade adds a direction to planted + plots. Rotation matters for directional mutations and + functional plants, and plants with directional sprites + can visually face their saved direction. +

+
+ +
+

Functional plants

+ +

+ Some mutation-created plants do more than grow and harvest. + Once mature, functional plants can affect nearby plots or + the wider Garden by harvesting, planting, duplicating, + advancing growth, changing mutation behaviour, or modifying + harvest rewards. Their exact behaviour depends on the plant. +

+ +

+ Directional functional plants use their plot rotation to + decide where effects such as Front and + Behind point. Other effects can target + cardinal neighbours, adjacent plots, or the whole Garden. +

+
+
Your Profile - contains your username, colour, statistics, and - Account Key. Garden saves can sync through the API, - while the Account Key lets you use the same Garden - in another browser or on another device. - It's basically just like logging into an account. + contains your username, colour, Garden display settings, + statistics, and Account Key. Garden saves can sync through + the API, while the Account Key lets you use the same Garden + in another browser or on another device. It's basically + just like logging into an account.

@@ -297,6 +349,26 @@ $PageSection = "Guide"; browser storage and cannot be cleared remotely.

+ +
+

Contact

+ +

+ For general Garden questions or anything that does not fit + elsewhere, email + contact@srhtnin.garden. +

+ +

+ Found a bug? Send it to + bug@srhtnin.garden. + Ideas and suggestions can go to + suggestion@srhtnin.garden. +

+
diff --git a/Pages/Profile.php b/Pages/Profile.php index 1fdd447..7356d71 100644 --- a/Pages/Profile.php +++ b/Pages/Profile.php @@ -17,9 +17,9 @@ $PageTitle = "Profile";

Profile

- Manage your Garden profile, view your - statistics, and move your account between - devices. + Manage your Garden profile and display settings, + view your statistics, move your account between + devices, and find the Garden contact addresses.

@@ -292,7 +292,17 @@ $PageTitle = "Profile";
- Garden size + Gardens owned + + + + ... + +
+ +
+ + Active Garden size @@ -303,6 +313,26 @@ $PageTitle = "Profile"; +
+

Contact

+ +

+ For general Garden questions, email + contact@srhtnin.garden. +

+ +

+ Bug reports can be sent to + bug@srhtnin.garden, + while ideas and suggestions can be sent to + suggestion@srhtnin.garden. +

+
+ +
{ + HarvestManyPlants( + Plot.Plant + ); + } + ); + + return Tile; + } + + if ( SelectedGardenTool !== "Trowel" @@ -2364,6 +2404,137 @@ async function PlantManySeeds() { } +async function HarvestManyPlants( + PlantKey +) { + const ActionTime = Date.now(); + + AdvanceGameSimulation( + GameSave, + ActionTime + ); + + const Plant = + Plants[PlantKey]; + + if (Plant === undefined) { + return; + } + + + const MatchingPlotIndexes = []; + + GameSave.Garden.Plots.forEach( + (Plot, PlotIndex) => { + if ( + Plot !== null && + Plot.Plant === PlantKey && + IsPlantMature( + Plot, + Plant + ) + ) { + MatchingPlotIndexes.push( + PlotIndex + ); + } + } + ); + + if (MatchingPlotIndexes.length === 0) { + SetGardenMessage( + "There aren't any mature " + + Plant.Name + + " plants to harvest." + ); + + RenderGame(); + return; + } + + + let HarvestedCount = 0; + let RewardAmount = 0; + let DisabledCount = 0; + let RewardUnavailableCount = 0; + + for ( + const PlotIndex + of MatchingPlotIndexes + ) { + const HarvestResult = + HarvestGardenPlot( + GameSave, + GameSave.ActiveGardenIndex, + PlotIndex, + ActionTime + ); + + if (!HarvestResult.Harvested) { + if (HarvestResult.Disabled) { + DisabledCount++; + } else if ( + HarvestResult.RewardUnavailable + ) { + RewardUnavailableCount++; + } + + continue; + } + + HarvestedCount++; + RewardAmount += + HarvestResult.RewardAmount; + } + + + if (HarvestedCount <= 0) { + if (DisabledCount > 0) { + SetGardenMessage( + Plant.Name + + " can't be harvested right now." + ); + } else if ( + RewardUnavailableCount > 0 + ) { + SetGardenMessage( + "Couldn't calculate the harvest reward for " + + Plant.Name + + "." + ); + } + + RenderGame(); + return; + } + + + SetGardenMessage( + "Magic trowel harvested " + + HarvestedCount.toLocaleString() + + " " + + Plant.Name + + (HarvestedCount === 1 + ? " plant" + : " plants") + + " for " + + RewardAmount.toLocaleString() + + " Dew." + ); + + CheckGardenMutations( + GameSave, + ActionTime + ); + + RenderGame(); + + await SaveGame( + GameSave + ); +} + + async function HarvestPlant( PlotIndex ) { diff --git a/Scripts/Garden/Profile.js b/Scripts/Garden/Profile.js index 9b7ee07..5db6f72 100644 --- a/Scripts/Garden/Profile.js +++ b/Scripts/Garden/Profile.js @@ -796,6 +796,12 @@ function RenderProfileStatistics() { ?.length ?? 0; + const GardensOwned = + ProfileSave + ?.Gardens + ?.length ?? + 1; + const GardenWidth = ProfileSave ?.Garden @@ -837,6 +843,13 @@ function RenderProfileStatistics() { ) ); + SetProfileStatistic( + "ProfileGardensOwned", + FormatProfileNumber( + GardensOwned + ) + ); + SetProfileStatistic( "ProfileGardenSize", GardenWidth + @@ -852,6 +865,7 @@ function RenderProfileStatisticsError() { "ProfileLifetimeDew", "ProfilePlantsDiscovered", "ProfileMutationsDiscovered", + "ProfileGardensOwned", "ProfileGardenSize" ];