servatrice/common
Basile Clement 42e7a8b423
Better support Double-Faced Cards (#4753)
* Better support Double-Faced Cards

This patch allows cards to be (virtually) transformed into other cards
while preserving their state, essentially implemeting the MTG mechanic
of the same name.

On the server side, this is implemented by allowing cards to be "stashed
away". A card that is stashed away is not in any zone, but is instead
owned by another card. When a token is destroyed due to a zone change,
if it had a card stashed away, that card is placed in the target zone
instead of the token.

On the database side, `attach="transform"` is used on `<reverse>` and
`<reverse-related>` to indicate that the created token should be
transformed this way.

Old servers ignore the new field in `Command_CreateToken` and will
perform a regular attachment, as currently.

* Address review comments

* Prevent tokens from being stashed

* format.sh
2023-03-03 16:54:51 +01:00
..
lib Counter expressions (#3534) 2019-02-02 13:56:49 -05:00
pb Better support Double-Faced Cards (#4753) 2023-03-03 16:54:51 +01:00
sfmt update sfmt to version 1.5.1 from 1.4.1 (#4124) 2020-10-02 12:13:12 -04:00
CMakeLists.txt Add cmake format (#4618) 2022-05-08 21:22:43 +02:00
color.h Tabs to spaces. 2014-07-08 22:53:02 -04:00
debug_pb_message.cpp implement custom protobuf debug string creation (#4532) 2022-02-23 23:46:23 +01:00
debug_pb_message.h implement custom protobuf debug string creation (#4532) 2022-02-23 23:46:23 +01:00
decklist.cpp Fix #4706: don't replace ampersands when loading from plain text (#4734) 2023-01-30 00:37:28 +01:00
decklist.h Fix #4706: don't replace ampersands when loading from plain text (#4734) 2023-01-30 00:37:28 +01:00
expression.cpp Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
expression.h Counter expressions (#3534) 2019-02-02 13:56:49 -05:00
featureset.cpp rework formatting with cmake-format (#4627) 2022-06-08 21:14:26 -04:00
featureset.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
get_pb_extension.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
get_pb_extension.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
passwordhasher.cpp miscellaneous refactors (#4521) 2022-01-16 17:58:53 -05:00
passwordhasher.h miscellaneous refactors (#4521) 2022-01-16 17:58:53 -05:00
rng_abstract.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
rng_abstract.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
rng_sfmt.cpp Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
rng_sfmt.h clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
room_message_type.h clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server.cpp Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
server.h Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
server_abstractuserinterface.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_abstractuserinterface.h apply chat flood prevention in games next to rooms (#4387) 2021-06-28 01:57:46 -04:00
server_arrow.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_arrow.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
server_arrowtarget.cpp Tabs to spaces. 2014-07-08 22:53:02 -04:00
server_arrowtarget.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
server_card.cpp Better support Double-Faced Cards (#4753) 2023-03-03 16:54:51 +01:00
server_card.h Better support Double-Faced Cards (#4753) 2023-03-03 16:54:51 +01:00
server_cardzone.cpp Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
server_cardzone.h remove cards being looked at from the count on drawing (#4671) 2022-10-17 16:35:54 -04:00
server_counter.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_counter.h clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_database_interface.cpp Overhaul common's CMakeLists.txt 2014-06-11 01:24:34 +02:00
server_database_interface.h Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
server_game.cpp Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
server_game.h fix deprecation of QMutex::Recursive in favor of QRecursiveMutex (#4328) 2021-05-01 18:51:17 -04:00
server_metatypes.h clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_player.cpp Better support Double-Faced Cards (#4753) 2023-03-03 16:54:51 +01:00
server_player.h Fix move (#4491) 2021-12-07 22:56:58 -05:00
server_player_reference.h Clang-format (#3028) 2018-01-27 10:41:32 +01:00
server_protocolhandler.cpp Display Welcome Message as Most Recent Message (#4720) 2022-12-11 23:40:47 +01:00
server_protocolhandler.h Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
server_remoteuserinterface.cpp clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_remoteuserinterface.h apply chat flood prevention in games next to rooms (#4387) 2021-06-28 01:57:46 -04:00
server_response_containers.cpp send hidden info to judge instead of player (#4297) 2021-03-25 22:35:46 -04:00
server_response_containers.h clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
server_room.cpp use hashed passwords in all commands (#4493) 2022-01-16 20:32:30 -05:00
server_room.h add option to delete a user's messages (#4362) 2021-09-14 16:05:20 -04:00
serverinfo_user_container.cpp Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
serverinfo_user_container.h Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
stringsizes.h Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice 2022-05-06 17:31:08 -04:00
user_level.h clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00