Add moveToTable context menu action and extract tableRowToGridY helper (#6738)

Adds a Table option to the Move menu, allowing cards to be moved directly to the battlefield from any zone. Extracts the repeated tableRow-to-grid-Y conversion logic into TableZone::tableRowToGridY(), consolidating five call sites and fixing a latent bug where cards with tableRow > 2 could land on the wrong row.
This commit is contained in:
DawnFire42 2026-03-24 16:45:52 -04:00 committed by GitHub
parent 70b41c2095
commit 94ea574c76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 64 additions and 14 deletions

View file

@ -382,3 +382,11 @@ int TableZone::clampValidTableRow(const int row)
return TABLEROWS - 1;
return row;
}
int TableZone::tableRowToGridY(int tableRow)
{
if (tableRow > 2) {
tableRow = 1;
}
return clampValidTableRow(2 - tableRow);
}