mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-30 16:01:53 +08:00
fd58948b3f
修复管道武器的充能计算方式,改为基于灵魂等级减1的乘法 修改子弹旋转速度计算,使用初始速度替代能量值 添加子弹基础伤害与能量值的关联 调整子弹命中后的能量衰减系数
22 lines
591 B
GDScript
22 lines
591 B
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 1 * to * soulLevel
|
|
origin["charge"] += 0.05 * (soulLevel - 1)
|
|
return origin
|
|
func attack(entity: EntityBase):
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
|
for bullet in BulletBase.generate(
|
|
ComponentManager.getBullet("Pipe"),
|
|
entity,
|
|
weaponPos,
|
|
weaponPos.angle_to_point(get_global_mouse_position())
|
|
):
|
|
if bullet is PipeBullet:
|
|
var e = charged(readStore("atk"), readStore("charge"))
|
|
bullet.baseDamage = e
|
|
bullet.energy = e
|
|
bullet.speed = e
|
|
return true
|