battles/classes/Battles/City.php

81 lines
5.2 KiB
PHP
Raw Normal View History

2020-10-26 18:16:28 +00:00
<?php
# Date: 26.10.2020 (17:56)
namespace Battles;
2022-12-16 23:20:43 +00:00
2020-10-26 18:16:28 +00:00
class City
{
use Rooms;
2022-12-16 23:20:43 +00:00
2020-10-26 18:16:28 +00:00
public static function showStreet(int $id)
{
2022-12-16 23:20:43 +00:00
echo '<div style="position:relative; display: inline-block;" id="ione">';
2020-10-26 18:16:28 +00:00
if ($id === 20) {
2022-12-16 23:20:43 +00:00
echo '<img alt="background" src="/i/city/spring_cap_cp_day.jpg">' .
self::showBuilding(1, "spring_cap_club", 30, 235, self::$roomNames[1]) .
self::showBuilding(2, "spring_cap_shop", 202, 171, self::$roomNames[22]) .
self::showBuilding(4, "spring_cap_rem", 202, 290, self::$roomNames[23]) .
self::showBuilding(6, "spring_cap_po4ta", 180, 540, self::$roomNames[27]) .
self::showBuilding(7, "cap_arr_right", 260, 710, self::$roomNames[21]) .
self::showBuilding(8, "cap_arr_left", 258, 21, self::$roomNames[26]) .
self::showBuilding(9, "winter_cap_tree2", 215, 500, self::$roomNames[44]) .
self::showBuilding(13, "spring_cap_statue", 222, 365, self::$roomNames[24]) .
self::showBuilding(14, "winter_cap_statue", 210, 390, "Снеговик") .
2022-12-16 23:20:43 +00:00
self::showBuilding(222, "cap_arr_top", 180, 650, "Торговая улица");
2020-10-26 18:16:28 +00:00
} elseif ($id === 21) {
2022-12-16 23:20:43 +00:00
echo '<img alt="background" src="/i/city/spring_cap_strash_day.jpg">' .
2020-10-26 18:16:28 +00:00
self::showBuilding(3, "cap_arr_right", 255, 708, "Ристалище") .
self::showBuilding(4, "cap_arr_left", 258, 21, self::$roomNames[20]) .
self::showBuilding(5, "spring_cap_bank", 180, 485, self::$roomNames[29]) .
self::showBuilding(13, "spring_cap_flowershop", 220, 613, self::$roomNames[34]) .
self::showBuilding(14, "spring_cap_registratura", 170, 113, self::$roomNames[30]) .
2022-12-16 23:20:43 +00:00
self::showBuilding(16, "spring_cap_tower", 5, 315, self::$roomNames[31]);
2020-10-26 18:16:28 +00:00
} elseif ($id === 26) {
2022-12-16 23:20:43 +00:00
echo '<img alt="background" src="/i/city/spring_cap_park_day.jpg">' .
self::showBuilding(3, "cap_arr_left", 259, 27, self::$roomNames[2601]) .
self::showBuilding(4, "cap_arr_right", 259, 715, self::$roomNames[20]) .
2020-10-26 18:16:28 +00:00
self::showBuilding(6, "cap_gate", 170, 340, "Городские ворота") .
2022-12-16 23:20:43 +00:00
self::showBuilding(660, "spring_cap_vokzal", 163, 43, self::$roomNames[661]);
2020-10-26 18:16:28 +00:00
} elseif ($id === 2601) {
2022-12-16 23:20:43 +00:00
echo '<img alt="background" src="/i/city/sub/cap_zamk_day.jpg">' .
self::showBuilding(1, "spring_cap_ruins", 166, 48, "Руины Старого замка") .
self::showBuilding(4, "cap_arr_right", 260, 710, self::$roomNames[26]) .
self::showBuilding(10, "ava_post", 240, 300, self::$roomNames[35]) .
self::showBuilding(55, "cap_arr_left", 258, 21, self::$roomNames[2655]) .
self::showBuilding(1051, "spring_cap_lab", 130, 327, self::$roomNames[33]) .
2022-12-16 23:20:43 +00:00
self::showBuilding(1052, "spring_cap_lavka", 240, 425, self::$roomNames[1053]);
2020-10-26 18:16:28 +00:00
} elseif ($id === 2655) {
2022-12-16 23:20:43 +00:00
echo '<img alt="background" src="/i/city/ar_e_d.jpg">' .
self::showBuilding(10, "arr_right_png2", 260, 710, self::$roomNames[2601]) .
2022-12-16 23:20:43 +00:00
self::showBuilding(2055, "altr_g", 230, 340, self::$roomNames[603]);
2020-10-26 18:16:28 +00:00
} elseif ($id === 2111) {
2022-12-16 23:20:43 +00:00
echo '<img alt="background" src="/i/city/av_rist_day.jpg">' .
self::showBuilding(1, "cap_arr_left", 240, 30, self::$roomNames[21]) .
self::showBuilding(14, "spring_cap_rist_solo", 210, 160, "Вход в Одиночные сражения") .
self::showBuilding(14, "spring_cap_rist_group", 243, 340, "Вход в Сражение отрядов") .
self::showBuilding(203, "spring_cap_rist_monstr", 145, 570, "Вход в Груповые сражения") .
2022-12-16 23:20:43 +00:00
self::showBuilding(1000, "av_zamk_rud", 80, 310, self::$roomNames[1001]);
2020-10-26 18:16:28 +00:00
} elseif ($id === 2701) {
2022-12-16 23:20:43 +00:00
echo '<img alt="background" src="/i/city/av_arena_bg1_day2.jpg">' .
2020-10-26 18:16:28 +00:00
self::showBuilding(1, "cap_3strelka", 260, 30, "Берег Залива") .
2022-12-16 23:20:43 +00:00
self::showBuilding(2, "cap_shar_dark", 234, 356, "Лабиринт Хаоса");
2020-10-26 18:16:28 +00:00
} elseif ($id === 2702) {
2022-12-16 23:20:43 +00:00
echo '<img alt="background" src="/i/city/spring_cap_torg_day.jpg">' .
self::showBuilding(6, "spring_cap_build1", 175, 70, "Академия") .
self::showBuilding(10, "cap_rist_arr_left", 259, 25, self::$roomNames[20]) .
self::showBuilding(16, "auk", 120, 300, "Аукцион") .
self::showBuilding(21, "spring_cap_build2", 150, 565, "Ломбард") .
2022-12-16 23:20:43 +00:00
self::showBuilding(16555, "spring_cap_build3", 155, 480, "Прокатная лавка");
2020-10-26 18:16:28 +00:00
}
2022-12-16 23:20:43 +00:00
echo '</div>';
2020-10-26 18:16:28 +00:00
}
2022-12-16 23:20:43 +00:00
private static function showBuilding(int $id, string $image, int $top, int $left, string $description): string
2020-10-26 18:16:28 +00:00
{
2022-12-16 23:20:43 +00:00
return <<<HTML
<div style="position:absolute; left:{$left}px; top:{$top}px; z-index:90; cursor: pointer;">
<img src="/i/city/sub/$image.png" alt="$description" title="$description" class="building" id="$id" onclick="window.location.href = 'city.php?got/level$id'">
</div>
HTML;
2020-10-26 18:16:28 +00:00
}
2022-12-16 23:20:43 +00:00
}