1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-31 00:11:54 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Weapons/Pipe.gd
T
fallingshrimp 21352430e3 fix(Weapons/Pipe): 调整攻击力和充能值的增长系数
将攻击力增长系数从2降低至1,充能值增长系数从0.02降低至0.005,以平衡武器性能
2026-02-05 21:11:07 +08:00

22 lines
591 B
GDScript

@tool
extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 1 * to * soulLevel
origin["charge"] += 0.005 * 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"), readStore("charge"))
bullet.baseDamage = e
bullet.energy = e
bullet.speed = e
return true