From 007f323482f01f4371f0643d47653fb1710b554c 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, 20 Sep 2025 17:30:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=AD=A6=E5=99=A8=E7=B3=BB=E7=BB=9F):?= =?UTF-8?q?=20=E9=87=8D=E6=9E=84=E6=AD=A6=E5=99=A8=E8=83=BD=E9=87=8F?= =?UTF-8?q?=E6=B6=88=E8=80=97=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除全局武器升级能量消耗倍数,改为各武器独立设置升级能量消耗 调整矢量核心武器的属性计算和初始能量值 为所有武器类型添加升级时的能量消耗增量 --- components/Weapons/VectorStar.tscn | 7 +++---- scripts/Contents/Weapons/BigLaser.gd | 1 + scripts/Contents/Weapons/LGBTWeapon.gd | 1 + scripts/Contents/Weapons/MushroomPickaxe.gd | 1 + scripts/Contents/Weapons/VectorStarWeapon.gd | 4 +++- scripts/Structs/Weapon.gd | 1 - scripts/Tools/GameRule.gd | 1 - 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/components/Weapons/VectorStar.tscn b/components/Weapons/VectorStar.tscn index d948026..eee858f 100644 --- a/components/Weapons/VectorStar.tscn +++ b/components/Weapons/VectorStar.tscn @@ -22,19 +22,18 @@ storeType = { "mincount": 1.0 } descriptionTemplate = "发射$mincount~$maxcount个[b]无主的飞星[/b],在$forwardtime秒后向目标冲刺并造成$atk点伤害。" -needEnergy = 25.0 +needEnergy = 10.0 cooldown = 500.0 -debugRebuild = true [node name="avatar" parent="container/info" index="0"] texture = ExtResource("3_wfty8") [node name="energy" parent="container/info/infos/energyInfo" index="1"] -text = "25.0" +text = "136.0" [node name="name" parent="container/info" index="2"] displayName = "矢量核心" quality = 2 [node name="description" parent="container" index="2"] -text = "[center]发射[color=cyan]5[/color]~[color=cyan]10[/color]个[b]无主的飞星[/b],在[color=cyan]0.75[/color]秒后向目标冲刺并造成[color=cyan]7[/color]点伤害。[/center]" +text = "[center]发射[color=cyan]5[/color]→[color=yellow]5[/color]~[color=cyan]10[/color]→[color=yellow]11[/color]个[b]无主的飞星[/b],在[color=cyan]0.75[/color]→[color=yellow]0.71[/color]秒后向目标冲刺并造成[color=cyan]7[/color]→[color=yellow]12[/color]点伤害。[/center]" diff --git a/scripts/Contents/Weapons/BigLaser.gd b/scripts/Contents/Weapons/BigLaser.gd index e226881..6257357 100644 --- a/scripts/Contents/Weapons/BigLaser.gd +++ b/scripts/Contents/Weapons/BigLaser.gd @@ -5,6 +5,7 @@ class_name BigLaserWeapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 5 * to * soulLevel origin["time"] /= 1 + 0.05 * to * soulLevel + needEnergy += 5 return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") diff --git a/scripts/Contents/Weapons/LGBTWeapon.gd b/scripts/Contents/Weapons/LGBTWeapon.gd index 09f21b1..876c9e9 100644 --- a/scripts/Contents/Weapons/LGBTWeapon.gd +++ b/scripts/Contents/Weapons/LGBTWeapon.gd @@ -8,6 +8,7 @@ func update(to: int, origin: Dictionary, _entity: EntityBase): origin["power"] += 0.05 * to * soulLevel origin["trace"] += 0.25 * to * soulLevel origin["angle"] /= 1 + 0.05 * to * soulLevel + needEnergy += 1 return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") diff --git a/scripts/Contents/Weapons/MushroomPickaxe.gd b/scripts/Contents/Weapons/MushroomPickaxe.gd index c2c3f44..29268f2 100644 --- a/scripts/Contents/Weapons/MushroomPickaxe.gd +++ b/scripts/Contents/Weapons/MushroomPickaxe.gd @@ -5,6 +5,7 @@ func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 1 * to * soulLevel origin["rate"] += 0.04 * to * soulLevel origin["count"] += 1 * to * soulLevel + needEnergy += 0.5 return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") diff --git a/scripts/Contents/Weapons/VectorStarWeapon.gd b/scripts/Contents/Weapons/VectorStarWeapon.gd index cb6dcc9..08060f5 100644 --- a/scripts/Contents/Weapons/VectorStarWeapon.gd +++ b/scripts/Contents/Weapons/VectorStarWeapon.gd @@ -5,7 +5,9 @@ class_name VectorStarWeapon func update(to: int, origin: Dictionary, _entity: EntityBase): origin["atk"] += 5 * to * soulLevel origin["forwardtime"] /= 1 + 0.05 * to * soulLevel - origin["maxcount"] += 1 * to * soulLevel + origin["mincount"] += 0.5 * to * soulLevel + origin["maxcount"] += 1.5 * to * soulLevel + needEnergy += 2 return origin func attack(entity: EntityBase): var weaponPos = entity.findWeaponAnchor("normal") diff --git a/scripts/Structs/Weapon.gd b/scripts/Structs/Weapon.gd index 08b6ef1..f644518 100644 --- a/scripts/Structs/Weapon.gd +++ b/scripts/Structs/Weapon.gd @@ -79,7 +79,6 @@ func apply(entity: EntityBase): entity.inventory[ItemStore.ItemType.BEACHBALL] -= costBeachball updateStore(level, entity) costBeachball = floor(GameRule.weaponUpdateCost * costBeachball) - needEnergy = GameRule.weaponUpdateEnergy * needEnergy rebuildInfo() return allHave func updateStore(to: int, entity: EntityBase): diff --git a/scripts/Tools/GameRule.gd b/scripts/Tools/GameRule.gd index 117cb05..e567047 100644 --- a/scripts/Tools/GameRule.gd +++ b/scripts/Tools/GameRule.gd @@ -21,4 +21,3 @@ static var critRateInfluenceByLuckValue: float = MathTool.percent(2.5) # 幸运 static var penerateRateInfluenceByLuckValue: float = MathTool.percent(3) # 幸运值对穿透率的影响 static var detainTime: float = 1000 # 血量如果在这个时间内没有改变才会开始播放降低动画 static var weaponUpdateCost: float = 1.5 # 武器升级后消耗的棒球数量倍数 -static var weaponUpdateEnergy: float = 1.01 # 武器升级后消耗的能量倍数