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

Method willDie

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

Source from the content-addressed store, hash-verified

69
70 // willDie()
71 public willDie(): void{
72 this.getQuest().getGame().getQuestLog().addMessage(new QuestLogMessage(this.getDeathMessage() + " (and found " + Algo.pluralFormat(this.getQuest().foundCandies(500 + Random.upTo(30)*35), " candy", " candies") + ")", this.getQuest().getCandiesFoundMessage()));
73
74 if(this.finType != null){
75 switch(this.finType){
76 case BigSharkFinType.RED:
77 this.getQuest().foundGridOrEqItem(new QuestItemFound(this.getQuest(), "gridItemPossessedRedSharkFin", "You found a red shark fin", "You gain a red shark fin"));
78 break;
79 case BigSharkFinType.GREEN:
80 this.getQuest().foundGridOrEqItem(new QuestItemFound(this.getQuest(), "gridItemPossessedGreenSharkFin", "You found a green shark fin", "You gain a green shark fin"));
81 break;
82 case BigSharkFinType.PURPLE:
83 this.getQuest().foundGridOrEqItem(new QuestItemFound(this.getQuest(), "gridItemPossessedPurpleSharkFin", "You found a purple shark fin", "You gain a purple shark fin"));
84 break;
85 }
86 }
87 }
88
89 // Public methods
90 public hasFin(finType: BigSharkFinType): void{

Callers

nothing calls this directly

Calls 8

addMessageMethod · 0.80
getQuestLogMethod · 0.80
getQuestMethod · 0.80
getDeathMessageMethod · 0.80
foundGridOrEqItemMethod · 0.80
getGameMethod · 0.45
foundCandiesMethod · 0.45

Tested by

no test coverage detected