mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
698b5a5618
调整钻石子弹的静态精灵位置和缩放,添加碰撞形状 修复当父节点无效时动画停止逻辑 ``` ```msg feat(Weapons/BlueCrystal): 调整蓝水晶武器属性 增加子弹环绕数量计算公式 降低基础攻击力并增加冷却时间 更新描述文本移除逃逸时间说明
18 lines
807 B
GDScript
18 lines
807 B
GDScript
@tool
|
|
extends Weapon
|
|
|
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
|
origin["atk"] += 1 * 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
|