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

feat(武器系统): 重构氧化加农炮并添加篮球消耗机制

- 修改Oxygener武器属性,增加count字段控制篮球消耗
- 实现checkAttack方法检查篮球消耗
- 调整武器基础数值和描述
- 移除氧气火焰的击退效果
- 在Rooster角色中替换初始武器为Oxygener
- 修复代码缩进问题
This commit is contained in:
2026-03-14 07:21:42 +08:00
parent 52f7872a2a
commit 06413d204c
6 changed files with 22 additions and 11 deletions
+3 -1
View File
@@ -169,7 +169,7 @@ func playSound(sound: String):
cloned.queue_free()
func canAttackBy(entity: EntityBase):
cooldownTimer.speedScale = entity.fields.get(FieldStore.Entity.ATTACK_SPEED) * attackSpeed
return cooldownTimer.isCooldowned() and entity.isEnergyEnough(needEnergy)
return cooldownTimer.isCooldowned() and entity.isEnergyEnough(needEnergy) and checkAttack(entity)
func tryAttack(entity: EntityBase):
if canAttackBy(entity):
var result = await attack(entity)
@@ -183,5 +183,7 @@ func charged(base: float, percent: float):
# 抽象
func update(_to: int, origin: Dictionary, _entity: EntityBase):
return origin
func checkAttack(_entity: EntityBase) -> bool:
return true
func attack(_entity: EntityBase):
pass