diff --git a/components/Weapons/DaoStatue.tscn b/components/Weapons/DaoStatue.tscn index 0cfafb1..feef666 100644 --- a/components/Weapons/DaoStatue.tscn +++ b/components/Weapons/DaoStatue.tscn @@ -29,10 +29,10 @@ descriptionTemplate = "挥出[b]天地之剑[/b],蓄力一段时间后, 攻击速度每降低[color=yellow]1%[/color],伤害+$rate2; 每失去[color=yellow]1[/color]点生命值,伤害+$rate1; 拥有的所有[b]气力[/b]层数之和,每化解[color=yellow]1[/color]点伤害,[b]无量斩[/b]的伤害+$rate3; -每次攻击都会消耗气力。" +每次攻击需要消耗至少[color=yellow]1[/color]层气力。" sources = Array[String](["Nine Sols"]) tease = "天机不可泄露" -needEnergy = 50.0 +needEnergy = 25.0 cooldown = 4000.0 debugRebuild = true @@ -43,7 +43,7 @@ stream = ExtResource("4_y3oaj") texture = ExtResource("2_gx1sf") [node name="energy" parent="container/info/infos/energyInfo" parent_id_path=PackedInt32Array(644675021) index="1" unique_id=1664028115] -text = "50.0" +text = "25.0" [node name="beachball" parent="container/info/infos" parent_id_path=PackedInt32Array(492799150) index="1" unique_id=653442983] count = 499 @@ -62,7 +62,7 @@ text = "[center]挥出[b]天地之剑[/b],蓄力一段时间后, 攻击速度每降低[color=yellow]1%[/color],伤害+[color=cyan]2.5%[/color]; 每失去[color=yellow]1[/color]点生命值,伤害+[color=cyan]5.0%[/color]; 拥有的所有[b]气力[/b]层数之和,每化解[color=yellow]1[/color]点伤害,[b]无量斩[/b]的伤害+[color=cyan]1.0%[/color]; -每次攻击都会消耗气力。[/center]" +每次攻击需要消耗至少[color=yellow]1[/color]层气力。[/center]" [node name="tease" parent="container" parent_id_path=PackedInt32Array(575698869) index="3" unique_id=689277044] text = "“天机不可泄露”" diff --git a/scripts/Contents/Weapons/DaoStatue.gd b/scripts/Contents/Weapons/DaoStatue.gd index 5fc5f61..499618f 100644 --- a/scripts/Contents/Weapons/DaoStatue.gd +++ b/scripts/Contents/Weapons/DaoStatue.gd @@ -7,6 +7,8 @@ func update(to: int, origin: Dictionary, _entity: EntityBase): origin["rate2"] *= soulLevel origin["rate3"] *= soulLevel return origin +func checkAttack(entity: EntityBase) -> bool: + return len(entity.getOrCreateCycleTimer("parry", 2000, 100).bullets) > 0 func attack(entity: EntityBase): var parryCounter = entity.getOrCreateCycleTimer("parry", 2000, 100) for bullet in BulletBase.generate( @@ -27,4 +29,5 @@ func attack(entity: EntityBase): for bulle in parryCounter.bullets: if bulle is ParryBallBullet: bulle.tryDestroy() + parryCounter.forceFilter() return true diff --git a/scripts/Statemachine/CycleTimer.gd b/scripts/Statemachine/CycleTimer.gd index 1e8fbb1..f7f50b0 100644 --- a/scripts/Statemachine/CycleTimer.gd +++ b/scripts/Statemachine/CycleTimer.gd @@ -14,8 +14,10 @@ func lifetime(): return Time.get_ticks_msec() - startTime func getStateAngle(index: int): return lifetime() / period * deg_to_rad(360) - deg_to_rad(360.0 * index / len(bullets)) -func apply(): +func forceFilter(): bullets = bullets.filter(is_instance_valid) +func apply(): + forceFilter() for index in len(bullets): var bullet = bullets[index] var newStateAngle = lerp_angle(bullet.cycleStateAngle, getStateAngle(index), 0.1)