Additional races
This commit is contained in:
parent
31ce4b7beb
commit
ecc69cd7d3
@ -48,7 +48,6 @@ class LobbieActor(hostUser: LobbyUser, deciderName: String) extends Actor with L
|
||||
private var secondPlayerSelectedRaces: Option[SelectedRaces] = None
|
||||
|
||||
|
||||
private val isSolo: Boolean = Try(config.getBoolean(s"deciders.$deciderName.isSolo")).getOrElse(false)
|
||||
private val mapsLobby: Set[DeciderMap] = {
|
||||
val configMaps = config.getList(s"deciders.$deciderName.maps").asScala
|
||||
configMaps.map(e => {
|
||||
@ -66,7 +65,6 @@ class LobbieActor(hostUser: LobbyUser, deciderName: String) extends Actor with L
|
||||
status.toString(),
|
||||
playerTurn,
|
||||
lobbyType.toString(),
|
||||
isSolo,
|
||||
mapsLobby)),
|
||||
this.self)
|
||||
|
||||
@ -78,16 +76,6 @@ class LobbieActor(hostUser: LobbyUser, deciderName: String) extends Actor with L
|
||||
// notify watchers
|
||||
logger.info(s"Ban map $mapName by ${sender.path.name}")
|
||||
|
||||
if (isSolo) {
|
||||
mapsLobby.find(p => p.map == mapName).foreach(m => m.isBanned = true)
|
||||
if (isFinish) {
|
||||
status = Finish()
|
||||
} else {
|
||||
status = Draft()
|
||||
}
|
||||
refreshAndBanMap(mapName)
|
||||
}
|
||||
|
||||
if (status == Draft()) {
|
||||
if ((playerTurn == 1 && sender == host.actorRef) ||
|
||||
(playerTurn == 2 && secondPlayer.exists(_.actorRef == sender))) {
|
||||
@ -227,7 +215,6 @@ class LobbieActor(hostUser: LobbyUser, deciderName: String) extends Actor with L
|
||||
status.toString(),
|
||||
playerTurn,
|
||||
lobbyType.toString(),
|
||||
isSolo,
|
||||
mapsLobby)
|
||||
}
|
||||
|
||||
@ -274,7 +261,7 @@ case class ChangeIsNecronSelected(isSelected: Boolean)
|
||||
|
||||
case object InfoQuery
|
||||
|
||||
case class SelectedRaces(firstRace: Int, secondRace: Int, thirdRace: Int, fourthRace: Int)
|
||||
case class SelectedRaces(mainRaces: List[Int], additionalRaces: List[Int])
|
||||
|
||||
case class UserInfo(name: String, isReady: Boolean, selectedRaces: Option[SelectedRaces] = None)
|
||||
|
||||
@ -285,7 +272,6 @@ case class LobbyInfo(user1Info: UserInfo,
|
||||
status: String,
|
||||
playerTurn: BigDecimal,
|
||||
selectedType: String,
|
||||
isSolo: Boolean,
|
||||
maps: Set[DeciderMap])
|
||||
|
||||
class LobbyStatus
|
||||
|
||||
@ -173,11 +173,10 @@ class UserActor(out: ActorRef,
|
||||
lobbieActor.foreach(lobby => lobby ! BanMap(map))
|
||||
|
||||
case Some("selectRace") =>
|
||||
val firstRace = (json \ "raceFirst").as[Int]
|
||||
val secondRace = (json \ "raceSecond").as[Int]
|
||||
val thirdRace = (json \ "raceThird").as[Int]
|
||||
val fourthRace = (json \ "raceFourth").as[Int]
|
||||
lobbieActor.foreach(lobby => lobby ! SelectedRaces(firstRace, secondRace, thirdRace, fourthRace))
|
||||
logger.info("RACES: " + json.toString())
|
||||
val races = (json \ "mainRaces").as[List[Int]]
|
||||
val additionalRaces = (json \ "additionalRaces").as[List[Int]]
|
||||
lobbieActor.foreach(lobby => lobby ! SelectedRaces(races, additionalRaces))
|
||||
|
||||
case Some("getLobbies") =>
|
||||
logger.debug("Get all lobby request")
|
||||
|
||||
BIN
app/assets/images/maps/6p_gear.jpg
Normal file
BIN
app/assets/images/maps/6p_gear.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
app/assets/images/maps/6p_snowblind.jpg
Normal file
BIN
app/assets/images/maps/6p_snowblind.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
BIN
app/assets/images/maps/img.png
Normal file
BIN
app/assets/images/maps/img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 565 KiB |
BIN
app/assets/images/maps/img_1.png
Normal file
BIN
app/assets/images/maps/img_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 565 KiB |
BIN
app/assets/images/maps/img_2.png
Normal file
BIN
app/assets/images/maps/img_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 565 KiB |
File diff suppressed because it is too large
Load Diff
BIN
app/assets/sound/4playersDraft.mp3
Normal file
BIN
app/assets/sound/4playersDraft.mp3
Normal file
Binary file not shown.
@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
.raceIcon{
|
||||
width: 90px;
|
||||
width: 60px;
|
||||
border-radius: 5px;
|
||||
margin: 3px;
|
||||
border: 1px solid;
|
||||
|
||||
@ -43,11 +43,11 @@ class HomeController @Inject()(cc: ControllerComponents) extends AbstractControl
|
||||
logger.info(s"Received request from: ${request.remoteAddress}")
|
||||
val deciderHumanName = config.getString(s"deciders.$deciderName.name")
|
||||
val deciderDescription = config.getString(s"deciders.$deciderName.rules")
|
||||
val isSolo = Try(config.getBoolean(s"deciders.$deciderName.isSolo")).getOrElse(false)
|
||||
val existAdditionalRaces = Try(config.getBoolean(s"deciders.$deciderName.existAdditionalRaces")).getOrElse(false)
|
||||
val raceCount = Try(config.getInt(s"deciders.$deciderName.raceCount")).getOrElse(1)
|
||||
val lastmapsSettings = LastMapsSelectConfig(true, true, true, true)
|
||||
val raceSelect = RaceSelect(true, false)
|
||||
Ok(views.html.index(deciderName, deciderHumanName, raceCount, deciderDescription, raceSelect, lastmapsSettings, isSolo))
|
||||
Ok(views.html.index(deciderName, deciderHumanName, raceCount, deciderDescription, raceSelect, lastmapsSettings, existAdditionalRaces))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
@(deciderName: String, deciderHumanName: String, raceCount: Int, rules: String, raceSelect: RaceSelect, boSettings: LastMapsSelectConfig, isSolo: Boolean)(implicit r: Request[_])
|
||||
@(deciderName: String, deciderHumanName: String, raceCount: Int, rules: String, raceSelect: RaceSelect, boSettings: LastMapsSelectConfig, existAdditionalRaces: Boolean)(implicit r: Request[_])
|
||||
<!DOCTYPE html>
|
||||
|
||||
<span id="deciderName" style="display: none">@deciderName</span>
|
||||
<span id="raceCount" style="display: none">@raceCount</span>
|
||||
<span id="existAdditionalRaces" style="display: none">@existAdditionalRaces</span>
|
||||
<span id="last1Presence" style="display: none">@boSettings.last1</span>
|
||||
<span id="last3Presence" style="display: none">@boSettings.last3</span>
|
||||
<span id="last5Presence" style="display: none">@boSettings.last5</span>
|
||||
<span id="last7Presence" style="display: none">@boSettings.last7</span>
|
||||
<span id="isSolo" style="display: none">@isSolo</span>
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
@ -21,7 +20,7 @@
|
||||
<script type='text/javascript' src='@routes.Assets.at("lib/underscore/underscore.js")'></script>
|
||||
<script type='text/javascript' src='@routes.Assets.at("lib/backbonejs/backbone.js")'></script>
|
||||
<script type="text/javascript" src="@routes.Assets.at("lib/jquery-cookie/jquery.cookie.js")"></script>
|
||||
<script type='text/javascript' src='@routes.Assets.at("javascripts/index.js?301222")'></script>
|
||||
<script type='text/javascript' src='@routes.Assets.at("javascripts/index.js?050823")'></script>
|
||||
</head>
|
||||
<body data-ws-url="@routes.HomeController.ws.webSocketURL()">
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
|
||||
@ -25,6 +25,20 @@ deciders{
|
||||
name = "Классический десайдер"
|
||||
rules = """"""
|
||||
}
|
||||
freakcup{
|
||||
maps = [["2p_battle_marshes"],
|
||||
["2p_quests_triumph"],
|
||||
["2p_meeting_of_minds"],
|
||||
["2p_shrine_of_excellion_[Rem]"],
|
||||
["2p_titan_fall_[Rem]"],
|
||||
["2p_tranquilitys_end_[Rem]"],
|
||||
["2p_outer_reaches"],
|
||||
["2p_blood_river_[Rem]"],
|
||||
["2p_emerald_river"]]
|
||||
raceCount = 1
|
||||
name = "Десайдер freakcup"
|
||||
rules = """"""
|
||||
}
|
||||
flazzomappool{
|
||||
maps = [["2p_battle_marshes"],
|
||||
["2p_fallen_city_[Rem]"],
|
||||
@ -58,7 +72,6 @@ deciders{
|
||||
["летний"]]
|
||||
|
||||
name = "Выбираем салат на новый год"
|
||||
isSolo = true
|
||||
rules = """"""
|
||||
}
|
||||
turtleshell{
|
||||
@ -279,6 +292,7 @@ deciders{
|
||||
}
|
||||
shouldercup{
|
||||
description = true
|
||||
existAdditionalRaces = true
|
||||
raceCount = 3
|
||||
maps = [["6p_paynes_retribution", "Количество точек: 28/2/2\nСпорных точек: 10/0/2\nТермогенераторы: 2"],
|
||||
["6p_fury_island", "Количество точек: 26/6/1\nСпорных точек: 6 + 1 крит\nТермогенераторы: Отсутствуют"],
|
||||
@ -345,21 +359,29 @@ deciders{
|
||||
Чтобы не было повторений карт, игроки могу выбрать всего 1 раз карту из списка. """
|
||||
}
|
||||
tpmodcup{
|
||||
maps = ["2p_battle_marshes",
|
||||
"2p_fallen_city_[Rem]",
|
||||
"2p_fata_morgana_[Rem]",
|
||||
"2p_quests_triumph",
|
||||
"2p_shrine_of_excellion_[Rem]",
|
||||
"2p_titan_fall_[Rem]",
|
||||
"2p_tranquilitys_end_[Rem]",
|
||||
"2p_blood_river_[Rem]",
|
||||
"2p_sugaroasis",
|
||||
"2p_faceoff",
|
||||
"2p_deadly_fun_archeology",
|
||||
"2p_terror_psyclaw",
|
||||
"2p_meeting_of_minds"]
|
||||
description = true
|
||||
raceCount = 1
|
||||
maps = [["2p_battle_marshes"],
|
||||
["2p_fallen_city_[Rem]"],
|
||||
["2p_quests_triumph"],
|
||||
["2p_fear"],
|
||||
["2p_shrine_of_excellion_[Rem]"],
|
||||
["2p_titan_fall_[Rem]"],
|
||||
["2p_tranquilitys_end_[Rem]"],
|
||||
["2p_blood_river_[Rem]"],
|
||||
["2p_sugaroasis"],
|
||||
["2p_faceoff"],
|
||||
["2p_deadly_fun_archeology"],
|
||||
["2p_terror_psyclaw"],
|
||||
["2p_meeting_of_minds_pro", "Модифицированная версия Meeting of minds v 1.0: 6 точек на игрока, одна из которой находится за реликтом."],
|
||||
["2p_edemus_gamble"],
|
||||
["[tp_mod]jungle_morning"],
|
||||
["2p_fraziersdemise"],
|
||||
["[tp_mod]light_brigade"],
|
||||
["2p_outer_reaches"],
|
||||
["2p_vortex_plateau"]]
|
||||
name = "Турнир по ТП моду"
|
||||
rules = """ Первая карта десайдер выбирается методом вычеркивания, остальные лузер пик."""
|
||||
rules = """Первая карта десайдер выбирается методом вычеркивания, остальные лузер пик. """
|
||||
}
|
||||
bestfriendscup{
|
||||
maps = ["4p_gorhael_crater",
|
||||
@ -388,7 +410,7 @@ deciders{
|
||||
rules = """Выбор карт в БО3 и БО5 осуществляется без лузерпиков, с тремя и пятью десайдерами соответственно. Игроки вычеркивают по очереди карты из маппула, пока их не останется 3 (для БО3) или 5 (для БО5). На этих картах и проходят все матчи встречи. Затем игроки вычеркивают выбранные карты, пока не останется только одна, на которой и играется первый матч встречи. Тот, кто первым начал вычеркивать из всего маппула, уступает оппоненту право вычеркивания первой карты из оставшихся карт-десайдеров. Во втором и последующем матчах проигравший выбирает карту из числа выбранных 3 (5) десайдеров. """
|
||||
}
|
||||
freneticmappool{
|
||||
raceCount = 2
|
||||
raceCount = 3
|
||||
description = true
|
||||
maps =[["2p_battle_marshes"],
|
||||
["2p_fallen_city_[Rem]"],
|
||||
@ -402,7 +424,9 @@ deciders{
|
||||
["2p_deadly_fun_archeology"],
|
||||
["2p_sugaroasis"],
|
||||
["2p_outer_reaches"],
|
||||
["2p_meeting_of_minds"]]
|
||||
["2p_meeting_of_minds"],
|
||||
["2p_fraziersdemise"],
|
||||
["2p_fata_morgana_[Rem]"]]
|
||||
name = "Frenetic map pool"
|
||||
rules = """ """
|
||||
}
|
||||
@ -437,7 +461,7 @@ deciders{
|
||||
["4p_marconia"],
|
||||
["4p_panrea_lowlands"],
|
||||
["4p_saints_square"],
|
||||
["6p_snowblind"],
|
||||
["4p_snowblind"],
|
||||
["4p_tartarus_center"],
|
||||
["4p_skerries"],
|
||||
["4p_doom_spiral"]]
|
||||
@ -477,5 +501,50 @@ deciders{
|
||||
name = "Casino cup"
|
||||
rules = """Выбор карт без лузерпиков, с тремя и пятью десайдерами соответственно. Игроки вычеркивают по очереди карты из маппула, пока их не останется 3 (для БО3) или 5 (для БО5). На этих картах и проходят все матчи встречи. Затем игроки вычеркивают выбранные карты, пока не останется только одна, на которой и играется первый матч встречи. Тот, кто первым начал вычеркивать из всего маппула, уступает оппоненту право вычеркивания первой карты из оставшихся карт-десайдеров. Во втором и последующем матчах проигравший выбирает карту из числа выбранных 3 (5) десайдеров. """
|
||||
}
|
||||
}
|
||||
|
||||
badcup {
|
||||
raceCount = 3
|
||||
maps = [["2p_sugaroasis"],
|
||||
["2p_titan_fall_[Rem]"],
|
||||
["2p_deadly_fun_archeology"],
|
||||
["2p_tranquilitys_end_[Rem]"],
|
||||
["2p_shrine_of_excellion_[Rem]"],
|
||||
["2p_quests_triumph"],
|
||||
["2p_fallen_city_[Rem]"],
|
||||
["2p_outer_reaches"],
|
||||
["2p_battle_marshes"],
|
||||
["2p_bloody_hell_[Ed]"],
|
||||
["2p_blood_river_[Rem]"]]
|
||||
name = "BAD cup"
|
||||
rules = """ """
|
||||
}
|
||||
ppcz {
|
||||
raceCount = 2
|
||||
maps = [["2p_fata_morgana_[Rem]"],
|
||||
["2p_titan_fall_[Rem]"],
|
||||
["2p_tranquilitys_end_[Rem]"],
|
||||
["2p_shrine_of_excellion_[Rem]"],
|
||||
["2p_quests_triumph"],
|
||||
["2p_fallen_city_[Rem]"],
|
||||
["2p_outer_reaches"],
|
||||
["2p_battle_marshes"],
|
||||
["2p_emerald_river"],
|
||||
["2p_blood_river_[Rem]"],
|
||||
["2p_meeting_of_minds"]]
|
||||
name = "PPCZ"
|
||||
rules = """ """
|
||||
}
|
||||
badcup_together {
|
||||
raceCount = 2
|
||||
maps = [["4p_tartarus_center"],
|
||||
["4p_skerries"],
|
||||
["4p_saints_square"],
|
||||
["4p_cold_war"],
|
||||
["4p_biffys_peril"],
|
||||
["4p_imperial_area"],
|
||||
["4p_tainted_soul"],
|
||||
["4p_chaos_platenau"],
|
||||
["4p_colosseum_of_deadman"]]
|
||||
name = "BAD CUP Together"
|
||||
rules = """ """
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user