mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
feat: 添加无敌状态和自定义波次逻辑
- 为EntityBase添加currentInvinsible属性控制无敌状态 - 修改BulletBase.gd在命中时检查目标无敌状态 - 在World.tscn中设置rooster初始为无敌状态 - 添加Wave.gd自定义波次启动逻辑 - 修复currentFocusedBoss未初始化时的空指针问题
This commit is contained in:
@@ -79,9 +79,10 @@ func _physics_process(_delta: float) -> void:
|
||||
func hit(target: Node):
|
||||
var entity: EntityBase = EntityTool.fromHurtbox(target)
|
||||
if !entity || !launcher: return
|
||||
if entity.currentInvinsible: return
|
||||
if !canDamageSelf && entity == launcher: return
|
||||
if !indisDamage && !GameRule.allowFriendlyFire:
|
||||
if entity.isPlayer() == launcher.isPlayer(): return
|
||||
if entity.isPlayer() == launcher.isPlayer() and launcher.currentFocusedBoss != entity: return
|
||||
var damages = entity.takeDamage(self, MathTool.rate(launcher.fields.get(FieldStore.Entity.CRIT_RATE) + GameRule.critRateInfluenceByLuckValue * launcher.fields[FieldStore.Entity.LUCK_VALUE]))
|
||||
succeedToHit(damages)
|
||||
if MathTool.rate(fullPenerate()):
|
||||
|
||||
Reference in New Issue
Block a user