mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
[Game] Implement action to automatically take damage from creatures (#6869)
* [Game] Implement action to automatically take damage from creatures * cleanup
This commit is contained in:
parent
67f6ab66f0
commit
762e742be0
7 changed files with 58 additions and 0 deletions
|
|
@ -343,6 +343,16 @@ void Player::incrementAllCardCounters()
|
|||
}
|
||||
}
|
||||
|
||||
AbstractCounter *Player::getLifeCounter() const
|
||||
{
|
||||
for (auto counter : counters.values()) {
|
||||
if (counter->getName() == "life") {
|
||||
return counter;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ArrowItem *Player::addArrow(const ServerInfo_Arrow &arrow)
|
||||
{
|
||||
const QMap<int, Player *> &playerList = game->getPlayerManager()->getPlayers();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue