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

Method endQuest

code/main/Bridge.ts:37–49  ·  view source on GitHub ↗
(win: boolean)

Source from the content-addressed store, hash-verified

35 }
36
37 public endQuest(win: boolean): void{
38 // We add some messages
39 if(win){
40 this.getGame().getQuestLog().addMessage(new QuestLogMessage("You managed to cross the bridge!"));
41 Saving.saveBool("mainMapDoneBridge", true); // The bridge is done
42 }
43 else{
44 this.getGame().getQuestLog().addMessage(new QuestLogMessage("You didn't manage to cross the bridge."));
45 }
46
47 // We call the endQuest method of our mother class
48 super.endQuest(win);
49 }
50
51 public update(): void{
52 if(this.getQuestEnded() == false){

Callers 1

updateMethod · 0.95

Calls 3

addMessageMethod · 0.80
getQuestLogMethod · 0.80
getGameMethod · 0.45

Tested by

no test coverage detected