mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-06 15:20:22 +00:00
🎨 优化目录结构
This commit is contained in:
27
plugin/reborn/born.go
Normal file
27
plugin/reborn/born.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package reborn
|
||||
|
||||
import (
|
||||
wr "github.com/mroth/weightedrand"
|
||||
)
|
||||
|
||||
type rate []struct {
|
||||
Name string `json:"name"`
|
||||
Weight float64 `json:"weight"`
|
||||
}
|
||||
|
||||
var (
|
||||
areac *wr.Chooser
|
||||
gender, _ = wr.NewChooser(
|
||||
wr.Choice{Item: "男孩子", Weight: 50707},
|
||||
wr.Choice{Item: "女孩子", Weight: 48292},
|
||||
wr.Choice{Item: "雌雄同体", Weight: 1001},
|
||||
)
|
||||
)
|
||||
|
||||
func randcoun() string {
|
||||
return areac.Pick().(string)
|
||||
}
|
||||
|
||||
func randgen() string {
|
||||
return gender.Pick().(string)
|
||||
}
|
||||
Reference in New Issue
Block a user