chapter.go 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. func SplitLevelId2(levelId int64) (typ int64, chapterLevel int64) {
  15. chapterLevel = levelId % 100000
  16. typ = levelId / 100000
  17. return
  18. }
  19. func SplitLevelId3(levelId int64) (typ int64, chapter, Level int64) {
  20. chapterLevel := levelId % 100000
  21. chapter = chapterLevel / 100
  22. Level = chapterLevel % 100
  23. typ = levelId / 100000
  24. return
  25. }
  26. // type LevelListItem struct {
  27. // 关卡列表-LevelList exported from 关卡配置.xlsx
  28. type LevelListItem struct {
  29. Uid int64 `json:"Uid"` // 关卡编号 每个关卡都有一个唯一编号
  30. Type int64 `json:"Type"` // 关卡类型 1:多人 2:多人主线 3:单人主线 4:PVP
  31. Name string `json:"Name"` // 关卡名字
  32. UnlockTime int64 `json:"UnlockTime"` // 关卡开启时间(天) 每个服务器单独计算 0--无时间限制 数值--代表开服后X天开启
  33. Chapter int64 `json:"Chapter"` // 所属大章
  34. Level int64 `json:"Level"` // 本章排序 (小章节ID)
  35. Unlock [][]int64 `json:"Unlock"` // 解锁条件 [类型,数值] 1--玩家等级 2--通关前置章节
  36. WaveNum int64 `json:"WaveNum"` // 关卡总波数 控制最大波数
  37. Cost [][]int64 `json:"Cost"` // 关卡消耗
  38. IconRes string `json:"IconRes"` // 入口怪物资源
  39. Map int64 `json:"Map"` // 调用场景 场景配置中ID
  40. WavePlan int64 `json:"WavePlan"` // 每关波数组号
  41. ConnectBaseMax int64 `json:"ConnectBaseMax"` // 基础连接上限 等级
  42. ConnectUp int64 `json:"ConnectUp"` // 连接上限提升组
  43. Restore float64 `json:"Restore"` // 要塞恢复 基础治疗力比例 小数
  44. RestoreUse []int64 `json:"RestoreUse"` // 要塞恢复消耗 【基础消耗,每次增加】 消耗幸运币
  45. CrystalGroup []int64 `json:"CrystalGroup"` // 小水晶出现逻辑 【基础水晶数,水晶随机组】
  46. Time int64 `json:"Time"` // 准备时间 动画效果、镜头表现等都在这里 秒
  47. PosPlan int64 `json:"PosPlan"` // 坐标点组号
  48. RandomPlanBase int64 `json:"RandomPlanBase"` // 刷新等级提升上限 基础
  49. RandomPlan int64 `json:"RandomPlan"` // 刷新规则策略 读取刷新策略表组号
  50. InitGold int64 `json:"InitGold"` // 初始银币数 整数
  51. InitUse int64 `json:"InitUse"` // 初始刷新消耗 整数
  52. UseUp int64 `json:"UseUp"` // 刷新消耗成长 整数
  53. ResetTime int64 `json:"ResetTime"` // 重置时间 /天 -1:不会重置
  54. CycleAward int64 `json:"CycleAward"` // 合作关卡周期奖励 重置时间达到时将重置该部分奖励
  55. FirstAward int64 `json:"FirstAward"` // 首通奖励 掉落组ID(0代表无) 波数掉落组合-RewardMix 中的ID
  56. Award int64 `json:"Award"` // 掉落奖励组 波数掉落组合-RewardMix 中的ID
  57. } // package model
  58. // 关卡每波组合-LevelWavePlan exported from 关卡配置.xlsx
  59. type LevelWavePlan struct {
  60. Uid int64 `json:"Uid"` // 唯一编号
  61. GroupId int64 `json:"GroupId"` // 所属组号
  62. Wave int64 `json:"Wave"` // 波数编号
  63. Time int64 `json:"Time"` // 每波整备时间、每波先整备后战斗 /秒
  64. MonsterGroupId int64 `json:"MonsterGroupId"` // 每波出怪策略组号
  65. OrdinaryHpUp float64 `json:"OrdinaryHpUp"` // 小怪血量成长
  66. OrdinaryAntUp float64 `json:"OrdinaryAntUp"` // 小怪攻击成长
  67. EliteHpUp float64 `json:"EliteHpUp"` // 精英血量成长
  68. EliteAntUp float64 `json:"EliteAntUp"` // 精英攻击成长
  69. BOSSHpUp float64 `json:"BOSSHpUp"` // BOSS血量成长
  70. BOSSAntUp float64 `json:"BOSSAntUp"` // BOSS攻击成长
  71. Pen int64 `json:"Pen"` // 每波全局穿透
  72. RageInterval []int64 `json:"RageInterval"` // 怪物狂暴 [时间长度,攻击力倍数]
  73. FightTime int64 `json:"FightTime"` // 战斗时间限制 /秒 超过此时间则直接战斗结束 -1:永久
  74. HeroGroupId []int64 `json:"HeroGroupId"` // 本波开始时 英雄赠送策略 0:不可刷新 1:可以刷新 【随机组号,是否可以刷新】
  75. } // package model
  76. // 出怪策略组-LevelMonsterPlan exported from 关卡配置.xlsx
  77. type LevelMonsterPlan struct {
  78. Uid int64 `json:"Uid"` // 唯一编号
  79. MonsterUid int64 `json:"MonsterUid"` // 怪物ID
  80. Award [][]int64 `json:"Award"` // 怪物死亡奖励货币 [[道具id,数量]] 15001:银币 15002:幸运币
  81. } // package model
  82. // 出怪坐标点-LevelPosPlan exported from 关卡配置.xlsx
  83. type LevelPosPlan struct {
  84. } // package model
  85. // 刷新策略组-LevelEnhancePlan exported from 关卡配置.xlsx
  86. type LevelEnhancePlan struct {
  87. Uid int64 `json:"Uid"` // 唯一编号
  88. GroupId int64 `json:"GroupId"` // 组编号
  89. Level int64 `json:"Level"` // 等级
  90. Quality int64 `json:"Quality"` // 英雄等级
  91. Weight int64 `json:"Weight"` // 出现权重
  92. Consume int64 `json:"Consume"` // 消耗银币数
  93. } // package model
  94. // 赠送英雄策略-LevelHeroRandom exported from 关卡配置.xlsx
  95. type LevelHeroRandom struct {
  96. Uid int64 `json:"Uid"` // 唯一ID
  97. GroupId int64 `json:"GroupId"` // 组号
  98. HeroId int64 `json:"HeroId"` // 英雄ID
  99. Rank int64 `json:"Rank"` // 等级
  100. Weight int64 `json:"Weight"` // 权重
  101. } // package model
  102. // 关卡内强化策略-LevelStrengthen exported from 关卡配置.xlsx
  103. type LevelStrengthen struct {
  104. Uid int64 `json:"Uid"` // 唯一ID
  105. Type int64 `json:"Type"` // 类型 1:基础英雄 2:神话英雄
  106. Grade int64 `json:"Grade"` // 等级
  107. Consume []int64 `json:"Consume"` // 强化消耗 【道具ID,数量】 15001:银币 15002:幸运币
  108. Addition float64 `json:"Addition"` // 强化倍率
  109. } // package model
  110. // 祈愿策略-LevelPrayers exported from 关卡配置.xlsx
  111. type LevelPrayers struct {
  112. Type int64 `json:"Type"` // 类型
  113. Grade int64 `json:"Grade"` // 出现的 英雄等级 -1:不出现
  114. Weight int64 `json:"Weight"` // 权重
  115. } // package model
  116. // 连接上限提升-LevelConnectUp exported from 关卡配置.xlsx
  117. type LevelConnectUp struct {
  118. Uid int64 `json:"Uid"` // 唯一编号
  119. GroupId int64 `json:"GroupId"` // 组编号
  120. Level int64 `json:"Level"` // 等级
  121. UpNum int64 `json:"UpNum"` // 提升数量
  122. Use int64 `json:"Use"` // 消耗幸运币
  123. }
  124. // 关卡进度奖励-ProgressReward exported from 关卡进度奖励.xlsx
  125. // type ProgressReward struct {
  126. // Uid int64 `json:"Uid"` // 关卡编号 每个关卡都有一个唯一编号
  127. // WaveNum int64 `json:"WaveNum"` // 波数
  128. // FirstReward [][]int64 `json:"FirstReward"` // 首通奖励列表 【【道具ID,数量】】
  129. // CycleReward [][]int64 `json:"CycleReward"` // 循环奖励列表 【【道具ID,数量】】
  130. // }
  131. // 波数掉落组合-RewardMix exported from 掉落相关配置.xlsx
  132. type RewardMix struct {
  133. Uid int64 `json:"Uid"` // 唯一ID
  134. GroupID int64 `json:"GroupID"` // 组号
  135. Inning int64 `json:"Inning"` // 波数
  136. FixedForm int64 `json:"FixedForm"` // 固定掉落组 固定掉落组号
  137. RandomForm [][]int64 `json:"RandomForm"` // 随机掉落组 【【随机掉落组号,随机次数】】
  138. SelectForm int64 `json:"SelectForm"` // 自选掉落组 自选掉落组号
  139. }
  140. // 固定掉落组-RewardFixed exported from 掉落相关配置.xlsx
  141. type RewardFixed struct {
  142. GroupID int64 `json:"GroupID"` // 掉落组号
  143. Type int64 `json:"Type"` // 道具类型 1:普通道具 2:装备类 3;铭文类型 4;道具宝箱
  144. ItemID int64 `json:"ItemID"` // 道具ID
  145. Num int64 `json:"Num"` // 道具数量
  146. } // package model
  147. // 随机掉落组-RewardRandom exported from 掉落相关配置.xlsx
  148. type RewardRandom struct {
  149. GroupID int64 `json:"GroupID"` // 掉落组号
  150. Type int64 `json:"Type"` // 道具类型 1:普通道具 2:装备类 3;铭文类型 4;道具宝箱
  151. ItemID int64 `json:"ItemID"` // 道具ID
  152. Num int64 `json:"Num"` // 道具数量
  153. Weight int64 `json:"Weight"` // 权重
  154. } // package model
  155. // 自选掉落组-SelectRandom exported from 掉落相关配置.xlsx
  156. type SelectRandom struct {
  157. GroupID int64 `json:"GroupID"` // 掉落组号
  158. Type int64 `json:"Type"` // 道具类型 1:普通道具 2:装备类 3;铭文类型 4;道具宝箱
  159. ItemID int64 `json:"ItemID"` // 道具ID
  160. Num int64 `json:"Num"` // 道具数量
  161. }