Removed damage-table mess and added API methods Item->getAttackPoints() and Item->getDefensePoints()

This commit is contained in:
Dylan K. Taylor
2017-08-26 12:58:20 +01:00
parent 7c212d3d53
commit 13187e1749
42 changed files with 183 additions and 57 deletions

View File

@ -746,6 +746,22 @@ class Item implements ItemIds, \JsonSerializable{
return 0;
}
/**
* Returns how many points of damage this item will deal to an entity when used as a weapon.
* @return int
*/
public function getAttackPoints() : int{
return 1;
}
/**
* Returns how many armor points can be gained by wearing this item.
* @return int
*/
public function getDefensePoints() : int{
return 0;
}
/**
* @param Entity|Block $object
*