2025-12-14 17:01:09 +08:00
|
|
|
@tool
|
|
|
|
|
extends Weapon
|
|
|
|
|
class_name RedCrystalWeapon
|
|
|
|
|
|
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
2025-12-14 22:25:24 +08:00
|
|
|
origin["atk"] += 5 * to * soulLevel
|
2025-12-16 23:01:16 +08:00
|
|
|
origin["radius"] += 1 * to * soulLevel
|
2025-12-22 13:16:27 +08:00
|
|
|
origin["count"] = 1 + 1 * soulLevel
|
2025-12-17 22:43:14 +08:00
|
|
|
origin["percent"] += 0.25 * (soulLevel - 1)
|
2025-12-14 17:01:09 +08:00
|
|
|
return origin
|
|
|
|
|
func attack(entity: EntityBase):
|
|
|
|
|
var weaponPos = entity.findWeaponAnchor("normal")
|
|
|
|
|
for bullet in BulletBase.generate(ComponentManager.getBullet("RedCrystal"), entity, weaponPos, (get_global_mouse_position() - weaponPos).angle()):
|
|
|
|
|
if bullet is RedCrystalBullet:
|
|
|
|
|
bullet.baseDamage = readStore("atk")
|
|
|
|
|
bullet.radius = readStore("radius")
|
2025-12-17 22:23:37 +08:00
|
|
|
bullet.percent = readStore("percent")
|
|
|
|
|
bullet.count = readStore("count")
|
2025-12-14 17:01:09 +08:00
|
|
|
return true
|