Skip to content

Commit

Permalink
chore: royal jelly collector
Browse files Browse the repository at this point in the history
  • Loading branch information
Mees committed Nov 2, 2024
1 parent 9f39815 commit dcf1957
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stores/resourcesStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ export const useResourcesStore = defineStore('resources', {
addAnts(amount: number) {
this.productionRates.antsGenerationRate += amount
},
addRoyalJelly(amount: number) {
this.resources.royalJelly += amount
},
applyStorageModifiers(storageModifiers: any) {
this.storageModifiers = storageModifiers
},
Expand Down
18 changes: 18 additions & 0 deletions src/stores/trainingStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,20 @@ export const useTrainingStore = defineStore({
initialTimePerAction: 30,
timePerAction: 30,
},
{
name: CraftingRecipeType.RoyalJellyCollector,
description: 'Collects 1 Royal Jelly per Royal Jelly Collector',
cost: {
[ResourceType.RoyalJelly]: 100,
},
xpPerAction: 180,
levelRequired: 80,
initialTimePerAction: 60,
timePerAction: 60,
effect: {
royalJellyGeneration: 1,
},
},
{
name: CraftingRecipeType.MasterAntHill,
description: 'Generates 20 ants passively per Ant Hill',
Expand Down Expand Up @@ -1091,6 +1105,10 @@ export const useTrainingStore = defineStore({
if (effect.antGeneration) {
resourcesStore.addAnts(effect.antGeneration * amountOfUpgrade)
}

if (effect.royalJellyGeneration) {
resourcesStore.addRoyalJelly(effect.royalJellyGeneration)
}
},

calculateOfflineMiningProgress(deltaTime: number, resource: MiningResource) {
Expand Down
2 changes: 2 additions & 0 deletions src/types/trainingTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export enum CraftingRecipeType {
AntHill = 'Ant Hill',
AdvancedAntHill = 'Advanced Ant Hill',
MasterAntHill = 'Master Ant Hill',

RoyalJellyCollector = 'Royal Jelly Collector',
}

export interface TrainingState {
Expand Down

0 comments on commit dcf1957

Please sign in to comment.