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

fix: 修复死亡原因显示和游戏结束逻辑

修正死亡原因文本格式并移除重复条目
重构游戏结束面板的消息生成逻辑
调整牧羊犬角色描述和移除调试属性
清理猞猁角色的多余武器节点
修复字段应用器的逻辑判断错误
This commit is contained in:
2026-05-08 17:13:51 +08:00
parent c1143d5f71
commit 972a8494b5
6 changed files with 10 additions and 17 deletions
+2 -3
View File
@@ -19,10 +19,9 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_fi2nw")
displayName = "牧羊犬"
slogan = "恪守使命不离不弃"
avatar = ExtResource("2_fi2nw")
description = "每3秒发动格挡,弹反一切子弹。"
description = "每3秒发动格挡。"
fields = Array[int]([0, 8, 3])
fieldValues = Array[float]([50.0, 0.15, -0.2])
clickToRebuild = true
[node name="avatarTexture" parent="wrapper" parent_id_path=PackedInt32Array(2023039659) index="0" unique_id=1334645594]
texture = ExtResource("2_fi2nw")
@@ -34,4 +33,4 @@ text = "牧羊犬"
text = "“恪守使命不离不弃”"
[node name="descriptionLabel" parent="wrapper/infoContainer" parent_id_path=PackedInt32Array(143242635) index="1" unique_id=808054282]
text = "每3秒发动格挡,弹反一切子弹。"
text = "每3秒发动格挡。"
-8
View File
@@ -3,17 +3,9 @@
[ext_resource type="PackedScene" uid="uid://bs863g2s8r770" path="res://components/Abstracts/PlayerBase.tscn" id="1_ns0m5"]
[ext_resource type="Script" uid="uid://b8g0hkqvyeptg" path="res://scripts/Contents/Characters/Lynx.gd" id="2_d6nve"]
[ext_resource type="PackedScene" uid="uid://frwt0fgrpskb" path="res://components/Weapons/Meowmere.tscn" id="3_nitbu"]
[ext_resource type="PackedScene" uid="uid://cx7nogfnv7s8t" path="res://components/Weapons/Tree.tscn" id="4_7h885"]
[ext_resource type="PackedScene" uid="uid://bbrllsqjmx0ie" path="res://components/Weapons/DaoStatue.tscn" id="5_75d8s"]
[node name="Lynx" unique_id=1711205167 instance=ExtResource("1_ns0m5")]
script = ExtResource("2_d6nve")
displayName = "猞猁"
[node name="Meowmere" parent="weaponStore" index="0" unique_id=1965287972 instance=ExtResource("3_nitbu")]
[node name="Tree" parent="weaponStore" index="1" unique_id=185228402 instance=ExtResource("4_7h885")]
debugRebuild = false
[node name="DaoStatue" parent="weaponStore" index="2" unique_id=265403254 instance=ExtResource("5_75d8s")]
debugRebuild = false
+1 -2
View File
@@ -126,10 +126,9 @@
"[b]%s[/b]成了宇航员,",
"[b]%s[/b]现在是太空垃圾,",
"[b]%s[/b]脱离了轨道,",
"[b]%s[/b]已飞升",
"[b]%s[/b]已飞升",
"[b]%s[/b]已离开游戏,",
"[b]%s[/b]跳起了舞,",
"[b]%s[/b]被开发者玩死了,",
"[b]%s[/b]被*刻意的游戏设计*杀死了!",
"[b]%s[/b]菜死了,"
]
+1 -2
View File
@@ -7,7 +7,6 @@ extends FullscreenPanelBase
func beforeOpen(args: Array = []):
audio.play()
var reasonTemplate = MathTool.randomChoiceFrom(GameRule.deadReasons)
deadreason.text = ("[color=gray]" + reasonTemplate + "凶手是[b]%s[/b]的[b]%s[/b]。[/color]") % args
deadreason.text = ("[color=gray]%s[/color]") % args[0]
func afterOpen(_args: Array = []):
gameControl.enable()
+5 -1
View File
@@ -436,7 +436,11 @@ func tryDie(by: BulletBase = null):
)
if isPlayer():
if UIState.player == self:
UIState.setPanel("GameOver", [displayName, by.launcher.displayName, by.displayName])
var reasonTemplate = MathTool.randomChoiceFrom(GameRule.deadReasons)
if is_instance_valid(by):
UIState.setPanel("GameOver", ["%s凶手是[b]%s[/b]的[b]%s[/b]。" % [reasonTemplate, by.launcher.displayName, by.displayName] % displayName])
else:
UIState.setPanel("GameOver", ["%s凶手是[b]%s[/b]。" % [reasonTemplate, "*刻意的游戏设计*"] % displayName])
EffectController.create(ComponentManager.getEffect("DeadBlood"), texture.global_position).shot()
await die()
died.emit()
+1 -1
View File
@@ -51,7 +51,7 @@ func apply(entity: EntityBase):
var value = fieldValues[i]
entity.fields[field] += value
var applier = FieldStore.entityApplier.get(field)
if applier and applier.call(entity, value):
if applier and !applier.call(entity, value):
entity.fields[field] -= value
entity.fields[field] = clamp(entity.fields[field], FieldStore.entityMinValueMap.get(field, 0), FieldStore.entityMaxValueMap.get(field, INF))
for i in weapons: