mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-11 20:43:25 -08:00
Merge upstream master and move the reveal docs into docs/
Upstream moved the documentation sources from doc/ to docs/ (#7584), so the page this branch adds now belongs under docs/doxygen/pages/user_documentation/ gameplay/. The index.md edit auto-merged onto the moved file, but the new page stayed at the old path, and GitHub's merge engine reported a conflict in index.md because the file it edits was deleted upstream. No source changes: the merge is upstream/master as-is plus the doc relocation.
This commit is contained in:
commit
b64e168026
179 changed files with 4162 additions and 832 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include <QtGlobal>
|
||||
#include <libcockatrice/interfaces/interface_interface_settings_provider.h>
|
||||
#include <libcockatrice/settings/interface_settings.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
|
||||
class PlayerLogic;
|
||||
class QObject;
|
||||
|
|
@ -36,6 +37,11 @@ bool ZoneViewZoneLogic::getCloseEmptyCardView() const
|
|||
return interfaceSettings ? interfaceSettings->getCloseEmptyCardView() : true;
|
||||
}
|
||||
|
||||
bool ZoneViewZoneLogic::isLibraryEdgeView() const
|
||||
{
|
||||
return origZone != nullptr && numberCards > 0 && origZone->getName() == ZoneNames::DECK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if inserting a card at the given position requires an actual new card to be created and added to the view.
|
||||
* Also does any cardId updates that would be required if a card is inserted in that position.
|
||||
|
|
|
|||
|
|
@ -82,6 +82,27 @@ public:
|
|||
return isReversed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Whether this view is a limited look at one end of a library.
|
||||
*
|
||||
* Only scry/surveil-style views of the top or bottom cards of a deck
|
||||
* qualify. Full-zone views, revealed-card views and views of other zones
|
||||
* do not, because their first and last cards have no library edge meaning.
|
||||
*/
|
||||
[[nodiscard]] bool isLibraryEdgeView() const;
|
||||
|
||||
/** @brief Whether the first card in the view is the top card of the library. */
|
||||
[[nodiscard]] bool showsTopOfLibrary() const
|
||||
{
|
||||
return isLibraryEdgeView() && !isReversed;
|
||||
}
|
||||
|
||||
/** @brief Whether the last card in the view is the bottom card of the library. */
|
||||
[[nodiscard]] bool showsBottomOfLibrary() const
|
||||
{
|
||||
return isLibraryEdgeView() && isReversed;
|
||||
}
|
||||
|
||||
CardZoneLogic *getOriginalZone() const
|
||||
{
|
||||
return origZone;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue