(quest: Quest, pos: Pos, minY: number, maxY: number)
| 13 | |
| 14 | // Constructor |
| 15 | constructor(quest: Quest, pos: Pos, minY: number, maxY: number){ |
| 16 | super(quest, |
| 17 | pos, |
| 18 | new Naming("The devil", "the devil"), |
| 19 | new RenderArea(16, 16), |
| 20 | new Pos(0, 0), |
| 21 | new CollisionBoxCollection(new CollisionBox(this, new Pos(4, 0), new Pos(8, 5))), |
| 22 | new QuestEntityMovement() |
| 23 | ); |
| 24 | |
| 25 | // Set from parameters |
| 26 | this.minY = minY; |
| 27 | this.maxY = maxY; |
| 28 | |
| 29 | // At first we're going down |
| 30 | this.setGoingDown(true); |
| 31 | |
| 32 | // Init the flames array |
| 33 | this.flames = []; |
| 34 | |
| 35 | // Set gravity |
| 36 | this.getQuestEntityMovement().setGravity(false); |
| 37 | |
| 38 | // Set destructible |
| 39 | this.setDestructible(true); |
| 40 | this.setMaxHp(666); |
| 41 | this.setHp(666); |
| 42 | |
| 43 | // Set the transparent character and draw |
| 44 | this.setTransparency(new RenderTransparency(" ", "%")); |
| 45 | this.reDraw(); |
| 46 | |
| 47 | // Set the weapon and its delay |
| 48 | this.addQuestEntityWeapon(new QuestEntityWeapon(this.getQuest(), this, new Naming("Evilness", "evilness"), new CollisionBoxCollection(new CollisionBox(this, new Pos(-1, -1), new Pos(18, 18))), 500)); |
| 49 | this.getLastQuestEntityWeapon().getCloseCombatDelay().setBetweenDelay(0, 5); |
| 50 | } |
| 51 | |
| 52 | // inflictDamage() |
| 53 | public inflictDamage(damage: number, reason: QuestEntityDamageReason): void{ |
nothing calls this directly
no test coverage detected