From fbcab848e223f53e860aa83efe8e2d9de291569a 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 16:18:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AD=90=E5=BC=B9?= =?UTF-8?q?=E4=BC=A4=E5=AE=B3=E8=AE=A1=E7=AE=97=E5=B9=B6=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整Wuwei子弹的伤害计算方式,移除冗余计算并添加rate2变量控制伤害倍率。修改Parrier子弹的反射伤害计算,加入子弹伤害因子。优化DaoStatue武器的攻击触发条件,从检测1颗子弹改为3颗,并简化子弹生成逻辑。 --- scripts/Contents/Bullets/Parrier.gd | 2 +- scripts/Contents/Bullets/Wuwei.gd | 6 ++++++ scripts/Contents/Weapons/DaoStatue.gd | 11 +++-------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/scripts/Contents/Bullets/Parrier.gd b/scripts/Contents/Bullets/Parrier.gd index 9810ce0..23bdf14 100644 --- a/scripts/Contents/Bullets/Parrier.gd +++ b/scripts/Contents/Bullets/Parrier.gd @@ -76,7 +76,7 @@ func hitBullet(bullet: BulletBase): # 当前子弹与其他子弹相撞 elif bullet.motionType == BulletBase.MotionType.STAB: parryEffect(bullet) bullet.hitbox.set_deferred("disabled", true) - bullet.launcher.takeDamage(atk * reflectRate) + bullet.launcher.takeDamage(atk * reflectRate * bullet.getDamage()) bullet.launcher.impluse(Vector2.from_angle(bullet.rotation) * -2000) generateParryBall(bullet.baseDamage) elif bullet.motionType == BulletBase.MotionType.SPRINT: diff --git a/scripts/Contents/Bullets/Wuwei.gd b/scripts/Contents/Bullets/Wuwei.gd index f8949a5..d5871dd 100644 --- a/scripts/Contents/Bullets/Wuwei.gd +++ b/scripts/Contents/Bullets/Wuwei.gd @@ -3,10 +3,16 @@ class_name WuweiBullet @export var canMove: bool = true +var rate2: float = 0 + func ai(): if canMove: PresetBulletAI.lockLauncher(self , launcher, true) PresetBulletAI.trace(self , launcher.currentFocusedPosition, 0.1) +func hitBullet(bullet: BulletBase): + if !is_instance_valid(launcher): return + if BulletTool.canDamage(bullet, launcher): + baseDamage *= rate2 ** bullet.getDamage() func shoot(): for bullet in BulletBase.generate( diff --git a/scripts/Contents/Weapons/DaoStatue.gd b/scripts/Contents/Weapons/DaoStatue.gd index ba4e746..8d4fe6f 100644 --- a/scripts/Contents/Weapons/DaoStatue.gd +++ b/scripts/Contents/Weapons/DaoStatue.gd @@ -7,7 +7,7 @@ func update(to: int, origin: Dictionary, _entity: EntityBase): origin["rate2"] += 0.06 * (soulLevel - 1) return origin func checkAttack(entity: EntityBase) -> bool: - return len(entity.getOrCreateCycleTimer("parry", 2000, 100).bullets) > 0 + return len(entity.getOrCreateCycleTimer("parry", 2000, 100).bullets) > 2 func attack(entity: EntityBase): var parryCounter = entity.getOrCreateCycleTimer("parry", 2000, 100) for bullet in BulletBase.generate( @@ -18,14 +18,9 @@ func attack(entity: EntityBase): ): if bullet is WuweiBullet: bullet.baseDamage = readStore("atk") - bullet.baseDamage *= max(-0.99, readStore("rate2") * ((1.0 - entity.fields[FieldStore.Entity.ATTACK_SPEED]) * 100)) + 1 bullet.baseDamage *= max(-0.99, readStore("rate1") * (entity.fields[FieldStore.Entity.MAX_HEALTH] - entity.health)) + 1 - var atkAll = 0 - for bulle in parryCounter.bullets: - if bulle is ParryBallBullet: - atkAll += bulle.atk - bullet.baseDamage *= max(-0.99, readStore("rate3") * atkAll) + 1 - for bulle in parryCounter.bullets: + bullet.rate2 = readStore("rate2") + for bulle in parryCounter.bullets.slice(0, 3): if bulle is ParryBallBullet: bulle.tryDestroy() parryCounter.forceFilter()