[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:
RickyRister 2026-05-13 15:03:41 -07:00 committed by GitHub
parent 67f6ab66f0
commit 762e742be0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 58 additions and 0 deletions

View file

@ -62,6 +62,9 @@ CardMenu::CardMenu(Player *_player, const CardItem *_card, bool _shortcutsActive
aSelectColumn = new QAction(this);
connect(aSelectColumn, &QAction::triggered, playerActions, &PlayerActions::actSelectColumn);
aReduceLifeByPower = new QAction(this);
connect(aReduceLifeByPower, &QAction::triggered, playerActions, &PlayerActions::actReduceLifeByPower);
aPlay = new QAction(this);
connect(aPlay, &QAction::triggered, playerActions, &PlayerActions::actPlay);
aHide = new QAction(this);
@ -153,6 +156,8 @@ void CardMenu::createTableMenu(bool canModifyCard)
addSeparator();
addAction(aClone);
addSeparator();
addAction(aReduceLifeByPower);
addSeparator();
addAction(aSelectAll);
addAction(aSelectRow);
addRelatedCardView();
@ -179,6 +184,8 @@ void CardMenu::createTableMenu(bool canModifyCard)
addMenu(new PtMenu(player));
addAction(aSetAnnotation);
addSeparator();
addAction(aReduceLifeByPower);
addSeparator();
addAction(aSelectAll);
addAction(aSelectRow);
@ -463,6 +470,7 @@ void CardMenu::retranslateUi()
aUnattach->setText(tr("Unattac&h"));
aDrawArrow->setText(tr("&Draw arrow..."));
aSetAnnotation->setText(tr("&Set annotation..."));
aReduceLifeByPower->setText(tr("Reduce life by power"));
mCardCounters->setTitle(tr("Ca&rd counters"));
@ -497,6 +505,7 @@ void CardMenu::setShortcutsActive()
aUnattach->setShortcuts(shortcuts.getShortcut("Player/aUnattach"));
aDrawArrow->setShortcuts(shortcuts.getShortcut("Player/aDrawArrow"));
aSetAnnotation->setShortcuts(shortcuts.getShortcut("Player/aSetAnnotation"));
aReduceLifeByPower->setShortcuts(shortcuts.getShortcut("Player/aReduceLifeByPower"));
aSelectAll->setShortcuts(shortcuts.getShortcut("Player/aSelectAll"));
aSelectRow->setShortcuts(shortcuts.getShortcut("Player/aSelectRow"));