mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
randomwalking for all mobs
This commit is contained in:
parent
88cec22404
commit
4689809794
10 changed files with 27 additions and 9 deletions
|
|
@ -11,6 +11,8 @@ class Creeper extends Monster{
|
|||
$this->ignited = 0;
|
||||
$this->setSpeed(0.25);
|
||||
$this->timeUntilExplode = $this->isIgnited() ? self::EXPL_TIME : 0;
|
||||
|
||||
$this->ai->addTask(new TaskRandomWalk(0.25));
|
||||
}
|
||||
|
||||
public function getAttackDamage(){
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ class Skeleton extends Monster{
|
|||
$this->setName("Skeleton");
|
||||
$this->ai->removeTask("TaskAttackPlayer");
|
||||
//$this->ai->addTask(new TaskDestroyServerPerformance());
|
||||
$this->setSpeed(0.25);
|
||||
|
||||
$this->ai->addTask(new TaskRandomWalk(0.25));
|
||||
}
|
||||
|
||||
public function getAttackDamage(){
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ class Spider extends Monster{
|
|||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 8, "generic");
|
||||
$this->setName("Spider");
|
||||
$this->setSpeed(0.3);
|
||||
$this->ai->addTask(new TaskRandomWalk(0.25)); //TODO this mob doesnt use newAI -> speed is not correct
|
||||
}
|
||||
|
||||
public function getDrops(){
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ class Zombie extends Monster{
|
|||
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 12, "generic");
|
||||
$this->setName("Zombie");
|
||||
$this->setSpeed(0.23);
|
||||
|
||||
$this->ai->addTask(new TaskRandomWalk(0.25));
|
||||
}
|
||||
|
||||
public function getArmorValue(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue