Esempio n. 1
0
            }
            unset($Weapon);
            break;
        case 'Locations':
            ?>
<option value="Bank">Any Bank</option>
					<option value="Bar">Any Bar</option>
					<option value="SafeFed">Any Safe Fed</option>
					<option value="Fed">Any Fed</option>
					<option value="HQ">Any Headquarters</option>
					<option value="UG">Any Underground</option>
					<option value="Hardware">Any Hardware Shop</option>
					<option value="Ship">Any Ship Shop</option>
					<option value="Weapon">Any Weapon Shop</option><?php 
            $Locations =& SmrLocation::getAllLocations();
            Sorter::sortByNumMethod($Locations, 'getName');
            foreach ($Locations as &$Location) {
                ?>
<option value="<?php 
                echo $Location->getTypeID();
                ?>
"><?php 
                echo $Location->getName();
                ?>
</option><?php 
            }
            unset($Location);
            break;
        case 'Goods':
            $Goods =& Globals::getGoods();
            foreach ($Goods as &$Good) {
acquire_lock($var['target_sector']);
// get new sector object
$sector =& $player->getSector();
//add that the player explored here if it hasnt been explored...for HoF
if (!$sector->isVisited($player)) {
    $player->increaseExperience(EXPLORATION_EXPERIENCE);
    $player->increaseHOF(EXPLORATION_EXPERIENCE, array('Movement', 'Exploration Experience Gained'), HOF_ALLIANCE);
    $player->increaseHOF(1, array('Movement', 'Sectors Explored'), HOF_ALLIANCE);
}
// make current sector visible to him
$sector->markVisited($player);
// send scout msgs
$sector->enteringSector($player, MOVEMENT_WALK);
$sectorForces =& $sector->getForces();
$mine_owner_id = false;
Sorter::sortByNumMethod($sectorForces, 'getMines', true);
foreach ($sectorForces as &$forces) {
    if (!$mine_owner_id && $forces->hasMines() && !$player->forceNAPAlliance($forces->getOwner())) {
        $mine_owner_id = $forces->getOwnerID();
        break;
    }
}
unset($forces);
if ($mine_owner_id) {
    if ($player->hasNewbieTurns()) {
        $turns = $sectorForces[$mine_owner_id]->getBumpTurnCost($ship);
        $player->takeTurns($turns, $turns);
        $container = create_container('skeleton.php', 'current_sector.php');
        $container['msg'] = 'You have just flown past a sprinkle of mines.<br />Because of your newbie status you have been spared from the harsh reality of the forces.<br />It has cost you ' . $turns . ' turn' . ($turns == 1 ? '' : 's') . ' to navigate the minefield safely.';
        forward($container);
    } else {