MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / handlePondConversion

Method handlePondConversion

code/main/Game.ts:751–768  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

749 }
750
751 private handlePondConversion(): void{
752 // Variables
753 var conversionAmount: number;
754
755 // If the conversion is activated
756 if(Saving.loadBool("lollipopFarmPondFeedingLolligators")){
757 // Set the conversion amount
758 conversionAmount = Saving.loadNumber("lollipopFarmPondConversionRate");
759 // If we don't have enough candies, lower this conversion rate
760 if(this.candies.getCurrent() < conversionAmount)
761 conversionAmount = this.candies.getCurrent();
762 // If the conversionAmount is > 0, we convert
763 if(conversionAmount > 0){
764 this.candies.add(-conversionAmount);
765 this.lollipops.add(conversionAmount);
766 }
767 }
768 }
769
770 private localAutosave(): void{
771 // If local autosave is enabled and there's a local auto save slot and there's a local autosave time

Callers 1

oneSecondMethodMethod · 0.95

Calls 2

getCurrentMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected