(define *global-env* (env))
(define #f (< 2 1))
(define #t (> 2 1))
(define _define define)
#"game" 1
(display "game - loading")
#"game" 4
(_define _system begin)
#"core/macro" 6
(_define list-with (lambda (item lst) (if (pair? lst) (if (== item (car lst)) #t))))
#"core/macro" 17
(_define backquote-combine (lambda (left right) (cond ((nul? right) (list (quote list) left)) ((list-with (quote list) right) (cons (quote list) (cons left (cdr right)))) (#t (list (quote cons) left right)))))
#"core/macro" 43
(_define backquote-expand (lambda (exp) (cond ((nul? exp) #f) ((atom? exp) (list (quote quote) exp)) ((list-with (quote backquote) exp) (begin (display "backquote") (backquote-expand (backquote-expand (cadr exp))))) ((list-with (quote comma) exp) (cadr exp)) ((list-with (quote commaAt) (car exp)) (if (nul? (cdr exp)) (cadar exp) (list (quote append) (cadar exp) (backquote-expand (cdr exp))))) (#t (backquote-combine (backquote-expand (car exp)) (backquote-expand (cdr exp)))))))
#"core/macro" 50
(_define macro? (lambda (lst) (if (pair? lst) (if (symbol? (car lst)) (list-with (quote macro) (eval (car lst) *global-env*))))))
#"core/macro" 53
(_define macro-method (lambda (exp) (cdr (eval (car exp) *global-env*))))
#"core/macro" 58
(_define macro-expand-list (lambda (exp) (if (pair? exp) (cons+ exp (macro-expand1 (car exp)) (macro-expand-list (cdr exp))) (macro-expand1 exp))))
#"core/macro" 76
(_define macro-expand1 (lambda (exp) (cond ((atom? exp) exp) ((list-with (quote backquote) exp) (macro-expand1 (backquote-expand (cadr exp)))) ((macro? exp) (_try (macro-expand1 (apply (macro-method exp) (cdr exp)))) (lambda (e) (display (->string (_file exp) " " (_line exp) " " e)) exp)) (#t (macro-expand-list exp)))))
#"core/macro" 79
()
#"core/base" 3
(_define defmacro (cons (quote macro) (lambda (param . body) (list (quote _define) (car param) (list (quote cons) (list (quote quote) (quote macro)) (cons (quote lambda) (cons (cdr param) body)))))))
#"core/base" 6
(_define defmacro! (cons (quote macro) (lambda (param . body) (list (quote set!) (car param) (list (quote cons) (list (quote quote) (quote macro)) (cons (quote lambda) (cons (cdr param) body)))))))
#"core/base" 93
(_define string-join (lambda (joinChar lst) (apply ->join (cons joinChar lst))))
#"core/base" 103
(_define anyOf (lambda (pred lst) (if (nul? (car lst)) #f (if (pred (car lst)) #t (anyOf pred (cdr lst))))))
#"core/base" 111
(_define allOf (lambda (pred lst) (if (nul? (car lst)) #t (if (pred (car lst)) (allOf pred (cdr lst))))))
#"core/base" 114
(_define *toClose* #f)
#"core/base" 120
(_define _onClose (lambda () (forEach (lambda (i) (i)) lst)))
#"core/base" 123
(_define *toSceneChange* #f)
#"core/base" 129
(_define _onSceneChange (lambda () (forEach (lambda (i) (i)) *toSceneChange*)))
#"core/base" 134
(_define abs (lambda (n) (if (< n 0) (%* n -1) n)))
#"core/base" 140
(_define makeSeed (lambda (seed) (lambda () (abs (set! seed (%+ (% (%* 69069 seed) 2147483647) 1234567))))))
#"core/base" 144
(_define makeRand (lambda (src n) (lambda () (% (src) n))))
#"core/base" 161
(_define exists (lambda (var) (if (nul? var) #f #t)))
#"core/base" 173
(_define nth (lambda (n lst) (cond ((nul? lst) (_throw "index too large")) ((> n 0) (nth (%- n 1) (cdr lst))) ((< n 0) (_throw "negative index")) (#t (car lst)))))
#"core/base" 178
(_define takeFirst (lambda (n lst) (if (> n 0) (cons (car lst) (takeFirst (%- n 1) (cdr lst))))))
#"core/base" 182
(_define choose (lambda (lst) (nth ((makeRand (makeSeed (coreInfoTime)) (length lst))) lst)))
#"type/date" 3
(_define makeTime (lambda (inHours inMinutes inSeconds) (%* (%+ (%+ (%* inHours 3600) (%* inMinutes 60)) inSeconds) 1000)))
#"type/date" 6
(_define timeToSeconds (lambda (inTime) (%/ inTime 1000)))
#"type/date" 9
(_define secondsToTime (lambda (inSeconds) (%* inSeconds 1000)))
#"type/date" 12
(_define daysToTime (lambda (inDays) (%* (%* (%* (%* inDays 24) 60) 60) 1000)))
#"type/date" 15
(_define timeAgo (lambda (inTime) (%- (coreInfoTime) inTime)))
#"type/date" 18
(_define toHours (lambda (inTime) (floor (%/ inTime (makeTime 1 0 0)))))
#"type/date" 21
(_define toMinutes (lambda (inTime) (floor (%/ inTime (makeTime 0 1 0)))))
#"game" 10
(_define *dynamic-reload* #f)
#"game" 14
(_define _require require)
#"game" 21
(if *dynamic-reload* (begin (#pragma strict #f) (_define urlServer "http://localhost:3000/") (_define require (lambda (filename) (readerFile filename (httpRead (->string urlServer filename)) *global-env*)))))
#"cat" 1
(display "Welcome to cat game")
#"persistance" 2
(_define *persistance* #f)
#"persistance" 6
(_define saveValue (lambda (name) (coreInfoWrite name (map-ref (car *global-env*) name))))
#"persistance" 13
(_define loadValue (lambda (name) (_define local (coreInfoRead name)) (if (exception? local) (display local) (map-set! (car *global-env*) name local))))
#"persistance" 23
(_define applyPersistance (lambda (io persistance) (_define _loop (lambda (lst) (if (nul? lst) #t (begin (apply io (car lst)) (_loop (cdr lst)))))) (_loop persistance)))
#"persistance" 27
(_define saveAll (lambda () (applyPersistance saveValue persistance) (coreInfoSave)))
#"persistance" 30
(_define loadAll (lambda () (applyPersistance loadValue persistance)))
#"cat" 6
(_define *buildInformation* #f)
#"cat" 14
(_define *require-reload* #f)
#"cat" 17
(_define reloadScripts (lambda () (eval (quote (forEach require (reverse *require-reload*))) *global-env*)))
#"cat" 26
(_define *toPlayerLeveled* #f)
#"cat" 32
(_define _onPlayerLeveled (lambda () (forEach (lambda (i) (i)) *toPlayerLeveled*)))
#"cat" 35
(_define *toPopupEmptied* #f)
#"cat" 41
(_define _onPopupsEmptied (lambda () (forEach (lambda (i) (i)) *toPopupEmptied*)))
#"cat" 44
(_define *toProgressMade* #f)
#"cat" 50
(_define _onProgressMade (lambda (key increment data) (forEach (lambda (i) (i key increment data)) *toProgressMade*)))
#"math" 6
(_define clamp (lambda (value min max) (if (> value max) max (if (> value min) value min))))
#"math" 10
(_define clampPayout (lambda (level base step min max) ((lambda (value) (clamp value min max)) (%+ (%* level step) base))))
#"liblocalize" 2
(_define localize (lambda (str) (localizeToString (localizedText str))))
#"liblocalize" 5
(_define localizeArg (lambda (str key val) (localizeToString (localizeSetArgument (localizedText str) key val))))
#"FeatureTools" 1
(display "loading feature flags")
#"FeatureTools" 4
(_define *features* #f)
#"FeatureTools" 9
(_define bool->feature (lambda (state) (if state (quote true) (quote false))))
#"FeatureTools" 16
(_define feature->bool (lambda (state) (cond ((== (quote true) state) #t) ((== (quote false) state) #f))))
#"feature" 2
(begin (_define speedups (if (coreInfoExists (quote speedups)) (coreInfoRead (quote speedups)) #f)) (set! *features* (cons (list (quote speedups) (quote (true false)) (bool->feature #f) (bool->feature speedups)) *features*)))
#"feature" 3
(begin (_define speedupsLevelUp (if (coreInfoExists (quote speedupsLevelUp)) (coreInfoRead (quote speedupsLevelUp)) #f)) (set! *features* (cons (list (quote speedupsLevelUp) (quote (true false)) (bool->feature #f) (bool->feature speedupsLevelUp)) *features*)))
#"feature" 4
(begin (_define speedupsBank (if (coreInfoExists (quote speedupsBank)) (coreInfoRead (quote speedupsBank)) #f)) (set! *features* (cons (list (quote speedupsBank) (quote (true false)) (bool->feature #f) (bool->feature speedupsBank)) *features*)))
#"feature" 5
(begin (_define speedupsCrafting (if (coreInfoExists (quote speedupsCrafting)) (coreInfoRead (quote speedupsCrafting)) #f)) (set! *features* (cons (list (quote speedupsCrafting) (quote (true false)) (bool->feature #f) (bool->feature speedupsCrafting)) *features*)))
#"feature" 6
(begin (_define speedupsCraftingEvent (if (coreInfoExists (quote speedupsCraftingEvent)) (coreInfoRead (quote speedupsCraftingEvent)) #f)) (set! *features* (cons (list (quote speedupsCraftingEvent) (quote (true false)) (bool->feature #f) (bool->feature speedupsCraftingEvent)) *features*)))
#"feature" 7
(begin (_define speedupsBreedDelivery (if (coreInfoExists (quote speedupsBreedDelivery)) (coreInfoRead (quote speedupsBreedDelivery)) #f)) (set! *features* (cons (list (quote speedupsBreedDelivery) (quote (true false)) (bool->feature #f) (bool->feature speedupsBreedDelivery)) *features*)))
#"feature" 8
(begin (_define speedupsSupplyDelivery (if (coreInfoExists (quote speedupsSupplyDelivery)) (coreInfoRead (quote speedupsSupplyDelivery)) #f)) (set! *features* (cons (list (quote speedupsSupplyDelivery) (quote (true false)) (bool->feature #f) (bool->feature speedupsSupplyDelivery)) *features*)))
#"feature" 9
(begin (_define speedupsSupplyAllDelivery (if (coreInfoExists (quote speedupsSupplyAllDelivery)) (coreInfoRead (quote speedupsSupplyAllDelivery)) #f)) (set! *features* (cons (list (quote speedupsSupplyAllDelivery) (quote (true false)) (bool->feature #f) (bool->feature speedupsSupplyAllDelivery)) *features*)))
#"feature" 10
(begin (_define speedupsPresentCoins (if (coreInfoExists (quote speedupsPresentCoins)) (coreInfoRead (quote speedupsPresentCoins)) #f)) (set! *features* (cons (list (quote speedupsPresentCoins) (quote (true false)) (bool->feature #f) (bool->feature speedupsPresentCoins)) *features*)))
#"feature" 11
(begin (_define speedupsCap (if (coreInfoExists (quote speedupsCap)) (coreInfoRead (quote speedupsCap)) #f)) (set! *features* (cons (list (quote speedupsCap) (quote (true false)) (bool->feature #f) (bool->feature speedupsCap)) *features*)))
#"feature" 12
(begin (_define supplies (if (coreInfoExists (quote supplies)) (coreInfoRead (quote supplies)) #f)) (set! *features* (cons (list (quote supplies) (quote (true false)) (bool->feature #f) (bool->feature supplies)) *features*)))
#"feature" 13
(begin (_define suppliesStockToggle (if (coreInfoExists (quote suppliesStockToggle)) (coreInfoRead (quote suppliesStockToggle)) #t)) (set! *features* (cons (list (quote suppliesStockToggle) (quote (true false)) (bool->feature #t) (bool->feature suppliesStockToggle)) *features*)))
#"feature" 14
(begin (_define secrets (if (coreInfoExists (quote secrets)) (coreInfoRead (quote secrets)) #f)) (set! *features* (cons (list (quote secrets) (quote (true false)) (bool->feature #f) (bool->feature secrets)) *features*)))
#"feature" 15
(begin (_define ticketToggle (if (coreInfoExists (quote ticketToggle)) (coreInfoRead (quote ticketToggle)) #f)) (set! *features* (cons (list (quote ticketToggle) (quote (true false)) (bool->feature #f) (bool->feature ticketToggle)) *features*)))
#"feature" 16
(begin (_define removePremiumKeys (if (coreInfoExists (quote removePremiumKeys)) (coreInfoRead (quote removePremiumKeys)) #f)) (set! *features* (cons (list (quote removePremiumKeys) (quote (true false)) (bool->feature #f) (bool->feature removePremiumKeys)) *features*)))
#"feature" 17
(begin (_define installHideGlobalChat (if (coreInfoExists (quote installHideGlobalChat)) (coreInfoRead (quote installHideGlobalChat)) #f)) (set! *features* (cons (list (quote installHideGlobalChat) (quote (true false)) (bool->feature #f) (bool->feature installHideGlobalChat)) *features*)))
#"feature" 18
(begin (_define gcOpt (if (coreInfoExists (quote gcOpt)) (coreInfoRead (quote gcOpt)) #f)) (set! *features* (cons (list (quote gcOpt) (quote (true false)) (bool->feature #f) (bool->feature gcOpt)) *features*)))
#"feature" 19
(begin (_define hideVariantsInSettings (if (coreInfoExists (quote hideVariantsInSettings)) (coreInfoRead (quote hideVariantsInSettings)) #f)) (set! *features* (cons (list (quote hideVariantsInSettings) (quote (true false)) (bool->feature #f) (bool->feature hideVariantsInSettings)) *features*)))
#"feature" 20
(begin (_define reviewFlow (if (coreInfoExists (quote reviewFlow)) (coreInfoRead (quote reviewFlow)) #t)) (set! *features* (cons (list (quote reviewFlow) (quote (true false)) (bool->feature #t) (bool->feature reviewFlow)) *features*)))
#"feature" 21
(begin (_define hideBankAd (if (coreInfoExists (quote hideBankAd)) (coreInfoRead (quote hideBankAd)) #f)) (set! *features* (cons (list (quote hideBankAd) (quote (true false)) (bool->feature #f) (bool->feature hideBankAd)) *features*)))
#"feature" 22
(begin (_define showRespinAd (if (coreInfoExists (quote showRespinAd)) (coreInfoRead (quote showRespinAd)) #t)) (set! *features* (cons (list (quote showRespinAd) (quote (true false)) (bool->feature #t) (bool->feature showRespinAd)) *features*)))
#"feature" 23
(begin (_define showInterstitialMiniGameAd (if (coreInfoExists (quote showInterstitialMiniGameAd)) (coreInfoRead (quote showInterstitialMiniGameAd)) #t)) (set! *features* (cons (list (quote showInterstitialMiniGameAd) (quote (true false)) (bool->feature #t) (bool->feature showInterstitialMiniGameAd)) *features*)))
#"feature" 24
(begin (_define showInterstitialPortraitAd (if (coreInfoExists (quote showInterstitialPortraitAd)) (coreInfoRead (quote showInterstitialPortraitAd)) #f)) (set! *features* (cons (list (quote showInterstitialPortraitAd) (quote (true false)) (bool->feature #f) (bool->feature showInterstitialPortraitAd)) *features*)))
#"feature" 25
(begin (_define showInterstitialContestAd (if (coreInfoExists (quote showInterstitialContestAd)) (coreInfoRead (quote showInterstitialContestAd)) #t)) (set! *features* (cons (list (quote showInterstitialContestAd) (quote (true false)) (bool->feature #t) (bool->feature showInterstitialContestAd)) *features*)))
#"feature" 26
(begin (_define showInterstitialContestAdToSpenders (if (coreInfoExists (quote showInterstitialContestAdToSpenders)) (coreInfoRead (quote showInterstitialContestAdToSpenders)) #f)) (set! *features* (cons (list (quote showInterstitialContestAdToSpenders) (quote (true false)) (bool->feature #f) (bool->feature showInterstitialContestAdToSpenders)) *features*)))
#"feature" 27
(begin (_define showInterstitialBeforeGameOver (if (coreInfoExists (quote showInterstitialBeforeGameOver)) (coreInfoRead (quote showInterstitialBeforeGameOver)) #f)) (set! *features* (cons (list (quote showInterstitialBeforeGameOver) (quote (true false)) (bool->feature #f) (bool->feature showInterstitialBeforeGameOver)) *features*)))
#"feature" 28
(begin (_define showInterstitialToLowStarterSpenders (if (coreInfoExists (quote showInterstitialToLowStarterSpenders)) (coreInfoRead (quote showInterstitialToLowStarterSpenders)) #f)) (set! *features* (cons (list (quote showInterstitialToLowStarterSpenders) (quote (true false)) (bool->feature #f) (bool->feature showInterstitialToLowStarterSpenders)) *features*)))
#"feature" 29
(begin (_define showBannerAd (if (coreInfoExists (quote showBannerAd)) (coreInfoRead (quote showBannerAd)) #f)) (set! *features* (cons (list (quote showBannerAd) (quote (true false)) (bool->feature #f) (bool->feature showBannerAd)) *features*)))
#"feature" 30
(begin (_define hideVIP (if (coreInfoExists (quote hideVIP)) (coreInfoRead (quote hideVIP)) #f)) (set! *features* (cons (list (quote hideVIP) (quote (true false)) (bool->feature #f) (bool->feature hideVIP)) *features*)))
#"feature" 31
(begin (_define loyaltyProgram (if (coreInfoExists (quote loyaltyProgram)) (coreInfoRead (quote loyaltyProgram)) #f)) (set! *features* (cons (list (quote loyaltyProgram) (quote (true false)) (bool->feature #f) (bool->feature loyaltyProgram)) *features*)))
#"feature" 32
(begin (_define appsFlyerCatsNumReportThreshold (if (coreInfoExists (quote appsFlyerCatsNumReportThreshold)) (coreInfoRead (quote appsFlyerCatsNumReportThreshold)) 30)) (set! *features* (cons (list (quote appsFlyerCatsNumReportThreshold) (quote (true false)) (bool->feature 30) (bool->feature appsFlyerCatsNumReportThreshold)) *features*)))
#"feature" 33
(begin (_define useNewDeliveryTimes (if (coreInfoExists (quote useNewDeliveryTimes)) (coreInfoRead (quote useNewDeliveryTimes)) #f)) (set! *features* (cons (list (quote useNewDeliveryTimes) (quote (true false)) (bool->feature #f) (bool->feature useNewDeliveryTimes)) *features*)))
#"feature" 34
(begin (_define hideCollectAllCoins (if (coreInfoExists (quote hideCollectAllCoins)) (coreInfoRead (quote hideCollectAllCoins)) #f)) (set! *features* (cons (list (quote hideCollectAllCoins) (quote (true false)) (bool->feature #f) (bool->feature hideCollectAllCoins)) *features*)))
#"feature" 35
(begin (_define hideMinigames (if (coreInfoExists (quote hideMinigames)) (coreInfoRead (quote hideMinigames)) #f)) (set! *features* (cons (list (quote hideMinigames) (quote (true false)) (bool->feature #f) (bool->feature hideMinigames)) *features*)))
#"feature" 36
(begin (_define hideContests (if (coreInfoExists (quote hideContests)) (coreInfoRead (quote hideContests)) #f)) (set! *features* (cons (list (quote hideContests) (quote (true false)) (bool->feature #f) (bool->feature hideContests)) *features*)))
#"feature" 37
(begin (_define hideBank (if (coreInfoExists (quote hideBank)) (coreInfoRead (quote hideBank)) #f)) (set! *features* (cons (list (quote hideBank) (quote (true false)) (bool->feature #f) (bool->feature hideBank)) *features*)))
#"feature" 38
(begin (_define showLimitedTimeOffer (if (coreInfoExists (quote showLimitedTimeOffer)) (coreInfoRead (quote showLimitedTimeOffer)) #f)) (set! *features* (cons (list (quote showLimitedTimeOffer) (quote (true false)) (bool->feature #f) (bool->feature showLimitedTimeOffer)) *features*)))
#"feature" 39
(begin (_define showNewShopShelf (if (coreInfoExists (quote showNewShopShelf)) (coreInfoRead (quote showNewShopShelf)) #f)) (set! *features* (cons (list (quote showNewShopShelf) (quote (true false)) (bool->feature #f) (bool->feature showNewShopShelf)) *features*)))
#"feature" 40
(begin (_define hidePackagesInCraft (if (coreInfoExists (quote hidePackagesInCraft)) (coreInfoRead (quote hidePackagesInCraft)) #f)) (set! *features* (cons (list (quote hidePackagesInCraft) (quote (true false)) (bool->feature #f) (bool->feature hidePackagesInCraft)) *features*)))
#"feature" 41
(begin (_define showLimitedTimePopup (if (coreInfoExists (quote showLimitedTimePopup)) (coreInfoRead (quote showLimitedTimePopup)) #f)) (set! *features* (cons (list (quote showLimitedTimePopup) (quote (true false)) (bool->feature #f) (bool->feature showLimitedTimePopup)) *features*)))
#"feature" 42
(begin (_define hidePoppyCats (if (coreInfoExists (quote hidePoppyCats)) (coreInfoRead (quote hidePoppyCats)) #f)) (set! *features* (cons (list (quote hidePoppyCats) (quote (true false)) (bool->feature #f) (bool->feature hidePoppyCats)) *features*)))
#"feature" 43
(begin (_define hideBlockyCats (if (coreInfoExists (quote hideBlockyCats)) (coreInfoRead (quote hideBlockyCats)) #f)) (set! *features* (cons (list (quote hideBlockyCats) (quote (true false)) (bool->feature #f) (bool->feature hideBlockyCats)) *features*)))
#"feature" 44
(begin (_define hideMaterialSale (if (coreInfoExists (quote hideMaterialSale)) (coreInfoRead (quote hideMaterialSale)) #f)) (set! *features* (cons (list (quote hideMaterialSale) (quote (true false)) (bool->feature #f) (bool->feature hideMaterialSale)) *features*)))
#"feature" 45
(begin (_define hideDailyQuests (if (coreInfoExists (quote hideDailyQuests)) (coreInfoRead (quote hideDailyQuests)) #f)) (set! *features* (cons (list (quote hideDailyQuests) (quote (true false)) (bool->feature #f) (bool->feature hideDailyQuests)) *features*)))
#"feature" 46
(begin (_define hideFlashSaleAtOpen (if (coreInfoExists (quote hideFlashSaleAtOpen)) (coreInfoRead (quote hideFlashSaleAtOpen)) #f)) (set! *features* (cons (list (quote hideFlashSaleAtOpen) (quote (true false)) (bool->feature #f) (bool->feature hideFlashSaleAtOpen)) *features*)))
#"feature" 47
(begin (_define adjustableEventBonuses (if (coreInfoExists (quote adjustableEventBonuses)) (coreInfoRead (quote adjustableEventBonuses)) #t)) (set! *features* (cons (list (quote adjustableEventBonuses) (quote (true false)) (bool->feature #t) (bool->feature adjustableEventBonuses)) *features*)))
#"feature" 48
(begin (_define scaleBankRewards (if (coreInfoExists (quote scaleBankRewards)) (coreInfoRead (quote scaleBankRewards)) #f)) (set! *features* (cons (list (quote scaleBankRewards) (quote (true false)) (bool->feature #f) (bool->feature scaleBankRewards)) *features*)))
#"feature" 49
(begin (_define presentFixes (if (coreInfoExists (quote presentFixes)) (coreInfoRead (quote presentFixes)) #f)) (set! *features* (cons (list (quote presentFixes) (quote (true false)) (bool->feature #f) (bool->feature presentFixes)) *features*)))
#"feature" 50
(begin (_define presentFixesCollectAllChange (if (coreInfoExists (quote presentFixesCollectAllChange)) (coreInfoRead (quote presentFixesCollectAllChange)) #f)) (set! *features* (cons (list (quote presentFixesCollectAllChange) (quote (true false)) (bool->feature #f) (bool->feature presentFixesCollectAllChange)) *features*)))
#"feature" 51
(begin (_define showMultipleGachaPackages (if (coreInfoExists (quote showMultipleGachaPackages)) (coreInfoRead (quote showMultipleGachaPackages)) #f)) (set! *features* (cons (list (quote showMultipleGachaPackages) (quote (true false)) (bool->feature #f) (bool->feature showMultipleGachaPackages)) *features*)))
#"feature" 52
(begin (_define minigameFixes (if (coreInfoExists (quote minigameFixes)) (coreInfoRead (quote minigameFixes)) #f)) (set! *features* (cons (list (quote minigameFixes) (quote (true false)) (bool->feature #f) (bool->feature minigameFixes)) *features*)))
#"feature" 53
(begin (_define showTentenReshuffle (if (coreInfoExists (quote showTentenReshuffle)) (coreInfoRead (quote showTentenReshuffle)) #f)) (set! *features* (cons (list (quote showTentenReshuffle) (quote (true false)) (bool->feature #f) (bool->feature showTentenReshuffle)) *features*)))
#"feature" 54
(begin (_define requireIdfaForAdViews (if (coreInfoExists (quote requireIdfaForAdViews)) (coreInfoRead (quote requireIdfaForAdViews)) #f)) (set! *features* (cons (list (quote requireIdfaForAdViews) (quote (true false)) (bool->feature #f) (bool->feature requireIdfaForAdViews)) *features*)))
#"feature" 55
(begin (_define starterPackV2 (if (coreInfoExists (quote starterPackV2)) (coreInfoRead (quote starterPackV2)) #f)) (set! *features* (cons (list (quote starterPackV2) (quote (true false)) (bool->feature #f) (bool->feature starterPackV2)) *features*)))
#"feature" 56
(begin (_define skipInitialV2StarterPackKey (if (coreInfoExists (quote skipInitialV2StarterPackKey)) (coreInfoRead (quote skipInitialV2StarterPackKey)) #f)) (set! *features* (cons (list (quote skipInitialV2StarterPackKey) (quote (true false)) (bool->feature #f) (bool->feature skipInitialV2StarterPackKey)) *features*)))
#"feature" 57
(begin (_define goTo100StarterPackNonSpenderV2 (if (coreInfoExists (quote goTo100StarterPackNonSpenderV2)) (coreInfoRead (quote goTo100StarterPackNonSpenderV2)) #f)) (set! *features* (cons (list (quote goTo100StarterPackNonSpenderV2) (quote (true false)) (bool->feature #f) (bool->feature goTo100StarterPackNonSpenderV2)) *features*)))
#"feature" 58
(begin (_define ebFinishedSpin (if (coreInfoExists (quote ebFinishedSpin)) (coreInfoRead (quote ebFinishedSpin)) #t)) (set! *features* (cons (list (quote ebFinishedSpin) (quote (true false)) (bool->feature #t) (bool->feature ebFinishedSpin)) *features*)))
#"feature" 59
(begin (_define ebFinishedSpinPackCatGemOnly (if (coreInfoExists (quote ebFinishedSpinPackCatGemOnly)) (coreInfoRead (quote ebFinishedSpinPackCatGemOnly)) #t)) (set! *features* (cons (list (quote ebFinishedSpinPackCatGemOnly) (quote (true false)) (bool->feature #t) (bool->feature ebFinishedSpinPackCatGemOnly)) *features*)))
#"feature" 60
(begin (_define ebFinishedSpinDisableForKeys (if (coreInfoExists (quote ebFinishedSpinDisableForKeys)) (coreInfoRead (quote ebFinishedSpinDisableForKeys)) #f)) (set! *features* (cons (list (quote ebFinishedSpinDisableForKeys) (quote (true false)) (bool->feature #f) (bool->feature ebFinishedSpinDisableForKeys)) *features*)))
#"feature" 61
(begin (_define ebFinishedSpinEventCat (if (coreInfoExists (quote ebFinishedSpinEventCat)) (coreInfoRead (quote ebFinishedSpinEventCat)) #t)) (set! *features* (cons (list (quote ebFinishedSpinEventCat) (quote (true false)) (bool->feature #t) (bool->feature ebFinishedSpinEventCat)) *features*)))
#"feature" 62
(begin (_define ebFinishedSpinSpecialEventCat (if (coreInfoExists (quote ebFinishedSpinSpecialEventCat)) (coreInfoRead (quote ebFinishedSpinSpecialEventCat)) #f)) (set! *features* (cons (list (quote ebFinishedSpinSpecialEventCat) (quote (true false)) (bool->feature #f) (bool->feature ebFinishedSpinSpecialEventCat)) *features*)))
#"feature" 63
(begin (_define ebGemNewItemGuarantee (if (coreInfoExists (quote ebGemNewItemGuarantee)) (coreInfoRead (quote ebGemNewItemGuarantee)) #f)) (set! *features* (cons (list (quote ebGemNewItemGuarantee) (quote (true false)) (bool->feature #f) (bool->feature ebGemNewItemGuarantee)) *features*)))
#"feature" 64
(begin (_define ebGemNewItemGuaranteeXSpins (if (coreInfoExists (quote ebGemNewItemGuaranteeXSpins)) (coreInfoRead (quote ebGemNewItemGuaranteeXSpins)) #t)) (set! *features* (cons (list (quote ebGemNewItemGuaranteeXSpins) (quote (true false)) (bool->feature #t) (bool->feature ebGemNewItemGuaranteeXSpins)) *features*)))
#"feature" 65
(begin (_define ebGemNewItemGuaranteeHidden (if (coreInfoExists (quote ebGemNewItemGuaranteeHidden)) (coreInfoRead (quote ebGemNewItemGuaranteeHidden)) #t)) (set! *features* (cons (list (quote ebGemNewItemGuaranteeHidden) (quote (true false)) (bool->feature #t) (bool->feature ebGemNewItemGuaranteeHidden)) *features*)))
#"feature" 66
(begin (_define ebTicketCarryover (if (coreInfoExists (quote ebTicketCarryover)) (coreInfoRead (quote ebTicketCarryover)) #t)) (set! *features* (cons (list (quote ebTicketCarryover) (quote (true false)) (bool->feature #t) (bool->feature ebTicketCarryover)) *features*)))
#"feature" 67
(begin (_define eventBasketV2 (if (coreInfoExists (quote eventBasketV2)) (coreInfoRead (quote eventBasketV2)) #f)) (set! *features* (cons (list (quote eventBasketV2) (quote (true false)) (bool->feature #f) (bool->feature eventBasketV2)) *features*)))
#"feature" 68
(begin (_define raresOrBetter (if (coreInfoExists (quote raresOrBetter)) (coreInfoRead (quote raresOrBetter)) #f)) (set! *features* (cons (list (quote raresOrBetter) (quote (true false)) (bool->feature #f) (bool->feature raresOrBetter)) *features*)))
#"feature" 69
(begin (_define useGuildSearchV3 (if (coreInfoExists (quote useGuildSearchV3)) (coreInfoRead (quote useGuildSearchV3)) #t)) (set! *features* (cons (list (quote useGuildSearchV3) (quote (true false)) (bool->feature #t) (bool->feature useGuildSearchV3)) *features*)))
#"feature" 70
(begin (_define clubInviteNerf (if (coreInfoExists (quote clubInviteNerf)) (coreInfoRead (quote clubInviteNerf)) #t)) (set! *features* (cons (list (quote clubInviteNerf) (quote (true false)) (bool->feature #t) (bool->feature clubInviteNerf)) *features*)))
#"feature" 71
(begin (_define themedFlashSaleTargeting (if (coreInfoExists (quote themedFlashSaleTargeting)) (coreInfoRead (quote themedFlashSaleTargeting)) #f)) (set! *features* (cons (list (quote themedFlashSaleTargeting) (quote (true false)) (bool->feature #f) (bool->feature themedFlashSaleTargeting)) *features*)))
#"feature" 72
(begin (_define checkVipIfPreviouslySubscribed (if (coreInfoExists (quote checkVipIfPreviouslySubscribed)) (coreInfoRead (quote checkVipIfPreviouslySubscribed)) #t)) (set! *features* (cons (list (quote checkVipIfPreviouslySubscribed) (quote (true false)) (bool->feature #t) (bool->feature checkVipIfPreviouslySubscribed)) *features*)))
#"feature" 73
(begin (_define nameCreationV2 (if (coreInfoExists (quote nameCreationV2)) (coreInfoRead (quote nameCreationV2)) #f)) (set! *features* (cons (list (quote nameCreationV2) (quote (true false)) (bool->feature #f) (bool->feature nameCreationV2)) *features*)))
#"feature" 74
(begin (_define nameCreationBlockUseOfHashtagChar (if (coreInfoExists (quote nameCreationBlockUseOfHashtagChar)) (coreInfoRead (quote nameCreationBlockUseOfHashtagChar)) #t)) (set! *features* (cons (list (quote nameCreationBlockUseOfHashtagChar) (quote (true false)) (bool->feature #t) (bool->feature nameCreationBlockUseOfHashtagChar)) *features*)))
#"feature" 75
(begin (_define nameCreationV2Popup (if (coreInfoExists (quote nameCreationV2Popup)) (coreInfoRead (quote nameCreationV2Popup)) #f)) (set! *features* (cons (list (quote nameCreationV2Popup) (quote (true false)) (bool->feature #f) (bool->feature nameCreationV2Popup)) *features*)))
#"feature" 76
(begin (_define allowCraftRewardAmount (if (coreInfoExists (quote allowCraftRewardAmount)) (coreInfoRead (quote allowCraftRewardAmount)) #f)) (set! *features* (cons (list (quote allowCraftRewardAmount) (quote (true false)) (bool->feature #f) (bool->feature allowCraftRewardAmount)) *features*)))
#"feature" 77
(begin (_define enableNotifications (if (coreInfoExists (quote enableNotifications)) (coreInfoRead (quote enableNotifications)) onIOS)) (set! *features* (cons (list (quote enableNotifications) (quote (true false)) (bool->feature onIOS) (bool->feature enableNotifications)) *features*)))
#"feature" 78
(begin (_define enablePresentsNotification (if (coreInfoExists (quote enablePresentsNotification)) (coreInfoRead (quote enablePresentsNotification)) #t)) (set! *features* (cons (list (quote enablePresentsNotification) (quote (true false)) (bool->feature #t) (bool->feature enablePresentsNotification)) *features*)))
#"feature" 79
(begin (_define enableDeliveriesNotification (if (coreInfoExists (quote enableDeliveriesNotification)) (coreInfoRead (quote enableDeliveriesNotification)) #t)) (set! *features* (cons (list (quote enableDeliveriesNotification) (quote (true false)) (bool->feature #t) (bool->feature enableDeliveriesNotification)) *features*)))
#"feature" 80
(begin (_define enableCraftingNotification (if (coreInfoExists (quote enableCraftingNotification)) (coreInfoRead (quote enableCraftingNotification)) #t)) (set! *features* (cons (list (quote enableCraftingNotification) (quote (true false)) (bool->feature #t) (bool->feature enableCraftingNotification)) *features*)))
#"feature" 81
(begin (_define enableEventsNotification (if (coreInfoExists (quote enableEventsNotification)) (coreInfoRead (quote enableEventsNotification)) #t)) (set! *features* (cons (list (quote enableEventsNotification) (quote (true false)) (bool->feature #t) (bool->feature enableEventsNotification)) *features*)))
#"feature" 82
(begin (_define showMaterialChest (if (coreInfoExists (quote showMaterialChest)) (coreInfoRead (quote showMaterialChest)) #t)) (set! *features* (cons (list (quote showMaterialChest) (quote (true false)) (bool->feature #t) (bool->feature showMaterialChest)) *features*)))
#"feature" 83
(begin (_define enableShortenedAnimations (if (coreInfoExists (quote enableShortenedAnimations)) (coreInfoRead (quote enableShortenedAnimations)) #f)) (set! *features* (cons (list (quote enableShortenedAnimations) (quote (true false)) (bool->feature #f) (bool->feature enableShortenedAnimations)) *features*)))
#"feature" 84
(begin (_define flashSaleV2 (if (coreInfoExists (quote flashSaleV2)) (coreInfoRead (quote flashSaleV2)) #f)) (set! *features* (cons (list (quote flashSaleV2) (quote (true false)) (bool->feature #f) (bool->feature flashSaleV2)) *features*)))
#"feature" 87
(_define contestVoteAdThreshold 0)
#"feature" 88
(_define maxDaysSinceLastVIPServerCheck 1)
#"feature" 89
(_define hideEventActionHoursPlayed #f)
#"feature" 90
(_define hideEventActionCatCollected #f)
#"feature" 91
(_define hideEventActionItemCollected #f)
#"feature" 92
(_define hideEventActionSpendCoins #f)
#"feature" 93
(_define hideEventActionSpendGems #f)
#"feature" 94
(_define hideEventActionMinigames #f)
#"feature" 95
(_define hideEventActionContestEntered #f)
#"feature" 96
(_define hideEventActionDeliveryStarted #f)
#"feature" 97
(_define hideEventActionSuppliesStarted #f)
#"feature" 98
(_define hideEventActionCraftCollected #f)
#"feature" 99
(_define hideEventActionFriendBasket #f)
#"FeatureTools" 34
(_define findn (lambda (item lst) (_define _loop (lambda (index lst) (cond ((nul? lst) lst) ((== item (car lst)) index) (#t (_loop (%+ index 1) (cdr lst)))))) (_loop 0 lst)))
#"FeatureTools" 41
(_define findnext (lambda (item lst) ((lambda (len index) (if (== index len) (car lst) (nth index lst))) (length lst) (%+ (findn item lst) 1))))
#"FeatureTools" 50
(_define replace (lambda (item lst with) (cond ((nul? lst) lst) ((== item (caar lst)) (cons with (cdr lst))) (#t (cons (car lst) (replace item (cdr lst) with))))))
#"FeatureTools" 56
(_define nextFeatureState (lambda (feature) (apply (lambda (name options default state) ((lambda (newFeature) (set! *features* (replace name *features* newFeature)) newFeature) (list name options default (findnext state options)))) feature)))
#"FeatureTools" 61
(_define getFeatures (lambda () *features*))
#"FeatureTools" 74
(_define toggleFeature (lambda (feature) ((lambda (newFeature) (apply (lambda (name options default state) (cond ((== default state) (coreInfoRemove name)) (#t (coreInfoWrite name (feature->bool state)))) (eval (list (quote set!) name (list (quote feature->bool) (list (quote quote) state))) *global-env*) (coreInfoSave)) newFeature) newFeature) (nextFeatureState feature))))
#"FeatureTools" 90
(_define setFeature (lambda (feature newState) (apply (lambda (name options default state) (if (anyOf (lambda (item) (== item newState)) options) ((lambda (newFeature) (cond ((== default newState) (coreInfoRemove name)) (#t (coreInfoWrite name (feature->bool newState)))) (set! *features* (replace name *features* newFeature)) (eval (list (quote set!) name (list (quote feature->bool) (list (quote quote) newState))) *global-env*) (coreInfoSave) newFeature) (list name options default newState)))) feature)))
#"FeatureTools" 101
(_define setABFeature (lambda (feature newState) (apply (lambda (name options default state) (if (anyOf (lambda (item) (== item newState)) options) ((lambda (newFeature) (set! *features* (replace name *features* newFeature)) (eval (list (quote set!) name (list (quote feature->bool) (list (quote quote) newState))) *global-env*) newFeature) (list name options default newState)))) feature)))
#"FeatureTools" 111
(_define getFeatureByName (lambda (name) (_define _loop (lambda (lst) (if (if (nul? lst) #f #t) (if (== name (caar lst)) (car lst) (_loop (cdr lst)))))) (_loop *features*)))
#"FeatureTools" 115
(_define getFeatureState (lambda (feature) (nth 3 feature)))
#"FeatureTools" 118
(_define isFeatureEnabled (lambda (feature) (feature->bool (getFeatureState (getFeatureByName feature)))))
#"FeatureTools" 120
(_define featuresAlreadyToggled (makeMap))
#"FeatureTools" 123
(_define resetFeaturesAlreadyToggled (lambda () (set! featuresAlreadyToggled (makeMap))))
#"FeatureTools" 140
(_define setFeaturesFromVariants (lambda (currentVariant variants) (forEach (lambda (variant) (apply (lambda (variantName rangeStart rangeEnd . features) (forEach (lambda (feature) (_define _featureName (car feature)) (_define _feature (getFeatureByName _featureName)) (cond ((== currentVariant variantName) (begin (map-set! featuresAlreadyToggled _featureName) (setABFeature _feature (bool->feature (eval (cadr feature) *global-env*))))) ((if (map-exists featuresAlreadyToggled _featureName) #f #t) (apply (lambda (name options default state) (setABFeature _feature default)) _feature)))) features)) variant)) variants)))
#"FeatureTools" 142
(display "features:")
#"FeatureTools" 145
(forEach (lambda (feature) (apply (lambda (name options default state) (display (->string name " " (bool->feature (eval name *global-env*)) "(" default ")"))) feature)) *features*)
#"ABTestTools" 1
(display "loading tests")
#"ABTestTools" 4
(_define *tests* #f)
#"ABTestDebugTools" 6
(_define getDebugName (lambda (testName) (->string "d" testName)))
#"ABTestDebugTools" 16
(_define saveDebugTestVariant (lambda (name variantName) ((lambda (debugName) (cond ((== variantName "") (coreInfoRemove debugName)) (#t (begin (coreInfoWrite debugName variantName) (coreInfoSave))))) (getDebugName name))))
#"ABTestDebugTools" 19
(_define getDebugTestVariant (lambda (name) (coreInfoRead (getDebugName name))))
#"ABTestDebugTools" 34
(_define getDebugVariants (lambda (variants debugVariant prime) (_define _newVariants #f) (forEach (lambda (variant) (apply (lambda (variantName rangeStart rangeEnd . features) (cond ((if (== variantName debugVariant) (if (if (nul? features) #f #t) #t)) (set! _newVariants (cons (append (list variantName 0 prime) (map (lambda (i) i) features)) _newVariants))) ((if (== variantName debugVariant) (if (nul? features) #t)) (set! _newVariants (cons (list variantName 0 prime) _newVariants))) ((nul? features) (set! _newVariants (cons (list variantName -1 -1) _newVariants))) (#t (set! _newVariants (cons (append (list variantName -1 -1) (map (lambda (i) i) features)) _newVariants))))) variant)) variants) (reverse _newVariants)))
#"ABTestDebugTools" 37
(_define isDebuggingABTest (lambda (testName) (if onDev (if (coreInfoExists (getDebugName testName)) #t))))
#"ABTestDebugTools" 42
(_define getDebugABTest (lambda (test) (apply (lambda (name prime variants minimumClientVersion startDate endDate targetFunction enabled cidInt) (_define newVariants (getDebugVariants variants (getDebugTestVariant name) prime)) (list name prime newVariants 0 startDate endDate #t #t cidInt)) test)))
#"ABTestTools" 16
(_define getTests (lambda () (if onDev ((lambda (lst) (forEach (lambda (test) (if (isDebuggingABTest (car test)) (set! lst (cons (getDebugABTest test) lst)) (set! lst (cons test lst)))) *tests*) (reverse lst)) #f) *tests*)))
#"ABTestTools" 19
(_define getTestNames (lambda () (map car (getTests))))
#"ABTestTools" 24
(_define newCidInt (lambda () (abs (parseInt (cidToInt (coreInfoCid))))))
#"ABTestTools" 34
(_define getTestByName (lambda (name) (_define _loop (lambda (lst) (if (if (nul? lst) #f #t) (if (== name (caar lst)) (car lst) (_loop (cdr lst)))))) (_loop (getTests))))
#"ABTestTools" 58
(_define getVariantIndex (lambda (test variant) (_define _loop (lambda (tests) (cond ((nul? tests)) ((== (caar tests) test) (begin (_define _innerLoop (lambda (variants index) (cond ((nul? variants)) ((== (caar variants) variant) index) (#t (_innerLoop (cdr variants) (%+ index 1)))))) (_innerLoop (caddr (car tests)) 0))) (#t (_loop (cdr tests)))))) (_loop (getTests))))
#"ABTestTools" 61
(_define isInRange (lambda (current start end) (if (if (nul? current) #f #t) (if (>= current start) (if (<= current end) #t)))))
#"ABTestTools" 64
(_define isTargeted (lambda (name targetFunction) (if (if (if (if (coreInfoExists name) #f #t) (if (if (eval targetFunction *global-env*) #f #t) #t)) #f #t) #t (if (isInTest name) #t #f))))
#"ABTestTools" 77
(_define getVariant (lambda (test) (apply (lambda (name prime variants minimumClientVersion startDate endDate targetFunction enabled cidInt) (if (if enabled (if (isInRange (coreInfoTime) startDate endDate) (if (isInRange (coreInfoVersion) minimumClientVersion 999) (if (isTargeted name targetFunction) #t)))) ((lambda (remainder) (_define _loop (lambda (lst) (if (if (nul? lst) #f #t) (apply (lambda (variantName rangeStart rangeEnd . features) (if (isInRange remainder rangeStart rangeEnd) variantName (_loop (cdr lst)))) (car lst))))) (_loop variants)) (% (eval cidInt *global-env*) prime)))) test)))
#"ABTestTools" 86
(_define saveVariantInTest (lambda (testName variantName) (if (nul? variantName) (begin (coreInfoRemove testName) (removePersisted testName)) (begin (coreInfoWrite testName variantName) (setTest testName (quote true))))))
#"ABTestTools" 132
(_define trySendAnalyticEvents (lambda (test currentVariant savedVariant) (apply (lambda (name prime variants minimumClientVersion startDate endDate targetFunction enabled cidInt) (cond ((if (if (nul? currentVariant) #f #t) (if (nul? savedVariant) (if (if (isInTest name) #f #t) #t))) (sendABEvent name "enter" prime currentVariant (makeABJson variants) minimumClientVersion (coreAssetListHash) startDate endDate (bool->feature enabled))) ((if (if (nul? currentVariant) #f #t) (if (if (nul? savedVariant) #f #t) #t)) (sendABEvent name "switch" prime currentVariant (makeABJson variants) minimumClientVersion (coreAssetListHash) startDate endDate (bool->feature enabled))) ((if (nul? currentVariant) (if (if (nul? savedVariant) #f #t) #t)) (sendABEvent name "exit" prime "" (makeABJson variants) minimumClientVersion (coreAssetListHash) startDate endDate (bool->feature enabled))))) test)))
#"ABTestTools" 156
(_define removeDeletedTests (lambda (persisted scriptTests) (_define _notFound (lambda (name) (if (coreInfoExists name) (begin (sendABEvent name "deleted" 0 "" "" 0 "" 0 0 "") (coreInfoRemove name))) (removePersisted name))) (_define _loop (lambda (tests) (if (if (nul? (car tests)) #f #t) (cond ((nul? scriptTests) (begin (_notFound (car tests)) (_loop (cdr tests)))) ((if (anyOf (lambda (item) (== item (car tests))) scriptTests) #f #t) (begin (_notFound (car tests)) (_loop (cdr tests)))) (#t (_loop (cdr tests))))))) (_loop persisted)))
#"ABTestTools" 166
(_define targetSince (lambda (startDate) (>= (coreInfoInstallTimestamp) (dateStringToTime startDate))))
#"ABTestTools" 169
(_define targetFreshInstall (lambda (startDate) (if (targetSince startDate) (if (<= (coreInfoPlayerLevel) 1) #t))))
#"ABTestTools" 172
(_define targetBefore (lambda (endDate) (< (coreInfoInstallTimestamp) (dateStringToTime endDate))))
#"ABTestTools" 175
(_define targetInstallBetween (lambda (startDate endDate) (if (targetSince startDate) (if (targetBefore endDate) #t))))
#"ABTestTools" 178
(_define targetExisting (lambda (endDate) (if (targetBefore endDate) (if (> (coreInfoPlayerLevel) 1) #t))))
#"ABTestTools" 181
(_define targetUsersLevelGreaterThan (lambda (level) (> (coreInfoPlayerLevel) level)))
#"ABTestTools" 184
(_define targetUsersLevelLessThan (lambda (level) (< (coreInfoPlayerLevel) level)))
#"ABTestTools" 187
(_define targetUsersLevelEqualTo (lambda (level) (== (coreInfoPlayerLevel) level)))
#"ABTestTools" 198
(_define targetCountries (lambda countries (_define _loop (lambda (country) (cond ((nul? (car country)) #f) ((== (coreInfoCountryCode) (car country)) #t) (#t (_loop (cdr country)))))) (_loop countries)))
#"ABTestTools" 201
(_define targetUsersSpendGreaterThan (lambda (amount) (> (coreInfoTotalSpend) amount)))
#"ABTestTools" 240
(_define topClubs (list "pawshank redemption" "whisky tango foxtrot" "sphynxies" "fearless whispurrs" "alleycats" "paper club." "familiars" "luxurious cats" "sourpuss" "dogs inc." "mewmaids" "boba kit-teas" "smol but mighty" "whisky tango hotel!" "doodles cattos" "the last mewnicorns" "...mini but mighty..." "sphynx kittens" "cinderfrost!" "maple kitties" "sherlock kitties" "mochi mews" "whispurrs of purrsuasion" "*the furry force*" "lucipurrr" "meow you see me" "mischievous creatures" "alley kittens" "cattetonic skelecats" "toe bean temptations" "live in the meowment" "the cookie jar!" "the seawater" "catfeine" "c h o n k s" "laddmal"))
#"ABTestTools" 246
(_define topClubsMap ((lambda (m) (forEach (lambda (i) (map-set! m (->string "cat-" i))) topClubs) m) (makeMap)))
#"ABTestTools" 249
(_define targetTopClubs (lambda () (map-exists topClubsMap (coreInfoGuild))))
#"ABTestTools" 313
(_define setData (lambda (currentVariant) (cond ((== currentVariant "Turn Off Ads Not Shown Bug Fix") (set! showInterstitialBeforeGameOver #f)) ((== currentVariant "RawSupply3k") (haxe-set! (dataByName "FormulaData" "shop-material-chest-cost") "value" 3000)) ((== currentVariant "NameCreationV2") (haxe-set! (dataByName "FormulaData" "username-character-limit") "value" 12)) ((== currentVariant "EBV2") (begin (haxe-set! (dataByName "RewardData" "picnic-event-basket-score6") "materialAmount" 30) (haxe-set! (dataByName "RewardData" "picnic-event-basket-score7") "materialAmount" 30) (haxe-set! (dataByName "RewardData" "picnic-event-basket-score8") "materialAmount" 30) (haxe-set! (dataByName "RewardData" "picnic-event-basket-score12") "materialAmount" 30) (haxe-set! (dataByName "RewardData" "picnic-event-basket-score13") "materialAmount" 70) (haxe-set! (dataByName "RewardData" "picnic-event-basket-score15") "materialAmount" 70) (haxe-set! (dataByName "RewardData" "picnic-event-basket-score18") "materialAmount" 70) (haxe-set! (dataByName "RewardData" "picnic-event-basket-score19") "materialAmount" 100) (haxe-set! (dataByName "RewardData" "picnic-event-basket-score20") "materialAmount" 170) (haxe-set! (dataByName "RewardData" "picnic-event-basket-guild-score2") "materialAmount" 30) (haxe-set! (dataByName "RewardData" "picnic-event-basket-guild-score5") "materialAmount" 30) (haxe-set! (dataByName "RewardData" "picnic-event-basket-guild-score6") "materialAmount" 70) (haxe-set! (dataByName "RewardData" "picnic-eventkey510") "materialAmount" 100) (haxe-set! (dataByName "FormulaData" "event-basket-key-cost") "value" 10))) ((== currentVariant "Shorten Starter") (begin (haxe-call (dataByName "IapData" "com.cats.starterpack50") "setPack" (dataByName "PackageData" "starter")) (haxe-call (dataByName "CostData" "starter-pack") "setIap" (dataByName "IapData" "com.cats.starterpack50")) (haxe-call (dataByName "PackageData" "starter") "setUnlockTheme" (dataByName "ThemeData" "fancyB")) (haxe-call (dataByName "PackageData" "starter20") "setUnlockTheme" (dataByName "ThemeData" "forestA")) (haxe-call (dataByName "PackageData" "starter30") "setUnlockTheme" (dataByName "ThemeData" "monsterA")) (haxe-call (dataByName "PackageData" "starter40") "setUnlockTheme" (dataByName "ThemeData" "forestB")) (haxe-set! (dataByName "PackageData" "starter50") "showInTower" #f) (haxe-set! (dataByName "PackageData" "starter50") "showInShop" #f) (haxe-set! (dataByName "PackageData" "starter") "durationHours" 12) (haxe-set! (dataByName "PackageData" "starter20") "durationHours" 12) (haxe-set! (dataByName "PackageData" "starter30") "durationHours" 12) (haxe-set! (dataByName "PackageData" "starter40") "durationHours" 12))) ((== currentVariant "Nonspender Starter V2 Offer") (begin (haxe-set! (dataByName "PackageData" "newpermanentspenderstarter10") "showInShop" #t) (haxe-set! (dataByName "PackageData" "newstarter10") "showInShop" #f) (haxe-set! (dataByName "PackageData" "newstarter10") "showInTower" #f) (haxe-set! (dataByName "PackageData" "newstarter5") "showInShop" #f) (haxe-set! (dataByName "PackageData" "newstarter5") "showInTower" #f) (haxe-set! (dataByName "PackageData" "newstarter3") "showInShop" #f) (haxe-set! (dataByName "PackageData" "newstarter3") "showInTower" #f) (haxe-set! (dataByName "PackageData" "newstarter1") "showInShop" #f) (haxe-set! (dataByName "PackageData" "newstarter1") "showInTower" #f) (haxe-set! (dataByName "PackageData" "newnonspenderstarter10") "showInShop" #t) (haxe-set! (dataByName "PackageData" "newnonspenderstarter10") "showInTower" #t) (haxe-set! (dataByName "PackageData" "newnonspenderstarter5") "showInShop" #t) (haxe-set! (dataByName "PackageData" "newnonspenderstarter5") "showInTower" #t) (haxe-set! (dataByName "PackageData" "newnonspenderstarter3") "showInShop" #t) (haxe-set! (dataByName "PackageData" "newnonspenderstarter3") "showInTower" #t))) ((if (== currentVariant "Speedups With Cap") #t (if (== currentVariant "S&S") #t #f)) (begin (haxe-set! (dataByName "FormulaData" "speedups-cap-limit") "value" 20) (haxe-set! (dataByName "FormulaData" "bank-completion-speedup-payout") "value" 10))) ((== currentVariant "Switch Pack Cat EB Spin") (begin (if (hasReward (rewardByName "cat" "fog" #f)) (haxe-set! (dataByName "PackageData" "weatherspecial") "showInTower" #f)))))))
#"ABTestTools" 330
(_define checkABTests (lambda () (forEach (lambda (test) ((lambda (testName variants currentVariant) (_define savedVariant (if (coreInfoExists testName) (coreInfoRead testName))) (if (!= currentVariant savedVariant) (begin (trySendAnalyticEvents test currentVariant savedVariant) (saveVariantInTest testName currentVariant))) (setFeaturesFromVariants currentVariant variants) (setData currentVariant)) (car test) (caddr test) (getVariant test))) (getTests)) (resetFeaturesAlreadyToggled)))
#"ABTestTools" 333
(set! *toSceneChange* (cons (lambda () (checkABTests)) *toSceneChange*))
#"vector" 6
(_define vectorFill (lambda (lst) ((lambda (vec) (forEach (lambda (i) (vector-push vec i)) lst) vec) (makeVector 0 ()))))
#"vector" 13
(_define vectorSwap (lambda (vec x y) ((lambda (v) (vector-set! vec x (vector-ref vec y)) (vector-set! vec y v)) (vector-ref vec x)) vec))
#"vector" 24
(_define vectorShuffle (lambda (vec) ((lambda (ran) (_define _loop (lambda (i) (if (< i 0) vec (begin (vectorSwap vec (ran) i) (_loop (%- i 1)))))) (_loop (%- (vector-length vec) 1))) (makeRand (makeSeed (coreInfoTime)) (vector-length vec)))))
#"ABTest" 30
(set! *tests* (cons (list "GCNewInstall3" 11 (quote (("GCI2" 0 10 (installHideGlobalChat #t)))) 0 (dateStringToTime "2020-05-14 16:00:00") (dateStringToTime "2025-01-01") (quote (if (targetFreshInstall "2020-05-13") #t (if (isInTest "GCNewInstall3_TC") #t #f))) #t (quote (coreInfoCidInt))) *tests*))
#"ABTest" 41
(set! *tests* (cons (list "GCNewInstall2" 11 (quote (("C" 0 4) ("GCI" 5 11 (installHideGlobalChat #t)))) 0 (dateStringToTime "2020-03-18") (dateStringToTime "2025-01-01") (quote (targetFreshInstall "2020-03-18")) #t (quote (coreInfoCidInt))) *tests*))
#"ABTest" 53
(set! *tests* (cons (list "SpeedSupply" 101 (quote (("C" 0 95) ("S&S" 96 101 (speedups #t) (speedupsLevelUp #t) (speedupsBank #t) (speedupsCrafting #t) (speedupsCraftingEvent #t) (speedupsBreedDelivery #t) (speedupsSupplyDelivery #t) (speedupsSupplyAllDelivery #t) (speedupsPresentCoins #t) (speedupsCap #t)))) 0 (dateStringToTime "2020-03-30") (dateStringToTime "2025-01-01") (quote #f) #t (quote (coreInfoCidInt))) *tests*))
#"ABTest" 65
(set! *tests* (cons (list "0001_Opt2" 11 (quote (("OptIn" 0 10 (gcOpt #t)))) 0 (dateStringToTime "2020-05-20 18:00:00") (dateStringToTime "2025-01-01") (quote (targetExisting "2020-03-18")) #t (quote (newCidInt))) *tests*))
#"ABTest" 78
(set! *tests* (cons (list "0029_LoyaltyEventExistingUsers2" 127 (quote (("Control" 0 63) ("Show Loyalty" 64 126 (loyaltyProgram #t)))) 0 (dateStringToTime "2020-09-10 20:00:00") (dateStringToTime "2020-09-16 18:00:00") (quote (if (targetInstallBetween "2019-08-01" "2020-02-01") #t (if (isInTest "0029_LoyaltyEventExistingUsers2_TC") #t #f))) #t (quote (newCidInt))) *tests*))
#"ABTest" 90
(set! *tests* (cons (list "0020_ShortenStarterTo100DataFixed" 157 (quote (("Shorten Starter" 0 156))) 0 (dateStringToTime "2020-09-08") (dateStringToTime "2025-01-01") (quote (targetFreshInstall "2020-09-08")) #t (quote (newCidInt))) *tests*))
#"ABTest" 101
(set! *tests* (cons (list "0066_SupplyCrateEvent_RawSupply3k" 383 (quote (("Control" 193 382 (supplies #t) (showMaterialChest #f)) ("RawSupply3k" 0 192 (supplies #t) (showMaterialChest #t)))) 0 (dateStringToTime "2021-06-06") (dateStringToTime "2021-06-11") (quote (targetUsersLevelGreaterThan 6)) #t (quote (newCidInt))) *tests*))
#"ABTest" 112
(set! *tests* (cons (list "0046_NonspenderStarterPackOffer100" 499 (quote (("Nonspender Starter V2 Offer" 0 498 (starterPackV2 #t) (goTo100StarterPackNonSpenderV2 #t)))) 0 (dateStringToTime "2021-03-24") (dateStringToTime "2025-01-01") (quote (if (targetExisting "2021-01-27") (if (if (targetUsersSpendGreaterThan 0) #f #t) #t))) #t (quote (newCidInt))) *tests*))
#"ABTest" 124
(set! *tests* (cons (list "0060_NameCreationV2_CopyFix" 881 (quote (("Control" 0 441) ("NameCreationV2" 442 880 (nameCreationV2 #t) (nameCreationV2Popup #t)))) 0 (dateStringToTime "2021-05-18") (dateStringToTime "2025-01-01") (quote #f) #t (quote (newCidInt))) *tests*))
#"ABTest" 135
(set! *tests* (cons (list "Test_EBV2" 1 (quote (("EBV2" 0 0 (eventBasketV2 #t)))) 0 (dateStringToTime "2021-01-01") (dateStringToTime "2025-01-01") (quote #t) #f (quote (newCidInt))) *tests*))
#"ABTest" 146
(set! *tests* (cons (list "0062_AndroidNotification" 571 (quote (("Control" 0 286) ("Enable Android Notifications" 287 570 (enableNotifications #t)))) 0 (dateStringToTime "2021-05-26 18:00:00") (dateStringToTime "2025-01-01") (quote onAndroid) #t (quote (newCidInt))) *tests*))
#"ABTest" 157
(set! *tests* (cons (list "0064_BonusDay14" 397 (quote (("Control" 0 198) ("Bonus Food Heart" 199 396))) 0 (dateStringToTime "2021-06-02") (dateStringToTime "2021-06-03") (quote (targetUsersLevelGreaterThan 6)) #t (quote (newCidInt))) *tests*))
#"ABTest" 168
(set! *tests* (cons (list "00XX_SwitchPackCatEBSpin" 1 (quote (("Switch Pack Cat EB Spin" 0 0 (ebFinishedSpinEventCat #f) (ebFinishedSpinSpecialEventCat #t)))) 0 (dateStringToTime "2021-06-03") (dateStringToTime "2021-06-10") (quote #t) #t (quote (newCidInt))) *tests*))
#"ABTest" 179
(set! *tests* (cons (list "0065_SpeedupsEvent_2.4_UpdatedCaps" 1427 (quote (("Control" 0 713) ("Speedups With Cap" 714 1426 (speedups #t) (speedupsLevelUp #t) (speedupsBank #t) (speedupsCrafting #t) (speedupsPresentCoins #t) (speedupsCap #t)))) 0 (dateStringToTime "2021-06-04 15:00:00") (dateStringToTime "2021-06-09") (quote #t) #t (quote (newCidInt))) *tests*))
#"ABTest" 182
(removeDeletedTests (getPersistedTests) (getTestNames))
#"ABTest" 185
(checkABTests)
#"ABTest" 190
(forEach (lambda (test) (apply (lambda (name prime variants minimumClientVersion startDate endDate targetFunction enabled cidInt) (setData name (eval cidInt *global-env*))) test)) (getTests))
#"ABTest" 192
(display "tests:")
#"ABTest" 194
(forEach (lambda (test) (display (->string (car test) " prime:" (cadr test)))) (getTests))
#"funnel" 14
(_define coreInfo (lambda () (display (coreInfoCid)) (display (coreInfoInstallVersion)) (display (coreInfoInstallBuild)) (display (coreInfoinstallTimestamp)) (display "") (display (coreInfoTotalSeconds)) (display (coreInfoTotalSessions)) (display (coreInfoTotalSpend)) (display (coreInfoMaxSpend)) (display "") (display (coreInfoTime))))
#"packs" 2
(display "gacha packs!")
#"packs" 6
(_define getGachaPackageKeys (lambda () (list "hideandseekspecial")))
#"packs" 11
(_define getNewStarterPackKeys (lambda () (if (isFeatureEnabled (quote skipInitialV2StarterPackKey)) (list "newstarter5" "newstarter3" "newstarter1") (list "newstarter10" "newstarter5" "newstarter3" "newstarter1"))))
#"packs" 14
(_define getNewNonspenderStarterPackKeys (lambda () (list "newnonspenderstarter10" "newnonspenderstarter5" "newnonspenderstarter3")))
#"packs" 20
(_define unlockV2StarterPack (lambda (starterPackKey) (if (isFeatureEnabled (quote starterPackV2)) (haxe-call (dataByName "PackageData" starterPackKey) "setUnlockTheme" (dataByName "ThemeData" "fancyB")))))
#"packs" 27
(_define check-with (lambda (symbol lst) (if (nul? lst) lst (if (list-with symbol (car lst)) (car lst) (check-with symbol (cdr lst))))))
#"packs" 32
(_define check-has (lambda (name symbol lst) (if (nul? (check-with symbol lst)) (display (->string name " can't find " symbol) #t))))
#"packs" 46
(if (check-has name (quote cost) items) (_define funnel1 (quote ((displayName "Winter BOOST") (description "Snow is falling super sale!") (dealText "Wow I wish I could buy this twice.") (percentValue 0.6) (percentOff 0.01) (cost "com.cats.flashsale15") (rewardCoins 200) (rewardCat tabby)))))
#"packs" 56
(if (check-has name (quote cost) items) (_define funnel2 (quote ((displayName "Summer BOOST") (description "!") (dealText "Wow I wish I could buy this twice.") (percentValue 0.6) (percentOff 0.01) (cost "com.cats.flashsale15") (rewardCoins 400) (rewardCat fatty)))))
#"packs" 58
(_define flashSaleV2LevelPctIncrease 0.02)
#"packs" 64
(_define getflashSaleV2CoinValue (lambda (baseValue) ((lambda (playerLevel) (if (if (< playerLevel 5) #t (if (if (isFeatureEnabled (quote flashSaleV2)) #f #t) #t #f)) baseValue (round (%* baseValue (%+ 1 (%* playerLevel flashSaleV2LevelPctIncrease)))))) (coreInfoPlayerLevel))))
#"packs" 77
(_define calculateFlashSaleV2ValuePercentage (lambda (baseValue) ((lambda (playerLevel) (if (if (< playerLevel 6) #t (if (if (isFeatureEnabled (quote flashSaleV2)) #f #t) #t #f)) baseValue (begin (_define adjustedValue (%+ (%* baseValue 100) (%* (%* 100 flashSaleV2LevelPctIncrease) (%- playerLevel 5)))) (_define roundToFiveRest (round (% adjustedValue 5))) (if (== 5 roundToFiveRest) (set! roundToFiveRest 0)) (if (> roundToFiveRest 2) (%/ (%+ adjustedValue (%- 5 roundToFiveRest)) 100) (%/ (%- adjustedValue roundToFiveRest) 100))))) (coreInfoPlayerLevel))))
#"funnel" 27
(_define applyFunnel (lambda (scriptedSale items) (_define _loop (lambda (lst) (if (nul? lst) scriptedSale (begin (apply popupAdd (cons scriptedSale (car lst))) (_loop scriptedSale (cdr lst)))))) (_loop items)))
#"funnel" 33
(_define levelIndex (quote (0 20 30 40 50 60)))
#"funnel" 34
(_define spendIndex (quote (0 5 10 20 50 100 120)))
#"funnel" 37
(_define funnels (list (list funnel1 funnel2)))
#"funnel" 47
(_define findIndex (lambda (value lst) (_define _loop (lambda (index lst) (if (nul? lst) (%- index 1) (if (< value (car lst)) (%- index 1) (_loop (%+ index 1) (cdr lst)))))) (_loop 0 lst)))
#"funnel" 50
(_define lastDay (coreInfoTime))
#"funnel" 51
(_define popupDelta (makeTime 0 1 0))
#"funnel" 54
(_define displayDeltaTime (lambda (time) (display (%/ (%- time lastTime) 1000))))
#"funnel" 57
(_define eventPopup (lambda () (applyFunnel (makePopup "flashepic") funnel1)))
#"funnel" 68
(_define eventFunnel (lambda () (applyFunnel (makePopup) funnel1)))
#"funnel" 71
(_define eventScriptedSale (lambda ()))
#"funnel" 73
(_define eventAnalytics (lambda ()))
#"funnel" 75
(loadAll)
#"quests" 4
(display "quests!")
#"quests" 7
(_define *quests* #f)
#"quests" 32
(_define questInLevel (lambda (quest) (apply (lambda (displayName event amount coinPayout minLevel maxLevel) (if (>= (coreInfoPlayerLevel) minLevel) (if (<= (coreInfoPlayerLevel) maxLevel) #t))) quest)))
#"quests" 38
(_define getQuests (lambda (numberOfQuests) (_define questVec (vectorShuffle (vectorFill (filter questInLevel *quests*)))) (_define quests (takeFirst numberOfQuests (vector->list questVec))) (map (lambda (quest) (apply makeDailyQuest quest)) quests)))
#"quests" 44
(set! *quests* (cons (list "Collect Decor!" "item.collected" 1 500 1 20) *quests*))
#"quests" 45
(set! *quests* (cons (list "Buy Food!" "food.added" 100 500 1 1000) *quests*))
#"quests" 46
(set! *quests* (cons (list "Collect Cotton!" "material.added.cotton" 55 500 1 1000) *quests*))
#"quests" 47
(set! *quests* (cons (list "Collect Logs!" "material.added.tree" 55 500 1 1000) *quests*))
#"quests" 48
(set! *quests* (cons (list "Collect Rocks!" "material.added.rock" 55 500 6 1000) *quests*))
#"quests" 49
(set! *quests* (cons (list "Collect Quartz!" "material.added.quartz" 55 500 15 1000) *quests*))
#"quests" 50
(set! *quests* (cons (list "Craft Materials!" "craft" 98 500 4 1000) *quests*))
#"quests" 55
(set! *quests* (cons (list "Spend Coins!" "coins.removed" ((lambda (spend cap) (if (> spend cap) cap spend)) (%* (coreInfoPlayerLevel) 1600) 30000) 500 1 1000) *quests*))
#"quests" 57
(if (if (isFeatureEnabled (quote presentFixes)) #f #t) (set! *quests* (cons (list "Collect Presents!" "present.taken" (%+ (coreInfoPlayerLevel) 50) 500 10 1000) *quests*)))
#"quests" 58
(set! *quests* (cons (list "Use String!" "material.removed.string" 30 500 4 1000) *quests*))
#"quests" 59
(set! *quests* (cons (list "Use Wood!" "material.removed.wood" 30 500 4 1000) *quests*))
#"quests" 60
(set! *quests* (cons (list "Collect Ribbon!" "material.added.ribbon" 15 500 4 1000) *quests*))
#"quests" 61
(set! *quests* (cons (list "Collect Metal!" "material.added.metal" 30 500 6 1000) *quests*))
#"quests" 62
(set! *quests* (cons (list "Collect Needles!" "material.added.needles" 8 500 6 1000) *quests*))
#"quests" 63
(set! *quests* (cons (list "Collect Sparkles!" "material.added.sparkles" 4 500 6 1000) *quests*))
#"quests" 65
(if (if (if (isFeatureEnabled (quote hideMinigames)) #f #t) (if (if (isFeatureEnabled (quote minigameFixes)) #f #t) #t)) (set! *quests* (cons (list "Minigame Coins!" "minigame.coins" 8000 500 1 1000) *quests*)))
#"quests" 66
(set! *quests* (cons (list "Deliver Supplies!" "room.supply" 8 500 1 1000) *quests*))
#"bonuses" 4
(display "event bonuses!")
#"bonuses" 8
(_define getEventBonuses (lambda () (vectorFill (list (bonusCrafting 1) (bonusCrafting 1) (bonusDelivering 5) (bonusCrafting 1)))))
#"events" 4
(_define *events* #f)
#"events" 5
(_define *offEvents* #f)
#"events" 8
(_define getEvents (lambda () *events*))
#"events" 11
(_define timeCheck (lambda (startDate endDate) (if (> (coreInfoTime) startDate) (if (< (coreInfoTime) endDate) #t))))
#"events" 26
(if (if (timeCheck (dateStringToTime "2021-06-06") (dateStringToTime "2021-06-11")) (if (isInTest "0066_SupplyCrateEvent_RawSupply3k") #t)) (set! *events* (cons (makeEvent (localize "Crafting Supplies") (localize "Get food crates, raw materials, and crafted materials here on the supplies shelf!") "PopupBonusCrafting" "specialsale" (dateStringToTime "2021-06-06") (dateStringToTime "2021-06-11") (quote "craft")) *events*)) (set! *offEvents* (cons (list (localize "Crafting Supplies") (localize "Get food crates, raw materials, and crafted materials here on the supplies shelf!") "PopupBonusCrafting" "specialsale" (dateStringToTime "2021-06-06") (dateStringToTime "2021-06-11") (quote "craft") (quote (isInTest "0066_SupplyCrateEvent_RawSupply3k"))) *offEvents*)))
#"events" 28
(_define bonusDayStartDate (dateStringToTime "2021-06-02"))
#"events" 29
(_define bonusDayEndDate (dateStringToTime "2021-06-03"))
#"events" 38
(if (if (timeCheck bonusDayStartDate bonusDayEndDate) (if (== (getVariant (getTestByName "0064_BonusDay14")) "Control") #t)) (set! *events* (cons (makeEvent (localize "FOODIES DAY!") (localize "Coin pack in tower! All food gives at least 2 hearts!") "PopupBonusXHeartsFromAllFood" "bonusdayevent" bonusDayStartDate bonusDayEndDate (quote "")) *events*)) (set! *offEvents* (cons (list (localize "FOODIES DAY!") (localize "Coin pack in tower! All food gives at least 2 hearts!") "PopupBonusXHeartsFromAllFood" "bonusdayevent" bonusDayStartDate bonusDayEndDate (quote "") (quote (== (getVariant (getTestByName "0064_BonusDay14")) "Control"))) *offEvents*)))
#"events" 48
(if (if (timeCheck bonusDayStartDate bonusDayEndDate) (if (== (getVariant (getTestByName "0064_BonusDay14")) "Bonus Food Heart") #t)) (set! *events* (cons (makeEvent (localize "FOODIES DAY!") (localize "Coin pack in tower! All food gives at least 3 hearts!") "PopupBonusXHeartsFromAllFood" "bonusdayevent" bonusDayStartDate bonusDayEndDate (quote "")) *events*)) (set! *offEvents* (cons (list (localize "FOODIES DAY!") (localize "Coin pack in tower! All food gives at least 3 hearts!") "PopupBonusXHeartsFromAllFood" "bonusdayevent" bonusDayStartDate bonusDayEndDate (quote "") (quote (== (getVariant (getTestByName "0064_BonusDay14")) "Bonus Food Heart"))) *offEvents*)))
#"events" 59
(if (if (timeCheck (dateStringToTime "2020-09-09 18:00:00") (dateStringToTime "2020-09-16 18:00:00")) (if (if (targetUsersLevelGreaterThan 4) (if (anyOf (lambda (test) (== (getVariant (getTestByName test)) "Show Loyalty")) (list "0029_LoyaltyEventExistingUsers2" "0029_LoyaltyEventExistingUsers2_TC")) #t)) #t)) (set! *events* (cons (makeEvent (localize "Reward Program") (localize "Earn exciting free prizes by making in-app purchases! (excludes ones made with gems or coins)") "PopupBonusMaterialChestDiscount" "specialsale" (dateStringToTime "2020-09-09 18:00:00") (dateStringToTime "2020-09-16 18:00:00") (quote "shop-top")) *events*)) (set! *offEvents* (cons (list (localize "Reward Program") (localize "Earn exciting free prizes by making in-app purchases! (excludes ones made with gems or coins)") "PopupBonusMaterialChestDiscount" "specialsale" (dateStringToTime "2020-09-09 18:00:00") (dateStringToTime "2020-09-16 18:00:00") (quote "shop-top") (quote (if (targetUsersLevelGreaterThan 4) (if (anyOf (lambda (test) (== (getVariant (getTestByName test)) "Show Loyalty")) (list "0029_LoyaltyEventExistingUsers2" "0029_LoyaltyEventExistingUsers2_TC")) #t)))) *offEvents*)))
#"events" 70
(if (if (timeCheck (dateStringToTime "2021-06-04 15:00:00") (dateStringToTime "2021-06-09")) (if (if (targetUsersLevelGreaterThan 2) (if (anyOf (lambda (test) (== (getVariant (getTestByName test)) "Speedups With Cap")) (list "0065_SpeedupsEvent_2.4_UpdatedCaps")) #t)) #t)) (set! *events* (cons (makeEvent (localize "SPEEDUPS EVENT") (localize "Use SPEEDUPS to skip crafts instead of GEMS for a limited time!") "PopupSpeedup" "specialsale" (dateStringToTime "2021-06-04 15:00:00") (dateStringToTime "2021-06-09") (quote "shop-speedups")) *events*)) (set! *offEvents* (cons (list (localize "SPEEDUPS EVENT") (localize "Use SPEEDUPS to skip crafts instead of GEMS for a limited time!") "PopupSpeedup" "specialsale" (dateStringToTime "2021-06-04 15:00:00") (dateStringToTime "2021-06-09") (quote "shop-speedups") (quote (if (targetUsersLevelGreaterThan 2) (if (anyOf (lambda (test) (== (getVariant (getTestByName test)) "Speedups With Cap")) (list "0065_SpeedupsEvent_2.4_UpdatedCaps")) #t)))) *offEvents*)))
#"events" 79
(_define checkOffEvents (lambda () (_define _offEvents *offEvents*) (set! *offEvents* #f) (forEach (lambda (event) (apply (lambda (name description popupIcon bannerSkin startDate endDate buttonEffect enabled) (if (if (timeCheck startDate endDate) (if (eval enabled *global-env*) #t)) (set! *events* (cons (makeEvent name description popupIcon bannerSkin startDate endDate buttonEffect) *events*)) (set! *offEvents* (cons event *offEvents*)))) event)) _offEvents)))
#"events" 81
(set! *toSceneChange* (cons (lambda () (checkOffEvents)) *toSceneChange*))
#"events" 85
(_define hasUpdatedBonusDayDataOnce #f)
#"events" 86
(_define canStartBonusDay (lambda () (if (targetUsersLevelGreaterThan 6) (if (isInRange (coreInfoTime) bonusDayStartDate bonusDayEndDate) #t))))
#"events" 87
(_define isBonusDayEvent (lambda () (if hasUpdatedBonusDayDataOnce (if (canStartBonusDay) #t))))
#"events" 88
(_define isCraftingDay (lambda () (if #f (if (isBonusDayEvent) #t))))
#"events" 89
(_define isDeliveryDay (lambda () (if #f (if (isBonusDayEvent) #t))))
#"events" 98
(_define checkUpdateBonusDayData (lambda () (if (canStartBonusDay) (begin (if (== (getVariant (getTestByName "0064_BonusDay14")) "Bonus Food Heart") (haxe-set! (dataByName "LiveOpsData" "bonus-day-14-food-hearts-3") "endDate" (timeToDate bonusDayEndDate)) (haxe-set! (dataByName "LiveOpsData" "bonus-day-14-food-hearts-2") "endDate" (timeToDate bonusDayEndDate))) (set! hasUpdatedBonusDayDataOnce #t)))))
#"events" 100
(set! *toSceneChange* (cons (lambda () (checkUpdateBonusDayData)) *toSceneChange*))
#"newShop" 4
(_define addSpacing (lambda (elements spacing) (if (<= (length elements) 1) elements (append (list (car elements) spacing) (addSpacing (cdr elements) spacing)))))
#"newShop" 11
(_define flattenShopLines (lambda (lst) (if (== (car (car lst)) "toFlatten") (append (cadr (car lst)) (flattenShopLines (cdr lst))) (if (if (nul? (car lst)) #f #t) (append (list (car lst)) (flattenShopLines (cdr lst)))))))
#"newShop" 18
(_define makePackLines (lambda (packs) (if (if (if (nul? (car packs)) #f #t) (if (if (nul? (cadr packs)) #f #t) #t)) (append (list (packLine (list (pack (car packs)) (pack (cadr packs))))) (makePackLines (cddr packs))) (if (if (nul? (car packs)) #f #t) (list (packLine (list (pack (car packs)))))))))
#"newShop" 23
(_define dailyFreebieLastObtained (lambda () (dateStringToTime "2025-01-01")))
#"newShop" 28
(_define viewSmallCurrency (lambda () (_define dimensions (list 222 374)) (list "smallCurrency" dimensions)))
#"newShop" 32
(_define viewBigCurrency (lambda (mostPopularText) (_define dimensions (list 339 357)) (list "bigCurrency" dimensions mostPopularText)))
#"newShop" 36
(_define viewVip (lambda (title description mostPopularText) (_define dimensions (list 687 307)) (list "vip" dimensions title description mostPopularText)))
#"newShop" 40
(_define viewMaterials (lambda (title percentOff endDate) (_define dimensions (list 687 248)) (list "materials" dimensions title percentOff endDate)))
#"newShop" 44
(_define viewDailyFreebie (lambda (title onceEveryXDays) (_define dimensions (list 687 152)) (list "dailyFreebie" dimensions title onceEveryXDays)))
#"newShop" 48
(_define viewPack (lambda () (_define dimensions (list 319 360)) (list "pack" dimensions)))
#"newShop" 52
(_define viewText (lambda (title) (_define dimensions (list 650 50)) (list "text" dimensions title)))
#"newShop" 55
(_define viewEmptySpace (lambda (dimensions) (list "emptySpace" dimensions)))
#"newShop" 59
(_define viewLoyalty (lambda () (_define dimensions (list 687 477)) (list "loyalty" dimensions)))
#"newShop" 63
(_define viewLimitedTimeOffer (lambda () (_define dimensions (list 690 386)) (list "limitedTimeOffer" dimensions)))
#"newShop" 67
(_define viewShelf (lambda () (_define dimensions (list 714 389)) (list "shelf" dimensions)))
#"newShop" 70
(_define packSpacing 43)
#"newShop" 71
(_define bigCurrencySpacing 7)
#"newShop" 72
(_define smallCurrencySpacing 7)
#"newShop" 75
(_define verticalSpacing 18)
#"newShop" 79
(_define purchaseMaterialChest (lambda () (list "PurchaseMaterialChest")))
#"newShop" 82
(_define purchaseMaterialChestDiscount (lambda () (list "PurchaseMaterialChestDiscount")))
#"newShop" 85
(_define purchaseCoins (lambda (currencyData) (list "PurchaseCoins" currencyData)))
#"newShop" 88
(_define purchaseSpeedups (lambda (amount cost) (list "PurchaseSpeedups" amount cost)))
#"newShop" 91
(_define purchaseGems (lambda (currencyData) (list "PurchaseGems" currencyData)))
#"newShop" 94
(_define purchaseVIPSubscription (lambda () (list "PurchaseVIPSubscription")))
#"newShop" 97
(_define purchasePackage (lambda (packageData) (list "PurchasePackage" packageData)))
#"newShop" 100
(_define purchaseDailyFreebie (lambda (amount) (list "PurchaseDailyFreebie" amount)))
#"newShop" 103
(_define purchaseNone (lambda () (list "None")))
#"newShop" 106
(_define uiElement (lambda (view purchase) (list view purchase)))
#"newShop" 109
(_define pack (lambda (package) (uiElement (viewPack) (purchasePackage package))))
#"newShop" 113
(_define emptySpace (lambda (width height) (_define dimensions (list width height)) (list (viewEmptySpace dimensions) (purchaseNone))))
#"newShop" 116
(_define vip (lambda () (uiElement (viewVip (localize "VIP!!") (localize "Daily Rewards!") (localize "Most Popular!")) (purchaseVIPSubscription))))
#"newShop" 119
(_define materials (lambda () (uiElement (viewMaterials "Materials") (purchaseMaterialChest))))
#"newShop" 122
(_define materialsDiscount (lambda () (uiElement (viewMaterials "Materials" 0.5 (dateStringToTime "2020-05-01")) (purchaseMaterialChestDiscount))))
#"newShop" 125
(_define dailyFreebie (lambda () (uiElement (viewDailyFreebie (localize "Daily Freebie!") 1) (purchaseDailyFreebie 500))))
#"newShop" 130
(_define coins50000 (lambda () (if (isCraftingDay) (uiElement (viewBigCurrency (localize "+25% MORE")) (purchaseCoins "coins50000")) (uiElement (viewBigCurrency (localize "Most Popular!")) (purchaseCoins "coins50000")))))
#"newShop" 135
(_define coins10000 (lambda () (if (isCraftingDay) (uiElement (viewBigCurrency (localize "+25% MORE")) (purchaseCoins "coins10000")) (uiElement (viewBigCurrency) (purchaseCoins "coins10000")))))
#"newShop" 140
(_define coins5000 (lambda () (if (isCraftingDay) (uiElement (viewBigCurrency (localize "+25% MORE")) (purchaseCoins "coins5000")) (uiElement (viewSmallCurrency) (purchaseCoins "coins5000")))))
#"newShop" 145
(_define coins1000 (lambda () (if (isCraftingDay) (uiElement (viewBigCurrency (localize "+25% MORE")) (purchaseCoins "coins1000")) (uiElement (viewSmallCurrency) (purchaseCoins "coins1000")))))
#"newShop" 150
(_define coins100 (lambda () (if (isCraftingDay) (uiElement (viewBigCurrency (localize "+25% MORE")) (purchaseCoins "coins100")) (uiElement (viewSmallCurrency) (purchaseCoins "coins100")))))
#"newShop" 153
(_define speedUps1 (lambda () (uiElement (viewSmallCurrency) (purchaseSpeedups 1 30))))
#"newShop" 156
(_define speedUps10 (lambda () (uiElement (viewSmallCurrency) (purchaseSpeedups 10 285))))
#"newShop" 159
(_define speedUps100 (lambda () (uiElement (viewSmallCurrency) (purchaseSpeedups 100 2700))))
#"newShop" 162
(_define bonusDayGemPack (lambda () (uiElement (viewBigCurrency (->string "+30% " (localize "MORE"))) (purchaseGems "gems500"))))
#"newShop" 165
(_define gems10000 (lambda () (uiElement (viewBigCurrency (localize "Most Popular!")) (purchaseGems "gems10000"))))
#"newShop" 168
(_define gems5000 (lambda () (uiElement (viewBigCurrency) (purchaseGems "gems5000"))))
#"newShop" 171
(_define gems2000 (lambda () (uiElement (viewSmallCurrency) (purchaseGems "gems2000"))))
#"newShop" 174
(_define gems1000 (lambda () (uiElement (viewSmallCurrency) (purchaseGems "gems1000"))))
#"newShop" 177
(_define gems500 (lambda () (uiElement (viewSmallCurrency) (purchaseGems "gems500"))))
#"newShop" 180
(_define gems100 (lambda () (uiElement (viewSmallCurrency) (purchaseGems "gems100"))))
#"newShop" 185
(_define coinsSeparator (lambda () (if (isCraftingDay) (uiElement (viewText (localize "ALL COIN PACKS +25% MORE!")) (purchaseNone)) (uiElement (viewText (localize "GET COINS!!")) (purchaseNone)))))
#"newShop" 188
(_define speedUpsSeparator (lambda () (uiElement (viewText (localize "GET SPEEDUPS!!")) (purchaseNone))))
#"newShop" 191
(_define gemsSeparator (lambda () (uiElement (viewText (localize "GET GEMS!!")) (purchaseNone))))
#"newShop" 194
(_define loyalty (lambda () (uiElement (viewLoyalty) (purchaseNone))))
#"newShop" 197
(_define limitedTimeOffer (lambda () (uiElement (viewLimitedTimeOffer) (purchaseNone))))
#"newShop" 200
(_define shelf (lambda () (uiElement (viewShelf) (purchaseNone))))
#"newShop" 202
(_define packSpacingUIElement (emptySpace packSpacing 0))
#"newShop" 203
(_define smallCurrencySpacingUIElement (emptySpace smallCurrencySpacing 0))
#"newShop" 204
(_define bigCurrencySpacingUIElement (emptySpace bigCurrencySpacing 0))
#"newShop" 207
(_define packLine (lambda (packs) (addSpacing packs packSpacingUIElement)))
#"newShop" 210
(_define smallCurrencyLine (lambda (elems) (addSpacing elems smallCurrencySpacingUIElement)))
#"newShop" 213
(_define bigCurrencyLine (lambda (elems) (addSpacing elems bigCurrencySpacingUIElement)))
#"newShop" 286
(_define getShopLines (lambda () (_define vipLine (if (isFeatureEnabled (quote hideVIP)) (list ()) (list (vip)))) (_define materialsLine (if (anyOf (lambda (item) (== (getVariant (getTestByName item)) "Expensive Supply Chest")) (list "0015_CostlySupplyChest" "0015_CostlySupplyChest_TC")) (list (materials)) (list ()))) (_define dailyFreebieLine (list (dailyFreebie))) (_define materialsDiscountLine (list (materialsDiscount))) (_define coinsSeparatorLine (list (coinsSeparator))) (_define bigCurrencyCoinsLine (bigCurrencyLine (list (coins50000) (coins10000)))) (_define smallCurrencyCoinsLine (smallCurrencyLine (list (coins5000) (coins1000) (coins100)))) (_define speedUpsSeparatorLine (list (speedUpsSeparator))) (_define smallSpeedupsLine (smallCurrencyLine (list (speedUps1) (speedUps10) (speedUps100)))) (_define gemsSeparatorLine (list (gemsSeparator))) (_define bigCurrencyGemsLine (bigCurrencyLine (list (gems10000) (gems5000)))) (_define smallCurrencyGemsLine (smallCurrencyLine (list (gems2000) (gems1000) (gems500)))) (_define emptySpaceLine (list (emptySpace 300 30))) (_define lastEmptyLine (list (emptySpace 300 165))) (_define firstEmptyLine (list (emptySpace 300 250))) (_define packLines (if (isFeatureEnabled (quote showNewShopShelf)) (list ()) (list "toFlatten" (makePackLines (packagesInShop))))) (_define coinsLines (if (isCraftingDay) (list ()) (list "toFlatten" (list emptySpaceLine coinsSeparatorLine bigCurrencyCoinsLine smallCurrencyCoinsLine)))) (_define bonusDayLine (cond ((isCraftingDay) (list "toFlatten" (list emptySpaceLine coinsSeparatorLine (list (coins50000)) (list (coins10000) (coins5000)) (list (coins1000) (coins100))))) ((isDeliveryDay) (list (bonusDayGemPack))) (#t (list ())))) (_define speedUpsLines (if (isFeatureEnabled (quote speedups)) (list "toFlatten" (list emptySpaceLine speedUpsSeparatorLine smallSpeedupsLine)) (list ()))) (_define gemsLines (list "toFlatten" (list emptySpaceLine gemsSeparatorLine bigCurrencyGemsLine smallCurrencyGemsLine))) (_define loyaltyLine (if (if (isFeatureEnabled (quote loyaltyProgram)) (if (hasLoyaltyId) (if (targetUsersLevelGreaterThan 4) #t))) (list (loyalty)) (list ()))) (_define limitedTimeOfferLine (if (if (isFeatureEnabled (quote showLimitedTimeOffer)) (if (hasLimitedTimeOffer) #t)) (list (limitedTimeOffer)) (list ()))) (_define shelfLine (if (if (isFeatureEnabled (quote showNewShopShelf)) (if (if (nul? (packagesInShop)) #f #t) #t)) (list (shelf)) (list ()))) (_define shopLines (addSpacing (flattenShopLines (list firstEmptyLine bonusDayLine loyaltyLine limitedTimeOfferLine shelfLine packLines vipLine coinsLines gemsLines materialsLine speedUpsLines lastEmptyLine)) (list (emptySpace 0 verticalSpacing)))) shopLines))
#"buildInformation" 7
(if (if (nul? (coreInfoUsername)) #f #t) (set! *buildInformation* (cons (->string "Username: " (coreInfoUsername)) *buildInformation*)))
#"buildInformation" 10
(if (if (nul? (coreInfoGuild)) #f #t) (set! *buildInformation* (cons (->string "Guild: " (coreInfoGuild)) *buildInformation*)))
#"buildInformation" 12
(set! *buildInformation* (cons (->string "Version: " (coreInfoVersion)) *buildInformation*))
#"buildInformation" 13
(set! *buildInformation* (cons (->string "Assets: " (coreAssetListHash)) *buildInformation*))
#"buildInformation" 14
(set! *buildInformation* (cons (->string "Build: " (coreInfoBuild)) *buildInformation*))
#"buildInformation" 15
(set! *buildInformation* (cons (->string "Install Date: " (timeToDateString (coreInfoInstallTimestamp))) *buildInformation*))
#"buildInformation" 21
(forEach (lambda (test) ((lambda (_variant _testName) (if (if (nul? _variant) #f #t) (set! *buildInformation* (cons (->string _testName ": " (substr _variant 0 2) (getVariantIndex _testName _variant)) *buildInformation*)))) (getVariant test) (car test))) (getTests))
#"buildInformation" 25
(_define getBuildInformation (lambda () (reverse *buildInformation*)))
#"rating" 5
(_define popupRating (lambda () (showRating)))
#"rating" 8
(_define needToShowupRating #f)
#"rating" 9
(_define canShowUpRatingIOS #t)
#"rating" 15
(_define getRatingTime (lambda (ratingShown) (if (coreInfoExists ratingShown) (coreInfoRead ratingShown) (makeTime 0 0 0))))
#"rating" 31
(_define checkShowupRatingCondition (lambda (key increment data) (_define rated (if (coreInfoExists "game-has-been-rated") (coreInfoRead "game-has-been-rated") #f)) (_define lastTimeShowupRatingWindow (getRatingTime "last-time-showup-rating")) (_define diffDay (%- (timeAgo lastTimeShowupRatingWindow) (daysToTime 7))) (if (if (if rated #f #t) (if (>= diffDay 0) (if (== key "cat.collected") (if (>= (coreInfoPlayerLevel) 4) #t)))) (set! needToShowupRating #t))))
#"rating" 35
(_define setGameHasBeenRated (lambda (rated) (coreInfoWrite "game-has-been-rated" rated)))
#"rating" 39
(_define incrementIOSNativeRatingCounter (lambda () (coreInfoWrite "rating-attempted" (%+ (coreInfoRead "rating-attempted") 1))))
#"rating" 70
(_define checkIOSRatingAllowed (lambda () (_define numberOfTries (if (coreInfoExists "rating-attempted") (coreInfoRead "rating-attempted") (begin (coreInfoWrite "rating-attempted" 0) 0))) (if (== numberOfTries 1) (coreInfoWrite "first-time-attempt-rating" (coreInfoTime))) (if (== numberOfTries 3) (coreInfoWrite "third-time-attempt-rating" (coreInfoTime))) (_define timeOfFirstAttempt (getRatingTime "first-time-attempt-rating")) (_define timeOfThirdAttempt (getRatingTime "third-time-attempt-rating")) (cond ((<= numberOfTries 3) (set! canShowUpRatingIOS #t)) ((if (> numberOfTries 3) (if (<= (timeOfThirdAttempt - timeOfFirstAttempt) (daysToTime 365)) #t)) (set! canShowUpRatingIOS #f)) ((if (> numberOfTries 3) (if (> (timeOfThirdAttempt - timeOfFirstAttempt) (daysToTime 365)) #t)) (begin (set! canShowUpRatingIOS #t) (coreInfoWrite "rating-attempted" 0))))))
#"rating" 81
(_define tryShowupRating (lambda () (if (if reviewFlow (if needToShowupRating (if checkTutorialComplete #t))) (begin (set! needToShowupRating #f) (if onIOS (checkIOSRatingAllowed)) (popupRating) (coreInfoWrite "last-time-showup-rating" (coreInfoTime))))))
#"rating" 85
(set! *toProgressMade* (cons (lambda (key increment data) (checkShowupRatingCondition key increment data)) *toProgressMade*))
#"rating" 86
(set! *toPopupEmptied* (cons (lambda () (tryShowupRating)) *toPopupEmptied*))
#"eventBasket" 5
(_define spinsUntilGuarantee 5)
#"eventBasket" 14
(_define canGuaranteeNewItemFromGemSpin (lambda (index rewards) (cond ((canNowDoFinishedSpin rewards) #f) ((isFeatureEnabled (quote ebGemNewItemGuarantee)) #t) ((isFeatureEnabled (quote ebGemNewItemGuaranteeXSpins)) (== (% index spinsUntilGuarantee) 0)))))
#"eventBasket" 31
(_define weightForEBGems (lambda (rarity) (cond ((if (== rarity "common") (if (isFeatureEnabled (quote raresOrBetter)) #t)) 0) ((== rarity "common") 100) ((== rarity "rare") 50) ((== rarity "epic") 10) ((== rarity "legendary") 2.5) ((== rarity "secret") 1) (#t 0))))
#"eventBasket" 46
(_define weightForEBKeys (lambda (rarity) (cond ((== rarity "common") 100) ((== rarity "rare") 50) ((== rarity "epic") 10) ((== rarity "legendary") 2.5) ((== rarity "secret") 1) (#t 0))))
#"eventBasket" 61
(_define weightForEBKeySpinV2 (lambda (rarity) (cond ((== rarity "common") 28.99) ((== rarity "rare") 14.49) ((== rarity "epic") 2.9) ((== rarity "legendary") 0.72) ((== rarity "secret") 0) (#t 0))))
#"eventBasket" 81
(_define eventBasketInstructions (lambda () (_define miniBonusDuration (toMinutes (makeTime 0 (haxe-ref (dataByName "FormulaData" "event-mini-bonus-duration") "value") 0))) (_define miniBonusDelay (toHours (makeTime (haxe-ref (dataByName "FormulaData" "event-mini-bonus-delay") "value") 0 0))) (_define collectPointsText (localize "Collect points by doing activities!")) (_define bonusText (->string (localize "Random bonus are automatically activated for") " " miniBonusDuration " " (localize "minutes every") " " miniBonusDelay " " (localize "hours."))) ((lambda (instructions) (cond ((isFeatureEnabled (quote eventBasketV2)) (begin (if (isFeatureEnabled (quote ebTicketCarryover)) (set! instructions (cons (list (->string collectPointsText " " bonusText) "eventIcon") instructions)) (set! instructions (cons (list (->string collectPointsText " " bonusText) "eventIcon") instructions))) (set! instructions (cons (list (localize "Earn keys to spin the Event Basket by claiming event prizes, making basket deliveries and opening material crate chests.") "eventTicket") instructions)) (set! instructions (cons (list (localize "Spin the Event Basket under the CATS tab using keys to get your daily rewards, cats, decos, and more!") "eventKey") instructions)) (set! instructions (cons (list (localize "Use gems to spin the Event Basket under the CATS tab for cats and decos!") "gemIcon") instructions)))) (#t (set! instructions (cons (list (->string collectPointsText " " bonusText) "eventIcon") instructions)))) (reverse instructions)) #f)))
#"eventBasket" 86
(_define expiredInfo (lambda () (if (isFeatureEnabled (quote ebTicketCarryover)) (localize "All event keys expire at the end of the event.") (localize "All event keys and tickets expire at the end of the event."))))
#"eventBasket" 98
(_define eventBasketDescription (lambda (canNowDoFinishedSpin packCatsLeftToSpin) ((lambda (expiredText) (cond ((if canNowDoFinishedSpin (if (if packCatsLeftToSpin #f #t) #t)) (->string (localize "Continue to spin for more prizes!") " " expiredText)) ((if canNowDoFinishedSpin (if packCatsLeftToSpin #t)) (->string (localize "You can now spin for the secret pack cat!") " " expiredText)) ((isFeatureEnabled (quote eventBasketV2)) (->string (localize "Spin for daily rewards, exclusive cats, decorations, and other items!") " " expiredText)) (#t (->string (localize "Spin for an exclusive cat or decoration! Duplicates will be converted to Event Tickets.") " " expiredText)))) (expiredInfo))))
#"eventBasket" 102
(_define showEBGuaranteeMessaging (lambda (canNowDoFinishedSpin packCatsLeftToSpin) (if (if canNowDoFinishedSpin (if packCatsLeftToSpin (if (isFeatureEnabled (quote ebFinishedSpinPackCatGemOnly)) #t))) #t (if (if (if canNowDoFinishedSpin #f #t) (if (if (isFeatureEnabled (quote ebGemNewItemGuarantee)) #t (if (isFeatureEnabled (quote ebGemNewItemGuaranteeXSpins)) #t (if (isFeatureEnabled (quote raresOrBetter)) #t #f))) #t)) #t #f))))
#"eventBasket" 113
(_define ebGuaranteeMesssagingTop (lambda (canNowDoFinishedSpin packCatsLeftToSpin) (cond ((if canNowDoFinishedSpin (if packCatsLeftToSpin #t)) (localize "CHANCE OF GETTING")) ((isFeatureEnabled (quote raresOrBetter)) (localize "RARES OR BETTER")) ((isFeatureEnabled (quote ebGemNewItemGuaranteeXSpins)) (localize "GUARANTEED NEW ITEM")) (#t (localize "CAT OR DECO")))))
#"eventBasket" 124
(_define ebGuaranteeMesssagingBottom (lambda (canNowDoFinishedSpin packCatsLeftToSpin) (cond ((if canNowDoFinishedSpin (if packCatsLeftToSpin #t)) (localize "PACK CAT")) ((isFeatureEnabled (quote raresOrBetter)) (localize "ONLY")) ((isFeatureEnabled (quote ebGemNewItemGuaranteeXSpins)) (localize "WITHIN 5 SPINS")) (#t (localize "GUARANTEED")))))
#"eventBasket" 128
(_define canShowEventPack (lambda (hasPackCat timesEntered) (if (if hasPackCat #f #t) (if (if (== timesEntered 2) #t (if (== timesEntered 5) #t #f)) #t))))
#"eventBasket" 132
(_define canShowSpecialEventPack (lambda (hasPackCat timesEntered) #f))
#"eventBasket" 136
(_define specialEventPack (lambda (key) (dataByName "PackageData" (->string key "special"))))
#"eventBasket" 152
(_define weightForGacha (lambda (rarity) (cond ((== rarity "common") 100) ((== rarity "rare") 50) ((== rarity "epic") 10) ((== rarity "legendary") 2.5) ((== rarity "secret") 1) (#t 0))))
#"eventBasket" 164
(_define getChestWeight (lambda (rarity spinType) (cond ((== spinType "BasketKey") (if (isFeatureEnabled (quote eventBasketV2)) (weightForEBKeySpinV2 rarity) (weightForEBKeys rarity))) ((== spinType "BasketGems") (weightForEBGems rarity)) (#t (weightForGacha rarity)))))
#"eventBasket" 168
(_define rewardsLeft (lambda (rewards) (filter (lambda (reward) (if (hasReward reward) #f #t)) rewards)))
#"eventBasket" 172
(_define hasRewardsLeft (lambda (rewards) (if (nul? (rewardsLeft rewards)) #f #t)))
#"eventBasket" 183
(_define lootTableNoDuplicate (lambda (cats decos spinType) ((lambda (loot) (forEach (lambda (cat) (addToLootTable loot cat (getChestWeight (rewardRarity cat) spinType))) (rewardsLeft cats)) (forEach (lambda (deco) (addToLootTable loot deco (getChestWeight (rewardRarity deco) spinType))) (rewardsLeft decos)) loot) (makeLootTable))))
#"eventBasket" 194
(_define lootTableDuplicate (lambda (cats decos spinType) ((lambda (loot) (forEach (lambda (cat) (addToLootTable loot cat (getChestWeight (rewardRarity cat) spinType))) cats) (forEach (lambda (deco) (addToLootTable loot deco (getChestWeight (rewardRarity deco) spinType))) decos) loot) (makeLootTable))))
#"eventBasket" 198
(_define juicedLootTableKeySpinV2 (lambda (keySpins) (if (<= keySpins 1) (if (isFeatureEnabled (quote eventBasketV2)) #t))))
#"eventBasket" 221
(_define lootTableKeySpinV2 (lambda (cats decos spinType) ((lambda (loot) (addToLootTable loot (rewardByName "material" "eb-ticket-carryover" 1) 650) (addToLootTable loot (rewardByName "material" "eb-ticket-carryover" 50) 1) (addToLootTable loot (rewardByName "material" "eb-ticket-carryover" 100) 0.5) (if (isFeatureEnabled (quote eventBasketV2)) (forEach (lambda (dailyReward) (apply (lambda (reward limit weight) ((lambda (amount defaultRewardAmount) (if (if (if (nul? amount) #f #t) (if (< amount limit) #t)) (if (< (%- limit amount) defaultRewardAmount) (addToLootTable loot (rewardWithAmount reward (%- limit amount)) weight) (addToLootTable loot reward weight)))) (dailyRewardAmount reward limit) (rewardAmount reward))) dailyReward)) (dailyRewards))) (forEach (lambda (cat) (addToLootTable loot cat (getChestWeight (rewardRarity cat) spinType))) (rewardsLeft cats)) (forEach (lambda (deco) (addToLootTable loot deco (getChestWeight (rewardRarity deco) spinType))) (rewardsLeft decos)) loot) (makeLootTable))))
#"eventBasket" 239
(_define spinnablePackCats (lambda (cats) ((lambda (packCats) (forEach (lambda (cat) (if (if (== (rewardObtainBy cat) "package") (if (if (hasReward cat) #f #t) #t)) (set! packCats (cons cat packCats)))) cats) (_define _loop (lambda (lst i) (cond ((nul? lst)) ((if (== i 0) (if (isFeatureEnabled (quote ebFinishedSpinEventCat)) #t)) (cons (car lst) (_loop (cdr lst) (%+ i 1)))) ((if (== i 1) (if (isFeatureEnabled (quote ebFinishedSpinSpecialEventCat)) #t)) (cons (car lst) (_loop (cdr lst) (%+ i 1)))) (#t (_loop (cdr lst) (%+ i 1)))))) (_loop packCats 0)) #f)))
#"eventBasket" 243
(_define hasPackCatsLeftToSpin (lambda (cats) (if (nul? (spinnablePackCats cats)) #f #t)))
#"eventBasket" 247
(_define canNowDoFinishedSpin (lambda (rewards) (if (if (hasRewardsLeft rewards) #f #t) (if (isFeatureEnabled (quote ebFinishedSpin)) #t))))
#"eventBasket" 260
(_define finishedSpinLootTable (lambda (cats spinType) ((lambda (loot isGemsType canSpinForCatGemsOnly) (addToLootTable loot (rewardByName "material" "keyShard" 5) 13) (addToLootTable loot (rewardByName "material" "keyShard" 6) 13) (addToLootTable loot (rewardByName "material" "keyShard" 7) 13) (addToLootTable loot (rewardByName "material" "keyShard" 8) 13) (if (if (if canSpinForCatGemsOnly #f #t) #t (if (if canSpinForCatGemsOnly (if isGemsType #t)) #t #f)) (forEach (lambda (cat) (addToLootTable loot cat (getChestWeight (rewardRarity cat) spinType))) (spinnablePackCats cats))) loot) (makeLootTable) (== spinType "BasketGems") (isFeatureEnabled (quote ebFinishedSpinPackCatGemOnly)))))
#"eventBasket" 264
(_define filterCatRewards (lambda (cats) (filter (lambda (cat) (if (== (rewardRarity cat) "secret") #f #t)) cats)))
#"eventBasket" 268
(_define filterDecoRewards (lambda (decos) (filter (lambda (deco) (if (rewardIsWallpaper deco) #f #t)) decos)))
#"eventBasket" 294
(_define eventLootTable (lambda (cats decos spinType isRigged) ((lambda (catRewards decoRewards) ((lambda (rewards) (cond ((if (== spinType "BasketKey") (if (isFeatureEnabled (quote eventBasketV2)) #t)) (if (if isRigged (if (hasRewardsLeft rewards) #t)) (lootTableNoDuplicate catRewards decoRewards spinType) (lootTableKeySpinV2 catRewards decoRewards spinType))) ((== spinType "BasketKey") (if (canNowDoFinishedSpin rewards) (finishedSpinLootTable cats spinType) (lootTableDuplicate catRewards decoRewards spinType))) ((== spinType "BasketGems") (cond (isRigged (lootTableNoDuplicate catRewards decoRewards spinType)) ((canNowDoFinishedSpin rewards) (finishedSpinLootTable cats spinType)) (#t (lootTableDuplicate catRewards decoRewards spinType)))) ((== spinType "SecretKey") (lootTableDuplicate catRewards decoRewards spinType)) ((== spinType "SecretGems") (lootTableNoDuplicate catRewards decoRewards spinType)))) (append catRewards decoRewards))) (filterCatRewards cats) (filterDecoRewards decos))))
#"eventBasket" 301
(_define dailyRewards (lambda () ((lambda (dailyRewards) (set! dailyRewards (cons (list (rewardByName "material" "keyShard" 1) 5 20) dailyRewards)) (set! dailyRewards (cons (list (rewardByName "gems" #f 5) 20 80) dailyRewards)) (reverse dailyRewards)) #f)))
#"eventBasket" 308
(_define eventBasketKey (lambda () ((lambda (key) (if (exists key) (->string key "-eb-key") "")) (eventBasketDataKey))))
#"authentication" 2
(setShowLoginUICooldowniOS 86400)
#"loyalty" 5
(_define *loyaltyPrizes* #f)
#"loyalty" 8
(_define getLoyaltyPrizes (lambda () *loyaltyPrizes*))
#"loyalty" 10
(setLoyaltyId "tea3")
#"loyalty" 16
(set! *loyaltyPrizes* (cons (list "loyalty-0" 0 "material") *loyaltyPrizes*))
#"loyalty" 17
(set! *loyaltyPrizes* (cons (list "loyalty-1" 1 "cats") *loyaltyPrizes*))
#"loyalty" 18
(set! *loyaltyPrizes* (cons (list "loyalty-2" 3 "material") *loyaltyPrizes*))
#"loyalty" 19
(set! *loyaltyPrizes* (cons (list "loyalty-3" 5 "decor") *loyaltyPrizes*))
#"loyalty" 20
(set! *loyaltyPrizes* (cons (list "loyalty-4" 9 "material") *loyaltyPrizes*))
#"loyalty" 21
(set! *loyaltyPrizes* (cons (list "loyalty-5" 10 "decor") *loyaltyPrizes*))
#"loyalty" 22
(set! *loyaltyPrizes* (cons (list "loyalty-6" 15 "cats") *loyaltyPrizes*))
#"loyalty" 23
(set! *loyaltyPrizes* (cons (list "loyalty-7" 20 "decor") *loyaltyPrizes*))
#"loyalty" 24
(set! *loyaltyPrizes* (cons (list "loyalty-8" 21 "material") *loyaltyPrizes*))
#"loyalty" 25
(set! *loyaltyPrizes* (cons (list "loyalty-9" 25 "cats") *loyaltyPrizes*))
#"loyalty" 26
(set! *loyaltyPrizes* (cons (list "loyalty-10" 40 "material") *loyaltyPrizes*))
#"loyalty" 27
(set! *loyaltyPrizes* (cons (list "loyalty-11" 50 "decor") *loyaltyPrizes*))
#"room" 16
(_define getRarityMultiplierLevelOne (lambda (rarity) (cond ((== rarity "common") 3) ((== rarity "rare") 10) ((== rarity "epic") 15) ((== rarity "legendary") 15) ((== rarity "secret") 15))))
#"room" 21
(_define getAdjustedLevelByCap (lambda (level cap) (if (> level cap) cap level)))
#"room" 37
(_define getDeliveryTime (lambda (level rarity) ((lambda (adjustedLevel) (cond ((== adjustedLevel 1) (getRarityMultiplierLevelOne rarity)) ((if (>= adjustedLevel 2) (if (<= adjustedLevel 4) #t)) 30) ((if (>= adjustedLevel 5) (if (<= adjustedLevel 7) #t)) 35) ((if (>= adjustedLevel 8) (if (<= adjustedLevel 9) #t)) 40) ((if (>= adjustedLevel 10) (if (<= adjustedLevel 11) #t)) 45) ((>= adjustedLevel 12) (%+ (%* (%- adjustedLevel 12) 5) 50)))) (getAdjustedLevelByCap level 20))))
#"room" 41
(_define getNewPresentAdBonus (lambda (coinsToCollect) (clampPayout (coreInfoPlayerLevel) 350 30 500 1250)))
#"room" 48
(_define getNewPresentTimeInMinutes (lambda (level coinBalance) ((lambda (walletLimitReached isHighLevel) (if isHighLevel (if walletLimitReached (expt 20 1) (expt 10 1)))) (> coinBalance (%* 1500 level)) (>= level 3))))
#"room" 54
(_define getSpeedupsAmountForLevelUp (lambda (gemsAmount level) 5))
#"room" 65
(_define breedChance (lambda (rarity level) ((lambda (baseChance) (%* baseChance (cond ((== rarity "common") 1) ((== rarity "rare") 0.6) ((== rarity "epic") 0.3) ((== rarity "legendary") 0.1) ((== rarity "secret") 0.1)))) (%/ 0.75 (expt (%+ level 1) 0.8)))))
#"room" 82
(_define percentIncreaseForItems (lambda (items) ((lambda (increase) (forEach (lambda (item) ((lambda (rarity) (set! increase (%+ increase (cond ((rewardIsWallpaper item) 0) ((== rarity "common") 0.01) ((== rarity "rare") 0.02) ((== rarity "epic") 0.03) ((== rarity "legendary") 0.05) ((== rarity "secret") 0.05))))) (rewardRarity item))) items) increase) 0)))
#"room" 90
(_define crateItems (list (list 0.5 1.58) (list 1 1) (list 2 0.5) (list 3 0.1) (list 10 0.01)))
#"room" 98
(_define ebv2CrateItems (list (list 0.5 1) (list 1 0.6) (list 1.5 0.3) (list 2.5 0.03) (list 10 0.003)))
#"room" 104
(_define deliveryBasketCrateItems (lambda () (if (if (isFeatureEnabled (quote eventBasketV2)) (if (isEventBasketLive) #t)) ebv2CrateItems crateItems)))
#"room" 114
(_define supplyCratePayTableInner (lambda (themeMaterial themeLevel isMastered amountAndWeights) ((lambda (loot multiple averagePayout) (forEach (lambda (amountAndWeight) (apply (lambda (amount weight) ((lambda (newAmount) (addToLootTable loot (rewardByName "material" themeMaterial newAmount) weight)) (%* (floor (%* amount averagePayout)) multiple))) amountAndWeight)) amountAndWeights) loot) (makeLootTable) (if isMastered 2 1) (floor (%+ (%* themeLevel 0.5) 3)))))
#"room" 118
(_define supplyCratePayTable (lambda (themeMaterial themeLevel isMastered) (supplyCratePayTableInner themeMaterial themeLevel isMastered crateItems)))
#"room" 133
(_define deliveryBasketEBV2AddOns (lambda (loot) (if (if (isFeatureEnabled (quote eventBasketV2)) (if (isEventBasketLive) #t)) ((lambda (key1Weight key) ((lambda (reward) (if (exists reward) (addToLootTable loot reward key1Weight))) (rewardByName "material" key (ceil (%/ (coreInfoPlayerLevel) 12)))) ((lambda (reward) (if (exists reward) (addToLootTable loot reward (%/ key1Weight 20)))) (rewardByName "material" key (ceil (%/ (coreInfoPlayerLevel) 7)))) ((lambda (reward) (if (exists reward) (addToLootTable loot reward 0.0004))) (rewardByName "material" key (%+ 100 (%* (floor (%/ (coreInfoPlayerLevel) 10)) 10))))) (%* 13 (expt (coreInfoPlayerLevel) -0.7)) (eventBasketKey))) loot))
#"room" 143
(_define deliveryBasketPayTable (lambda (cat themeMaterial themeLevel floorDecosOwned modifier) ((lambda (loot) (deliveryBasketEBV2AddOns loot) ((lambda (baseChance percentIncrease vipChance) ((lambda (chance) (apply (lambda (factorPlus factorTimes) (addToLootTableWithPercent loot cat (%* (%+ chance factorPlus) factorTimes))) modifier)) (%+ (%+ baseChance percentIncrease) vipChance))) (breedChance (rewardRarity cat) themeLevel) (percentIncreaseForItems floorDecosOwned) (if (coreInfoSubscribed) 0.05 0)) loot) (supplyCratePayTableInner themeMaterial themeLevel #f (deliveryBasketCrateItems)))))
#"bank" 7
(_define coinPayoutEquation (lambda () (clampPayout (coreInfoPlayerLevel) 350 30 500 2250)))
#"bank" 14
(_define getNewCoinPayout (lambda (type) (cond ((== type "materialchest") 200) (#t (coinPayoutEquation)))))
#"bank" 25
(_define getSpeedupPayout (lambda (type) (cond ((== type "ad") 3) ((== type "dailyquest") 3) ((== type "materialchest") 3) (#t 3))))
#"bank" 28
(_define canSeeBankUpdatedPopup (if (> (coreInfoPlayerLevel) 5) (if (targetExisting "2020-11-18") #t)))
#"bank" 35
(_define coinsForDelivery (lambda (level) ((lambda (maxFoodCost) (if (<= level 8) (%* 30 (%+ level 2)) (%* 30 (%+ (floor (%/ level 4)) 7)))) 30)))
#"bank" 39
(_define averageMaterialPayout (lambda (level) (floor (%+ 3 (%* level 0.5)))))
#"bank" 44
(_define baseMaterialCost (lambda () ((lambda (level) (floor (%/ (coinsForDelivery level) (averageMaterialPayout level)))) (coreInfoPlayerLevel))))
#"bank" 53
(_define getTotal (lambda (materials) ((lambda (total) (forEach (lambda (material) (apply (lambda (name owned) (set! total (%+ total owned))) material)) materials) total) 0)))
#"bank" 67
(_define materialChestLootTable (lambda (materials) ((lambda (loot total) ((lambda (favorMissing) (forEach (lambda (material) (apply (lambda (name owned) (_define weight (if favorMissing (expt (%- 1 (%/ owned total)) 3) 1)) (addToLootTable loot (rewardByName "material" name 1) weight)) material)) materials)) (> total 0)) loot) (makeLootTable) (getTotal materials))))
#"bank" 103
(_define rollBaseMaterial (lambda (materials riggedRewards worth rolls isDiscounted) ((lambda (rewards cost targetWorth) ((lambda (targetAmount ran) (forEach (lambda (riggedReward) ((lambda (riggedRewardRolls) (if (>= rolls riggedRewardRolls) (begin (set! rolls (%- rolls riggedRewardRolls)) (_define _loop (lambda () (if (> riggedRewardRolls 0) (begin (set! rewards (cons (rewardWithAmount riggedReward (ceil targetAmount)) rewards)) (set! riggedRewardRolls (%- riggedRewardRolls 1)) (_loop))))) (_loop)))) (ceil (%/ (rewardAmount riggedReward) targetAmount)))) riggedRewards) (if (if (isFeatureEnabled (quote eventBasketV2)) (if (isEventBasketLive) (if (> rolls 0) #t))) ((lambda (amount key) ((lambda (reward) (if (exists reward) (begin (set! rolls (%- rolls 1)) (set! rewards (cons reward rewards))))) (rewardByName "material" key amount))) (round (%* (%/ (%* targetAmount 35) 172) (%+ (%/ (ran) 100) 0.5))) (eventBasketKey))) ((lambda (loot) (_define _loop (lambda (i) (if (< i rolls) ((lambda (reward amount) (set! rewards (cons (rewardWithAmount reward amount) rewards)) (_loop (%+ i 1))) (rollLootTable loot) (ceil (%* targetAmount (%+ (%/ (ran) 100) 0.5))))))) (_loop 0)) (materialChestLootTable materials))) (%/ targetWorth cost) (makeRand (makeSeed (coreInfoTime)) 100)) rewards) #f (baseMaterialCost) (%/ worth rolls))))
#"bank" 110
(_define materialChestRewards (lambda (materials riggedRewards isDiscounted) (_define _rolls (haxe-ref (dataByName "FormulaData" "material-chest-rolls") "value")) (_define _worth (haxe-ref (dataByName "FormulaData" "material-chest-cost") "value")) (_define _bonus (haxe-ref (dataByName "FormulaData" "material-chest-multiple") "value")) (rollBaseMaterial materials riggedRewards (%* _worth _bonus) _rolls isDiscounted)))
#"bank" 117
(_define supplyCrateRawRewards (lambda (materials amount) (_define _worth (haxe-ref (dataByName "FormulaData" "shop-material-chest-cost") "value")) (_define _rolls (haxe-ref (dataByName "FormulaData" "shop-material-chest-rolls") "value")) (_define _bonus (haxe-ref (dataByName "FormulaData" "shop-material-chest-multiple") "value")) (rollBaseMaterial materials () (%* (%* _worth amount) _bonus) (%* _rolls amount) #f)))
#"bank" 122
(_define filterCraftedMaterials (lambda (craftedMaterials worth rolls) ((lambda (maxCost) (filter (lambda (craftedMaterial) (apply (lambda (material cost) (< cost maxCost)) craftedMaterial)) craftedMaterials)) (%/ (%* worth 2) rolls))))
#"bank" 131
(_define getTotalWorth (lambda (chosen) ((lambda (totalWorth) (forEach (lambda (chose) (apply (lambda (amount material cost) (set! totalWorth (%+ totalWorth cost))) chose)) chosen) totalWorth) 0)))
#"bank" 147
(_define rollCraftedMaterialsWorth (lambda (craftedMaterials worth rolls) ((lambda (chosen totalWorth ran) (set! craftedMaterials (filterCraftedMaterials craftedMaterials worth rolls)) (_define _loop (lambda (rollsRemaining) (if (if (< totalWorth worth) (if (> rollsRemaining 0) (if (> (length craftedMaterials) 0) #t))) ((lambda (craftedMaterial costAllocated variation) (apply (lambda (material cost) ((lambda (rewardAmount) (set! chosen (cons (list rewardAmount material (%* cost rewardAmount)) chosen)) (set! totalWorth (getTotalWorth chosen)) (set! craftedMaterials (filterCraftedMaterials craftedMaterials costAllocated 1)) (_loop (%- rollsRemaining 1))) (ceil (%/ (%* costAllocated variation) cost)))) craftedMaterial)) (nth ((makeRand (makeSeed (coreInfoTime)) (length craftedMaterials))) craftedMaterials) (%/ (%- worth totalWorth) rollsRemaining) (%+ (%/ (ran) 100) 0.5))))) (_loop rolls) (map (lambda (i) (apply (lambda (amount material cost) (rewardByName "material" material amount)) i)) chosen)) #f 0 (makeRand (makeSeed (coreInfoTime)) 100))))
#"bank" 154
(_define supplyCrateCraftedRewards (lambda (craftedMaterials amount) (_define _worth (haxe-ref (dataByName "FormulaData" "shop-material-chest-epic-cost") "value")) (_define _rolls (haxe-ref (dataByName "FormulaData" "shop-material-chest-rolls") "value")) (_define _bonus (haxe-ref (dataByName "FormulaData" "shop-material-chest-multiple") "value")) (rollCraftedMaterialsWorth craftedMaterials (%* (%* _worth amount) _bonus) (%* _rolls amount))))
#"bank" 169
(_define bankSpinDisplayRewards (lambda (craftedMaterials) ((lambda (loot worth rolls materialWeight) ((lambda (weight) (forEach (lambda (craftedMaterial) (addToLootTable loot craftedMaterial weight)) (rollCraftedMaterialsWorth craftedMaterials worth rolls))) (%/ materialWeight rolls)) (if (isFeatureEnabled (quote ticketToggle)) (addToLootTable loot (rewardByName "material" "ticketCommon" 1) 10)) (if (if (isFeatureEnabled (quote removePremiumKeys)) #f #t) (begin (addToLootTable loot (rewardByName "material" "keyShard" 1) 10) (addToLootTable loot (rewardByName "material" "key" 1) 5))) loot) (makeLootTable) 5000 10 100)))
#"bank" 200
(_define bankSpinClaimRewards (lambda (craftedMaterials) ((lambda (loot worth rolls materialWeight) (if (isFeatureEnabled (quote ticketToggle)) (addToLootTable loot "ticket" 10)) (addToLootTable loot "shard" 10) (addToLootTable loot "key" 5) (addToLootTable loot "material" 100) ((lambda (rewards materials) (_define _loop (lambda (i) (if (> i 0) ((lambda (rewardType) (cond ((== rewardType "ticket") (set! rewards (cons (rewardByName "material" "ticketCommon" 1) rewards))) ((== rewardType "shard") (if (isFeatureEnabled (quote removePremiumKeys)) (set! rewards (cons (rewardByName "material" "speedup" 1) rewards)) (set! rewards (cons (rewardByName "material" "keyShard" 1) rewards)))) ((== rewardType "key") (if (isFeatureEnabled (quote removePremiumKeys)) (set! rewards (cons (rewardByName "material" "speedup" 20) rewards)) (set! rewards (cons (rewardByName "material" "key" 1) rewards)))) ((== rewardType "material") ((lambda (material) (removeFromLootTable loot material) (set! rewards (cons material rewards))) (choose materials)))) (_loop (%- i 1))) (rollLootTable loot))))) (_loop rolls) rewards) #f (rollCraftedMaterialsWorth craftedMaterials worth rolls))) (makeLootTable) 5000 10 100)))
#"bank" 210
(_define costOfFoodAtLevel (lambda (level) (cond ((< level 2) 10) ((< level 5) (%* (ceil (%/ (%* level 5) 5)) 5)) (#t (%* (ceil (%/ (%+ level 20) 5)) 5)))))
#"bank" 223
(_define rollFoodMaterial (lambda (unlockedFood worth rolls) ((lambda (rewards targetWorth cost) ((lambda (targetAmount ran) (_define _loop (lambda (i) (if (> i 0) ((lambda (food variation) ((lambda (newAmount) (set! rewards (cons (rewardByName "food" food newAmount) rewards)) (_loop (%- i 1))) (ceil (%* targetAmount variation)))) (choose unlockedFood) (%+ (%/ (ran) 100) 0.5))))) (_loop rolls)) (%/ targetWorth cost) (makeRand (makeSeed (coreInfoTime)) 100)) rewards) #f (%/ worth rolls) (%* (costOfFoodAtLevel (coreInfoPlayerLevel)) 0.7))))
#"bank" 230
(_define supplyCrateFoodRewards (lambda (unlockedFood amount) (_define _worth (haxe-ref (dataByName "FormulaData" "shop-food-crate-cost") "value")) (_define _rolls (haxe-ref (dataByName "FormulaData" "shop-food-crate-rolls") "value")) (_define _bonus (haxe-ref (dataByName "FormulaData" "shop-food-crate-multiple") "value")) (rollFoodMaterial unlockedFood (round (%* (%* _worth amount) _bonus)) (%* _rolls amount))))
#"restartOnReload" 2
(_define shouldForceRestartOnReloadingScripts #f)
#"restartOnReload" 5
(if (if isReloadingScripts (if shouldForceRestartOnReloadingScripts #t)) (forceRestartOnNextScene))
#"ccpa" 1
(_define getCcpaRedirectUrl "https://www.tiltingpoint.com/ccpa")
#"cat" 73
(reloadScripts)
#"game" 24
(display "game - loaded")