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

Method getCandiesWeWillGain

code/main/SuperRPG.ts:208–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206 }
207
208 private getCandiesWeWillGain(): number{
209 // The reward
210 var reward: number = 0;
211
212 // Test the first reward
213 if(Saving.loadBool("SuperRPGReward1") == false && this.floor > 5){
214 reward += 100;
215 Saving.saveBool("SuperRPGReward1", true);
216 }
217
218 // Test the second reward
219 if(Saving.loadBool("SuperRPGReward2") == false && this.floor > 10){
220 reward += 1000;
221 Saving.saveBool("SuperRPGReward2", true);
222 }
223
224 // Test the third reward
225 if(Saving.loadBool("SuperRPGReward3") == false && this.floor > 15){
226 reward += 10000;
227 Saving.saveBool("SuperRPGReward3", true);
228 }
229
230 // Test the fourth reward
231 if(Saving.loadBool("SuperRPGReward4") == false && this.floor > 20){
232 reward += 30000;
233 Saving.saveBool("SuperRPGReward4", true);
234 Saving.saveBool("SuperRPGUnlockedHardmode", true);
235 }
236
237 // We return the reward
238 return reward;
239 }
240
241 private goToLose(): void{
242 // No more menu

Callers 1

goToLoseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected