2025-09-29 22:33:56 +08:00
|
|
|
@tool
|
|
|
|
|
extends Weapon
|
|
|
|
|
|
|
|
|
|
func update(to, origin, _entity):
|
2025-11-30 16:23:53 +08:00
|
|
|
origin["atk"] += 1 * to * soulLevel
|
|
|
|
|
origin["count"] = 1 * soulLevel
|
2025-09-29 22:33:56 +08:00
|
|
|
origin["radius"] /= 1 + 0.05 * to * soulLevel
|
|
|
|
|
return origin
|
|
|
|
|
func attack(entity: EntityBase):
|
|
|
|
|
for i in readStore("count"):
|
|
|
|
|
var myPos = get_global_mouse_position() + QuickUI.getWindowSize() * Vector2(randf_range(-1, 1) * 0.25, -1)
|
|
|
|
|
for j in BulletBase.generate(ComponentManager.getBullet("WhiteSoul"), entity,
|
|
|
|
|
myPos,
|
2026-01-18 15:31:52 +08:00
|
|
|
myPos.angle_to_point(get_global_mouse_position() + MathTool.sampleInCircle(readStore("radius")))
|
2025-09-29 22:33:56 +08:00
|
|
|
):
|
2025-11-22 22:51:33 +08:00
|
|
|
if j is BulletBase:
|
|
|
|
|
j.baseDamage = readStore("atk")
|
2025-09-29 22:33:56 +08:00
|
|
|
return true
|