Location: PHPKode > projects > PhpBlock > A9.8/modules/dungeon/unit/human/soldier.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 Soldier extends DungeonRealObject
{
	public function getObjectInfoValueImage() {
		return DungeonConstante::$REAL_OBJECT_INFO_VALUE_SOLDIER_IMAGE;
	}

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

		DungeonRealObject::insertInfo($locObjectId, 10, 10, DungeonConstante::$MEDIUM_ARMOR,
		Constante::$REF_MAX_ACTION_POINT,
		Constante::$REF_MAX_FIGHT_ACTION_POINT,
		Constante::$REF_MAX_ACTION_POINT/4,Constante::$REF_MAX_ACTION_POINT/10,
		Constante::$REF_MAX_ACTION_POINT*3/20,Constante::$REF_MAX_FIGHT_ACTION_POINT/2,
		0,//DungeonConstante::$ACTION_BUY_SOLDIER_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 "soldier";
	}
	public function getName() {
		return Soldier::staticGetName();
	}
}
?>
Return current item: PhpBlock