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