From da37ca690ea0315134312eb622d7044851c17dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=AE=87=E5=AE=87?= <3061196825@qq.com> Date: Sat, 14 Sep 2024 22:30:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/niuniu/main.go | 1 + plugin/niuniu/utils.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/plugin/niuniu/main.go b/plugin/niuniu/main.go index bc02af71aa..6cdc4c6614 100644 --- a/plugin/niuniu/main.go +++ b/plugin/niuniu/main.go @@ -355,6 +355,7 @@ func init() { j := fmt.Sprintf("%d_%d", gid, adduser) count, ok := jjCount.Load(j) var c lastLength + // 按照第一次jj时的时间计算,超过45分钟则重置 if !ok { c = lastLength{ TimeLimit: time.Now(), diff --git a/plugin/niuniu/utils.go b/plugin/niuniu/utils.go index 0821a749cf..3699258f7f 100644 --- a/plugin/niuniu/utils.go +++ b/plugin/niuniu/utils.go @@ -118,6 +118,7 @@ func purchaseItem(n int, info userInfo, uid int64) (*userInfo, int, error) { return u, money, nil } +// useWeiGe 使用道具伟哥 func useWeiGe(niuniu float64) (string, float64) { reduce := math.Abs(hitGlue(niuniu)) niuniu += reduce @@ -128,6 +129,7 @@ func useWeiGe(niuniu float64) (string, float64) { }), niuniu } +// usePhilter 使用道具媚药 func usePhilter(niuniu float64) (string, float64) { reduce := math.Abs(hitGlue(niuniu)) niuniu -= reduce @@ -138,6 +140,7 @@ func usePhilter(niuniu float64) (string, float64) { }), niuniu } +// useArtifact 使用道具击剑神器 func useArtifact(myLength, adduserniuniu float64) (string, float64, float64) { difference := myLength - adduserniuniu var ( @@ -158,6 +161,7 @@ func useArtifact(myLength, adduserniuniu float64) (string, float64, float64) { }), myLength, adduserniuniu - change/1.3 } +// useShenJi 使用道具击剑神稽 func useShenJi(myLength, adduserniuniu float64) (string, float64, float64) { difference := myLength - adduserniuniu var (