fix some edge-case bugs in ep3 server
This commit is contained in:
@@ -68,7 +68,6 @@ Current known issues / missing features / things to do:
|
||||
- Implement the C5 (battle/challenge records) command.
|
||||
- Implement choice search.
|
||||
- Episode 3 bugs
|
||||
- Re-record the Episode 3 battle replay test.
|
||||
- Fix behavior when joining a spectator team after the beginning of a battle.
|
||||
- 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...)
|
||||
|
||||
@@ -572,7 +572,9 @@ int32_t Card::move_to_location(const Location& loc) {
|
||||
this->loc.x = this->server()->warp_positions[warp_type][warp_end ^ 1][0];
|
||||
this->loc.y = this->server()->warp_positions[warp_type][warp_end ^ 1][1];
|
||||
cmd.change_type = 0;
|
||||
cmd.card_refs.clear(0xFFFF);
|
||||
cmd.card_refs[0] = this->card_ref;
|
||||
cmd.unknown_a2.clear(0xFFFFFFFF);
|
||||
this->server()->send(cmd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -553,6 +553,8 @@ void PlayerState::discard_and_redraw_hand() {
|
||||
G_Unknown_GC_Ep3_6xB4x2C cmd;
|
||||
cmd.change_type = 3;
|
||||
cmd.client_id = this->client_id;
|
||||
cmd.card_refs.clear(0xFFFF);
|
||||
cmd.unknown_a2.clear(0xFFFFFFFF);
|
||||
this->server()->send(cmd);
|
||||
|
||||
this->deck_state->restart();
|
||||
@@ -641,6 +643,8 @@ bool PlayerState::do_mulligan() {
|
||||
G_Unknown_GC_Ep3_6xB4x2C cmd;
|
||||
cmd.change_type = 3;
|
||||
cmd.client_id = this->client_id;
|
||||
cmd.card_refs.clear(0xFFFF);
|
||||
cmd.unknown_a2.clear(0xFFFFFFFF);
|
||||
this->server()->send(cmd);
|
||||
|
||||
this->deck_state->do_mulligan();
|
||||
|
||||
@@ -337,7 +337,7 @@ bool RulerServer::attack_action_has_rampage_and_not_pierce(
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (; cond_index >= 0; cond_index--) {
|
||||
for (cond_index--; cond_index >= 0; cond_index--) {
|
||||
bool has_rampage = this->check_pierce_and_rampage(
|
||||
card_ref,
|
||||
ce->def.effects[cond_index].type,
|
||||
|
||||
@@ -970,12 +970,14 @@ void Server::move_phase_after() {
|
||||
(abs(sc_card->loc.y - trap_y) < 2) &&
|
||||
ps->replace_assist_card_by_id(trap_card_id)) {
|
||||
G_Unknown_GC_Ep3_6xB4x2C cmd;
|
||||
cmd.client_id = client_id;
|
||||
cmd.change_type = 0x01;
|
||||
cmd.loc.direction = static_cast<Direction>(trap_type);
|
||||
cmd.client_id = client_id;
|
||||
cmd.card_refs.clear(0xFFFF);
|
||||
cmd.loc.x = trap_x;
|
||||
cmd.loc.y = trap_y;
|
||||
cmd.loc.direction = static_cast<Direction>(trap_type);
|
||||
cmd.unknown_a2[0] = trap_card_id;
|
||||
cmd.unknown_a2[1] = 0xFFFFFFFF;
|
||||
this->send(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user