mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 07:21:54 +08:00
7ab849129f
为七魂武器添加攻击力属性并调整伤害和治疗机制 修复子弹工具中空引用检查缺失的问题 移除子弹基类中冗余的空检查逻辑 更新武器描述以反映新功能 调整子弹粒子效果和伤害计算方式
19 lines
599 B
GDScript
19 lines
599 B
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func attack(entity: EntityBase):
|
|
playSound("attack")
|
|
for i in 6:
|
|
for bullet in BulletBase.generate(ComponentManager.getBullet("SevenSoul"), entity, entity.texture.global_position, 0):
|
|
if bullet is SevenSoulBullet:
|
|
bullet.index = i
|
|
bullet.baseDamage = readStore("atk")
|
|
bullet.energyCollect = readStore("dmg")
|
|
bullet.healAmount = readStore("heal")
|
|
await TickTool.millseconds(15000 / 6.0)
|
|
func update(to, origin, _entity):
|
|
origin["atk"] += 1 * to * soulLevel
|
|
origin["dmg"] += 0.02 * to * soulLevel
|
|
origin["heal"] += 0.1 * to * soulLevel
|
|
return origin
|