Skip to content

Commit

Permalink
Merge pull request #2 from CuteOne/master
Browse files Browse the repository at this point in the history
X
  • Loading branch information
Dastano committed Sep 21, 2018
2 parents 0d726f1 + ad38dcf commit 31c080e
Show file tree
Hide file tree
Showing 14 changed files with 679 additions and 626 deletions.
9 changes: 6 additions & 3 deletions Rotations/Demon Hunter/Havoc/HavocCuteOne.lua
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,8 @@ local function runRotation()
end
-- Eye Beam
-- eye_beam,if=active_enemies>1&(!raid_event.adds.exists|raid_event.adds.up)&!variable.waiting_for_momentum
if cast.able.eyeBeam() and enemies.yards8r > 0 and not moving and not waitForMomentum --and (ttd(units.dyn8) > 2 or isDummy(units.dyn8))
if cast.able.eyeBeam() and enemies.yards8r > 0 and not moving and not waitForMomentum and (not talent.momentum or buff.momentum.exists())
--and (ttd(units.dyn8) > 2 or isDummy(units.dyn8))
-- and ((getOptionValue("Eye Beam Usage") == 1 and mode.rotation == 1 and enemies.yards8r > 1)
-- or (getOptionValue("Eye Beam Usage") == 2 and mode.rotation == 1 and enemies.yards8r >= getOptionValue("Units To AoE"))
-- or (mode.rotation == 2 and enemies.yards8r > 0))
Expand Down Expand Up @@ -626,7 +627,8 @@ local function runRotation()
end
-- Eye Beam
-- eye_beam,if=!talent.blind_fury.enabled&!variable.waiting_for_dark_slash&raid_event.adds.in>cooldown
if cast.able.eyeBeam() and enemies.yards8r > 0 and not moving and not talent.blindFury and not waitForDarkSlash --and (ttd(units.dyn8) > 2 or isDummy(units.dyn8))
if cast.able.eyeBeam() and enemies.yards8r > 0 and not moving and not talent.blindFury and not waitForDarkSlash and (not talent.momentum or buff.momentum.exists())
--and (ttd(units.dyn8) > 2 or isDummy(units.dyn8))
-- and ((getOptionValue("Eye Beam Usage") == 1 and mode.rotation == 1 and enemies.yards8r > 0)
-- or (getOptionValue("Eye Beam Usage") == 2 and mode.rotation == 1 and enemies.yards8r >= getOptionValue("Units To AoE"))
-- or (mode.rotation == 2 and enemies.yards8r > 0))
Expand All @@ -650,7 +652,8 @@ local function runRotation()
end
-- Eye Beam
-- eye_beam,if=talent.blind_fury.enabled&raid_event.adds.in>cooldown
if cast.able.eyeBeam() and enemies.yards8r > 0 and not moving and talent.blindFury --and (ttd(units.dyn8) > 2 or isDummy(units.dyn8))
if cast.able.eyeBeam() and enemies.yards8r > 0 and not moving and talent.blindFury and (not talent.momentum or buff.momentum.exists())
--and (ttd(units.dyn8) > 2 or isDummy(units.dyn8))
-- and ((getOptionValue("Eye Beam Usage") == 1 and mode.rotation == 1 and enemies.yards8r > 0)
-- or (getOptionValue("Eye Beam Usage") == 2 and mode.rotation == 1 and enemies.yards8r >= getOptionValue("Units To AoE"))
-- or (mode.rotation == 2 and enemies.yards8r > 0))
Expand Down
2 changes: 1 addition & 1 deletion Rotations/Druid/Feral/FeralCuteOne.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ local function runRotation()
-- Moonfire
-- moonfire_cat,if=buff.bloodtalons.up&buff.predatory_swiftness.down&combo_points<5
if cast.able.moonfireFeral() and talent.lunarInspiration and debuff.moonfireFeral.count() < 5 then
if buff.bloodtalons.exists() and not buff.predatorySwiftness.exists() and combo < 5 then
if buff.bloodtalons.exists() and not buff.predatorySwiftness.exists() and comboPoints < 5 then
if cast.moonfireFeral() then return end
end
end
Expand Down
1,082 changes: 546 additions & 536 deletions Rotations/Monk/Mistweaver/Mistweaver_Ledecky.lua

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions Rotations/Paladin/Holy/HolyFengshen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ local function runRotation()
end
end
-- Blessing of Protection
if isChecked("Blessing of Protection") and cast.able.blessingOfProtection() and not isBoss() then
if isChecked("Blessing of Protection") and cast.able.blessingOfProtection() and not isBoss("boss1") then
if getOptionValue("BoP Target") == 1 then
if blessingOfProtectionall ~= nil then
if cast.blessingOfProtection(blessingOfProtectionall) then return end
Expand Down Expand Up @@ -854,28 +854,8 @@ local function runRotation()
end
end
end
-- Bestow Faith
if isChecked("Bestow Faith") and cast.able.bestowFaith() and talent.bestowFaith then
if getOptionValue("Bestow Faith Target") == 1 then
if lowest.hp <= getValue ("Bestow Faith") then
if cast.bestowFaith(lowest.unit) then return end
end
elseif getOptionValue("Bestow Faith Target") == 2 and #tanks > 0 then
if tanks[1].hp <= getValue ("Bestow Faith") then
if cast.bestowFaith(tanks[1].unit) then return end
end
elseif getOptionValue("Bestow Faith Target") == 3 then
if php <= getValue ("Bestow Faith") then
if cast.bestowFaith("player") then return end
end
elseif getOptionValue("Bestow Faith Target") == 4 then
if lowest.hp <= getValue ("Bestow Faith") then
if cast.bestowFaith("player") then return end
end
end
end
-- Holy Shock
if isChecked("Holy Shock") and cast.able.holyShock() then
if isChecked("Holy Shock") and (cast.able.holyShock() or isCastingSpell(spell.flashOfLight)) then
if php <= getValue("Critical HP") then
if CastSpellByName(GetSpellInfo(20473),"player") then return end
end
Expand Down Expand Up @@ -913,6 +893,26 @@ local function runRotation()
if lightOfTheMartyrHP ~= nil and isChecked("Light of the Martyr") and php >= getOptionValue("LotM player HP limit") then
if cast.lightOfTheMartyr(lightOfTheMartyrHP) then return end
end
-- Bestow Faith
if isChecked("Bestow Faith") and cast.able.bestowFaith() and talent.bestowFaith then
if getOptionValue("Bestow Faith Target") == 1 then
if lowest.hp <= getValue ("Bestow Faith") then
if cast.bestowFaith(lowest.unit) then return end
end
elseif getOptionValue("Bestow Faith Target") == 2 and #tanks > 0 then
if tanks[1].hp <= getValue ("Bestow Faith") then
if cast.bestowFaith(tanks[1].unit) then return end
end
elseif getOptionValue("Bestow Faith Target") == 3 then
if php <= getValue ("Bestow Faith") then
if cast.bestowFaith("player") then return end
end
elseif getOptionValue("Bestow Faith Target") == 4 then
if lowest.hp <= getValue ("Bestow Faith") then
if cast.bestowFaith("player") then return end
end
end
end
-- Flash of Light
if isChecked("Flash of Light") and ((isChecked("Holy Shock") and GetSpellCooldown(20473) > gcd) or not isChecked("Holy Shock")) and cast.able.flashOfLight() and not isMoving("player") and getDebuffRemain("player",240447) == 0 then
if php <= getValue("Critical HP") then
Expand Down
109 changes: 59 additions & 50 deletions Rotations/Priest/Holy/HolyLedecky.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ local function createOptions()
-- br.ui:createCheckbox(section,"Flask / Crystal")
-- Trinkets
br.ui:createCheckbox(section,"Trinkets")
br.ui:createSpinner(section,"Revitalizing Voodoo Totem", 80, 0, 100, 1, "Uses this Trinket when Tank's HP Falls below this set.")
-- Pre-Pot Timer
br.ui:createSpinner(section, "Pre-Pot Timer", 5, 1, 15, 1, "|cffFFFFFFSet to desired time to start Pre-Pull (DBM Required). Min: 1 / Max: 15 / Interval: 1")
-- Racial
Expand Down Expand Up @@ -177,16 +178,17 @@ local function createOptions()
-- Holy Word: Sanctify
br.ui:createSpinner(section, "Holy Word: Sanctify", 80, 0, 100, 5, "Health Percent to Cast At")
br.ui:createSpinnerWithout(section, "Holy Word: Sanctify Targets", 3, 0, 40, 1, "Minimum Holy Word: Sanctify Targets")
br.ui:createCheckbox(section,"Use Old HW Sanctify","Uses the old method of HW Sanctify. Causes no freezes, but less effective than the current method.")
-- Holy Word: Sanctify Hot Key
br.ui:createDropdown(section, "Holy Word: Sanctify HK", br.dropOptions.Toggle, 10, colorGreen.."Enables"..colorWhite.."/"..colorRed.."Disables "..colorWhite.." Holy Word: Sanctify Usage.")
br.ui:checkSectionState(section)
section = br.ui:createSection(br.ui.window.profile, colordh.."AOE Healing")
-- Binding Heal
br.ui:createSpinner(section, "Binding Heal", 70, 0, 100, 5, "Health Percent to Cast At")
br.ui:createSpinner(section, "Binding Heal", 70, 0, 100, 5, "Cast Binding Heal if anyone falls below this HP.")
-- Binding Heal Player HP
br.ui:createSpinnerWithout(section, "Binding Heal Player HP", 80, 0, 100, 5, "|cffFFBB00Will only cast if Player HP is below this Percentage.");
-- Binding Heal Targets
-- br.ui:createCheckbox(section, "Binding Heal Multi","Will Only cast if 2 of our party/raid need healing excluding me. But will follow the Binding Heal Player HP logic.");
br.ui:createCheckbox(section, "Binding Heal Multi","Will attempt to only use Binding Heal if there are at least 2 allies injured and below set HP");
-- Prayer of Healing
br.ui:createSpinner(section, "Prayer of Healing", 70, 0, 100, 5, "Health Percent to Cast At")
br.ui:createSpinnerWithout(section, "Prayer of Healing Targets", 3, 0, 40, 1, "Minimum Prayer of Healing Targets")
Expand Down Expand Up @@ -472,7 +474,17 @@ local function runRotation()
if canUse(14) then
useItem(14)
end
end
end
--Revitalizing Voodoo
if isChecked("Revitalizing Voodoo Totem") then
for i = 1, #br.friend do
if br.friend[i].hp <= getValue("Revitalizing Voodoo Totem") then
if hasEquiped(158320) and canUse(158320) and getBuffRemain(br.friend[i].unit,266018) == 0 and UnitGroupRolesAssigned(br.friend[i].unit) == "TANK" and UnitInRange(br.friend[i].unit) and not UnitIsDeadOrGhost(br.friend[i].unit) then
UseItemByName(158320,br.friend[i].unit)
end
end
end
end
-- Racial: Blood Elf Arcane Torrent
if isChecked("Arcane Torrent") and inCombat and (br.player.race == "BloodElf") and mana <= getValue("Arcane Torrent Mana") then
if castSpell("player",racial,false,false,false) then return end
Expand Down Expand Up @@ -527,13 +539,7 @@ local function runRotation()
if cast.holyWordSerenity(br.friend[i].unit) then return end
end
end
end
-- Holy Word: Sanctify Old Version
-- if isChecked("Holy Word: Sanctify") then
-- if castWiseAoEHeal(br.friend,spell.holyWordSanctify,40,getValue("Holy Word: Sanctify"),getValue("Holy Word: Sanctify Targets"),6,false,false) then
-- RunMacroText("/stopspelltarget")
-- end
-- end
end
-- Binding Heal On Me
if isChecked("Binding Heal On Me") and talent.bindingHeal and php <= getValue("Binding Heal On Me") and getDebuffRemain("player",240447) == 0 and not isMoving("player") then
for i = 1, #br.friend do
Expand Down Expand Up @@ -605,30 +611,29 @@ local function runRotation()
end
end
end
-- Holy Word: Sanctify JR Locals
for i=1, #friends.yards40 do
if cd.holyWordSanctify.remain() == 0 and friends.yards40[i].hp < getValue("Holy Word: Sanctify") then
tinsert(sanctifyCandidates,friends.yards40[i])
end
if talent.bindingHeal and friends.yards40[i].hp < getValue("Binding Heal") then
tinsert(bindingHealCandidates,friends.yards40[i])
end
end
-- Holy Word: Sanctify JR Locals
if not isChecked("Use Old HW Sanctify") then
for i=1, #friends.yards40 do
if cd.holyWordSanctify.remain() == 0 and friends.yards40[i].hp < getValue("Holy Word: Sanctify") then
tinsert(sanctifyCandidates,friends.yards40[i])
end
end
end
-- Holy Word: Sanctify
if cd.holyWordSanctify.remain() == 0 and #sanctifyCandidates >= getValue("Holy Word: Sanctify Targets") then
if not isChecked("Use Old HW Sanctify") and cd.holyWordSanctify.remain() == 0 and #sanctifyCandidates >= getValue("Holy Word: Sanctify Targets") then
-- get the best ground location to heal most or all of them
local loc = getBestGroundCircleLocation(sanctifyCandidates,getValue("Holy Word: Sanctify Targets"),6,10)
if loc ~= nil then
if castGroundAtLocation(loc, spell.holyWordSanctify) then return true end
end
end

