Location: PHPKode > projects > PhpBlock > A9.8/modules/dungeon/unit/human/knight.class.php
<?php
include_once $PATH_TO_CODE."/modules/dungeon/unit/dungeonrealobject.class.php";
include_once $PATH_TO_CODE."/script/zone.class.php";
include_once $PATH_TO_CODE."/script/imagemanager.class.php";
include_once $PATH_TO_CODE."/script/weapon.class.php";

include_once $PATH_TO_CODE."/script/log.class.php";

class Knight extends DungeonRealObject
{
	public function getObjectInfoValueImage() {
		return DungeonConstante::$REAL_OBJECT_INFO_VALUE_KNIGHT_IMAGE;
	}

	public static function create($parZone, $parPlayerId, $parIsLobotomize=true)
	{
		$parZone->occupedWithMovable();
		global $gloObjectManager;
		$locPlayer = $gloObjectManager->getPlayer($parPlayerId);
		$locObjectId = DungeonRealObject::createObject(DungeonConstante::$REAL_OBJECT_TYPE_KNIGHT,
		$locPlayer, $parZone, DungeonConstante::$REAL_OBJECT_CATEGORY_MEDIUM_INFANTERY, $parIsLobotomize);

		DungeonRealObject::insertInfo($locObjectId, 10, 10, DungeonConstante::$HIGH_ARMOR,
		Constante::$REF_MAX_ACTION_POINT,
		Constante::$REF_MAX_FIGHT_ACTION_POINT,
		Constante::$REF_MAX_ACTION_POINT/4,Constante::$REF_MAX_ACTION_POINT/8,
		Constante::$REF_MAX_ACTION_POINT/4,Constante::$REF_MAX_FIGHT_ACTION_POINT/2,
		0,//DungeonConstante::$ACTION_BUY_KNIGHT_COST*DungeonConstante::$UPKEEP_PRICE_MUX,
		($parIsLobotomize?20:0));

		DungeonRealObject::insertWeapon($locObjectId, 0, 10, 1,
		Weapon::$WEAPON_RANGE_HAND_TO_HAND, Weapon::$WEAPON_TYPE_AXIS,
		DungeonConstante::$WEAPON_DEFAULT_DAMAGE);

		return $locObjectId;

	}
	public static function staticGetName() {
		return "knight";
	}
	public function getName() {
		return Knight::staticGetName();
	}
}
?>
Return current item: PhpBlock