Autumn meatgrinder
This commit is contained in:
parent
e71480c1f7
commit
52baef061b
@ -43,6 +43,8 @@ class LobbieActor(hostUser: LobbyUser) extends Actor with LazyLogging {
|
||||
|
||||
private var lobbyType: LobbyType = Last3()
|
||||
|
||||
private var isNecrons: Boolean = false
|
||||
|
||||
private val mapsLobby: Set[DeciderMap] = {
|
||||
val configMaps = config.getStringList("maps").asScala
|
||||
configMaps.map(e => {
|
||||
@ -58,6 +60,7 @@ class LobbieActor(hostUser: LobbyUser) extends Actor with LazyLogging {
|
||||
status.toString(),
|
||||
playerTurn,
|
||||
lobbyType.toString(),
|
||||
isNecrons,
|
||||
mapsLobby)),
|
||||
this.self)
|
||||
|
||||
@ -139,6 +142,15 @@ class LobbieActor(hostUser: LobbyUser) extends Actor with LazyLogging {
|
||||
}
|
||||
users.foreach(_ ! RefreshLobbyInfo(getLobbyInfoResponse))
|
||||
|
||||
case ChangeIsNecronSelected(isSelected) =>
|
||||
isNecrons = isSelected
|
||||
if(isSelected) {
|
||||
mapsLobby.foreach(map => if(map.map == "2p_meeting_of_minds" || map.map == "2p_shrine_of_excellion_[Rem]") map.isBanned = true)
|
||||
}else{
|
||||
mapsLobby.foreach(map => map.isBanned = false)
|
||||
}
|
||||
users.foreach(_ ! RefreshLobbyInfo(getLobbyInfoResponse))
|
||||
|
||||
case KickSecondPlayer =>
|
||||
if (sender() == host.actorRef) {
|
||||
secondPlayer.foreach(player => player.actorRef ! LobbyFatal("You were kicked from lobby!"))
|
||||
@ -202,6 +214,7 @@ class LobbieActor(hostUser: LobbyUser) extends Actor with LazyLogging {
|
||||
status.toString(),
|
||||
playerTurn,
|
||||
lobbyType.toString(),
|
||||
isNecrons,
|
||||
mapsLobby)
|
||||
}
|
||||
}
|
||||
@ -228,6 +241,8 @@ case class MessageForLobby(message: String)
|
||||
|
||||
case class ChangeLobbyType(lobbyType: String)
|
||||
|
||||
case class ChangeIsNecronSelected(isSelected: Boolean)
|
||||
|
||||
case object InfoQuery
|
||||
|
||||
case class UserInfo(name: String, isReady: Boolean)
|
||||
@ -238,6 +253,7 @@ case class LobbyInfo(user1Info: UserInfo,
|
||||
status: String,
|
||||
playerTurn: BigDecimal,
|
||||
selectedType: String,
|
||||
isNecrons: Boolean,
|
||||
maps: Set[DeciderMap])
|
||||
|
||||
class LobbyStatus
|
||||
|
||||
@ -38,6 +38,7 @@ class UserActor(out: ActorRef,
|
||||
"status" -> lobby.status,
|
||||
"playerTurn" -> lobby.playerTurn,
|
||||
"selectedType" -> lobby.selectedType,
|
||||
"isNecrons" -> lobby.isNecrons,
|
||||
"maps" -> Json.toJson(lobby.maps)
|
||||
)
|
||||
}
|
||||
@ -56,6 +57,7 @@ class UserActor(out: ActorRef,
|
||||
"status" -> lobby.status,
|
||||
"playerTurn" -> lobby.playerTurn,
|
||||
"selectedType" -> lobby.selectedType,
|
||||
"isNecrons" -> lobby.isNecrons,
|
||||
"maps" -> Json.toJson(lobby.maps)
|
||||
)))
|
||||
}
|
||||
@ -146,6 +148,10 @@ class UserActor(out: ActorRef,
|
||||
val lobbyType = (json \ "lobbyType").as[String]
|
||||
lobbieActor.foreach(lobby => lobby ! ChangeLobbyType(lobbyType))
|
||||
|
||||
case Some("changeIsNecronSelected") =>
|
||||
val isNecronSelected = (json \ "isNecronSelected").as[Boolean]
|
||||
lobbieActor.foreach(lobby => lobby ! ChangeIsNecronSelected(isNecronSelected))
|
||||
|
||||
case Some("kickSecondPlayer") =>
|
||||
lobbieActor.foreach(lobby => lobby ! KickSecondPlayer)
|
||||
|
||||
|
||||
@ -270,6 +270,10 @@ function renderPlayersAndStats(lobby) {
|
||||
var last5Selected = "";
|
||||
var superfinalSelected = "";
|
||||
var looserPickSelected = "";
|
||||
|
||||
var isNecronsSelected = "";
|
||||
if(lobby.isNecrons) isNecronsSelected = "checked";
|
||||
|
||||
switch (lobby.selectedType) {
|
||||
case "Last3()":
|
||||
last3Selected = "selected";
|
||||
@ -309,10 +313,19 @@ function renderPlayersAndStats(lobby) {
|
||||
disabledText = "disabled";
|
||||
}
|
||||
resHtml += "<br/><select class=\"form-control\" id = 'deciderOption' onChange='changeLobbyType()' "+disabledText+" >" +
|
||||
"<option "+looserPickSelected+" value = 'looserpick'>Play on last map (BO1)</option>" +
|
||||
"<option "+last3Selected+" value = 'last3'>Play on last 3 maps (BO3)</option>" +
|
||||
"<option "+last5Selected+" value = 'last5'>Play on last 5 maps (BO5)</option>" +
|
||||
"<option "+superfinalSelected+" value = 'superfinal'>Superfinal (BO7)</option>" +
|
||||
"</select>"
|
||||
//"<option "+superfinalSelected+" value = 'superfinal'>Superfinal (BO7)</option>" +
|
||||
"</select>";
|
||||
|
||||
if(lobby.user1Info.name !== userName && lobby.user2Info.name !== userName){
|
||||
disabledText = "disabled";
|
||||
}else{
|
||||
disabledText = "";
|
||||
}
|
||||
resHtml += "<br/><label><input onchange=\"changeIsNecronSelected()\" id='isNecron' type=\"checkbox\" "+isNecronsSelected +" " + disabledText +">" +
|
||||
" Necrons are present</label>";
|
||||
resHtml += "</div>";
|
||||
break;
|
||||
case "Draft()":
|
||||
@ -377,6 +390,14 @@ function changeLobbyType(){
|
||||
}));
|
||||
}
|
||||
|
||||
function changeIsNecronSelected(){
|
||||
var isNecronSelected = $("#isNecron").is(':checked');
|
||||
ws.send(JSON.stringify({
|
||||
type: "changeIsNecronSelected",
|
||||
isNecronSelected: isNecronSelected
|
||||
}));
|
||||
}
|
||||
|
||||
function joinDecider(actorName){
|
||||
ws.send(JSON.stringify({
|
||||
type: "joinDecider",
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<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?040921")'></script>
|
||||
<script type='text/javascript' src='@routes.Assets.at("javascripts/index.js?180921")'></script>
|
||||
</head>
|
||||
<body data-ws-url="@routes.HomeController.ws.webSocketURL()">
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
@ -51,21 +51,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
||||
<div><i><b>Правила турнира Big Boss of Summer 2021</b><br/>
|
||||
<div><i><b>Правила турнира "Осенняя мясорубка#1"</b><br/>
|
||||
<p>Выбор карт в БО3 и БО5 осуществляется без лузерпиков, с тремя и пятью десайдерами соответственно.
|
||||
Игроки вычеркивают по очереди карты из маппула, пока их не останется 3 (для БО3) или 5 (для БО5).
|
||||
На этих картах и проходят все матчи встречи. Затем игроки вычеркивают выбранные карты, пока не останется только одна, на которой и играется первый матч встречи.
|
||||
Тот, кто первым начал вычеркивать из всего маппула, уступает оппоненту право вычеркивания первой карты из оставшихся карт-десайдеров.
|
||||
Во втором и последующем матчах проигравший выбирает карту из числа выбранных 3 (5) десайдеров.</p>
|
||||
<p>В суперфинале турнира оба игрока вычеркивают по две карты. После этого из оставшихся 9 карт можно брать любые, выбирает их проигравший в предыдущем матче.
|
||||
Первый лузер-пик - за игроком из нижней сетки, который начинает с -1 очком.</p>
|
||||
Игроки вычеркивают по очереди карты из маппула, пока их не останется 3 (для БО3) или 5 (для БО5). На этих картах и проходят все матчи встречи. Затем игроки вычеркивают выбранные карты, пока не останется только одна, на которой и играется первый матч встречи. Тот, кто первым начал вычеркивать из всего маппула, уступает оппоненту право вычеркивания первой карты из оставшихся карт-десайдеров. Во втором и последующем матчах проигравший выбирает карту из числа выбранных 3 (5) десайдеров.
|
||||
В случае, если один из игроков играет за расу некронов, из маппула исключаются карты MoM и SoE, после чего оба игрока приступают к вычеркиванию карт стандартным образом из 11-картового маппула.</p>
|
||||
<br>
|
||||
<p>Maps for BO3 and BO5 should be picked with 3 and 5 deciders respectively, w/o looser picks.
|
||||
Players disclude maps from the map pool one-by-one, until they got 3 (for BO3) or 5 (for BO5).
|
||||
At these maps you play all the matches vs your opponent. After defining the maps for BO3/BO5, the players disclude maps one-by-one from this small pool of 3(5), untill they get one.
|
||||
This gonna be the first map for your round. The next one will be picked by looser from the previously defined map pool of 3 (5) maps.</p>
|
||||
<p>At grandfinal both players disclude only two maps. After that, looser can pick ANY map from the 9 left in map pool.
|
||||
First looser pick belongs to the player from looser bracket, because he/she starts with -1 score.</p>
|
||||
</i>
|
||||
</div>
|
||||
|
||||
|
||||
@ -16,8 +16,8 @@ maps = ["2p_battle_marshes",
|
||||
"2p_shrine_of_excellion_[Rem]",
|
||||
"2p_titan_fall_[Rem]",
|
||||
"2p_tranquilitys_end_[Rem]",
|
||||
"2p_fraziersdemise",
|
||||
"2p_emerald_river",
|
||||
"2p_deadly_fun_archeology",
|
||||
"2p_vortex_plateau",
|
||||
"2p_sugaroasis",
|
||||
"2p_blood_river_[Rem]"]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user