mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 15:01:53 +08:00
873b1b06a9
修改钢管武器的伤害计算公式,使用平方根函数替代线性增长 移除蓄力倍率属性,改为固定值0.1 更新武器描述文本以反映新的伤害机制
21 lines
531 B
GDScript
21 lines
531 B
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 1 * to * soulLevel
|
|
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"), 0.1)
|
|
bullet.baseDamage = e
|
|
bullet.energy = e
|
|
bullet.speed = e
|
|
return true
|