diff --git a/src/entity/Creature.php b/src/entity/Creature.php index 3d36dd9f..159ff7f6 100644 --- a/src/entity/Creature.php +++ b/src/entity/Creature.php @@ -44,10 +44,10 @@ abstract class Creature extends Living{ } public function getSpeedModifer(){ - return 0.7; //$this->speedModifer; //should be 0.7? + return 0.7; } public function getArmorValue(){ - return 2; + return 0; } public function spawn($player){ if(!($player instanceof Player)){ diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 2948653b..8225d896 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -1328,19 +1328,20 @@ class Entity extends Position if (!$this->canBeAttacked) { return false; } - if(is_numeric($cause) && ($entity = $this->server->api->entity->get($cause)) != false){ if($this->attackTimeout > 0) return false; - switch($this->server->difficulty){ - //case 0: looks like mobs also have 0 attack dmg in peaceful mode - // $dmg = 0; - // break; - case 1: - $dmg = (int)($dmg / 3) + 1; - break; - case 3: - $dmg = 3 * (int)($dmg / 2); - break; + if(!$entity->isPlayer()){ + switch($this->server->difficulty){ + //case 0: looks like mobs also have 0 attack dmg in peaceful mode + // $dmg = 0; + // break; + case 1: + $dmg = (int)($dmg / 3) + 1; + break; + case 3: + $dmg = 3 * (int)($dmg / 2); + break; + } } }