2023-04-09 05:35:35 +00:00
|
|
|
|
-- SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
2023-08-10 19:24:22 +00:00
|
|
|
|
---@alias PlayerId integer
|
|
|
|
|
|
2023-02-15 11:54:35 +00:00
|
|
|
|
---@class CardsMoveInfo
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public ids integer[]
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public from? integer
|
|
|
|
|
---@field public to? integer
|
|
|
|
|
---@field public toArea? CardArea
|
|
|
|
|
---@field public moveReason? CardMoveReason
|
|
|
|
|
---@field public proposer? integer
|
|
|
|
|
---@field public skillName? string
|
|
|
|
|
---@field public moveVisible? boolean
|
|
|
|
|
---@field public specialName? string
|
|
|
|
|
---@field public specialVisible? boolean
|
2022-04-08 10:39:58 +00:00
|
|
|
|
|
2023-02-15 11:54:35 +00:00
|
|
|
|
---@class MoveInfo
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public cardId integer
|
|
|
|
|
---@field public fromArea CardArea
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public fromSpecialName? string
|
2022-04-08 10:39:58 +00:00
|
|
|
|
|
2023-02-15 11:54:35 +00:00
|
|
|
|
---@class CardsMoveStruct
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public moveInfo MoveInfo[]
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public from? integer
|
|
|
|
|
---@field public to? integer
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public toArea CardArea
|
|
|
|
|
---@field public moveReason CardMoveReason
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public proposer? integer
|
|
|
|
|
---@field public skillName? string
|
|
|
|
|
---@field public moveVisible? boolean
|
|
|
|
|
---@field public specialName? string
|
|
|
|
|
---@field public specialVisible? boolean
|
|
|
|
|
---@field public drawPilePosition? integer @ 移至牌堆的索引位置,值为-1代表置入牌堆底,或者牌堆牌数+1也为牌堆底
|
2022-04-08 10:39:58 +00:00
|
|
|
|
|
2023-03-14 12:48:08 +00:00
|
|
|
|
---@class PindianResult
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public toCard Card
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public winner? ServerPlayer
|
2023-03-14 12:48:08 +00:00
|
|
|
|
|
2023-03-29 15:27:11 +00:00
|
|
|
|
--- 描述和一次体力变化有关的数据
|
2023-02-15 11:54:35 +00:00
|
|
|
|
---@class HpChangedData
|
2023-03-29 15:27:11 +00:00
|
|
|
|
---@field public num integer @ 体力变化量,可能是正数或者负数
|
2023-12-10 10:55:16 +00:00
|
|
|
|
---@field public shield_lost integer|nil
|
2023-03-29 15:27:11 +00:00
|
|
|
|
---@field public reason string @ 体力变化原因
|
|
|
|
|
---@field public skillName string @ 引起体力变化的技能名
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public damageEvent? DamageStruct @ 引起这次体力变化的伤害数据
|
|
|
|
|
---@field public preventDying? boolean @ 是否阻止本次体力变更流程引发濒死流程
|
2022-04-08 10:39:58 +00:00
|
|
|
|
|
2023-03-29 15:27:11 +00:00
|
|
|
|
--- 描述跟失去体力有关的数据
|
2023-02-15 11:54:35 +00:00
|
|
|
|
---@class HpLostData
|
2023-03-29 15:27:11 +00:00
|
|
|
|
---@field public num integer @ 失去体力的数值
|
|
|
|
|
---@field public skillName string @ 导致这次失去的技能名
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
|
|
|
|
---@alias DamageType integer
|
|
|
|
|
|
|
|
|
|
fk.NormalDamage = 1
|
|
|
|
|
fk.ThunderDamage = 2
|
|
|
|
|
fk.FireDamage = 3
|
2023-04-13 12:17:39 +00:00
|
|
|
|
fk.IceDamage = 4
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
2023-03-29 15:27:11 +00:00
|
|
|
|
--- DamageStruct 用来描述和伤害事件有关的数据。
|
2023-02-15 11:54:35 +00:00
|
|
|
|
---@class DamageStruct
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public from? ServerPlayer @ 伤害来源
|
2023-03-29 15:27:11 +00:00
|
|
|
|
---@field public to ServerPlayer @ 伤害目标
|
|
|
|
|
---@field public damage integer @ 伤害值
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public card? Card @ 造成伤害的牌
|
|
|
|
|
---@field public chain? boolean @ 伤害是否是铁索传导的伤害
|
|
|
|
|
---@field public damageType? DamageType @ 伤害的属性
|
|
|
|
|
---@field public skillName? string @ 造成本次伤害的技能名
|
|
|
|
|
---@field public beginnerOfTheDamage? boolean @ 是否是本次铁索传导的起点
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
2023-03-29 15:27:11 +00:00
|
|
|
|
--- 用来描述和回复体力有关的数据。
|
2023-02-15 11:54:35 +00:00
|
|
|
|
---@class RecoverStruct
|
2023-03-29 15:27:11 +00:00
|
|
|
|
---@field public who ServerPlayer @ 回复体力的角色
|
|
|
|
|
---@field public num integer @ 回复值
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public recoverBy? ServerPlayer @ 此次回复的回复来源
|
|
|
|
|
---@field public skillName? string @ 因何种技能而回复
|
|
|
|
|
---@field public card? Card @ 造成此次回复的卡牌
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
|
|
|
|
---@class DyingStruct
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public who integer
|
|
|
|
|
---@field public damage DamageStruct
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public ignoreDeath? boolean
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
|
|
|
|
---@class DeathStruct
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public who integer
|
|
|
|
|
---@field public damage DamageStruct
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
2023-12-03 10:45:25 +00:00
|
|
|
|
--- askForUseCard中的extra_data
|
|
|
|
|
---@class UseExtraData
|
2023-12-12 13:20:35 +00:00
|
|
|
|
---@field public must_targets? integer[] @ 必须选择这些目标?
|
|
|
|
|
---@field public include_targets? integer[] @ 必须选其中一个目标?
|
|
|
|
|
---@field public exclusive_targets? integer[] @ 只能选择这些目标?
|
2023-12-03 10:45:25 +00:00
|
|
|
|
---@field public bypass_distances? boolean @ 无距离限制?
|
|
|
|
|
---@field public bypass_times? boolean @ 无次数限制?
|
|
|
|
|
---@field public playing? boolean @ (AI专用) 出牌阶段?
|
|
|
|
|
|
2023-02-15 11:54:35 +00:00
|
|
|
|
---@class CardUseStruct
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public from integer
|
|
|
|
|
---@field public tos TargetGroup
|
|
|
|
|
---@field public card Card
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public toCard? Card
|
|
|
|
|
---@field public responseToEvent? CardUseStruct
|
|
|
|
|
---@field public nullifiedTargets? integer[]
|
|
|
|
|
---@field public extraUse? boolean
|
|
|
|
|
---@field public disresponsiveList? integer[]
|
|
|
|
|
---@field public unoffsetableList? integer[]
|
|
|
|
|
---@field public additionalDamage? integer
|
|
|
|
|
---@field public additionalRecover? integer
|
|
|
|
|
---@field public customFrom? integer
|
|
|
|
|
---@field public cardsResponded? Card[]
|
|
|
|
|
---@field public prohibitedCardNames? string[]
|
|
|
|
|
---@field public damageDealt? table<PlayerId, number>
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
|
|
|
|
---@class AimStruct
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public from integer
|
|
|
|
|
---@field public card Card
|
|
|
|
|
---@field public tos AimGroup
|
|
|
|
|
---@field public to integer
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public subTargets? integer[]
|
|
|
|
|
---@field public targetGroup? TargetGroup
|
|
|
|
|
---@field public nullifiedTargets? integer[]
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public firstTarget boolean
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public additionalDamage? integer
|
|
|
|
|
---@field public additionalRecover? integer
|
|
|
|
|
---@field public disresponsive? boolean
|
|
|
|
|
---@field public unoffsetableList? boolean
|
|
|
|
|
---@field public additionalResponseTimes? table<string, integer>|integer
|
|
|
|
|
---@field public fixedAddTimesResponsors? integer[]
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
|
|
|
|
---@class CardEffectEvent
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public from integer
|
|
|
|
|
---@field public to integer
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public subTargets? integer[]
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public tos TargetGroup
|
|
|
|
|
---@field public card Card
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public toCard? Card
|
|
|
|
|
---@field public responseToEvent? CardEffectEvent
|
|
|
|
|
---@field public nullifiedTargets? integer[]
|
|
|
|
|
---@field public extraUse? boolean
|
|
|
|
|
---@field public disresponsiveList? integer[]
|
|
|
|
|
---@field public unoffsetableList? integer[]
|
|
|
|
|
---@field public additionalDamage? integer
|
|
|
|
|
---@field public additionalRecover? integer
|
|
|
|
|
---@field public customFrom? integer
|
|
|
|
|
---@field public cardsResponded? Card[]
|
|
|
|
|
---@field public disresponsive? boolean
|
|
|
|
|
---@field public unoffsetable? boolean
|
|
|
|
|
---@field public isCancellOut? boolean
|
|
|
|
|
---@field public fixedResponseTimes? table<string, integer>|integer
|
|
|
|
|
---@field public fixedAddTimesResponsors? integer[]
|
|
|
|
|
---@field public prohibitedCardNames? string[]
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
|
|
|
|
---@class SkillEffectEvent
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public from integer
|
|
|
|
|
---@field public tos integer[]
|
|
|
|
|
---@field public cards integer[]
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
|
|
|
|
---@class JudgeStruct
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public who ServerPlayer
|
|
|
|
|
---@field public card Card
|
|
|
|
|
---@field public reason string
|
|
|
|
|
---@field public pattern string
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public skipDrop? boolean
|
2023-02-15 11:54:35 +00:00
|
|
|
|
|
|
|
|
|
---@class CardResponseEvent
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public from integer
|
|
|
|
|
---@field public card Card
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public responseToEvent? CardEffectEvent
|
|
|
|
|
---@field public skipDrop? boolean
|
|
|
|
|
---@field public customFrom? integer
|
2022-12-20 10:40:17 +00:00
|
|
|
|
|
2023-03-05 17:07:54 +00:00
|
|
|
|
---@class AskForCardUse
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public user ServerPlayer
|
|
|
|
|
---@field public cardName string
|
|
|
|
|
---@field public pattern string
|
|
|
|
|
---@field public result CardUseStruct
|
2023-03-05 17:07:54 +00:00
|
|
|
|
|
|
|
|
|
---@class AskForCardResponse
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public user ServerPlayer
|
|
|
|
|
---@field public cardName string
|
|
|
|
|
---@field public pattern string
|
|
|
|
|
---@field public result Card
|
2023-03-05 17:07:54 +00:00
|
|
|
|
|
2022-09-14 05:01:10 +00:00
|
|
|
|
---@alias CardMoveReason integer
|
2022-04-08 10:39:58 +00:00
|
|
|
|
|
|
|
|
|
fk.ReasonJustMove = 1
|
|
|
|
|
fk.ReasonDraw = 2
|
|
|
|
|
fk.ReasonDiscard = 3
|
|
|
|
|
fk.ReasonGive = 4
|
|
|
|
|
fk.ReasonPut = 5
|
|
|
|
|
fk.ReasonPutIntoDiscardPile = 6
|
|
|
|
|
fk.ReasonPrey = 7
|
|
|
|
|
fk.ReasonExchange = 8
|
2022-04-30 07:27:56 +00:00
|
|
|
|
fk.ReasonUse = 9
|
|
|
|
|
fk.ReasonResonpse = 10
|
2023-06-04 11:40:14 +00:00
|
|
|
|
fk.ReasonJudge = 11
|
2023-12-06 13:08:56 +00:00
|
|
|
|
fk.ReasonRecast = 12
|
2022-04-08 10:39:58 +00:00
|
|
|
|
|
2023-02-21 05:44:24 +00:00
|
|
|
|
---@class PindianStruct
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public from ServerPlayer
|
|
|
|
|
---@field public tos ServerPlayer[]
|
|
|
|
|
---@field public fromCard Card
|
|
|
|
|
---@field public results table<integer, PindianResult>
|
|
|
|
|
---@field public reason string
|
2023-02-21 05:44:24 +00:00
|
|
|
|
|
2023-02-15 11:54:35 +00:00
|
|
|
|
---@class LogMessage
|
2023-03-26 09:32:45 +00:00
|
|
|
|
---@field public type string
|
2023-12-03 11:35:14 +00:00
|
|
|
|
---@field public from? integer
|
|
|
|
|
---@field public to? integer[]
|
|
|
|
|
---@field public card? integer[]
|
|
|
|
|
---@field public arg? any
|
|
|
|
|
---@field public arg2? any
|
|
|
|
|
---@field public arg3? any
|
2023-05-13 06:20:34 +00:00
|
|
|
|
|
|
|
|
|
---@class SkillUseStruct
|
|
|
|
|
---@field public skill Skill
|
|
|
|
|
---@field public willUse boolean
|
|
|
|
|
|
|
|
|
|
---@class DrawCardStruct
|
|
|
|
|
---@field public who ServerPlayer
|
|
|
|
|
---@field public num number
|
|
|
|
|
---@field public skillName string
|
|
|
|
|
---@field public fromPlace "top"|"bottom"
|