From 97f426ff354f98388ee6b27eb2074cb45b4313de Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 17 Feb 2023 11:58:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E5=8F=B0=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=89=93=E9=80=A0=E4=B8=A4=E4=BB=B6=E8=A3=85=E5=A4=87?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_drawcard.json | 297 ++------------------------------- comm/const.go | 9 + modules/hero/configure_comp.go | 2 + modules/smithy/model_stove.go | 31 +++- 4 files changed, 57 insertions(+), 282 deletions(-) diff --git a/bin/json/game_drawcard.json b/bin/json/game_drawcard.json index 04c7ab53c..b50ced312 100644 --- a/bin/json/game_drawcard.json +++ b/bin/json/game_drawcard.json @@ -5,7 +5,7 @@ "card_pool_type": "base_pool1", "star": 3, "race": 1, - "id": "24004", + "id": "15005", "weight": 1000 }, { @@ -14,7 +14,7 @@ "card_pool_type": "base_pool1", "star": 4, "race": 1, - "id": "24004", + "id": "15005", "weight": 1000 }, { @@ -23,7 +23,7 @@ "card_pool_type": "base_pool1", "star": 5, "race": 1, - "id": "24004", + "id": "15005", "weight": 1000 }, { @@ -32,7 +32,7 @@ "card_pool_type": "base_pool2", "star": 3, "race": 1, - "id": "25001", + "id": "24005", "weight": 1000 }, { @@ -41,7 +41,7 @@ "card_pool_type": "base_pool2", "star": 4, "race": 1, - "id": "25001", + "id": "24005", "weight": 1000 }, { @@ -50,7 +50,7 @@ "card_pool_type": "base_pool2", "star": 5, "race": 1, - "id": "25001", + "id": "24005", "weight": 1000 }, { @@ -59,7 +59,7 @@ "card_pool_type": "base_pool3", "star": 3, "race": 1, - "id": "25004", + "id": "14001", "weight": 1000 }, { @@ -68,7 +68,7 @@ "card_pool_type": "base_pool3", "star": 4, "race": 1, - "id": "25004", + "id": "14001", "weight": 1000 }, { @@ -77,7 +77,7 @@ "card_pool_type": "base_pool3", "star": 5, "race": 1, - "id": "25004", + "id": "14001", "weight": 1000 }, { @@ -86,7 +86,7 @@ "card_pool_type": "base_pool4", "star": 3, "race": 1, - "id": "24008", + "id": "14003", "weight": 1000 }, { @@ -95,7 +95,7 @@ "card_pool_type": "base_pool4", "star": 4, "race": 1, - "id": "24008", + "id": "14003", "weight": 1000 }, { @@ -104,7 +104,7 @@ "card_pool_type": "base_pool4", "star": 5, "race": 1, - "id": "24008", + "id": "14003", "weight": 1000 }, { @@ -113,7 +113,7 @@ "card_pool_type": "base_pool5", "star": 3, "race": 1, - "id": "24003", + "id": "35006", "weight": 1000 }, { @@ -122,7 +122,7 @@ "card_pool_type": "base_pool5", "star": 4, "race": 1, - "id": "24003", + "id": "35006", "weight": 1000 }, { @@ -131,7 +131,7 @@ "card_pool_type": "base_pool5", "star": 5, "race": 1, - "id": "24003", + "id": "35006", "weight": 1000 }, { @@ -140,7 +140,7 @@ "card_pool_type": "base_pool6", "star": 3, "race": 1, - "id": "44002", + "id": "34007", "weight": 1000 }, { @@ -149,7 +149,7 @@ "card_pool_type": "base_pool6", "star": 4, "race": 1, - "id": "44002", + "id": "34007", "weight": 1000 }, { @@ -158,268 +158,7 @@ "card_pool_type": "base_pool6", "star": 5, "race": 1, - "id": "44002", - "weight": 1000 - }, - { - "key": 19, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 4, - "race": 3, - "id": "34006", - "weight": 1000 - }, - { - "key": 20, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 5, - "race": 4, - "id": "45003", - "weight": 1000 - }, - { - "key": 21, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 4, - "race": 4, - "id": "44005", - "weight": 1000 - }, - { - "key": 22, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 4, - "race": 1, - "id": "14003", - "weight": 1000 - }, - { - "key": 23, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 5, - "race": 1, - "id": "15005", - "weight": 1000 - }, - { - "key": 24, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 4, - "race": 2, - "id": "24003", - "weight": 1000 - }, - { - "key": 25, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 4, - "race": 2, - "id": "24008", - "weight": 1000 - }, - { - "key": 26, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 5, - "race": 2, - "id": "25001", - "weight": 1000 - }, - { - "key": 27, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 5, - "race": 2, - "id": "25004", - "weight": 1000 - }, - { - "key": 28, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 5, - "race": 3, - "id": "35006", - "weight": 1000 - }, - { - "key": 29, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 4, - "race": 4, - "id": "44002", - "weight": 1000 - }, - { - "key": 30, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 3, - "race": 2, - "id": "24002", - "weight": 1000 - }, - { - "key": 31, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 4, - "race": 2, - "id": "24004", - "weight": 1000 - }, - { - "key": 32, - "recruitment_type": 1, - "card_pool_type": "base_pool2", - "star": 5, - "race": 2, - "id": "35001", - "weight": 1000 - }, - { - "key": 33, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 3, - "race": 1, - "id": "13003", - "weight": 1000 - }, - { - "key": 34, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 4, - "race": 4, - "id": "44006", - "weight": 1000 - }, - { - "key": 35, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 5, - "race": 2, - "id": "35001", - "weight": 1000 - }, - { - "key": 36, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 4, - "race": 4, - "id": "44005", - "weight": 1000 - }, - { - "key": 37, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 5, - "race": 1, - "id": "15004", - "weight": 1000 - }, - { - "key": 38, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 3, - "race": 2, - "id": "24002", - "weight": 1000 - }, - { - "key": 39, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 4, - "race": 4, - "id": "45003", - "weight": 1000 - }, - { - "key": 40, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 4, - "race": 1, - "id": "14003", - "weight": 1000 - }, - { - "key": 41, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 5, - "race": 1, - "id": "15005", - "weight": 1000 - }, - { - "key": 42, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 4, - "race": 2, - "id": "24003", - "weight": 1000 - }, - { - "key": 43, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 4, - "race": 2, - "id": "24004", - "weight": 1000 - }, - { - "key": 44, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 5, - "race": 2, - "id": "25004", - "weight": 1000 - }, - { - "key": 45, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 4, - "race": 3, - "id": "34006", - "weight": 1000 - }, - { - "key": 46, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 5, - "race": 2, - "id": "25001", - "weight": 1000 - }, - { - "key": 47, - "recruitment_type": 1, - "card_pool_type": "base_pool6", - "star": 4, - "race": 1, - "id": "14007", + "id": "34007", "weight": 1000 }, { diff --git a/comm/const.go b/comm/const.go index 3c1c9711c..c1c5d2d6e 100644 --- a/comm/const.go +++ b/comm/const.go @@ -732,4 +732,13 @@ const ( SmithyReelType2 = 2 // 材料消耗减少 SmithyReelType3 = 3 // 解锁图纸【紫金雷神锤】 SmithyReelType4 = 4 + SmithyReelType5 = 5 // 概率制造两件装备 +) + +const ( + SmithyToolsSkill1 = 1 // 史诗品质概率提升 + SmithyToolsSkill2 = 2 // 所有装备售价提升 + SmithyToolsSkill3 = 3 // 所有图纸炉温消耗减少 + SmithyToolsSkill4 = 4 // 每日顾客数量提升至{0}人 + SmithyToolsSkill5 = 5 // 顾客购买装备数量上限提高至{0}件 ) diff --git a/modules/hero/configure_comp.go b/modules/hero/configure_comp.go index 4e0a7928a..37baee464 100644 --- a/modules/hero/configure_comp.go +++ b/modules/hero/configure_comp.go @@ -140,6 +140,8 @@ func (this *configureComp) SetHeroDrawConfig() { err = fmt.Errorf("%T no is *cfg.Game_drawCard", v) return } else { + this.hlock.Lock() + defer this.hlock.Unlock() for _, v := range _configure.GetDataList() { if _, ok := this.drawCardCfg[v.CardPoolType]; !ok { this.drawCardCfg[v.CardPoolType] = make(map[int32][]*cfg.GameDrawCardData, 0) diff --git a/modules/smithy/model_stove.go b/modules/smithy/model_stove.go index 4fd071481..62d0edf41 100644 --- a/modules/smithy/model_stove.go +++ b/modules/smithy/model_stove.go @@ -8,7 +8,9 @@ import ( "go_dreamfactory/pb" "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" + "math/rand" "strconv" + "time" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" @@ -66,15 +68,38 @@ func (this *modelStove) updateSmithyStove(uid string, update map[string]interfac func (this *modelStove) CheckTemperature(reelId int32, lv int32) (t int32) { var index int32 for index = 1; index <= lv; index++ { - if cfg := this.module.configure.GetSmithyProficileData(reelId, index); cfg != nil { - if cfg.Type == comm.SmithyReelType1 { - t += cfg.Value1 + if cfgData := this.module.configure.GetSmithyProficileData(reelId, index); cfgData != nil { + if cfgData.Type == comm.SmithyReelType1 { + t += cfgData.Value1 } } } return } +// 检查额外概率制造两件装备 +func (this *modelStove) CheckForgetwoEquip(reelId int32, lv int32) (b bool) { + var ( + index int32 + value int32 + ) + for index = 1; index <= lv; index++ { + if cfgData := this.module.configure.GetSmithyProficileData(reelId, index); cfgData != nil { + if cfgData.Type == comm.SmithyReelType5 { + value += cfgData.Value1 + } + } + } + if value > 0 { + rand.Seed(time.Now().UnixNano()) + if value < int32(rand.Intn(100)) { + return true + } + } + + return false +} + // 检查消耗减少 func (this *modelStove) CheckForgeConsume(reelId int32, lv int32) (atn []*cfg.Gameatn) { var index int32