1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(武器系统): 优化道像武器逻辑并调整能量消耗

- 将子弹过滤逻辑提取为独立方法 forceFilter
- 增加攻击前检查气力层的功能
- 降低武器能量需求从50改为25
- 更新武器描述文本以更准确反映机制
This commit is contained in:
2026-04-05 07:50:24 +08:00
parent 0b97de0fcc
commit 8d8f25976c
3 changed files with 10 additions and 5 deletions
+4 -4
View File
@@ -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 = "“天机不可泄露”"
+3
View File
@@ -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
+3 -1
View File
@@ -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)