From 46d3816d9d906c9001a310756d29c5dde48b6557 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: Sun, 10 May 2026 14:14:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(HCN):=20=E4=BF=AE=E6=94=B9=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E6=8A=80=E8=83=BD=E4=B8=BA=E5=87=BB=E6=9D=80=E6=95=8C?= =?UTF-8?q?=E4=BA=BA=E6=97=B6=E5=82=A8=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改HCN角色的技能触发机制,从召唤物死亡时储能改为击杀敌人时储能 更新角色描述和属性数值 更换角色默认武器为AcidWind 添加killEnemy信号到EntityBase用于触发击杀事件 为AcidWind武器添加升华选项 --- components/CharacterCards/HCN.tscn | 8 ++--- components/Characters/HCN.tscn | 5 ++- scripts/Contents/Characters/HCN.gd | 8 +++-- scripts/Contents/Weapons/AcidWind.gd | 47 ++++++++++++++++++++++++++++ scripts/Statemachine/EntityBase.gd | 4 +++ 5 files changed, 63 insertions(+), 9 deletions(-) diff --git a/components/CharacterCards/HCN.tscn b/components/CharacterCards/HCN.tscn index e094094..f9af238 100644 --- a/components/CharacterCards/HCN.tscn +++ b/components/CharacterCards/HCN.tscn @@ -20,9 +20,9 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_1yfsg") displayName = "氰化氢" slogan = "微量便可颠覆生机" avatar = ExtResource("2_1yfsg") -description = "在召唤物死亡时储能。" -fields = Array[int]([18, 27]) -fieldValues = Array[float]([5.0, 1.0]) +description = "击杀敌人时储能。" +fields = Array[int]([18, 1]) +fieldValues = Array[float]([3.0, -0.15]) clickToRebuild = true [node name="avatarTexture" parent="wrapper" parent_id_path=PackedInt32Array(2023039659) index="0" unique_id=1334645594] @@ -35,4 +35,4 @@ text = "氰化氢" text = "“微量便可颠覆生机”" [node name="descriptionLabel" parent="wrapper/infoContainer" parent_id_path=PackedInt32Array(143242635) index="1" unique_id=808054282] -text = "召唤物死亡时为自身恢复生命值。" +text = "击杀敌人时储能。" diff --git a/components/Characters/HCN.tscn b/components/Characters/HCN.tscn index daae589..2caca8f 100644 --- a/components/Characters/HCN.tscn +++ b/components/Characters/HCN.tscn @@ -2,11 +2,10 @@ [ext_resource type="PackedScene" uid="uid://bs863g2s8r770" path="res://components/Abstracts/PlayerBase.tscn" id="1_eeneu"] [ext_resource type="Script" uid="uid://bevc4f6apql4t" path="res://scripts/Contents/Characters/HCN.gd" id="2_f7uj3"] -[ext_resource type="PackedScene" uid="uid://wl8u5m52708w" path="res://components/Weapons/LGBT.tscn" id="3_2fpmn"] - +[ext_resource type="PackedScene" uid="uid://yq7vmijwvgx1" path="res://components/Weapons/AcidWind.tscn" id="3_2fpmn"] [node name="HCN" unique_id=1711205167 instance=ExtResource("1_eeneu")] script = ExtResource("2_f7uj3") displayName = "氰化氢" -[node name="LGBT" parent="weaponStore" index="0" unique_id=1938660022 instance=ExtResource("3_2fpmn")] +[node name="AcidWind" parent="weaponStore" parent_id_path=PackedInt32Array(1319091445) index="0" unique_id=1599717188 instance=ExtResource("3_2fpmn")] diff --git a/scripts/Contents/Characters/HCN.gd b/scripts/Contents/Characters/HCN.gd index b92cf1e..fbcd6fe 100644 --- a/scripts/Contents/Characters/HCN.gd +++ b/scripts/Contents/Characters/HCN.gd @@ -1,4 +1,8 @@ extends PlayerBase -func summoned(entity: SummonBase): - entity.died.connect(func(): storeEnergy(10)) +func register(): + super.register() + killEnemy.connect( + func(_who, _by): + storeEnergy(1) + ) diff --git a/scripts/Contents/Weapons/AcidWind.gd b/scripts/Contents/Weapons/AcidWind.gd index 79c0a19..b3f0014 100644 --- a/scripts/Contents/Weapons/AcidWind.gd +++ b/scripts/Contents/Weapons/AcidWind.gd @@ -3,6 +3,53 @@ extends Weapon var acids: Array[String] = ["AcidS", "AcidN", "AcidCl", "AcidP", "AcidC"] +func sublimateOptions() -> Array[SublimateOption]: + return [ + SublimateOption.new( + "浓度提高", + "硫酸最大溅射数+1,弱酸伤害+0.03", + func(w: Weapon, _e): + w.addStoreExtra("s-count-max", 1) + w.addStoreExtra("weakatk", 0.03), + 1, + CategoryStore.Quality.COMMON + ), + SublimateOption.new( + "王水效应", + "硝酸额外伤害+10%,盐酸减速效果+0.02%", + func(w: Weapon, _e): + w.addStoreExtra("n-atk", 0.1) + w.addStoreExtra("cl-speed", 0.0002) + w.addStoreExtra("cl-atkspeed", 0.0002), + 1, + CategoryStore.Quality.RARE + ), + SublimateOption.new( + "脱钙反应", + "碳酸降伤比例+0.2%,磷酸散射角增加+0.02°", + func(w: Weapon, _e): + w.addStoreExtra("c-atk", 0.002) + w.addStoreExtra("p-offset", 0.02), + 1, + CategoryStore.Quality.EPIC + ), + SublimateOption.new( + "离心涡流", + "风暴吸引频率+1Hz", + func(w: Weapon, _e): + w.addStoreExtra("f", 1), + 1, + CategoryStore.Quality.LEGENDARY + ), + SublimateOption.new( + "强酸蚀骨", + "强酸基础伤害+0.05", + func(w: Weapon, _e): + w.addStoreExtra("atk", 0.05), + 1, + CategoryStore.Quality.COMMON + ), + ] func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 0.15 * to * soulLevel origin["c-atk"] *= soulLevel diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index 901af53..cc3e773 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -5,6 +5,7 @@ signal hit(damage: float, bullet: BulletBase, crit: bool) signal healed(amount: float) signal healthChanged(health: float) signal died() +signal killEnemy(who: EntityBase, by: BulletBase) signal energyChanged(energy: float, dontChangeDirection: bool) @@ -170,6 +171,7 @@ func _ready(): ) healthChanged.emit(health) energyChanged.emit(energy, false) + killEnemy.connect(func(): return ) spawn() func _process(_delta): health = clamp(health, 0, fields.get(FieldStore.Entity.MAX_HEALTH)) @@ -446,6 +448,8 @@ func tryDie(by: BulletBase = null): EffectController.create(ComponentManager.getEffect("DeadBlood"), texture.global_position).shot() await die() died.emit() + if is_instance_valid(by): + by.launcher.killEnemy.emit(self , by) if isBoss: UIState.showTip("[b]%s[/b] 已被打败!" % displayName, TipBox.MessageType.CONGRATULATION) elif isPlayer():