1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(武器): 新增道教石像武器及其相关效果

实现道教石像武器,包含以下功能:
- 添加天地之剑攻击逻辑,根据攻击速度、生命值和气层数计算伤害
- 新增无量斩子弹类型和特效
- 为公鸡角色添加新武器配置
- 更新相关动画和音效资源
This commit is contained in:
2026-04-03 18:29:14 +08:00
parent f018378053
commit 7e90bd1c1c
29 changed files with 734 additions and 60 deletions
@@ -1,5 +1,12 @@
extends BulletBase
class_name InfinitySwordBullet
var implused: Array[EntityBase] = []
func ai():
PresetBulletAI.forward(self , rotation)
func succeedToHit(_dmg: float, entity: EntityBase):
if implused.has(entity): return
else:
implused.append(entity)
entity.impluse(Vector2.from_angle(rotation) * 1500)
+18 -1
View File
@@ -1,5 +1,22 @@
extends BulletBase
class_name WuweiBullet
@export var canMove: bool = true
func ai():
if canMove:
PresetBulletAI.lockLauncher(self , launcher, true)
look_at(get_global_mouse_position())
func shoot():
pass
for bullet in BulletBase.generate(
ComponentManager.getBullet("InfinitySword"),
launcher,
position + Vector2.from_angle(rotation) * 400,
rotation
):
if bullet is InfinitySwordBullet:
bullet.baseDamage = baseDamage
func beReady():
canMove = false
EffectController.create(ComponentManager.getEffect("Danger"), findAnchor("Spawn")).shot()
+16
View File
@@ -0,0 +1,16 @@
@tool
extends Weapon
func attack(entity: EntityBase):
for bullet in BulletBase.generate(
ComponentManager.getBullet("Wuwei"),
entity,
entity.position,
entity.position.angle_to_point(get_global_mouse_position())
):
if bullet is WuweiBullet:
bullet.baseDamage = readStore("atk")
bullet.baseDamage *= (readStore("rate2") + 1) ** ((1.0 - entity.fields[FieldStore.Entity.ATTACK_SPEED]) * 100)
bullet.baseDamage *= (readStore("rate1") + 1) ** (entity.fields[FieldStore.Entity.MAX_HEALTH] - entity.health)
bullet.baseDamage *= (readStore("rate3") + 1) ** len(entity.getOrCreateCycleTimer("parry", 2000, 100).bullets)
return true
@@ -0,0 +1 @@
uid://cu42bwm2r05p6
+6
View File
@@ -104,6 +104,12 @@ func _physics_process(_delta: float) -> void:
else:
tryDestroy()
func findAnchor(anch: String):
var node = get_node_or_null("%anchor" + anch)
if node is Node2D:
return node.global_position
else:
return Vector2.ZERO
func setupCuttable(cutSpeed: float):
area_entered.connect(
func(body):