Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "i": 458720,
- "m": "d",
- "s": "Dev",
- "d": {
- "yOffset": -88.999969482422,
- "desaturate": false,
- "additional_triggers": [
- {
- "untrigger": [],
- "trigger": {
- "use_absorbMode": true,
- "unit": "player",
- "use_unit": true,
- "unevent": "auto",
- "custom": "function()\n aura_env.makehealerlist()\n return false\nend\n\n\n\n\n\n\n\n",
- "subeventSuffix": "_CAST_START",
- "events": "GROUP_ROSTER_UPDATE",
- "event": "Health",
- "type": "custom",
- "custom_type": "status",
- "subeventPrefix": "SPELL",
- "check": "event"
- }
- }
- ],
- "text1Point": "TOP",
- "regionType": "text",
- "animation": {
- "main": {
- "colorA": 1,
- "x": 0,
- "use_color": true,
- "y": 0,
- "rotate": 0,
- "scaley": 1,
- "colorFunc": "function()\n if WeakAuras.IsOptionsOpen() then\n return 1,1,1,1\n end\n local time = GetTime()\n if not aura_env.last or aura_env.last < time - 0.2 then\n aura_env.last = time\n \n -- number of atonements\n local atonement_count = aura_env.atonement_count()\n \n if atonement_count > 0 then\n local vers = 1 + GetCombatRatingBonus(29) / 100\n local mastery = 1 + GetMasteryEffect() / 100\n local haste = UnitSpellHaste(\"player\")\n local holy_crit_chance = GetSpellCritChance(2)/100\n local spellBonusArcane = GetSpellBonusDamage(7)\n local atonement_transfer = mastery * 60 / 100\n local hasTof = WA_GetUnitBuff(\"player\", 265259)\n local tof = hasTof and 1.2 or 1\n local hasSchism = WA_GetUnitDebuff(\"target\", 214621)\n local schism = hasSchism and 1.4 or 1\n local hasSins = select(4, GetTalentInfo(5, 1, 1))\n local sins = hasSins and aura_env.sotm[atonement_count] or 1\n \n \n -- calc smite healing \n -- TODO: add \"Weal and Woe\" and \"Gift of Forgiveness\" traits\n local heal_per_unit = spellBonusArcane * 0.5 * 1.5 * vers * atonement_transfer * tof * sins * schism\n local heal_per_unit_avg = heal_per_unit + heal_per_unit*holy_crit_chance\n \n local casttime = select(4, GetSpellInfo(585))\n local heal_hit, heal_crit, threshold_pct = aura_env.calc_healing_from_spell(casttime, heal_per_unit)\n local heal_avg = heal_hit*(1-holy_crit_chance) + heal_crit*holy_crit_chance\n \n local efficiency = (heal_avg*100) / heal_per_unit_avg\n --print((\"efficiency: %.1f - threshold_pct: %.1f\"):format(efficiency, threshold_pct))\n \n local col = {[\"red\"] = {1,0,0,1}, [\"orange\"] = {1,0.5,0,1}, [\"yellow\"] = {1,1,0,1}, [\"green\"] = {0,1,0,1}}\n local choice = {}\n \n if threshold_pct > aura_env.min_threshold_pct then\n if efficiency >= aura_env.color.green then\n choice = col.green\n elseif efficiency >= aura_env.color.yellow then\n choice = col.yellow\n elseif efficiency >= aura_env.color.orange then\n choice = col.orange\n else\n choice = col.red\n end\n else\n choice = col.red\n end\n \n aura_env.cur_color = choice\n end\n end\n if aura_env.cur_color then\n return aura_env.cur_color[1], aura_env.cur_color[2], aura_env.cur_color[3], aura_env.cur_color[4]\n else\n return 1,1,1,1\n end \nend",
- "colorType": "custom",
- "colorR": 1,
- "colorG": 1,
- "alpha": 0,
- "type": "custom",
- "duration_type": "seconds",
- "colorB": 1,
- "scalex": 1
- },
- "start": {
- "type": "none",
- "duration_type": "seconds"
- },
- "finish": {
- "type": "none",
- "duration_type": "seconds"
- }
- },
- "keepAspectRatio": false,
- "selfPoint": "CENTER",
- "cooldownTextEnabled": true,
- "stickyDuration": false,
- "text1Font": "Friz Quadrata TT",
- "init_started": 1,
- "xOffset": -266.00006103516,
- "glow": false,
- "text1FontSize": 13,
- "text2Point": "CENTER",
- "height": 36.000007629395,
- "text1Enabled": true,
- "width": 25.999996185303,
- "text2Font": "Friz Quadrata TT",
- "text2FontFlags": "OUTLINE",
- "text1Containment": "OUTSIDE",
- "disjunctive": "custom",
- "internalVersion": 3,
- "customTriggerLogic": "function(t) return t[1] end",
- "text2Enabled": false,
- "text2FontSize": 24,
- "text2Containment": "INSIDE",
- "uid": "cM7I)yZeYPH",
- "text2Color": [
- 1,
- 1,
- 1,
- 1
- ],
- "auto": true,
- "numTriggers": 2,
- "text1FontFlags": "OUTLINE",
- "text2": "%p",
- "displayText": "%s",
- "displayIcon": 135769,
- "actions": {
- "init": {
- "custom": "-- Buds#0500 @ Discord - https://wago.io/p/Buds\n-- https://wago.io/H1DUIp0zm\n-- update: 14/07/2018\n\n-- heck healing done by other healers in group (set false to improve fps)\naura_env.check_incoming_heal = true\n\n-- add delay to smite cast time\naura_env.reaction_time = 500\n\n-- ignore units with more than 99% HP (lower to improve fps)\naura_env.health_deficit_threshold = 99\n\n-- don't use smite if 50% of units with atonement have more than 99% HP\naura_env.min_threshold_pct = 50\n\n--green if total healing from a smite heal is >= 100% of a single atonement smite heal (might have to change how this is calculated)\naura_env.color = {\n [\"green\"] = 100.0,\n [\"yellow\"] = 70.0,\n [\"orange\"] = 40.0\n}\n\n--------------------\naura_env.healers = {}\n\nfunction aura_env.GroupMembers(reversed, forceParty)\n local unit = (not forceParty and IsInRaid()) and 'raid' or 'party'\n local numGroupMembers = (forceParty and GetNumSubgroupMembers() or GetNumGroupMembers()) - (unit == \"party\" and 1 or 0)\n local i = reversed and numGroupMembers or (unit == 'party' and 0 or 1)\n return function()\n local ret\n if i == 0 and unit == 'party' then\n ret = 'player'\n elseif i <= numGroupMembers and i > 0 then\n ret = unit .. i\n end\n i = i + (reversed and -1 or 1)\n return ret\n end\nend\n\naura_env.atonement_count = function()\n local triggerInfo = WeakAuras.triggerState[aura_env.id][0][\"\"]\n return triggerInfo and triggerInfo.stacks or 0\nend\naura_env.atonement_list = function()\n local triggerInfo = WeakAuras.triggerState[aura_env.id][0][\"\"]\n return triggerInfo and triggerInfo.name and string.gmatch(triggerInfo.name, \"%S+\")\nend\n\n\naura_env.sotm = {\n [0] = 1.12,\n [1] = 1.12,\n [2] = 1.10,\n [3] = 1.09,\n [4] = 1.08,\n [5] = 1.07,\n [6] = 1.06,\n [7] = 1.05,\n [8] = 1.04\n}\nsetmetatable(aura_env.sotm, {__index = function () return 1.03 end}) -- default 1.03\n\naura_env.makehealerlist = function()\n aura_env.healers = {}\n for groupmember in WA_IterateGroupMembers() do\n if UnitGroupRolesAssigned(groupmember) == \"HEALER\" and UnitGUID(groupmember) ~= WeakAuras.myGUID then\n table.insert(aura_env.healers, groupmember)\n end\n end\nend\n\n\nfunction aura_env.calc_healing_from_spell(cast_time, healing_per_unit)\n local now = GetTime()\n local heal_hit, heal_crit = 0, 0\n \n local count_atonement_filtered = 0 -- count units with atonement up when cast finish\n local count_atonement_filtered_underthreshold = 0 -- count units with atonement up when cast finish + hp < threshold\n \n -- get atonement list from aura trigger, save a lot of time\n local ato_list = aura_env.atonement_list()\n if ato_list then\n for unit in ato_list do\n local ato = select(6, WA_GetUnitBuff(unit, 194384, \"PLAYER\"))\n local atonement_remaining_time = ato and ato - now or 0\n -- filter if buff drop before end of cast\n if atonement_remaining_time*1000 > cast_time + aura_env.reaction_time then\n count_atonement_filtered = count_atonement_filtered +1\n \n local hp_max, hp_cur = UnitHealthMax(unit), UnitHealth(unit)\n local health_deficit = hp_max - hp_cur\n local hp_pct = hp_cur / hp_max * 100\n -- check deficit threshold\n if hp_pct < aura_env.health_deficit_threshold then\n count_atonement_filtered_underthreshold = count_atonement_filtered_underthreshold + 1\n -- incoming heal\n if aura_env.check_incoming_heal then\n if UnitGetIncomingHeals(unit) > 0 then\n -- incoming heal source(s)\n local external_healing_total = 0\n for _,healer in pairs(aura_env.healers) do\n local external_healing = UnitGetIncomingHeals(unit, healer) or 0\n if external_healing > 0 then\n -- process only incoming heals that will land before the smite\n local when_lands = select(5, UnitCastingInfo(healer))\n if when_lands then\n when_lands = when_lands - now*1000\n if when_lands < cast_time + aura_env.reaction_time then\n external_healing_total = external_healing_total + external_healing\n end\n end\n end\n end\n external_healing_total = external_healing_total < health_deficit and external_healing_total or health_deficit\n health_deficit = health_deficit - external_healing_total\n end\n end\n -- compute the heal received by this unit\n local this_hit = health_deficit < healing_per_unit and health_deficit or healing_per_unit\n local this_crit = health_deficit < healing_per_unit*2 and health_deficit or healing_per_unit*2\n heal_hit = heal_hit + this_hit\n heal_crit = heal_crit + this_crit\n end\n end\n end\n end\n \n if count_atonement_filtered > 0 then\n local count_atonement_filtered_underthreshold_pct = count_atonement_filtered_underthreshold / count_atonement_filtered * 100\n return heal_hit, heal_crit, count_atonement_filtered_underthreshold_pct\n else\n return 0, 0 ,0\n end\nend",
- "do_custom": true
- }
- },
- "customText": "",
- "zoom": 0,
- "text1": "%n",
- "inverse": false,
- "load": {
- "difficulty": {
- "multi": []
- },
- "faction": {
- "multi": []
- },
- "use_spec": true,
- "class": {
- "single": "PRIEST"
- },
- "ingroup": {
- "single": "group",
- "multi": {
- "group": true
- }
- },
- "race": {
- "multi": []
- },
- "spec": {
- "single": 1
- },
- "use_class": true,
- "role": {
- "multi": []
- },
- "use_ingroup": true,
- "pvptalent": {
- "multi": []
- },
- "talent": {
- "multi": []
- },
- "talent2": {
- "multi": []
- }
- },
- "trigger": {
- "ownOnly": true,
- "name_info": "players",
- "showOn": "showOnActive",
- "group_count": "0",
- "spellIds": [
- 81749,
- 214206,
- 194384
- ],
- "debuffType": "HELPFUL",
- "unit": "group",
- "names": [
- "Atonement",
- "Atonement",
- "Atonement"
- ],
- "stack_info": "count",
- "use_specific_unit": false,
- "group_countOperator": ">"
- },
- "icon": true,
- "id": "Atonement count with smite helper",
- "text1Color": [
- 1,
- 1,
- 1,
- 1
- ],
- "activeTriggerMode": 0,
- "fontSize": 36,
- "url": "https://wago.io/H1DUIp0zm/4"
- },
- "v": 1421,
- "a": {
- "Atonement": 458720
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement