mobs will attack now, fixed division by 0(i hate php)

This commit is contained in:
GameHerobrine 2023-01-23 00:19:50 +03:00
parent 616c933d3d
commit b8589c9dd4
13 changed files with 71 additions and 5 deletions

View file

@ -1,4 +1,11 @@
<?php
class Monster extends Creature{
public function __construct(Level $level, $eid, $class, $type = 0, $data = []){
parent::__construct($level, $eid, $class, $type, $data);
$this->ai->addTask(new TaskAttackPlayer());
}
public function getAttackDamage(){
return 2;
}
}