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

feat: 添加音元护盾武器和召唤物功能

实现音元护盾武器系统,包含以下内容:
- 新增护盾武器资源及脚本
- 添加护盾召唤物逻辑
- 实现护盾AI跟随主人功能
- 更新公鸡角色默认武器为护盾
This commit is contained in:
2025-12-08 22:23:53 +08:00
parent 3dd5f06bbe
commit b4bb95cc72
11 changed files with 163 additions and 3 deletions
+7
View File
@@ -0,0 +1,7 @@
class_name PresetSummonAI
static func lockMaster(summon: SummonBase, myMaster: EntityBase, onTexture: bool = false) -> void:
if onTexture:
summon.position = myMaster.texture.global_position
else:
summon.position = myMaster.position
+1
View File
@@ -0,0 +1 @@
uid://ds0dbvm0r34nv
+7
View File
@@ -0,0 +1,7 @@
extends SummonBase
class_name ShieldSummon
func register():
fields[FieldStore.Entity.PENARATION_RESISTANCE] = 1.0
func ai():
PresetSummonAI.lockMaster(self, myMaster, true)
+1
View File
@@ -0,0 +1 @@
uid://fc3pppnguup
+13
View File
@@ -0,0 +1,13 @@
@tool
extends Weapon
class_name ShieldWeapon
func update(to: int, origin: Dictionary, _entity: EntityBase):
origin["atk"] += 2 * to * soulLevel
return origin
func attack(entity: EntityBase):
var summon = entity.summon(ComponentManager.getSummon("Shield"))
if !summon: return true
summon.fields[FieldStore.Entity.MAX_HEALTH] = readStore("atk")
summon.health = summon.fields[FieldStore.Entity.MAX_HEALTH]
return true
+1
View File
@@ -0,0 +1 @@
uid://dcacy48pcfci3