mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 02:00:24 +00:00
优化代码 (#501)
This commit is contained in:
@@ -471,7 +471,7 @@ func init() {
|
||||
fiancee := ctx.State["regex_matched"].([]string)
|
||||
gay, _ := strconv.ParseInt(fiancee[2]+fiancee[3], 10, 64)
|
||||
if gay == uid {
|
||||
ctx.Send(message.ReplyWithMessage(message.At(uid), message.Text("[qqwife]你想给自己买什么礼物呢?")))
|
||||
ctx.Send(message.ReplyWithMessage(ctx.Event.MessageID, message.At(uid), message.Text("[qqwife]你想给自己买什么礼物呢?")))
|
||||
return
|
||||
}
|
||||
// 获取CD
|
||||
@@ -504,12 +504,12 @@ func init() {
|
||||
// 计算钱对应的好感值
|
||||
newFavor := 1
|
||||
if favor > 50 {
|
||||
newFavor += moneyToFavor % 10 // 礼物厌倦
|
||||
newFavor = moneyToFavor % 10 // 礼物厌倦
|
||||
} else {
|
||||
newFavor += rand.Intn(moneyToFavor)
|
||||
}
|
||||
// 随机对方心情
|
||||
mood := rand.Intn(5)
|
||||
mood := rand.Intn(2)
|
||||
if mood == 0 {
|
||||
newFavor = -newFavor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user