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"):
|
2026-04-11 11:05:59 +08:00
|
|
|
var myFloor = get_global_mouse_position() + MathTool.sampleInCircle(readStore("radius"))
|
|
|
|
|
for bullet in BulletBase.generate(ComponentManager.getBullet("WhiteSoul"), entity,
|
|
|
|
|
get_global_mouse_position() + QuickUI.getWindowSize() * Vector2(randf_range(-1, 1) * 0.25, -1),
|
|
|
|
|
0
|
2025-09-29 22:33:56 +08:00
|
|
|
):
|
2026-04-11 11:05:59 +08:00
|
|
|
if bullet is WhiteSoulBullet:
|
|
|
|
|
bullet.look_at(myFloor)
|
|
|
|
|
bullet.floorPos = myFloor
|
|
|
|
|
bullet.baseDamage = readStore("atk")
|
2025-09-29 22:33:56 +08:00
|
|
|
return true
|