This commit is contained in:
aozhiwei 2024-11-11 11:57:20 +08:00
parent 6ddbfb87fc
commit de6e75cb58

View File

@ -14,9 +14,9 @@ type RewardTable struct {
f5.IdMetaTable[Reward] f5.IdMetaTable[Reward]
} }
func (this *Reward) RandScore() int32 { func (this *Reward) Init1() {
if this.GetReward1() <0 { }
} func (this *Reward) RandScore() int32 {
return int32(rand.Intn(10)) return int32(int(this.GetReward1()) + rand.Intn(int(this.GetReward2() - this.GetReward1())))
} }