-- Holy Word: Sanctify
-- if isChecked("Holy Word: Sanctify") then
-- if castWiseAoEHeal(br.friend,spell.holyWordSanctify,40,getValue("Holy Word: Sanctify"),getValue("Holy Word: Sanctify Targets"),6,false,false) then
-- RunMacroText("/stopspelltarget")
-- end
-- end
-- Old Holy Word: Sanctify
if isChecked("Use Old HW Sanctify") then
if castWiseAoEHeal(br.friend,spell.holyWordSanctify,40,getValue("Holy Word: Sanctify"),getValue("Holy Word: Sanctify Targets"),6,false,false) then
RunMacroText("/stopspelltarget")
end
end
-- Prayer of Mending
if isChecked("Prayer of Mending") and getDebuffRemain("player",240447) == 0 and not isMoving("player") then
for i = 1, #br.friend do
Expand Down Expand Up @@ -664,30 +669,34 @@ local function runRotation()
if cast.halo() then return end
end
end
--JR Binding Heal Logic Test
if talent.bindingHeal and not moving and #bindingHealCandidates >= 2 then
for i=1, #tanks do
thisTank = tanks[i]
if thisTank.hp <= getValue("Binding Heal") and not UnitIsUnit(thisTank.unit,"player") and php <= getValue("Binding Heal Player HP") then
if cast.bindingHeal(thisTank.unit, "aoe") then return true end
end
end
if lowest.hp <= getValue("Binding Heal") and not UnitIsUnit(lowest.unit,"player") and php <= getValue("Binding Heal Player HP") then
if cast.bindingHeal(lowest.unit, "aoe") then return true end
end
end
-- Binding Heal
-- if isChecked("Binding Heal") and talent.bindingHeal and php <= getValue("Binding Heal Player HP") and getDebuffRemain("player",240447) == 0 and not isMoving("player") then
-- for i = 1, #br.friend do
-- if castWiseAoEHeal(br.friend,spell.bindingHeal,40,getValue("Binding Heal"),2,3,false,true) and isChecked("Binding Heal Multi") then
-- RunMacroText("/stopspelltarget")
-- elseif br.friend[i].hp <= getValue("Binding Heal") and not isChecked("Binding Heal Multi") then
-- if cast.bindingHeal(br.friend[i].unit) then
-- RunMacroText("/stopspelltarget")
-- end
-- end
-- end
-- end
--JR Binding Heal Scan
if isChecked("Binding Heal Multi") and talent.bindingHeal and friends.yards40[i].hp < getValue("Binding Heal") then
tinsert(bindingHealCandidates,friends.yards40[i])
end
-- Binding Heal JR
if isChecked("Binding Heal Multi") and isChecked("Binding Heal") then
if talent.bindingHeal and not moving and #bindingHealCandidates >= 2 then
for i=1, #tanks do
thisTank = tanks[i]
if thisTank.hp <= getValue("Binding Heal") and not UnitIsUnit(thisTank.unit,"player") and php <= getValue("Binding Heal Player HP") then
if cast.bindingHeal(thisTank.unit, "aoe") then return true end
end
end
if lowest.hp <= getValue("Binding Heal") and not UnitIsUnit(lowest.unit,"player") and php <= getValue("Binding Heal Player HP") then
if cast.bindingHeal(lowest.unit, "aoe") then return true end
end
end
end
-- Binding Heal Single
if isChecked("Binding Heal") and not isChecked("Binding Heal Multi") and talent.bindingHeal and php <= getValue("Binding Heal Player HP") and getDebuffRemain("player",240447) == 0 and not isMoving("player") then
for i = 1, #br.friend do
if br.friend[i].hp <= getValue("Binding Heal") then
if cast.bindingHeal(br.friend[i].unit) then
RunMacroText("/stopspelltarget")
end
end
end
end
-- Renew
if isChecked("Renew") then
for i = 1, #br.friend do
Expand Down
8 changes: 8 additions & 0 deletions System/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ function BadRotationsUpdate(self)
if isChecked("Talent Anywhere") then
talentAnywhere()
end

