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);
91 const GameEvent &event,
92 const GameEventContext &context,
93 EventProcessingOptions options);
102 eventSetCardAttr(
const Event_SetCardAttr &event,
const GameEventContext &context, EventProcessingOptions options);
108 void eventMoveCard(
const Event_MoveCard &event,
const GameEventContext &context);
113 void eventRevealCards(
const Event_RevealCards &event, EventProcessingOptions options);
122 CardAttribute attribute,
123 const QString &avalue,
125 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:596
void logUndoDraw(PlayerLogic *player, QString cardName)
void eventCreateToken(const Event_CreateToken &event)
Definition player_event_handler.cpp:134
void logSetCounter(PlayerLogic *player, QString counterName, int value, int oldValue)
void logCreateToken(PlayerLogic *player, QString cardName, QString pt, bool faceDown)
void logUnattachCard(PlayerLogic *player, QString cardName)
void eventShuffle(const Event_Shuffle &event)
Definition player_event_handler.cpp:47
void eventChangeZoneProperties(const Event_ChangeZoneProperties &event)
Definition player_event_handler.cpp:567
PlayerLogic * player
Definition player_event_handler.h:118
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:283
void logSetCardCounter(PlayerLogic *player, QString cardName, int counterId, int value, int oldValue)
void eventGameSay(const Event_GameSay &event)
Definition player_event_handler.cpp:42
void logDrawCards(PlayerLogic *player, int number, bool deckIsEmpty)
void eventMoveCard(const Event_MoveCard &event, const GameEventContext &context)
Definition player_event_handler.cpp:296
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:189
void eventRollDie(const Event_RollDie &event)
Definition player_event_handler.cpp:81
void eventFlipCard(const Event_FlipCard &event)
Definition player_event_handler.cpp:384
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:475
void eventCreateArrow(const Event_CreateArrow &event)
Definition player_event_handler.cpp:93
void logFlipCard(PlayerLogic *player, QString cardName, bool faceDown)
void eventDestroyCard(const Event_DestroyCard &event)
Definition player_event_handler.cpp:406
void eventDelCounter(const Event_DelCounter &event)
Definition player_event_handler.cpp:278
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:584
void eventSetCounter(const Event_SetCounter &event)
Definition player_event_handler.cpp:267
void eventSetCardAttr(const Event_SetCardAttr &event, const GameEventContext &context, EventProcessingOptions options)
Definition player_event_handler.cpp:161
void eventAttachCard(const Event_AttachCard &event)
Definition player_event_handler.cpp:429
void logSetPT(PlayerLogic *player, CardItem *card, QString newPT)
void eventRevealCards(const Event_RevealCards &event, EventProcessingOptions options)
Definition player_event_handler.cpp:502
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:244
void eventCreateCounter(const Event_CreateCounter &event)
Definition player_event_handler.cpp:262
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:129
Definition player_logic.h:65