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

Method getQuestEntityWeapon

code/main/Player.ts:92–106  ·  view source on GitHub ↗
(quest: Quest = null)

Source from the content-addressed store, hash-verified

90 }
91
92 public getQuestEntityWeapon(quest: Quest = null): QuestEntityWeapon{
93 var qew: QuestEntityWeapon;
94
95 // If a weapon is equipped, we use the quest entity weapon it provides us
96 if(this.game.getSelectedEqItems()["weapon"] != null){
97 qew = this.game.getSelectedEqItems()["weapon"].getQuestEntityWeapon(quest, this);
98 }
99 // Else, no weapon is equipped, we use our fists
100 else{
101 qew = new QuestEntityWeapon(this.getQuest(), this, new Naming("Your fists", "your fists"), this.getClassicCollisionBoxCollection(), 1);
102 qew.getCloseCombatDelay().setFixedDelay(6, 0);
103 }
104
105 return qew;
106 }
107
108 public getSpellCastingPosition(facingRight: boolean = true): Pos{
109 switch(this.characterType){

Callers 1

loadCharacterMethod · 0.95

Calls 5

getSelectedEqItemsMethod · 0.80
getQuestMethod · 0.80
setFixedDelayMethod · 0.80
getCloseCombatDelayMethod · 0.80

Tested by

no test coverage detected