mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-13 21:40:00 -08:00
[Game] Single chat message when a card transforms (#4764)
Transform currently logs "X destroys Y." followed by "X creates token: Z." because the server implements it as DestroyCard + CreateToken events. - Add Context_TransformCard (protocol extension 1010) to the transform event batch and a unit test asserting the server attaches it - Suppress the destroy/create pair and the migration un-attach lines in the game log, printing one "X transforms Y into Z (P/T)." message
This commit is contained in:
parent
44d5138181
commit
5b11af585f
8 changed files with 229 additions and 1 deletions
|
|
@ -80,6 +80,7 @@ set(PROTO_FILES
|
|||
context_ping_changed.proto
|
||||
context_ready_start.proto
|
||||
context_set_sideboard_lock.proto
|
||||
context_transform_card.proto
|
||||
context_undo_draw.proto
|
||||
developer_commands.proto
|
||||
event_add_to_list.proto
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
syntax = "proto2";
|
||||
import "game_event_context.proto";
|
||||
|
||||
message Context_TransformCard {
|
||||
extend GameEventContext {
|
||||
optional Context_TransformCard ext = 1010;
|
||||
}
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ message GameEventContext {
|
|||
CONNECTION_STATE_CHANGED = 1007;
|
||||
SET_SIDEBOARD_LOCK = 1008;
|
||||
UNCONCEDE = 1009;
|
||||
TRANSFORM_CARD = 1010;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue