1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 15:01:53 +08:00
Files
Dog-Lynx-And-HCN/scripts/Contents/Bullets/Volcano.gd
T
fallingshrimp 4a04c4ca01 feat(武器): 为火山武器添加幻影攻击功能
在火山武器的第4段攻击时发射多支火山幻影,造成额外伤害。修改了动画、伤害计算和武器描述,包括:
- 添加count和dmg5属性控制幻影数量和伤害
- 调整幻影动画效果和速度
- 更新武器描述模板和显示文本
2025-11-22 16:36:59 +08:00

34 lines
848 B
GDScript

extends BulletBase
class_name Volcano
@onready var textureSword: Sprite2D = $%textureSword
@onready var anchor: Node2D = $%anchor
var rotates: float = 0
var count: int = 0
var dmg5: float = 0
var splitAngle: float = 10
func register():
animator.speed_scale = launcher.fields.get(FieldStore.Entity.ATTACK_SPEED)
func ai():
PresetBulletAI.lockLauncher(self, launcher, true)
rotation = lerp_angle(
rotation,
position.angle_to_point(get_global_mouse_position()),
rotates
)
func generateShadow():
var startAngle = rotation - deg_to_rad(count * splitAngle / 2)
for i in count:
for bullet in BulletBase.generate(
ComponentManager.getBullet("VolcanoShadow"),
launcher,
position,
startAngle + i * deg_to_rad(splitAngle),
false, false, true, true
):
if bullet is VolcanoShadow:
bullet.baseDamage = baseDamage * dmg5