We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23e567f commit 502693eCopy full SHA for 502693e
plugin/robbery/robbery.go
@@ -41,7 +41,7 @@ func init() {
41
Help: "- 打劫[对方Q号|@对方QQ]\n" +
42
"1. 受害者钱包少于1000不能被打劫\n" +
43
"2. 打劫成功率 40%\n" +
44
- "4. 打劫失败罚款1000(钱不够不罚钱)\n" +
+ "4. 打劫失败罚款1000(钱不够,钱包归零)\n" +
45
"5. 保险赔付0-80%\n" +
46
"6. 打劫成功获得对方0-5%+500的财产(最高1W)\n" +
47
"7. 每日可打劫或被打劫一次\n" +
@@ -104,8 +104,12 @@ func init() {
104
105
// 判断打劫是否成功
106
if rand.Intn(100) > 60 {
107
+ updateMoney := wallet.GetWalletOf(uid)
108
+ if updateMoney >= 1000 {
109
+ updateMoney = 1000
110
+ }
111
ctx.SendChain(message.Text("打劫失败,罚款1000"))
- err := wallet.InsertWalletOf(uid, -1000)
112
+ err := wallet.InsertWalletOf(uid, -updateMoney)
113
if err != nil {
114
ctx.SendChain(message.Text("[ERROR]:罚款失败,钱包坏掉力:\n", err))
115
return
0 commit comments