2025-11-16 17:22:40 +08:00
|
|
|
@tool
|
|
|
|
|
extends Weapon
|
|
|
|
|
|
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
2026-04-12 15:27:32 +08:00
|
|
|
origin["atk"] += 0.1 * to * soulLevel
|
2025-11-16 17:22:40 +08:00
|
|
|
origin["count"] = 1 * soulLevel
|
2026-05-08 18:54:31 +08:00
|
|
|
origin["self"] += (soulLevel - 1)
|
2025-11-16 17:22:40 +08:00
|
|
|
return origin
|
|
|
|
|
func attack(entity: EntityBase):
|
|
|
|
|
entity.takeDamage(readStore("self"))
|
|
|
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
|
|
|
|
for i in BulletBase.generate(
|
|
|
|
|
ComponentManager.getBullet("Bow"),
|
|
|
|
|
entity,
|
|
|
|
|
weaponPos,
|
|
|
|
|
weaponPos.angle_to_point(get_global_mouse_position())
|
|
|
|
|
):
|
|
|
|
|
var bullet: Bow = i
|
|
|
|
|
bullet.count = readStore("count")
|
|
|
|
|
bullet.atk = readStore("atk")
|
2026-03-07 09:08:39 +08:00
|
|
|
return true
|