From 972a8494b5abb8a81c835cf92b000c73d47f25a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Fri, 8 May 2026 17:13:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=AD=BB=E4=BA=A1?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E6=98=BE=E7=A4=BA=E5=92=8C=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正死亡原因文本格式并移除重复条目 重构游戏结束面板的消息生成逻辑 调整牧羊犬角色描述和移除调试属性 清理猞猁角色的多余武器节点 修复字段应用器的逻辑判断错误 --- components/CharacterCards/MuyangDog.tscn | 5 ++--- components/Characters/Lynx.tscn | 8 -------- resources/constants/deadReasons.json | 3 +-- scripts/Contents/Panels/GameOver.gd | 3 +-- scripts/Statemachine/EntityBase.gd | 6 +++++- scripts/Structs/Feed.gd | 2 +- 6 files changed, 10 insertions(+), 17 deletions(-) diff --git a/components/CharacterCards/MuyangDog.tscn b/components/CharacterCards/MuyangDog.tscn index f63bb07..bffbbd2 100644 --- a/components/CharacterCards/MuyangDog.tscn +++ b/components/CharacterCards/MuyangDog.tscn @@ -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秒发动格挡。" diff --git a/components/Characters/Lynx.tscn b/components/Characters/Lynx.tscn index 2a2896a..c4952a2 100644 --- a/components/Characters/Lynx.tscn +++ b/components/Characters/Lynx.tscn @@ -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 diff --git a/resources/constants/deadReasons.json b/resources/constants/deadReasons.json index 7a6a267..29c0f7e 100644 --- a/resources/constants/deadReasons.json +++ b/resources/constants/deadReasons.json @@ -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]菜死了," ] \ No newline at end of file diff --git a/scripts/Contents/Panels/GameOver.gd b/scripts/Contents/Panels/GameOver.gd index 9a9cc14..8c50e1f 100644 --- a/scripts/Contents/Panels/GameOver.gd +++ b/scripts/Contents/Panels/GameOver.gd @@ -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() diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index 8e69d0e..23bb89a 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -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() diff --git a/scripts/Structs/Feed.gd b/scripts/Structs/Feed.gd index e969fe8..10b323c 100644 --- a/scripts/Structs/Feed.gd +++ b/scripts/Structs/Feed.gd @@ -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: