From d898620c7aae9d87e5d9e8b72b1179f54774a3d2 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: Sat, 15 Nov 2025 20:18:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=AD=A6=E5=99=A8):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=81=AB=E5=B1=B1=E6=AD=A6=E5=99=A8=E7=9A=84=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=92=8C=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改火山武器的攻击力、旋转速度、生命值和子弹数量等基础属性 优化子弹生成逻辑,新增ignoreOffset参数控制偏移 更新武器配置和描述文本以匹配新数值 --- components/Weapons/Volcano.tscn | 13 +++++++------ scripts/Contents/Weapons/Volcano.gd | 8 ++++---- scripts/Statemachine/BulletBase.gd | 5 +++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/components/Weapons/Volcano.tscn b/components/Weapons/Volcano.tscn index 6d59edb..ffc3c01 100644 --- a/components/Weapons/Volcano.tscn +++ b/components/Weapons/Volcano.tscn @@ -10,11 +10,12 @@ avatarTexture = ExtResource("2_hh01t") displayName = "火山" quality = 3 typeTopic = 2 +costBeachball = 300 store = { -"atk": 20, -"count": 1.0, +"atk": 25, +"count": 2.0, "life": 5, -"rotate": 2.0 +"rotate": 1.0 } storeType = { "atk": 1, @@ -23,14 +24,14 @@ storeType = { "rotate": 3 } descriptionTemplate = "召唤$count支[b]火山[/b],以$rotate的速度旋转,接触时造成$atk点伤害,在$life秒后停止。" -cooldown = 7000.0 +cooldown = 6000.0 debugRebuild = true [node name="avatar" parent="container/info" index="0"] texture = ExtResource("2_hh01t") [node name="beachball" parent="container/info/infos" index="1"] -count = 500 +count = 300 [node name="soul" parent="container/info/infos" index="2"] count = 1 @@ -41,4 +42,4 @@ quality = 3 typeTopic = 2 [node name="description" parent="container" index="2"] -text = "[center]召唤[color=cyan]1[/color]支[b]火山[/b],以[color=cyan]2.0°[/color]的速度旋转,接触时造成[color=cyan]20[/color]点伤害,在[color=cyan]5.00[/color]秒后停止。[/center]" +text = "[center]召唤[color=cyan]2[/color]支[b]火山[/b],以[color=cyan]1.0°[/color]的速度旋转,接触时造成[color=cyan]25[/color]点伤害,在[color=cyan]5.00[/color]秒后停止。[/center]" diff --git a/scripts/Contents/Weapons/Volcano.gd b/scripts/Contents/Weapons/Volcano.gd index 01fdf3b..4c904b5 100644 --- a/scripts/Contents/Weapons/Volcano.gd +++ b/scripts/Contents/Weapons/Volcano.gd @@ -2,14 +2,14 @@ extends Weapon func update(to: int, origin: Dictionary, _entity: EntityBase): - origin["atk"] += 5 * to * soulLevel + origin["atk"] += 3 * to * soulLevel origin["count"] += 1 * (soulLevel - 1) - origin["rotate"] += 0.1 * to * soulLevel - origin["life"] += 0.05 * to * soulLevel + origin["rotate"] += 0.05 * to * soulLevel + origin["life"] += 0.1 * to * soulLevel return origin func attack(entity: EntityBase): for i in readStore("count"): - for j in BulletBase.generate(ComponentManager.getBullet("Volcano"), entity, entity.findWeaponAnchor("normal"), deg_to_rad(360.0 / readStore("count") * i)): + for j in BulletBase.generate(ComponentManager.getBullet("Volcano"), entity, entity.findWeaponAnchor("normal"), deg_to_rad(360.0 / readStore("count") * i), false, false, true, true): var bullet: Volcano = j bullet.damage = readStore("atk") bullet.rotates = readStore("rotate") diff --git a/scripts/Statemachine/BulletBase.gd b/scripts/Statemachine/BulletBase.gd index 829c69c..2474777 100644 --- a/scripts/Statemachine/BulletBase.gd +++ b/scripts/Statemachine/BulletBase.gd @@ -151,7 +151,8 @@ static func generate( spawnRotation: float, asChildSplit: bool = false, asChildRefract: bool = false, - addToWorld: bool = true + addToWorld: bool = true, + ignoreOffset: bool = false ): var extraCount = launchBy.fields.get(FieldStore.Entity.EXTRA_BULLET_COUNT) var count = 1 + MathTool.shrimpRate(extraCount) @@ -162,7 +163,7 @@ static func generate( instance.isChildRefract = asChildRefract instance.launcher = launchBy instance.position = spawnPosition - instance.rotation = spawnRotation + deg_to_rad(randf_range(-launchBy.fields.get(FieldStore.Entity.OFFSET_SHOOT), launchBy.fields.get(FieldStore.Entity.OFFSET_SHOOT))) + instance.rotation = spawnRotation + deg_to_rad(launchBy.fields.get(FieldStore.Entity.OFFSET_SHOOT) * randf_range(-1, 1) * int(!ignoreOffset)) if addToWorld: WorldManager.rootNode.call_deferred("add_child", instance) instance.add_to_group("bullets")