(onTheLeft: boolean)
| 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 | } |
no test coverage detected