Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(niuniu): 出售牛牛 #1047

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

feat(niuniu): 出售牛牛 #1047

wants to merge 3 commits into from

Conversation

xyy0411
Copy link
Contributor

@xyy0411 xyy0411 commented Oct 27, 2024

add:新玩法出售牛牛
fix:
1.注销牛牛需要atri币防止刷初始
2.增加赎牛牛触发机率
3.修改部分已知问题

add:新玩法出售牛牛
fix:
1.注销牛牛需要atri币防止刷初始
2.增加赎牛牛触发机率
3.修改部分已知问题
@fumiama fumiama changed the title add: feat(niuniu): 出售牛牛 Oct 27, 2024
@xyy0411 xyy0411 closed this Oct 31, 2024
@xyy0411 xyy0411 reopened this Oct 31, 2024
}
money := wallet.GetWalletOf(uid)
if money < 150 {
ctx.SendChain(message.Text("赎牛牛需要150ATRI币,快去赚钱吧,目前仅有:", money, "个ATRI币"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ATRI币不建议硬编码进去
可以用wallet.GetWalletName()

case niuniu > 15:
money = int(niuniu * 10)
message = randomChoice([]string{
fmt.Sprintf("你的牛牛已经离你而去了,你赚取了%d个ATRI币", money),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ATRI币不建议硬编码进去
可以用wallet.GetWalletName()

err = errors.New("道具不存在")
}
if props == "伟哥" || props == "媚药" {
err = errors.New("道具不能混着用哦")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得你直接return比较好🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没必要专门给第二个if判断return

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你err最后不都被下面这个err = u.createUserInfoByProps(props);覆盖了吗,那你上面这两个err的赋值不就没意义了
主要你ci没过

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants