restrict tournament trigger to a specific battle table

This commit is contained in:
Martin Michelsen
2022-12-13 22:10:08 -08:00
parent 5bcd16b6f2
commit 025556ecd3
2 changed files with 11 additions and 6 deletions
+3 -1
View File
@@ -46,7 +46,9 @@ Current known issues / missing features / things to do:
- Episode 3 bugs
- Disconnecting during a match turns you into a COM if there are other humans in the match, even if the match is part of a tournament. This may be incorrect behavior for tournaments.
- Disconnecting during a tournament when there are no other humans in the match simply cancels the match (so it can be replayed) instead of forfeiting, which is almost certainly incorrect behavior. (Then again, no one likes losing tournaments to COMs...)
- Tournament deck restrictions aren't enforced when populating COMs at tournament start time. This can cause weird behavior if, for example, a COM deck contains assist cards and the tournament rules forbid them.
- There is a rare failure mode during battles that causes one of the clients to be disconnected.
- Battle Tables don't work properly (except for tournaments).
## Compatibility
@@ -87,7 +89,7 @@ The following Episode 3 features are implemented, but only partially tested:
* Battle replays sometimes cause the client to crash during the replay. Using the $playrec command is therefore not recommended.
* Tournaments.
Tournaments work differently than they did on Sega's servers. Tournaments can be created with the `create-tournament` shell command, which enables players to register for them. (Use `help` to see all the arguments - there are many!) The `start-tournament` shell command starts the tournament, but this doesn't schedule any matches. Instead, players who are scheduled for a match can all stand at a battle table in a CARD lobby, and the tournament match will start automatically. (This also means that, for example, not all matches in round 1 must be complete before round 2 can begin - only the matches preceding each individual match must be complete for that match to be playable.)
Tournaments work differently than they did on Sega's servers. Tournaments can be created with the `create-tournament` shell command, which enables players to register for them. (Use `help` to see all the arguments - there are many!) The `start-tournament` shell command starts the tournament, but this doesn't schedule any matches. Instead, players who are ready to play their next match can all stand at the rightmost 4-player battle table in the same CARD lobby, and the tournament match will start automatically. (This also means that, for example, not all matches in round 1 must be complete before round 2 can begin - only the matches preceding each individual match must be complete for that match to be playable.)
Because newserv gives all players 1000000 meseta, there is no reward for winning a tournament. This may change in the future.
+8 -5
View File
@@ -1061,7 +1061,9 @@ static void on_ep3_battle_table_state(shared_ptr<ServerState> s,
}
c->card_battle_table_number = cmd.table_number;
c->card_battle_table_seat_number = cmd.seat_number;
start_ep3_tournament_match_if_pending(s, l, c, cmd.table_number);
if (cmd.table_number == 2) {
start_ep3_tournament_match_if_pending(s, l, c, cmd.table_number);
}
} else { // Leaving battle table
c->card_battle_table_number = -1;
@@ -1495,7 +1497,8 @@ static void on_menu_item_info_request(shared_ptr<ServerState> s, shared_ptr<Clie
auto team = tourn->get_team(team_index);
if (team) {
string team_name = team->name.empty() ? "(Unnamed team)" : team->name;
string message = string_printf("$C7(Unnamed team)\n%zuH/%zuC/%zu players\n%zu %s\n%s",
string message = string_printf("$C7%s\n%zuH/%zuC/%zu players\n%zu %s\n%s",
team_name.c_str(),
team->num_human_players(),
team->num_com_players(),
team->max_players,
@@ -1956,9 +1959,9 @@ static void on_menu_selection(shared_ptr<ServerState> s, shared_ptr<Client> c,
send_ep3_confirm_tournament_entry(s, c, tourn);
string message = string_printf("$C7You are registered in $C6%s$C7.\n\
\n\
After registration ends, you can start your\n\
first match by standing at any Battle Table in\n\
the lobby along with your partner (if any) and\n\
After registration ends, start your matches by\n\
standing at the rightmost 4-player Battle Table\n\
in the lobby along with your partner (if any) and\n\
opponent(s).", tourn->get_name().c_str());
send_ep3_timed_message_box(c->channel, 240, message.c_str());