chapter.go 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. package model
  2. // 章节类型
  3. // 多人 多人主线 单人主线 PVP
  4. const (
  5. LevelTypeCooperation = 1
  6. LevelTypeMainMulti = 2
  7. LevelTypeMainSingle = 3
  8. LevelTypePVP = 4
  9. )
  10. func CombineLevelId(typ int64, chapter int64, level int64) int64 {
  11. id := typ*100000 + chapter*100 + level
  12. return id
  13. }
  14. // type LevelListItem struct {
  15. // 关卡列表-LevelList exported from 关卡配置.xlsx
  16. type LevelListItem struct {
  17. Uid int64 `json:"Uid"` // 关卡编号 每个关卡都有一个唯一编号
  18. Type int64 `json:"Type"` // 关卡类型 1:多人 2:多人主线 3:单人主线 4:PVP
  19. Name string `json:"Name"` // 关卡名字
  20. Chapter int64 `json:"Chapter"` // 所属大章
  21. Level int64 `json:"Level"` // 本章排序 (小章节ID)
  22. Unlock [][]int64 `json:"Unlock"` // 解锁条件 [类型,数值] 1--玩家等级 2--通关前置章节
  23. WaveNum int64 `json:"WaveNum"` // 关卡总波数
  24. Cost [][]int64 `json:"Cost"` // 关卡消耗
  25. IconRes string `json:"IconRes"` // 入口怪物资源
  26. Map string `json:"Map"` // 调用场景
  27. MapGrid []int64 `json:"MapGrid"` // 地图网格 【横格子数,竖格子数】 服务端用来计算中心点,水晶系统相关
  28. CorePos [][]int64 `json:"CorePos"` // 要塞所在格子坐标 最左上角开始算 【【格子x坐标,格子y坐标】】
  29. RepelPos [][]int64 `json:"RepelPos"` // 水晶不能生成格子 最左上角开始算 【【格子x坐标,格子y坐标】】
  30. WavePlan int64 `json:"WavePlan"` // 每关波数组号
  31. ConnectUp int64 `json:"ConnectUp"` // 连接上限提升组
  32. Restore float64 `json:"Restore"` // 要塞恢复 基础治疗力比例 小数
  33. RestoreUse []int64 `json:"RestoreUse"` // 要塞恢复消耗 【基础消耗,每次增加】 消耗幸运币
  34. CrystalGroup []int64 `json:"CrystalGroup"` // 小水晶出现逻辑 【基础水晶数,水晶随机组】
  35. Time int64 `json:"Time"` // 准备时间 秒
  36. PosPlan int64 `json:"PosPlan"` // 坐标点组号
  37. RandomPlan int64 `json:"RandomPlan"` // 刷新规则策略 读取刷新策略表组号
  38. InitGold int64 `json:"InitGold"` // 初始银币数 整数
  39. InitUse int64 `json:"InitUse"` // 初始刷新消耗 整数
  40. UseUp int64 `json:"UseUp"` // 刷新消耗成长 整数
  41. ResetTime int64 `json:"ResetTime"` // 重置时间 /天 -1:不会重置
  42. CycleAward int64 `json:"CycleAward"` // 合作关卡周期奖励 重置时间达到时将重置该部分奖励
  43. FirstAward int64 `json:"FirstAward"` // 首通奖励 掉落组ID(0代表无)
  44. Award int64 `json:"Award"` // 掉落奖励组 波数掉落组合-RewardMix 中的ID
  45. Preview [][]int64 `json:"Preview"` // 奖励预览
  46. BossDet []int64 `json:"BossDet"` // 关卡BOSS详情
  47. MonsterDet []int64 `json:"MonsterDet"` // 关卡小怪详情
  48. } // package model
  49. // 关卡每波组合-LevelWavePlan exported from 关卡配置.xlsx
  50. type LevelWavePlan struct {
  51. Uid int64 `json:"Uid"` // 唯一编号
  52. GroupId int64 `json:"GroupId"` // 所属组号
  53. Wave int64 `json:"Wave"` // 波数编号
  54. Time int64 `json:"Time"` // 单波总时间
  55. MonsterGroupId int64 `json:"MonsterGroupId"` // 每波出怪策略组号
  56. Level float64 `json:"Level"` // 怪物成长等级
  57. Pen int64 `json:"Pen"` // 每波全局穿透
  58. Countdown int64 `json:"Countdown"` // 结束倒计时 普通:3秒 结尾:0秒
  59. Award [][]int64 `json:"Award"` // 提前结束奖励
  60. } // package model
  61. // 出怪策略组-LevelMonsterPlan exported from 关卡配置.xlsx
  62. type LevelMonsterPlan struct {
  63. Uid int64 `json:"Uid"` // 唯一编号
  64. GroupId int64 `json:"GroupId"` // 策略组号
  65. Id int64 `json:"Id"` // 小编号
  66. MonsterUid int64 `json:"MonsterUid"` // 怪物ID
  67. Interval int64 `json:"Interval"` // 生成间隔时间 秒 可以小数值 生成下一个的间隔
  68. Delay int64 `json:"Delay"` // 延迟生成时间 秒 每波开头时的只针对第一只怪的延迟
  69. PosList []int64 `json:"PosList"` // 生成坐标点编号列表 对应出怪坐标点配置中的坐标点编号
  70. Award [][]int64 `json:"Award"` // 怪物死亡奖励货币 [[道具id,数量]]
  71. } // package model
  72. // 出怪坐标点-LevelPosPlan exported from 关卡配置.xlsx
  73. type LevelPosPlan struct {
  74. Uid int64 `json:"Uid"` // 唯一ID
  75. GroupId int64 `json:"GroupId"` // 组号
  76. PosId int64 `json:"PosId"` // 坐标点编号
  77. Angle int64 `json:"Angle"` // 角度
  78. Range int64 `json:"Range"` // 离中心距离 像素数
  79. } // package model
  80. // 刷新策略组-LevelEnhancePlan exported from 关卡配置.xlsx
  81. type LevelEnhancePlan struct {
  82. Uid int64 `json:"Uid"` // 唯一编号
  83. GroupId int64 `json:"GroupId"` // 组编号
  84. Level int64 `json:"Level"` // 等级
  85. Quality int64 `json:"Quality"` // 品质 1:1 2:2 3:3 4:4
  86. Weight int64 `json:"Weight"` // 出现权重
  87. } // package model
  88. // 连接上限提升-LevelConnectUp exported from 关卡配置.xlsx
  89. type LevelConnectUp struct {
  90. Uid int64 `json:"Uid"` // 唯一编号
  91. GroupId int64 `json:"GroupId"` // 组编号
  92. Level int64 `json:"Level"` // 等级
  93. UpNum int64 `json:"UpNum"` // 提升数量
  94. Use int64 `json:"Use"` // 消耗幸运币
  95. }
  96. // 关卡进度奖励-ProgressReward exported from 关卡进度奖励.xlsx
  97. // type ProgressReward struct {
  98. // Uid int64 `json:"Uid"` // 关卡编号 每个关卡都有一个唯一编号
  99. // WaveNum int64 `json:"WaveNum"` // 波数
  100. // FirstReward [][]int64 `json:"FirstReward"` // 首通奖励列表 【【道具ID,数量】】
  101. // CycleReward [][]int64 `json:"CycleReward"` // 循环奖励列表 【【道具ID,数量】】
  102. // }
  103. // 波数掉落组合-RewardMix exported from 掉落相关配置.xlsx
  104. type RewardMix struct {
  105. Uid int64 `json:"Uid"` // 唯一ID
  106. GroupID int64 `json:"GroupID"` // 组号
  107. Inning int64 `json:"Inning"` // 波数
  108. FixedForm int64 `json:"FixedForm"` // 固定掉落组 固定掉落组号
  109. RandomForm [][]int64 `json:"RandomForm"` // 随机掉落组 【【随机掉落组号,随机次数】】
  110. SelectForm int64 `json:"SelectForm"` // 自选掉落组 自选掉落组号
  111. }
  112. // 固定掉落组-RewardFixed exported from 掉落相关配置.xlsx
  113. type RewardFixed struct {
  114. GroupID int64 `json:"GroupID"` // 掉落组号
  115. Type int64 `json:"Type"` // 道具类型 1:普通道具 2:装备类 3;铭文类型 4;道具宝箱
  116. ItemID int64 `json:"ItemID"` // 道具ID
  117. Num int64 `json:"Num"` // 道具数量
  118. } // package model
  119. // 随机掉落组-RewardRandom exported from 掉落相关配置.xlsx
  120. type RewardRandom struct {
  121. GroupID int64 `json:"GroupID"` // 掉落组号
  122. Type int64 `json:"Type"` // 道具类型 1:普通道具 2:装备类 3;铭文类型 4;道具宝箱
  123. ItemID int64 `json:"ItemID"` // 道具ID
  124. Num int64 `json:"Num"` // 道具数量
  125. Weight int64 `json:"Weight"` // 权重
  126. } // package model
  127. // 自选掉落组-SelectRandom exported from 掉落相关配置.xlsx
  128. type SelectRandom struct {
  129. GroupID int64 `json:"GroupID"` // 掉落组号
  130. Type int64 `json:"Type"` // 道具类型 1:普通道具 2:装备类 3;铭文类型 4;道具宝箱
  131. ItemID int64 `json:"ItemID"` // 道具ID
  132. Num int64 `json:"Num"` // 道具数量
  133. }