1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Weapons/BlueCrystal.gd
T
fallingshrimp 33b2b16b70 refactor(武器系统): 调整水晶武器伤害计算和子弹行为
重构蓝水晶和紫水晶武器的伤害计算方式,将蓝水晶的基础伤害从3降至2
移除紫水晶子弹的分裂和折射功能,将其逻辑移至BulletBase基类
更新相关场景文件中的显示文本和配置参数
调整角色初始武器配置,移除无用音效资源
2025-12-13 10:55:02 +08:00

19 lines
820 B
GDScript

@tool
extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 2 * to * soulLevel
origin["count"] = 1 + 1 * soulLevel
return origin
func attack(entity: EntityBase):
for i in BulletBase.generate(ComponentManager.getBullet("BlueCrystal"), entity, entity.findWeaponAnchor("normal"), deg_to_rad(randf_range(0, 360))):
if i is BlueCrystalBullet:
i.tracer = EntityTool.findClosetEntity(get_global_mouse_position(), get_tree(), !entity.isPlayer(), entity.isPlayer())
i.baseDamage = readStore("atk")
for index in readStore("count"):
for j in BulletBase.generate(ComponentManager.getBullet("Diamond2"), entity, i.position, deg_to_rad(360.0 / readStore("count") * index)):
if j is Diamond2Bullet:
j.baseDamage = readStore("atk")
j.parent = i
return true