1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-02 17:31:55 +08:00

feat(战斗系统): 为爆炸攻击添加内伤效果并重构内伤生成逻辑

- 在InfinitySword.gd中添加爆炸攻击时生成内伤球的功能
- 将内伤生成逻辑提取到InternalDamage.gd中的静态方法generateBall
- 移除Parrier.gd中重复的内伤生成代码,改用新的generateBall方法
- 更新Tree.tscn中的描述文本,添加对爆炸攻击产生内伤的说明
- 调整WeaponCardBase.tscn的UI布局,为描述文本添加滚动容器
This commit is contained in:
2026-05-09 20:09:58 +08:00
parent cf9568bcac
commit 9c1c739deb
5 changed files with 35 additions and 18 deletions
@@ -11,3 +11,16 @@ func spawn():
if bullet.motionType == BulletBase.MotionType.EXPLOSION:
hitbox.set_deferred("disabled", false)
)
static func generateBall(by: EntityBase, who: EntityBase, atk: float):
var internalDamages = who.getOrCreateCycleTimer("internalDamages", 3000, 150)
for bullet in BulletBase.generate(
ComponentManager.getBullet("InternalDamage"),
by,
Vector2.ZERO,
0
):
if bullet is InternalDamageBullet:
bullet.baseDamage = atk
bullet.hoster = who
internalDamages.host(bullet)