(quest: Quest, pos: Pos)
| 12 | |
| 13 | // Constructor |
| 14 | constructor(quest: Quest, pos: Pos){ |
| 15 | super(quest, |
| 16 | pos, |
| 17 | new Naming("A monkey wizard", "a monkey wizard"), |
| 18 | new RenderArea(4, 4), |
| 19 | new Pos(0, 0), |
| 20 | new CollisionBoxCollection(new CollisionBox(this, new Pos(3, 0), new Pos(1, 1)), |
| 21 | new CollisionBox(this, new Pos(1, 1), new Pos(3, 1)), |
| 22 | new CollisionBox(this, new Pos(0, 2), new Pos(4, 1)), |
| 23 | new CollisionBox(this, new Pos(0, 3), new Pos(4, 1)) |
| 24 | ), |
| 25 | new QuestEntityMovement() |
| 26 | ); |
| 27 | |
| 28 | // Set the timers |
| 29 | this.timer = 0; |
| 30 | this.bigTimer = 0; |
| 31 | |
| 32 | // At first we're going left |
| 33 | this.goingLeft = true; |
| 34 | |
| 35 | // Set gravity |
| 36 | this.getQuestEntityMovement().setGravity(true); |
| 37 | this.getQuestEntityMovement().setWormsLike(false); |
| 38 | |
| 39 | // Set destructible |
| 40 | this.setDestructible(true); |
| 41 | this.setMaxHp(300); |
| 42 | this.setHp(300); |
| 43 | |
| 44 | // Set the ascii art and the transparent character |
| 45 | this.getRenderArea().drawArray(Database.getAscii("places/quests/monkeyWizard/monkeyWizard")); |
| 46 | this.setTransparency(new RenderTransparency(" ")); |
| 47 | |
| 48 | // Set the weapon and its delay |
| 49 | this.addQuestEntityWeapon(new QuestEntityWeapon(this.getQuest(), this, new Naming("Its staff", "its staff"), new CollisionBoxCollection(new CollisionBox(this, new Pos(-1, -1), new Pos(6, 6))), 3)); |
| 50 | this.getLastQuestEntityWeapon().getCloseCombatDelay().setFixedDelay(1); |
| 51 | } |
| 52 | |
| 53 | // update() |
| 54 | public update(): void{ |
nothing calls this directly
no test coverage detected