--Quaking helper
if getOptionCheck("Quaking Helper") then
if UnitChannelInfo("player") and getDebuffRemain("player", 240448) < 0.5 and getDebuffRemain("player", 240448) > 0 then
SpellStopCasting()
end
end

-- Blizz CastSpellByName bug bypass
if castID then
-- Print("Casting by ID")
Expand Down
14 changes: 9 additions & 5 deletions System/Functions/Aura.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ function canDispel(Unit,spellID)
if spellID == 213644 then typesList = {"Poison", "Disease"} end
end
if ClassNum == 3 then --Hunter
typesList = { }
if spellID == 264265 then typesList = { "Magic", "" } end --spiritShock
if spellID == 264028 then typesList = { "Magic", "" } end --chiJiTranq
if spellID == 264266 then typesList = { "Magic", "" } end --naturesGrace
if spellID == 264264 then typesList = { "Magic", "" } end --netherShock
if spellID == 264263 then typesList = { "Magic", "" } end --sonicBlast
if spellID == 254262 then typesList = { "Magic", "" } end --soothingWater
if spellID == 254056 then typesList = { "Magic", "" } end --sporeCloud
end
if ClassNum == 4 then --Rogue
-- Cloak of Shadows
Expand Down Expand Up @@ -175,8 +181,7 @@ function canDispel(Unit,spellID)
end
end
if (dispelUnitObj == nil ) then
if ((isChecked("Dispel delay") and (getDebuffDuration(Unit, debuffid) - getDebuffRemain(Unit, debuffid)) > (getDebuffDuration(Unit, debuffid)
* (math.random(getValue("Dispel delay")-2, getValue("Dispel delay")+2)/100))) or not isChecked("Dispel delay"))
if (isChecked("Dispel delay") and (getDebuffDuration(Unit, debuffid) - getDebuffRemain(Unit, debuffid)) > (getValue("Dispel delay")-0.2 + math.random() * 0.4)) or not isChecked("Dispel delay")
then
HasValidDispel = true
break
Expand All @@ -195,8 +200,7 @@ function canDispel(Unit,spellID)
-- local _,_,_,_,buffType,_,_,_,_,_,buffid = UnitBuff(Unit,i)
-- Blackout Debuffs
if ((buffType and ValidType(buffType))) and buffid ~= 138733 then --Ionization from Jin'rokh the Breaker
if ((isChecked("Dispel delay") and (getBuffDuration(Unit, buffid) - getBuffRemain(Unit, buffid)) > (getBuffDuration(Unit, buffid)
* (math.random(getValue("Dispel delay")-2, getValue("Dispel delay")+2)/100))) or not isChecked("Dispel delay"))
if (isChecked("Dispel delay") and (getBuffDuration(Unit, buffid) - getBuffRemain(Unit, buffid)) > (getValue("Dispel delay")-0.2 + math.random() * 0.4)) or not isChecked("Dispel delay")
then
HasValidDispel = true
break
Expand Down
19 changes: 19 additions & 0 deletions System/Functions/Cast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ Tenth noCast True to return True/False instead of casting spell.
function castSpell(Unit,SpellID,FacingCheck,MovementCheck,SpamAllowed,KnownSkip,DeadCheck,DistanceSkip,usableSkip,noCast)
if GetObjectExists(Unit) --and betterStopCasting(SpellID) ~= true
and (not UnitIsDeadOrGhost(Unit) or DeadCheck) then
--Quaking helper
if getOptionCheck("Quaking Helper") then
--Detect channels
local channeledSpell = false
local costTable = GetSpellPowerCost(SpellID)
for _, costInfo in pairs(costTable) do
if costInfo.costPerSec > 0 then
channeledSpell = true
end
end
-- Quake check
local quakeRemain = getDebuffRemain("player", 240448)
if quakeRemain > 0 then
local spellCastTime = select(4,GetSpellInfo(SpellID))
if (spellCastTime > 0 and quakeRemain <= ((spellCastTime+300)/1000)) or (spellCastTime == 0 and channeledSpell and quakeRemain < 1.5) then
return false
end
end
end
-- we create an usableSkip for some specific spells like hammer of wrath aoe mode
if usableSkip == nil then usableSkip = false end
-- stop if not enough power for that spell
Expand Down
Loading

0 comments on commit 31c080e

Please sign in to comment.