fix: improve endgame clock and gameplay stability

This commit is contained in:
CAtlas0784 committed 2026-11-04 15:59:48 +07:00
1 parent ce6aabfc55
commit 658298ee86
46 files changed
+1915 -99

No files matched your search

+10 -2
View File
@@ -145,7 +145,7 @@ func (r *battleRules) techniqueBuffs(a *common.AvatarJson, slot, leader uint32,
return result
}
func (r *battleRules) addGlobalPassives(battle *goproto.SceneBattleInfo, player *common.FreesrData) {
func (r *battleRules) addGlobalPassives(battle *goproto.SceneBattleInfo, player *common.FreesrData, attackerSlot *uint32) {
for _, rule := range r.GlobalPassives {
var enabled *bool
switch rule.Setting {
@@ -170,7 +170,15 @@ func (r *battleRules) addGlobalPassives(battle *goproto.SceneBattleInfo, player
if !present {
owner = battle.BattleAvatarList[0].Index
}
battle.BuffList = append(battle.BuffList, battleBuff(rule.BuffID, owner, nil))
buff := battleBuff(rule.BuffID, owner, nil)
// Owner is the configured source of the passive; the target is the
// scene actor who started this battle. Other global passives retain
// their captured target. A request without an identified attacker
// keeps the existing wire representation.
if rule.Setting == "enable_aha_global" && attackerSlot != nil {
buff.TargetIndexList = []uint32{*attackerSlot}
}
battle.BuffList = append(battle.BuffList, buff)
}
}