[Lua] 纯文本查看 复制代码 if BeeIsRun("反魔法护罩") and not IsMounted("player") and not UnitIsDeadOrGhost("player") and UnitAffectingCombat("player") and not UnitBuff("player", GetSpellInfo(48707)) -- 精确检测护罩BUFF and GetTime() - (ams_cd or 0) > 45 -- 冷却系统(实际CD 60秒,留15秒缓冲)then -- 血量智能检测系统 local currentHealth = UnitHealth("player")/UnitHealthMax("player")*100 local healthThreshold = 80 -- 自定义阈值 -- 智能施法判断(包含防抖机制) if currentHealth <= healthThreshold and not (UnitGetIncomingHeals("player") and UnitGetIncomingHeals("player") > 0) -- 排除治疗在读 then ams_cd = GetTime() BeeRun("反魔法护罩") -- 可选调试输出 print("|cff00ff00[AMS触发]|r 当前血量:"..string.format("%.1f%%", currentHealth)) endend |