v卡掉落调整
This commit is contained in:
parent
e4afc80be9
commit
8c622c1d63
|
@ -2150,8 +2150,15 @@ func (this *Scene) TryBillExGameDrop(p *Player) {
|
||||||
if drop.MaxAmount > drop.MinAmount {
|
if drop.MaxAmount > drop.MinAmount {
|
||||||
num = rand.Int31n(drop.MaxAmount-drop.MinAmount+1) + drop.MinAmount
|
num = rand.Int31n(drop.MaxAmount-drop.MinAmount+1) + drop.MinAmount
|
||||||
}
|
}
|
||||||
|
oldNum := num
|
||||||
a := math.Max(float64(p.MoneyTotal), 50) * 10.0 / math.Max(float64(p.VCardCost), 500.0)
|
a := math.Max(float64(p.MoneyTotal), 50) * 10.0 / math.Max(float64(p.VCardCost), 500.0)
|
||||||
num = int32(float64(num) * math.Min(a, 1.5))
|
num = int32(float64(num) * math.Min(a, 1.5))
|
||||||
|
if num == 0 {
|
||||||
|
// 50%概率给oldNum
|
||||||
|
if rand.Int31n(100) < 50 {
|
||||||
|
num = oldNum
|
||||||
|
}
|
||||||
|
}
|
||||||
p.Items[drop.ItemId] += int64(num)
|
p.Items[drop.ItemId] += int64(num)
|
||||||
realDrop[drop.ItemId] = num
|
realDrop[drop.ItemId] = num
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue