feat(game): 添加PUA激励台——AI评分打鸡血,触发攻击/攻速/HC/狂暴/翻车等游戏效果;移除静音按钮BGM默认开启
This commit is contained in:
@@ -16,11 +16,18 @@ export abstract class TowerBase {
|
||||
|
||||
public readonly cost: number
|
||||
public readonly attackRange: number
|
||||
public readonly attackDamage: number
|
||||
private readonly _attackDamage: number
|
||||
// 实际伤害 = 基础伤害 × PUA倍率
|
||||
get attackDamage(): number {
|
||||
return this._attackDamage * this._puaDmgMult
|
||||
}
|
||||
public readonly attackSpeed: number
|
||||
public readonly maxStamina: number = STAMINA_MAX
|
||||
public stamina: number = STAMINA_MAX
|
||||
public isFrozen: boolean = false
|
||||
// PUA buff 动态倍率(由 GameScene.applyPuaBuff 设置)
|
||||
public _puaSpeedMult: number = 1.0 // 攻速倍率
|
||||
public _puaDmgMult: number = 1.0 // 伤害倍率
|
||||
|
||||
protected attackCooldown: number = 0
|
||||
protected staminaRegen: number = STAMINA_REGEN
|
||||
@@ -47,7 +54,7 @@ export abstract class TowerBase {
|
||||
this.gridY = gridY
|
||||
this.cost = cost
|
||||
this.attackRange = attackRange
|
||||
this.attackDamage = attackDamage
|
||||
this._attackDamage = attackDamage
|
||||
this.attackSpeed = attackSpeed
|
||||
this.spriteKey = spriteKey
|
||||
|
||||
@@ -92,7 +99,8 @@ export abstract class TowerBase {
|
||||
if (target && this.attackCooldown <= 0) {
|
||||
this.attack(target)
|
||||
this.stamina -= 5
|
||||
this.attackCooldown = 1000 / this.attackSpeed
|
||||
// 应用 PUA 攻速倍率(倍率越高冷却越短)
|
||||
this.attackCooldown = 1000 / (this.attackSpeed * this._puaSpeedMult)
|
||||
this.updateStaminaBar()
|
||||
} else if (!target) {
|
||||
this.stamina = Math.min(this.maxStamina, this.stamina + (this.staminaRegen * delta) / 1000)
|
||||
|
||||
Reference in New Issue
Block a user