|
|
|
@ -2,88 +2,72 @@ local Tinkr, Bastion = ... |
|
|
|
|
|
|
|
|
|
-- Core |
|
|
|
|
local AssasinationModule = Bastion.Module:New('assassination') |
|
|
|
|
local Evaluator = Tinkr.Util.Evaluator |
|
|
|
|
local Player = Bastion.UnitManager:Get('player') |
|
|
|
|
local None = Bastion.UnitManager:Get('none') |
|
|
|
|
local Target = Bastion.UnitManager:Get('target') |
|
|
|
|
local Focus = Bastion.UnitManager:Get('focus') |
|
|
|
|
local Draw = Tinkr.Util.Draw:New() |
|
|
|
|
|
|
|
|
|
function Round(num, numDecimalPlaces) |
|
|
|
|
return tonumber(string.format("%." .. (numDecimalPlaces or 0) .. "f", num)) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
-- Draw |
|
|
|
|
Draw:Sync(function(draw) |
|
|
|
|
local px, py, pz = ObjectPosition('player') |
|
|
|
|
local tx, ty, tz = ObjectPosition('target') |
|
|
|
|
draw:SetColor(255, 105, 180) |
|
|
|
|
draw:Line(px, py, pz, tx, ty, tz) |
|
|
|
|
local distance = ObjectDistance('player', 'target') |
|
|
|
|
|
|
|
|
|
if Target:Exists() then |
|
|
|
|
if Round(distance) <= 6 then |
|
|
|
|
draw:SetColor(144, 238, 144) |
|
|
|
|
draw:SetAlpha(200) |
|
|
|
|
end |
|
|
|
|
if Round(distance) >= 6 then |
|
|
|
|
draw:SetColor(230, 230, 250) |
|
|
|
|
draw:SetAlpha(50) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
draw:Circle(px, py, pz, 5) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
-- SpellBook |
|
|
|
|
local SliceAndDice = Bastion.SpellBook:GetSpell(6774) |
|
|
|
|
local Rupture = Bastion.SpellBook:GetSpell(48672) |
|
|
|
|
local HungerForBloodAura = Bastion.SpellBook:GetSpell(63848) |
|
|
|
|
local HungerForBlood = Bastion.SpellBook:GetSpell(51662) |
|
|
|
|
local Vanish = Bastion.SpellBook:GetSpell(26889) |
|
|
|
|
local Overkill = Bastion.SpellBook:GetSpell(58427) |
|
|
|
|
local ColdBlood = Bastion.SpellBook:GetSpell(14177) |
|
|
|
|
local Envenom = Bastion.SpellBook:GetSpell(57993) |
|
|
|
|
local Mutilate = Bastion.SpellBook:GetSpell(48666) |
|
|
|
|
local TricksOfTheTrade = Bastion.SpellBook:GetSpell(57934) |
|
|
|
|
local FanOfKnives = Bastion.SpellBook:GetSpell(51723) |
|
|
|
|
local Kick = Bastion.SpellBook:GetSpell(1766) |
|
|
|
|
local SliceAndDice = Bastion.SpellBook:GetSpell(6774) |
|
|
|
|
local Rupture = Bastion.SpellBook:GetSpell(48672) |
|
|
|
|
local HungerForBloodAura = Bastion.SpellBook:GetSpell(63848) |
|
|
|
|
local HungerForBlood = Bastion.SpellBook:GetSpell(51662) |
|
|
|
|
local Vanish = Bastion.SpellBook:GetSpell(26889) |
|
|
|
|
local Overkill = Bastion.SpellBook:GetSpell(58427) |
|
|
|
|
local ColdBlood = Bastion.SpellBook:GetSpell(14177) |
|
|
|
|
local Envenom = Bastion.SpellBook:GetSpell(57993) |
|
|
|
|
local Mutilate = Bastion.SpellBook:GetSpell(48666) |
|
|
|
|
local TricksOfTheTrade = Bastion.SpellBook:GetSpell(57934) |
|
|
|
|
local FanOfKnives = Bastion.SpellBook:GetSpell(51723) |
|
|
|
|
local Kick = Bastion.SpellBook:GetSpell(1766) |
|
|
|
|
|
|
|
|
|
-- Items |
|
|
|
|
local PotionOfSpeed = Bastion.ItemBook:GetItem(40211) |
|
|
|
|
|
|
|
|
|
--[[ |
|
|
|
|
## Assassination Rogue |
|
|
|
|
## 16 October 2022 |
|
|
|
|
|
|
|
|
|
actions.precombat+=/tricks_of_the_trade,if=group |
|
|
|
|
actions.precombat+=/potion |
|
|
|
|
actions.precombat+=/stealth |
|
|
|
|
actions.precombat+=/garrote,if=solo |
|
|
|
|
|
|
|
|
|
actions+=/kick |
|
|
|
|
actions+=/slice_and_dice,if=buff.slice_and_dice.down |
|
|
|
|
|
|
|
|
|
actions+=/adrenaline_rush,if=active_enemies>1 |
|
|
|
|
actions+=/blade_flurry,if=active_enemies>1 |
|
|
|
|
actions+=/fan_of_knives,if=active_enemies>1 |
|
|
|
|
|
|
|
|
|
actions+=/rupture,if=talent.hunger_for_blood.enabled&buff.hunger_for_blood.down&debuff.garrote.down |
|
|
|
|
actions+=/hunger_for_blood,if=buff.hunger_for_blood.down |
|
|
|
|
actions+=/shadowmeld,if=talent.overkill.enabled&buff.overkill.down |
|
|
|
|
actions+=/vanish,if=talent.overkill.enabled&buff.overkill.down |
|
|
|
|
actions+=/tricks_of_the_trade,if=group |
|
|
|
|
actions+=/envenom,if=combo_points.deficit=0&buff.cold_blood.up |
|
|
|
|
actions+=/cold_blood,if=combo_points.deficit=0 |
|
|
|
|
actions+=/envenom,if=combo_points.deficit<2&(debuff.envenom.down|energy.time_to_max<debuff.envenom.remains) |
|
|
|
|
actions+=/mutilate,if=combo_points.deficit>0 |
|
|
|
|
--]] |
|
|
|
|
|
|
|
|
|
-- APL |
|
|
|
|
-- APLs |
|
|
|
|
local PreCombatAPL = Bastion.APL:New('precombat') |
|
|
|
|
local DefaultAPL = Bastion.APL:New('default') |
|
|
|
|
|
|
|
|
|
-- actions.precombat+=/tricks_of_the_trade |
|
|
|
|
PreCombatAPL:AddSpell( |
|
|
|
|
TricksOfTheTrade:CastableIf(function(self) |
|
|
|
|
return Focus:Exists() and self:IsKnownAndUsable() and Focus:IsAffectingCombat() |
|
|
|
|
return Focus:Exists() and self:IsInRange(Focus) and self:IsKnownAndUsable() and Focus:IsAffectingCombat() |
|
|
|
|
end):SetTarget(Focus) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- actions.precombat+=/potion |
|
|
|
|
PreCombatAPL:AddItem( |
|
|
|
|
PotionOfSpeed:UsableIf(function(self) |
|
|
|
|
return self:IsEquippedAndUsable() |
|
|
|
|
return Target:Exists() and self:IsUsable() and Target:IsBoss() and Target:IsAffectingCombat() |
|
|
|
|
end):SetTarget(Player) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- actions+=/kick |
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
Kick:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and Player:InMelee(Target) and Target:IsInterruptible(5) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and self:IsInRange(Target) and Target:IsCastingOrChanneling() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -104,60 +88,87 @@ DefaultAPL:AddSpell( |
|
|
|
|
-- actions+=/hunger_for_blood,if=buff.hunger_for_blood.down |
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
HungerForBlood:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and (not Player:GetAuras():FindMy(HungerForBloodAura):IsUp() or Player:GetAuras():FindMy(HungerForBloodAura):GetRemainingTime() < 5) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and self:IsInRange(Target) and (not Player:GetAuras():FindMy(HungerForBloodAura):IsUp() or Player:GetAuras():FindMy(HungerForBloodAura):GetRemainingTime() < 5) |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- actions+=/rupture,if=talent.hunger_for_blood.enabled&buff.hunger_for_blood.down |
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
Rupture:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:GetAuras():FindMy(HungerForBloodAura):IsUp() |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and self:IsInRange(Target) and not Player:GetAuras():FindMy(HungerForBloodAura):IsUp() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- actions+=/vanish,if=talent.overkill.enabled&buff.overkill.down |
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
Vanish:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and not Player:GetAuras():FindMy(Overkill):IsUp() |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and self:IsInRange(Target) and not Player:GetAuras():FindMy(Overkill):IsUp() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- actions+=/envenom,if=combo_points.deficit=0&buff.cold_blood.up |
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
Envenom:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and Player:GetComboPointsDeficit(Target) < 1 and Player:GetAuras():FindMy(ColdBlood):IsUp() |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and self:IsInRange(Target) and Player:GetComboPointsDeficit(Target) < 1 and Player:GetAuras():FindMy(ColdBlood):IsUp() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- actions+=/cold_blood,if=combo_points.deficit=0 |
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
ColdBlood:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and Player:GetComboPointsDeficit(Target) < 1 |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and self:IsInRange(Target) and Player:GetComboPointsDeficit(Target) < 1 and Target:IsBoss() |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- actions+=/envenom,if=combo_points.deficit<2&(debuff.envenom.down|energy.time_to_max<debuff.envenom.remains) |
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
Envenom:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and Player:GetComboPointsDeficit(Target) < 2 and not Player:GetAuras():FindMy(Envenom):IsUp() and Player:GetPowerDeficit() < 25 |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and self:IsInRange(Target) and Player:GetComboPointsDeficit(Target) < 2 and not Player:GetAuras():FindMy(Envenom):IsUp() and Player:GetPowerDeficit() < 30 |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- actions+=/mutilate,if=combo_points.deficit>1 |
|
|
|
|
DefaultAPL:AddSpell( |
|
|
|
|
Mutilate:CastableIf(function(self) |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and Player:GetComboPointsDeficit(Target) > 1 |
|
|
|
|
return Target:Exists() and self:IsKnownAndUsable() and self:IsInRange(Target) and Player:GetComboPointsDeficit(Target) > 1 |
|
|
|
|
end):SetTarget(Target) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
-- Register Module |
|
|
|
|
AssasinationModule:Sync(function() |
|
|
|
|
if Target:Exists() and not Player:IsAffectingCombat() and Player:InMelee(Target) then |
|
|
|
|
if not Player:IsAffectingCombat() then |
|
|
|
|
PreCombatAPL:Execute() |
|
|
|
|
end |
|
|
|
|
if Target:Exists() and Player:IsAffectingCombat() then |
|
|
|
|
if Player:IsAffectingCombat() then |
|
|
|
|
DefaultAPL:Execute() |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
Draw:Enable() |
|
|
|
|
end) |
|
|
|
|
Draw:Enable() |
|
|
|
|
Bastion:Register(AssasinationModule) |
|
|
|
|
|
|
|
|
|
--[[ |
|
|
|
|
## Assassination Rogue |
|
|
|
|
## 16 October 2022 |
|
|
|
|
|
|
|
|
|
actions.precombat+=/tricks_of_the_trade,if=group |
|
|
|
|
actions.precombat+=/potion |
|
|
|
|
actions.precombat+=/stealth |
|
|
|
|
actions.precombat+=/garrote,if=solo |
|
|
|
|
|
|
|
|
|
actions+=/kick |
|
|
|
|
actions+=/slice_and_dice,if=buff.slice_and_dice.down |
|
|
|
|
|
|
|
|
|
actions+=/adrenaline_rush,if=active_enemies>1 |
|
|
|
|
actions+=/blade_flurry,if=active_enemies>1 |
|
|
|
|
actions+=/fan_of_knives,if=active_enemies>1 |
|
|
|
|
|
|
|
|
|
actions+=/rupture,if=talent.hunger_for_blood.enabled&buff.hunger_for_blood.down&debuff.garrote.down |
|
|
|
|
actions+=/hunger_for_blood,if=buff.hunger_for_blood.down |
|
|
|
|
actions+=/shadowmeld,if=talent.overkill.enabled&buff.overkill.down |
|
|
|
|
actions+=/vanish,if=talent.overkill.enabled&buff.overkill.down |
|
|
|
|
actions+=/tricks_of_the_trade,if=group |
|
|
|
|
actions+=/envenom,if=combo_points.deficit=0&buff.cold_blood.up |
|
|
|
|
actions+=/cold_blood,if=combo_points.deficit=0 |
|
|
|
|
actions+=/envenom,if=combo_points.deficit<2&(debuff.envenom.down|energy.time_to_max<debuff.envenom.remains) |
|
|
|
|
actions+=/mutilate,if=combo_points.deficit>0 |
|
|
|
|
--]] |