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

Method shootMagicSpine

code/main/TreeSpirit.ts:96–112  ·  view source on GitHub ↗
(onTheLeft: boolean)

Source from the content-addressed store, hash-verified

94
95 // Private methods
96 private shootMagicSpine(onTheLeft: boolean): boolean{
97 // Create the magic spine
98 var magicSpine: Fireball = new Fireball(this.getQuest(),
99 this.getGlobalPosition().plus(new Pos((onTheLeft? -3:5), 2)),
100 new Naming("A magical spine", "a magical spine"),
101 new Color(ColorType.TREE_SPIRIT_MAGIC_SPINE),
102 new Pos(3, 1),
103 150,
104 this.getAndPossiblyCreateSpellCastingDamageReason(new Naming("A magical spine", "a magical spine"))
105 );
106
107 // No target
108 magicSpine.setTargetTypeNoTarget(new Pos((onTheLeft? -2:2), 0));
109
110 // Add the entity
111 return this.getQuest().addEntity(magicSpine);
112 }
113}

Callers 1

updateMethod · 0.95

Calls 6

setTargetTypeNoTargetMethod · 0.95
getQuestMethod · 0.80
plusMethod · 0.80
getGlobalPositionMethod · 0.80
addEntityMethod · 0.80

Tested by

no test coverage detected