mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
arrows can target players; card attachment works
This commit is contained in:
parent
61b82bd6f9
commit
614f106304
32 changed files with 885 additions and 402 deletions
|
|
@ -27,6 +27,12 @@ Server_Card::Server_Card(QString _name, int _id, int _coord_x, int _coord_y)
|
|||
|
||||
Server_Card::~Server_Card()
|
||||
{
|
||||
// setParentCard(0) leads to the item being removed from our list, so we can't iterate properly
|
||||
while (!attachedCards.isEmpty())
|
||||
attachedCards.first()->setParentCard(0);
|
||||
|
||||
if (parentCard)
|
||||
parentCard->removeAttachedCard(this);
|
||||
}
|
||||
|
||||
void Server_Card::resetState()
|
||||
|
|
@ -74,3 +80,12 @@ void Server_Card::setCounter(int id, int value)
|
|||
else
|
||||
counters.remove(id);
|
||||
}
|
||||
|
||||
void Server_Card::setParentCard(Server_Card *_parentCard)
|
||||
{
|
||||
if (parentCard)
|
||||
parentCard->removeAttachedCard(this);
|
||||
parentCard = _parentCard;
|
||||
if (parentCard)
|
||||
parentCard->addAttachedCard(this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue