fix some edge-case bugs in ep3 server

This commit is contained in:
Martin Michelsen
2023-08-20 17:37:41 -07:00
parent 8adbe38617
commit 300d3cd825
6 changed files with 48989 additions and 4 deletions
+2
View File
@@ -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;
}
+4
View File
@@ -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();
+1 -1
View File
@@ -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,
+4 -2
View File
@@ -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);
}
}