Skip to content

Events Specification

neuront edited this page Dec 19, 2011 · 6 revisions

GameControl 请求事件列表时, 会返回描述事件的字典列表. 其中, 每个字典均含有 type 键, 其对应的值为事件类型. 每类事件中其它的键值对将在下面描述.

发牌 DealCards

摸牌玩家

  • player_id: 摸牌玩家 id
  • get: [card] 摸到的牌

其中每个 card 格式为

  • id: 牌 id
  • name: 牌名称
  • rank: 牌点数
  • suit: 牌花色

其他玩家

  • player_id: 摸牌玩家 id
  • get: 牌的张数

弃牌 DiscardCards

弃牌玩家

  • player_id: 弃牌玩家 id
  • discard: [card] 摸到的牌

其中每个 card 格式为

  • id: 牌 id
  • name: 牌名称
  • rank: 牌点数
  • suit: 牌花色
  • region: 牌所在区域 ( cards )

其他玩家

  • player_id: 弃牌玩家 id
  • discard: [card] 摸到的牌

其中每个 card 格式为

  • name: 牌名称
  • rank: 牌点数
  • suit: 牌花色
  • region: 牌所在区域 ( cards )

使用牌 UseCardsForPlayers

用牌玩家

  • user: 用牌玩家 id
  • targets: [player_id] 目标玩家 id 列表
  • action: 动作
  • use: [card] 被使用的牌

其中每个 card 格式为

  • id: 牌 id
  • name: 牌名称
  • rank: 牌点数
  • suit: 牌花色

其他玩家

  • user: 用牌玩家 id
  • targets: [player_id] 目标玩家 id 列表
  • action: 动作
  • use: [card] 被使用的牌

其中每个 card 格式为

  • name: 牌名称
  • rank: 牌点数
  • suit: 牌花色

打出牌 PlayCards

出牌玩家

  • player: 出牌玩家 id
  • play: [card] 被打出的牌

其中每个 card 格式为

  • id: 牌 id
  • name: 牌名称
  • rank: 牌点数
  • suit: 牌花色

其他玩家

  • player: 出牌玩家 id
  • play: [card] 被使用的牌

其中每个 card 格式为

  • name: 牌名称
  • rank: 牌点数
  • suit: 牌花色

展示牌 ShowCards

  • player: 展示手牌的玩家 id
  • show: [card] 被展示的牌

其中每个 card 格式为

  • name: 牌名称
  • rank: 牌点数
  • suit: 牌花色

受到伤害 Damage

  • victim: 受到伤害玩家 id
  • damage: 受到的伤害点数
  • category: 伤害类型 ( normal | fire )

Clone this wiki locally