2025-09-06 08:23:57 +08:00
|
|
|
@tool
|
2025-09-05 22:23:41 +08:00
|
|
|
extends Weapon
|
|
|
|
|
class_name PurpleCrystalWeapon
|
|
|
|
|
|
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
2025-12-13 11:28:15 +08:00
|
|
|
origin["atk"] += 1 * to * soulLevel
|
2025-09-05 22:23:41 +08:00
|
|
|
return origin
|
|
|
|
|
func attack(entity: EntityBase):
|
|
|
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
2025-09-21 13:11:31 +08:00
|
|
|
for bullet in BulletBase.generate(ComponentManager.getBullet("PurpleCrystal"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle()):
|
2025-11-22 22:51:33 +08:00
|
|
|
if bullet is BulletBase:
|
|
|
|
|
bullet.baseDamage = readStore("atk")
|
2025-09-06 07:40:21 +08:00
|
|
|
return true
|