7#ifndef COCKATRICE_PLAYER_EVENT_HANDLER_H
8#define COCKATRICE_PLAYER_EVENT_HANDLER_H
12#include <libcockatrice/protocol/pb/card_attributes.pb.h>
13#include <libcockatrice/protocol/pb/game_event.pb.h>
14#include <libcockatrice/protocol/pb/game_event_context.pb.h>
19class Event_AttachCard;
20class Event_ChangeZoneProperties;
21class Event_CreateArrow;
22class Event_CreateCounter;
23class Event_CreateToken;
24class Event_DelCounter;
25class Event_DeleteArrow;
26class Event_DestroyCard;
32class Event_RevealCards;
34class Event_SetCardAttr;
35class Event_SetCardCounter;
36class Event_SetCounter;
38class Event_GameLogNotice;
82 bool isLentToAnotherPlayer =
false);
92 const GameEvent &event,
93 const GameEventContext &context,
94 EventProcessingOptions options);
103 eventSetCardAttr(
const Event_SetCardAttr &event,
const GameEventContext &context, EventProcessingOptions options);
109 void eventMoveCard(
const Event_MoveCard &event,
const GameEventContext &context);
114 void eventRevealCards(
const Event_RevealCards &event, EventProcessingOptions options);
123 CardAttribute attribute,
124 const QString &avalue,
126 EventProcessingOptions options);
Definition card_item.h:28
Definition card_zone_logic.h:26
void logUndoDrawFailed(PlayerLogic *player)
void processGameEvent(GameEvent::GameEventType type, const GameEvent &event, const GameEventContext &context, EventProcessingOptions options)
Definition player_event_handler.cpp:594
void logUndoDraw(PlayerLogic *player, QString cardName)
void eventCreateToken(const Event_CreateToken &event)
Definition player_event_handler.cpp:132
void logSetCounter(PlayerLogic *player, QString counterName, int value, int oldValue)
void logCreateToken(PlayerLogic *player, QString cardName, QString pt, bool faceDown)
void requestCardMenuUpdate(const CardItem *card)
void logUnattachCard(PlayerLogic *player, QString cardName)
void eventShuffle(const Event_Shuffle &event)
Definition player_event_handler.cpp:48
void eventChangeZoneProperties(const Event_ChangeZoneProperties &event)
Definition player_event_handler.cpp:565
PlayerLogic * player
Definition player_event_handler.h:119
void logDestroyCard(PlayerLogic *player, QString cardName)
void logDumpZone(PlayerLogic *player, CardZoneLogic *zone, int numberCards, bool isReversed=false)
void logRollDie(PlayerLogic *player, int sides, const QList< uint > &rolls)
PlayerEventHandler(PlayerLogic *player)
Definition player_event_handler.cpp:38
void logSetAnnotation(PlayerLogic *player, CardItem *card, QString newAnnotation)
void cardZoneChanged(CardItem *card, bool sameZone)
void eventDumpZone(const Event_DumpZone &event)
Definition player_event_handler.cpp:281
void logSetCardCounter(PlayerLogic *player, QString cardName, int counterId, int value, int oldValue)
void eventGameSay(const Event_GameSay &event)
Definition player_event_handler.cpp:43
void logDrawCards(PlayerLogic *player, int number, bool deckIsEmpty)
void eventMoveCard(const Event_MoveCard &event, const GameEventContext &context)
Definition player_event_handler.cpp:294
void logMoveCard(PlayerLogic *player, CardItem *card, CardZoneLogic *startZone, int oldX, CardZoneLogic *targetZone, int newX)
void setCardAttrHelper(const GameEventContext &context, CardItem *card, CardAttribute attribute, const QString &avalue, bool allCards, EventProcessingOptions options)
Definition player_event_handler.cpp:187
void eventRollDie(const Event_RollDie &event)
Definition player_event_handler.cpp:82
void eventFlipCard(const Event_FlipCard &event)
Definition player_event_handler.cpp:382
void logSay(PlayerLogic *player, QString message)
void logAttachCard(PlayerLogic *player, QString cardName, PlayerLogic *targetPlayer, QString targetCardName)
void eventDrawCards(const Event_DrawCards &event)
Definition player_event_handler.cpp:473
void eventCreateArrow(const Event_CreateArrow &event)
Definition player_event_handler.cpp:94
void logFlipCard(PlayerLogic *player, QString cardName, bool faceDown)
void eventDestroyCard(const Event_DestroyCard &event)
Definition player_event_handler.cpp:404
void eventDelCounter(const Event_DelCounter &event)
Definition player_event_handler.cpp:276
void logRevealCards(PlayerLogic *player, CardZoneLogic *zone, int cardId, QString cardName, PlayerLogic *otherPlayer, bool faceDown, int amount, bool isLentToAnotherPlayer=false)
void eventGameLogNotice(const Event_GameLogNotice &event)
Definition player_event_handler.cpp:582
void eventSetCounter(const Event_SetCounter &event)
Definition player_event_handler.cpp:265
void eventSetCardAttr(const Event_SetCardAttr &event, const GameEventContext &context, EventProcessingOptions options)
Definition player_event_handler.cpp:159
void eventAttachCard(const Event_AttachCard &event)
Definition player_event_handler.cpp:427
void logSetPT(PlayerLogic *player, CardItem *card, QString newPT)
void eventRevealCards(const Event_RevealCards &event, EventProcessingOptions options)
Definition player_event_handler.cpp:500
void logAlwaysLookAtTopCard(PlayerLogic *player, CardZoneLogic *zone, bool reveal)
void logShuffle(PlayerLogic *player, CardZoneLogic *zone, int start, int end)
void logSetDoesntUntap(PlayerLogic *player, CardItem *card, bool doesntUntap)
void logAlwaysRevealTopCard(PlayerLogic *player, CardZoneLogic *zone, bool reveal)
void eventSetCardCounter(const Event_SetCardCounter &event)
Definition player_event_handler.cpp:242
void eventCreateCounter(const Event_CreateCounter &event)
Definition player_event_handler.cpp:260
void logSetTapped(PlayerLogic *player, CardItem *card, bool tapped)
void logCreateArrow(PlayerLogic *player, PlayerLogic *startPlayer, QString startCard, PlayerLogic *targetPlayer, QString targetCard, bool _playerTarget)
void eventDeleteArrow(const Event_DeleteArrow &event)
Definition player_event_handler.cpp:127
Definition player_logic.h:64