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

Method enchant

code/main/WishingWell.ts:196–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194 }
195
196 private enchant(): void{
197 // Get the index of the selected echantment
198 var index: number = parseInt(this.selectedEnchantmentId.substr(30));
199
200 // Enchant (lose the before item and gain the after item)
201 this.possibleEnchantments[index].enchant();
202
203 // We're not enchanting anymore
204 Saving.saveBool("wishingWellWeAreEnchanting", false);
205
206 // We re-create the lists
207 this.createPossibleEnchantments();
208
209 // Set the speech
210 this.currentSpeech = "wishingWellEnchantmentDoneSpeech";
211
212 // Update
213 this.update();
214 this.getGame().updatePlace();
215 }
216
217 private enchantmentSelected(): void{
218 // Get the selected language id

Callers

nothing calls this directly

Calls 4

updateMethod · 0.95
updatePlaceMethod · 0.80
getGameMethod · 0.45

Tested by

no test coverage detected