(quest: Quest, pos: Pos)
| 3 | class MiniShark extends QuestEntity{ |
| 4 | // Constructor |
| 5 | constructor(quest: Quest, pos: Pos){ |
| 6 | super(quest, |
| 7 | pos, |
| 8 | new Naming("A dangerous fish", "a dangerous fish"), |
| 9 | new RenderArea(19, 5), |
| 10 | new Pos(0, 0), |
| 11 | new CollisionBoxCollection(new CollisionBox(this, new Pos(8, 1), new Pos(2, 1)), |
| 12 | new CollisionBox(this, new Pos(17, 1), new Pos(2, 1)), |
| 13 | new CollisionBox(this, new Pos(5, 2), new Pos(14, 1)), |
| 14 | new CollisionBox(this, new Pos(2, 3), new Pos(17, 1)), |
| 15 | new CollisionBox(this, new Pos(0, 4), new Pos(12, 1)), |
| 16 | new CollisionBox(this, new Pos(18, 4), new Pos(1, 1)) |
| 17 | ), |
| 18 | new QuestEntityMovement(new Pos(-1, 0)) |
| 19 | ); |
| 20 | |
| 21 | // Set destructible |
| 22 | this.setDestructible(true); |
| 23 | this.setMaxHp(70); |
| 24 | this.setHp(70); |
| 25 | |
| 26 | // Set the ascii art |
| 27 | this.getRenderArea().drawArray(Database.getAscii("places/quests/theSea/miniShark")); |
| 28 | |
| 29 | // Set the transparency |
| 30 | this.setTransparency(new RenderTransparency(" ", "%")); |
| 31 | |
| 32 | // Set the weapon and its delay |
| 33 | this.addQuestEntityWeapon(new QuestEntityWeapon(this.getQuest(), this, new Naming("Its teeth", "its teeth"), new CollisionBoxCollection(new CollisionBox(this, new Pos(-1, -1), new Pos(21, 7))), 8)); |
| 34 | this.getLastQuestEntityWeapon().getCloseCombatDelay().setFixedDelay(2); |
| 35 | } |
| 36 | |
| 37 | // willDie() |
| 38 | public willDie(): void{ |
nothing calls this directly
no test coverage detected