@@ -63,7 +63,10 @@ func init() {
6363 msg = append (msg , message .Text ("[" , i , "] " , info .Equip , " : 耐" , info .Durable , "/修" , info .Maintenance ,
6464 "/诱" , enchantLevel [info .Induce ], "/眷顾" , enchantLevel [info .Favor ], "\n " ))
6565 }
66- msg = append (msg , message .Text ("————————\n 输入对应序号进行装备,或回复“取消”取消" ))
66+ msg = append (msg , message .Text ("————————\n " ))
67+ msg = append (msg , message .Text ("- 输入对应序号进行装备\n " ))
68+ msg = append (msg , message .Text ("- 输入“取消”终止本次操作\n " ))
69+ msg = append (msg , message .Text ("- 鱼竿数量请使用钓鱼背包查看" ))
6770 ctx .Send (msg )
6871 // 等待用户下一步选择
6972 recv , cancel := zero .NewFutureEvent ("message" , 999 , false , zero .RegexRule (`^(取消|\d+)$` ), zero .CheckUser (ctx .Event .UserID )).Repeat ()
@@ -316,13 +319,15 @@ func init() {
316319 case "诱钓" :
317320 equipInfo .Induce ++
318321 if equipInfo .Induce > 3 {
319- equipInfo .Induce = 3
322+ ctx .SendChain (message .Text ("诱钓等级已达到上限,你浪费了一本附魔书" ))
323+ return
320324 }
321325 number = equipInfo .Induce
322326 case "海之眷顾" :
323327 equipInfo .Favor ++
324328 if equipInfo .Favor > 3 {
325- equipInfo .Favor = 3
329+ ctx .SendChain (message .Text ("海之眷顾等级已达到上限,你浪费了一本附魔书" ))
330+ return
326331 }
327332 number = equipInfo .Favor
328333 default :
@@ -378,6 +383,8 @@ func init() {
378383 })
379384 }
380385 list := []int {0 , 1 , 2 }
386+ // 可以用于合成的鱼竿数量(取3的倍数)
387+ upgradeNum := (len (articles ) / 3 ) * 3
381388 check := false
382389 if len (articles ) > 3 {
383390 msg := make (message.Message , 0 , 3 + len (articles ))
@@ -386,10 +393,13 @@ func init() {
386393 msg = append (msg , message .Text ("[" , i , "] " , info .Equip , " : 耐" , info .Durable , "/修" , info .Maintenance ,
387394 "/诱" , enchantLevel [info .Induce ], "/眷顾" , enchantLevel [info .Favor ], "\n " ))
388395 }
389- msg = append (msg , message .Text ("————————\n 输入3个序号进行合成(用空格分割),或回复“取消”取消" ))
396+ msg = append (msg , message .Text ("————————\n " ))
397+ msg = append (msg , message .Text ("- 输入3个序号进行合成(用空格分割)\n " ))
398+ msg = append (msg , message .Text ("- 输入“取消”,终止本次合成\n " ))
399+ msg = append (msg , message .Text ("- 输入“梭哈“,合成所有鱼竿" ))
390400 ctx .Send (message .ReplyWithMessage (ctx .Event .MessageID , msg ... ))
391401 // 等待用户下一步选择
392- recv , cancel := zero .NewFutureEvent ("message" , 999 , false , zero .RegexRule (`^(取消|\d+ \d+ \d+)$` ), zero .CheckUser (ctx .Event .UserID )).Repeat ()
402+ recv , cancel := zero .NewFutureEvent ("message" , 999 , false , zero .RegexRule (`^(梭哈| 取消|\d+ \d+ \d+)$` ), zero .CheckUser (ctx .Event .UserID )).Repeat ()
393403 defer cancel ()
394404 for {
395405 select {
@@ -410,6 +420,13 @@ func init() {
410420 )
411421 return
412422 }
423+ if nextcmd == "梭哈" {
424+ for i := 3 ; i < upgradeNum ; i ++ {
425+ list = append (list , i )
426+ }
427+ check = true
428+ break
429+ }
413430 chooseList := strings .Split (nextcmd , " " )
414431 first , err := strconv .Atoi (chooseList [0 ])
415432 if err != nil {
@@ -463,12 +480,12 @@ func init() {
463480 )
464481 return
465482 }
466- attribute := strconv .Itoa (durationList [thingName ]) + "/0/" + strconv .Itoa (induceLevel / 3 ) + "/" + strconv .Itoa (favorLevel / 3 )
483+ attribute := strconv .Itoa (durationList [thingName ]) + "/0/" + strconv .Itoa (induceLevel / upgradeNum ) + "/" + strconv .Itoa (favorLevel / upgradeNum )
467484 newthing := article {
468485 Duration : time .Now ().Unix (),
469486 Type : "pole" ,
470487 Name : thingName ,
471- Number : 1 ,
488+ Number : upgradeNum / 3 ,
472489 Other : attribute ,
473490 }
474491 err = dbdata .updateUserThingInfo (uid , newthing )
@@ -478,7 +495,7 @@ func init() {
478495 }
479496 ctx .Send (
480497 message .ReplyWithMessage (ctx .Event .MessageID ,
481- message .Text (thingName , "合成成功" , list , "\n 属性: " , attribute ),
498+ message .Text (thingName , "合成成功: " , upgradeNum / 3 , "个铁竿 \n 属性: " , attribute ),
482499 ),
483500 )
484501 })
0 commit comments