@@ -63,7 +63,10 @@ func init() {
63
63
msg = append (msg , message .Text ("[" , i , "] " , info .Equip , " : 耐" , info .Durable , "/修" , info .Maintenance ,
64
64
"/诱" , enchantLevel [info .Induce ], "/眷顾" , enchantLevel [info .Favor ], "\n " ))
65
65
}
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 ("- 鱼竿数量请使用钓鱼背包查看" ))
67
70
ctx .Send (msg )
68
71
// 等待用户下一步选择
69
72
recv , cancel := zero .NewFutureEvent ("message" , 999 , false , zero .RegexRule (`^(取消|\d+)$` ), zero .CheckUser (ctx .Event .UserID )).Repeat ()
@@ -316,13 +319,15 @@ func init() {
316
319
case "诱钓" :
317
320
equipInfo .Induce ++
318
321
if equipInfo .Induce > 3 {
319
- equipInfo .Induce = 3
322
+ ctx .SendChain (message .Text ("诱钓等级已达到上限,你浪费了一本附魔书" ))
323
+ return
320
324
}
321
325
number = equipInfo .Induce
322
326
case "海之眷顾" :
323
327
equipInfo .Favor ++
324
328
if equipInfo .Favor > 3 {
325
- equipInfo .Favor = 3
329
+ ctx .SendChain (message .Text ("海之眷顾等级已达到上限,你浪费了一本附魔书" ))
330
+ return
326
331
}
327
332
number = equipInfo .Favor
328
333
default :
@@ -378,6 +383,8 @@ func init() {
378
383
})
379
384
}
380
385
list := []int {0 , 1 , 2 }
386
+ // 可以用于合成的鱼竿数量(取3的倍数)
387
+ upgradeNum := (len (articles ) / 3 ) * 3
381
388
check := false
382
389
if len (articles ) > 3 {
383
390
msg := make (message.Message , 0 , 3 + len (articles ))
@@ -386,10 +393,13 @@ func init() {
386
393
msg = append (msg , message .Text ("[" , i , "] " , info .Equip , " : 耐" , info .Durable , "/修" , info .Maintenance ,
387
394
"/诱" , enchantLevel [info .Induce ], "/眷顾" , enchantLevel [info .Favor ], "\n " ))
388
395
}
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 ("- 输入“梭哈“,合成所有鱼竿" ))
390
400
ctx .Send (message .ReplyWithMessage (ctx .Event .MessageID , msg ... ))
391
401
// 等待用户下一步选择
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 ()
393
403
defer cancel ()
394
404
for {
395
405
select {
@@ -410,6 +420,13 @@ func init() {
410
420
)
411
421
return
412
422
}
423
+ if nextcmd == "梭哈" {
424
+ for i := 3 ; i < upgradeNum ; i ++ {
425
+ list = append (list , i )
426
+ }
427
+ check = true
428
+ break
429
+ }
413
430
chooseList := strings .Split (nextcmd , " " )
414
431
first , err := strconv .Atoi (chooseList [0 ])
415
432
if err != nil {
@@ -463,12 +480,12 @@ func init() {
463
480
)
464
481
return
465
482
}
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 )
467
484
newthing := article {
468
485
Duration : time .Now ().Unix (),
469
486
Type : "pole" ,
470
487
Name : thingName ,
471
- Number : 1 ,
488
+ Number : upgradeNum / 3 ,
472
489
Other : attribute ,
473
490
}
474
491
err = dbdata .updateUserThingInfo (uid , newthing )
@@ -478,7 +495,7 @@ func init() {
478
495
}
479
496
ctx .Send (
480
497
message .ReplyWithMessage (ctx .Event .MessageID ,
481
- message .Text (thingName , "合成成功" , list , "\n 属性: " , attribute ),
498
+ message .Text (thingName , "合成成功: " , upgradeNum / 3 , "个铁竿 \n 属性: " , attribute ),
482
499
),
483
500
)
484
501
})
0 commit comments