mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
feat: add Piece HP and ATK
This commit is contained in:
@@ -195,4 +195,22 @@ std::unordered_set<int> Board::getSporeRange(int PieceID) const {
|
||||
|
||||
|
||||
return SporeRegion;
|
||||
}
|
||||
|
||||
bool Board::changeHP(int row, int col, int num) {
|
||||
int pieceID = getPieceID(row, col);
|
||||
if (!m_grid[pieceID]) {
|
||||
return false;
|
||||
}
|
||||
m_grid[pieceID]->changeHP(num);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Board::changeATK(int row, int col, int num) {
|
||||
int pieceID = getPieceID(row, col);
|
||||
if (!m_grid[pieceID]) {
|
||||
return false;
|
||||
}
|
||||
m_grid[pieceID]->changeATK(num);
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user