Skip to content

Add Priority-Based Pet Hatching and Feeding Strategy#50

Open
douglasrizzo wants to merge 5 commits intobumbleshoot:mainfrom
douglasrizzo:doug/priority-hatch-feed
Open

Add Priority-Based Pet Hatching and Feeding Strategy#50
douglasrizzo wants to merge 5 commits intobumbleshoot:mainfrom
douglasrizzo:doug/priority-hatch-feed

Conversation

@douglasrizzo
Copy link

@douglasrizzo douglasrizzo commented Dec 5, 2025

This PR introduces a new "priority" mode for automatic pet hatching and feeding, alongside the existing "conservative" mode. The priority mode is designed for players who want to actively progress their pet collection without waiting for strict resource requirements to be met.

This PR intends to address the suggestion described in #48.

New Features

Priority Mode (HATCH_FEED_MODE = "priority")

Hatching Priority

Hatches pets whenever eggs and potions are available (no strict requirements), in this order:

  1. Standard pets (basic colors)
  2. Standard pets (magic/premium potions)
  3. Quest pets (basic colors)
  4. Wacky pets

Within each group, sorted alphabetically by species.

Feeding Priority

Feeds pets to turn them into mounts, in this order:

  1. Standard pets (basic colors) - favorite food only (+5 per feeding)
  2. Quest pets (basic colors) - favorite food only (+5 per feeding)
  3. Magic potion pets (premium colors) - leftover food only (+2 per feeding)
  4. Wacky pets - skipped (cannot become mounts)

Within each group, pets closest to becoming mounts are fed first.

Efficiency rules:

  • Basic color pets are ONLY fed their favorite foods (never wastes food at +2)
  • Premium color pets only receive food that isn't needed by any remaining basic color pets
  • Pets may be partially fed if not enough appropriate food is available

Shared Utility Functions (in global.gs)

Extracted common code into reusable functions:

  • getPetLists() - Returns categorized pet lists from content data
  • getBasicColors() - Returns basic hatching potion colors
  • getOwnedPets() - Returns owned non-special pets
  • getOwnedMounts() - Returns owned non-special mounts
  • getUsableFood() - Returns usable food based on settings
  • makeReadable() - Converts CamelCase to readable format
  • hatchPet() - API call to hatch a pet with logging
  • feedPet() - API call to feed a pet with logging
  • getFavoriteFoods() - Returns favorite foods for a color

Files Changed

File Changes
automations/hatchFeedPetsPriority.gs New file - Priority strategy implementation
automations/hatchFeedPets.gs Refactored to use shared functions
global.gs Added shared pet utility functions + mode switching
setup.gs Added HATCH_FEED_MODE configuration option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant