1
0
This commit is contained in:
syui 2023-04-06 12:38:49 +09:00
parent 1d65e1194b
commit e025b48fb4
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

View File

@ -64,15 +64,15 @@ func (Card) Fields() []ent.Field {
Immutable(). Immutable().
DefaultFunc(func() int { DefaultFunc(func() int {
rand.Seed(time.Now().UnixNano()) rand.Seed(time.Now().UnixNano())
var cp = rand.Intn(100) var cp = 1 + rand.Intn(100)
if cp == 1 { if cp == 2 {
cp = rand.Intn(250) cp = 50 + rand.Intn(200)
} }
if card > 1 { if card > 2 {
cp = cp + rand.Intn(250) cp = 50 + cp + rand.Intn(200)
} }
if super == "super" { if super == "super" {
cp = cp + rand.Intn(500) cp = 200 + cp + rand.Intn(300)
} }
return cp return cp