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()