1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-29 23:41:54 +08:00

feat(武器): 添加火山武器及其子弹逻辑

实现火山武器系统,包括:
1. 添加火山武器场景和脚本,支持旋转子弹和伤害计算
2. 新增子弹自旋转AI预设
3. 为公鸡角色添加火山武器配置
4. 实现武器升级效果随灵魂等级提升
This commit is contained in:
2025-11-15 19:33:10 +08:00
parent b8031d31d9
commit 5570cc97a2
8 changed files with 104 additions and 5 deletions
+2
View File
@@ -15,3 +15,5 @@ static func trace(bullet: BulletBase, target: Vector2, speed: float):
)
static func faceToMouse(bullet: BulletBase):
bullet.rotation = bullet.position.angle_to_point(bullet.get_global_mouse_position())
static func selfRotate(bullet: BulletBase, speed: float):
bullet.rotation += deg_to_rad(speed)
+8
View File
@@ -0,0 +1,8 @@
extends BulletBase
class_name Volcano
var rotates: float = 0
func ai():
PresetBulletAI.selfRotate(self, rotates)
PresetBulletAI.lockLauncher(self, launcher, true)
+1
View File
@@ -0,0 +1 @@
uid://ci5hswfhck5as
+14
View File
@@ -0,0 +1,14 @@
@tool
extends Weapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 5 * to * soulLevel
origin["count"] += 1 * soulLevel
origin["rotate"] += 0.25 * to * soulLevel
return origin
func attack(entity: EntityBase):
for i in readStore("count"):
for j in BulletBase.generate(ComponentManager.getBullet("Volcano"), entity, entity.findWeaponAnchor("normal"), deg_to_rad(360.0 / readStore("count") * i)):
var bullet: Volcano = j
bullet.damage = readStore("atk")
bullet.rotates = readStore("rotate")
+1
View File
@@ -0,0 +1 @@
uid://cbihum34xs8ev