5. Player game interaction - HearthSim/kettle-design GitHub Wiki
Relations
- UserUI -> [No response] | Player <-> Game server
- UserUI :- enum Emote
Types
UserUI
kettle:types/user_ui
objects are used to communicate mouse interactions of players with the game.
These objects do NOT impact game state!
There are only two types of interaction. Each object can only represent 1 of the two types! Both Player and GameServer are allowed to send these objects freely, but should restrain from flooding the connection with these updates.
- Emote: The ID of an emote;
- PlayerID: The ID of the player;
- MouseInfo: Contains information about the player's mouse cursor.
- ArrowOrigin: Entity used to draw an action arrow starting from it. -1 is allowed as 'none provided';
- HeldCard: EntityID of the card that's about to be put into play. -1 is allowed as 'none provided';
- HoverCard: EntityID of the card underneath the player's cursor. -1 is allowed as 'none provided';
{
"type": "kettle:types/user_ui".
"user_ui":
{
/*REQ*/ "playerID" := kettle:games/[game_id]/players/[player_id]
/*OPT*/ "emote" := Emote:integer.
/*OPT*/ "mouse_info":
{
/*REQ*/ "arrow_origin" := kettle:games/[game_id]/entities/[entity_id]
/*REQ*/ "held_card" := kettle:games/[game_id]/entities/[entity_id]
/*REQ*/ "hover_card" := kettle:games/[game_id]/entities/[entity_id]
}
}
}
Enums
Emote
Emote
enum contains all hero emotions possible in the Hearthstone game.
The values are represented in HEX format and the underlying type is int32.
0x0
INVALID.
0x1
GREETINGS.
0x2
WELL_PLAYED.
0x3
OOPS.
0x4
THREATEN.
0x5
THANKS.
0x6
SORRY.
0x7
CONCEDE.
0x8
START.
0x9
TIMER.
0xA
THINK1.
0xB
THINK2.
0xC
THINK3.
0xD
GOOD_GAME.
0xE
LOW_CARDS.
0xF
NO_CARDS.
0X10
ERROR_NEED_WEAPON.
0x11
ERROR_NEED_MANA.
0x12
ERROR_MINION_ATTACKED.
0x13
ERROR_I_ATTACKED.
0x14
ERROR_JUST_PLAYED.
0x15
ERROR_HAND_FULL.
0x16
ERROR_FULL_MINIONS.
0x17
ERROR_STEALTH.
0x18
ERROR_PLAY.
0x19
ERROR_TARGET.
0x1A
ERROR_TAUNT.
0x1B
ERROR_GENERIC.
0x1C
PICKED.
0x1D
DEATH_LINE.
0x1E
EVENT_LUNAR_NEW_YEAR.
0x1F
MIRROR_START.
0x20
EVENT_WINTER_VEIL.
0x21
WOW.