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

Method clickedBuyPolishedSilverSwordButton

code/main/Forge.ts:77–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 }
76
77 private clickedBuyPolishedSilverSwordButton(): void{
78 if(this.getGame().getCandies().getCurrent() >= 2000){
79 this.getGame().getCandies().add(-2000); // -2000 candies
80 Saving.saveBool("forgeBoughtPolishedSilverSword", true); // We bought the sword
81 this.getGame().gainItem("eqItemWeaponPolishedSilverSword"); // We now own the sword
82 this.currentSpeech = "mapVillageForgeBuyPolishedSilverSwordSpeech"; // New speech
83 // We update
84 this.update();
85 this.getGame().updatePlace();
86 }
87 }
88
89 private clickedBuyScytheButton(): void{
90 if(this.getGame().getCandies().getCurrent() >= 5000000){

Callers

nothing calls this directly

Calls 7

updateMethod · 0.95
getCurrentMethod · 0.80
gainItemMethod · 0.80
updatePlaceMethod · 0.80
addMethod · 0.65
getCandiesMethod · 0.45
getGameMethod · 0.45

Tested by

no test coverage detected