1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-29 15:02:29 +08:00

feat(掉落系统): 根据敌人等级调整boss掉落物品数量

将boss掉落的晶体数量上限从固定20改为15+等级,钻石数量上限从固定3改为等于等级
This commit is contained in:
2026-05-09 21:06:51 +08:00
parent c7b1660311
commit d739771c1a
+2 -2
View File
@@ -416,7 +416,7 @@ func tryDie(by: BulletBase = null):
fields[FieldStore.Entity.MAX_HEALTH] * randf_range(1 - GameRule.beachballOffset, 1 + GameRule.beachballOffset), fields[FieldStore.Entity.MAX_HEALTH] * randf_range(1 - GameRule.beachballOffset, 1 + GameRule.beachballOffset),
position + MathTool.sampleInCircle(GameRule.itemDroppedSpawnOffset) position + MathTool.sampleInCircle(GameRule.itemDroppedSpawnOffset)
) )
for i in randi_range(0, 20 if isBoss else 5): for i in randi_range(0, (15 + level) if isBoss else 5):
ItemDropped.generate( ItemDropped.generate(
ItemStore.ItemType.CRYSTAL, ItemStore.ItemType.CRYSTAL,
5 if isBoss else 1, 5 if isBoss else 1,
@@ -425,7 +425,7 @@ func tryDie(by: BulletBase = null):
if isBoss: if isBoss:
ItemDropped.generate( ItemDropped.generate(
ItemStore.ItemType.DIAMOND, ItemStore.ItemType.DIAMOND,
randi_range(1, 3), randi_range(1, level),
position + MathTool.sampleInCircle(GameRule.itemDroppedSpawnOffset) position + MathTool.sampleInCircle(GameRule.itemDroppedSpawnOffset)
) )
if isBoss: if isBoss: