b1f578f4b0
# Conflicts: # admin/admin.php # classes/Battles/User.php # classes/Battles/UserStats.php # fbattle.php # functions.php
101 lines
2.9 KiB
PHP
101 lines
2.9 KiB
PHP
<?php
|
||
/**
|
||
* Конфиг системных настроек.
|
||
* Copyright (c) 2018.
|
||
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
||
* Project name: Battles-Game
|
||
*/
|
||
|
||
include_once 'classes/Database/db.php';
|
||
include_once 'classes/Database/Mysql.php';
|
||
include_once 'classes/Database/Statement.php';
|
||
include_once 'classes/Database/Exception.php';
|
||
|
||
ini_set('display_errors', 'On');
|
||
error_reporting(E_ALL);
|
||
const GAMEDOMAIN = "battles.lan";
|
||
|
||
if (session_status() !== PHP_SESSION_ACTIVE) {
|
||
session_start();
|
||
}
|
||
|
||
/*
|
||
* Запрещаем кэшировать
|
||
*/
|
||
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
|
||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||
|
||
/**
|
||
* Автозагрузка классов с учётом неймспейсов.
|
||
*/
|
||
|
||
spl_autoload_register(function ($className) {
|
||
$fileName = __DIR__ . '/classes/' . str_replace('\\', DIRECTORY_SEPARATOR, $className . '.php');
|
||
if (file_exists($fileName)) {
|
||
require_once $fileName;
|
||
}
|
||
});
|
||
|
||
// Для нападалок. Сперва комнаты в которых нельзя напасть, потом персонажи на которых нельзя напасть.
|
||
const UNKILABLE = [
|
||
'rooms' => [620, 621, 1051, 1052],
|
||
'users' => [10962, 10964, 10965],
|
||
];
|
||
|
||
// Кажется, для пещер.
|
||
const CANAL_ENTERS = [620];
|
||
const CAVE_ROOMS = [621];
|
||
const CAVE_DATA = [
|
||
621 => [
|
||
'x1' => 6,
|
||
'y1' => 11,
|
||
'dir1' => 1,
|
||
'x2' => 10,
|
||
'y2' => 8,
|
||
'dir2' => 1,
|
||
'x3' => 20,
|
||
'y3' => 4,
|
||
'dir3' => 1,
|
||
'x4' => 10,
|
||
'y4' => 10,
|
||
'dir4' => 1,
|
||
'delay' => 360,
|
||
'name1' => 'Проклятый Рудник',
|
||
'name2' => 'Проклятого Рудника'
|
||
],
|
||
];
|
||
|
||
const EXPTABLE = [
|
||
0 => [0, 0, 0, 0, 0, 20],
|
||
20 => [1, 0, 0, 0, 0, 45],
|
||
45 => [1, 0, 0, 2, 0, 75],
|
||
75 => [1, 0, 0, 4, 0, 110],
|
||
110 => [3, 1, 1, 8, 1, 160], # Это первый уровень
|
||
|
||
160 => [1, 0, 0, 2, 0, 215],
|
||
215 => [1, 0, 0, 2, 0, 280],
|
||
280 => [1, 0, 0, 4, 0, 350],
|
||
350 => [1, 0, 0, 8, 0, 410],
|
||
410 => [3, 1, 1, 16, 1, 530], # Это второй уровень
|
||
|
||
530 => [1, 0, 0, 8, 0, 670],
|
||
670 => [1, 0, 0, 12, 0, 830],
|
||
830 => [1, 0, 0, 16, 0, 950],
|
||
950 => [1, 0, 0, 24, 0, 1100],
|
||
1100 => [1, 0, 0, 32, 0, 1300],
|
||
1300 => [3, 1, 1, 40, 1, 1450], # Это третий уровень
|
||
|
||
1450 => [1, 0, 0, 10, 0, 1650],
|
||
1650 => [1, 0, 0, 20, 0, 1850],
|
||
1850 => [1, 0, 0, 30, 0, 2050],
|
||
2050 => [1, 0, 0, 40, 0, 2200],
|
||
2200 => [1, 0, 0, 50, 0, 2500],
|
||
2500 => [5, 1, 1, 70, 1, 2900], # Это четвёртый уровень
|
||
|
||
2900 => [1, 0, 0, 10, 0, 3350],
|
||
3350 => [1, 0, 0, 20, 0, 3800],
|
||
3800 => [1, 0, 0, 30, 0, 4200],
|
||
4200 => [1, 0, 0, 40, 0, 4600],
|
||
4600 => [1, 0, 0, 50, 0, 5000],
|
||
5000 => [3, 1, 1, 80, 1, 6000], # Это пятый уровень
|
||
]; |