1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00

fix(EntityBase): 限制能量值不超过最大值

style(Starter): 更新游戏模式选项文本描述
This commit is contained in:
2026-05-04 21:56:37 +08:00
parent 8137b398a9
commit b5c2152d4c
2 changed files with 3 additions and 2 deletions
@@ -299,11 +299,11 @@ theme = ExtResource("4_lfxcn")
selected = 0
allow_reselect = true
item_count = 3
popup/item_0/text = "无尽波次"
popup/item_0/text = "无尽波次·标准游戏体验"
popup/item_0/id = 0
popup/item_1/text = "Boss Rush"
popup/item_1/id = 1
popup/item_2/text = "割草"
popup/item_2/text = "割草·高难度⚠️"
popup/item_2/id = 2
[node name="useTutorial" type="HBoxContainer" parent="content/wrapper/layout/startGameWrapper/start/starter/singleplayer/playConfig" index="2" unique_id=2079979053]
+1
View File
@@ -322,6 +322,7 @@ func collectItem(itemType: ItemStore.ItemType, amount: int):
UIState.showTip("[b]%s[/b]已自动强化!" % weapon.displayName)
func storeEnergy(value: float, dontChangeDirection: bool = false):
energy += value * fields.get(FieldStore.Entity.ENERGY_MULTIPILER)
energy = clamp(energy, 0, fields[FieldStore.Entity.MAX_ENERGY])
energyChanged.emit(energy, dontChangeDirection)
func finalEnergy(base: float):
return base / fields.get(FieldStore.Entity.SAVE_ENERGY)