Location: PHPKode > projects > PhpBlock > A9.8/modules/dungeon/action/buildcity.class.php
<?php
include_once $PATH_TO_CODE."/modules/dungeon/action/abstractchangezonetype.class.php";

class BuildCity extends DungeonAbstractChangeZoneTypeAction {
    function __construct() {
        parent::__construct(DungeonConstante::$ACTION_BUILD_CITY, 
        	DungeonConstante::$ZONE_TYPE_CITY, DungeonConstante::$ACTION_BUY_CITY_COST, false, false);
    }

    public function isOkToChange($locBlock, $locZone) {
        $locManageAction = ManageAction::getInstance();
        $locPlayer = $locManageAction->getPlayer();

        if(!$locZone->isSurface()) {
            $locManageAction->addPlayerInfo("City must begin on ground");
        } else {
			return parent::isOkToChange($locBlock, $locZone);
        }
        return false;
    }
}
?>
Return current item: PhpBlock