1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-04 02:37:12 +08:00

feat(武器): 为火山武器添加幻影攻击功能

在火山武器的第4段攻击时发射多支火山幻影,造成额外伤害。修改了动画、伤害计算和武器描述,包括:
- 添加count和dmg5属性控制幻影数量和伤害
- 调整幻影动画效果和速度
- 更新武器描述模板和显示文本
This commit is contained in:
2025-11-22 16:36:59 +08:00
parent 0316387e73
commit 4a04c4ca01
5 changed files with 43 additions and 17 deletions
+14 -9
View File
@@ -5,6 +5,9 @@ class_name Volcano
@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)
@@ -17,12 +20,14 @@ func ai():
)
func generateShadow():
for i in BulletBase.generate(
ComponentManager.getBullet("VolcanoShadow"),
launcher,
textureSword.global_position,
anchor.global_rotation,
false, false, true, true
):
if i is VolcanoShadow:
i.baseDamage = baseDamage
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
+4
View File
@@ -7,6 +7,8 @@ func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["dmg2"] += 0.03 * to * soulLevel
origin["dmg3"] += 0.03 * to * soulLevel
origin["dmg4"] += 0.03 * to * soulLevel
origin["dmg5"] += 0.04 * to * soulLevel
origin["count"] = 1 * soulLevel + 1
origin["atk"] += 1 * to * soulLevel
return origin
func attack(entity: EntityBase):
@@ -20,3 +22,5 @@ func attack(entity: EntityBase):
bullet.baseDamage = readStore("atk")
bullet.rotates = readStore("rotate")
bullet.damageMultipliers = [readStore("dmg1"), readStore("dmg2"), readStore("dmg3"), readStore("dmg4")]
bullet.count = readStore("count")
bullet.dmg5 = readStore("dmg5")