Esempio n. 1
0
     include_once GAME_ROOT . './include/system.func.php';
     while ($now > $areatime) {
         $o_areatime = $areatime;
         $areatime += $areahour * 60;
         //save_gameinfo();
         add_once_area($o_areatime);
         $areawarn = 0;
         //save_gameinfo();
         $ginfochange = true;
         //		testlog('禁区增加');
     }
     //addarea($areatime);
 } elseif ($gamestate > 10 && $now > $areatime - $areawarntime && !$areawarn) {
     //判定警告增加禁区
     include_once GAME_ROOT . './include/system.func.php';
     areawarn();
     //save_gameinfo();
     $ginfochange = true;
 }
 if ($gamestate == 20) {
     $arealimit = $arealimit > 0 ? $arealimit : 1;
     if ($validnum <= 0 && $areanum >= $arealimit * $areaadd) {
         //判定无人参加并结束游戏
         gameover($areatime - 3599, 'end4');
     } elseif ($areanum >= $arealimit * $areaadd || $validnum >= $validlimit) {
         //判定游戏停止激活
         $gamestate = 30;
         //save_gameinfo();
         $ginfochange = true;
     }
 }
Esempio n. 2
0
function updategame()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys', 'map'));
    if ($gamestate > 10 && $now > $areatime) {
        //判定增加禁区
        while ($now > $areatime) {
            $o_areatime = $areatime;
            $areatime += $areahour * 60;
            add_once_area($o_areatime);
            $areawarn = 0;
        }
    } elseif ($gamestate > 10 && $now > $areatime - $areawarntime && !$areawarn) {
        //判定警告增加禁区
        areawarn();
    }
    if ($gamestate == 20) {
        $arealimit = $arealimit > 0 ? $arealimit : 1;
        if ($validnum <= 0 && $areanum >= $arealimit * $areaadd) {
            //判定无人参加并结束游戏
            \sys\gameover($areatime - 3599, 'end4');
        } elseif ($areanum >= $arealimit * $areaadd || $validnum >= $validlimit) {
            //判定游戏停止激活
            $gamestate = 30;
        }
    }
    $chprocess();
}