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

feat(武器系统): 调整武器升级逻辑并添加等级显示

- 修改PurpleCrystal和LGBT武器的属性增长系数
- 武器升级时增加等级并调整消耗计算
- 在UI中添加武器等级显示
- 升级后自动更新武器信息
This commit is contained in:
2025-09-06 11:59:24 +08:00
parent 4e158006c6
commit 6d39f19ea4
5 changed files with 26 additions and 9 deletions
+5 -1
View File
@@ -50,8 +50,11 @@ func allHad(entity: EntityBase) -> bool:
func apply(entity: EntityBase):
var allHave = allHad(entity)
if allHave:
level += 1
entity.inventory[ItemStore.ItemType.BEACHBALL] -= costBeachball
store = update(level + 1, originalStore.duplicate(), entity)
store = update(level, originalStore.duplicate(), entity)
costBeachball *= 2
rebuildInfo()
return allHave
func multipiler() -> float:
if is_instance_valid(UIState.player):
@@ -63,6 +66,7 @@ func rebuildInfo():
nameLabel.displayName = displayName
nameLabel.quality = quality
nameLabel.typeTopic = typeTopic
nameLabel.level = level
energyLabel.text = "%.1f" % needEnergy
beachballLabel.text = str(costBeachball)
descriptionLabel.text = buildDescription()