1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

fix(EntityBase): 仅在Boss死亡时掉落灵魂物品

修改tryDie函数,使灵魂物品只在Boss死亡时生成,避免普通敌人也掉落灵魂物品
This commit is contained in:
2025-09-27 22:40:37 +08:00
parent 9258a26232
commit 6e644324cb
+6 -5
View File
@@ -321,11 +321,12 @@ func tryDie(by: BulletBase = null):
fields[FieldStore.Entity.MAX_HEALTH] * randf_range(1 - GameRule.beachballOffset, 1 + GameRule.beachballOffset),
position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset)
)
ItemDropped.generate(
ItemStore.ItemType.SOUL,
randi_range(1, 2),
position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset)
)
if isBoss:
ItemDropped.generate(
ItemStore.ItemType.SOUL,
randi_range(1, 2),
position + MathTool.randv2_range(GameRule.itemDroppedSpawnOffset)
)
if isPlayer():
if UIState.player == self:
UIState.setPanel("GameOver", [displayName, by.launcher.displayName, by.displayName])