chaos
This commit is contained in:
parent
ed5d06a63c
commit
b91bcd202b
16
main.go
16
main.go
|
@ -691,6 +691,7 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||
bufftype := "none"
|
||||
buffvalue := 0
|
||||
var candystr string
|
||||
maxcandy, _ := topUserCandy()
|
||||
switch m.Embeds[0].Footer.Text {
|
||||
case "candyMilky":
|
||||
candyvalue = 500
|
||||
|
@ -709,13 +710,14 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||
candyvalue = 200
|
||||
case "candyKiko":
|
||||
candyvalue = 500
|
||||
case "candyChaos":
|
||||
candyvalue = rand.Intn(maxcandy*2) - maxcandy
|
||||
default:
|
||||
candyvalue = 100
|
||||
}
|
||||
maxcandy, _ := topUserCandy()
|
||||
multiplier := 1
|
||||
usercandy := checkUserCandy(reactions[0].ID)
|
||||
if !math.Signbit(float64(candyvalue)) {
|
||||
if !math.Signbit(float64(candyvalue)) && m.Embeds[0].Footer.Text != "candyChaos" {
|
||||
if checkUserCandy(claimer) < maxcandy {
|
||||
if usercandy == 0 {
|
||||
multiplier = maxcandy / 100
|
||||
|
@ -728,8 +730,16 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||
}
|
||||
candyvalue *= multiplier
|
||||
candystr = "+" + fmt.Sprint(candyvalue)
|
||||
} else {
|
||||
} else if m.Embeds[0].Footer.Text != "candyChaos" {
|
||||
candystr = fmt.Sprint(candyvalue)
|
||||
} else {
|
||||
multiplier = rand.Intn(21) - 10
|
||||
candyvalue *= multiplier
|
||||
if !math.Signbit(float64(candyvalue)) {
|
||||
candystr = "+" + fmt.Sprint(candyvalue)
|
||||
} else {
|
||||
candystr = fmt.Sprint(candyvalue)
|
||||
}
|
||||
}
|
||||
msg := reactions[0].Username + " has claimed the candy! (" + candystr + " 🍬) (" + fmt.Sprint(multiplier) + "x)"
|
||||
switch bufftype {
|
||||
|
|
Loading…
Reference in New Issue