Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ogre Magi Bloodlust for bot lane push/defend #137

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ability_item_usage_ogre_magi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function GetComboMana()
return ability_item_usage_generic.GetComboMana(AbilitiesReal)
end

-- ogre_magi_fireblast
Consider[1] = function()

local ability = AbilitiesReal[1];
Expand Down Expand Up @@ -208,6 +209,7 @@ Consider[1] = function()
return BOT_ACTION_DESIRE_NONE, 0
end

-- ogre_magi_ignite
Consider[2] = function()

local ability = AbilitiesReal[2];
Expand Down Expand Up @@ -333,7 +335,7 @@ Consider[2] = function()
return BOT_ACTION_DESIRE_NONE, 0;
end


-- ogre_magi_bloodlust
Consider[3] = function()
local ability = AbilitiesReal[3]

Expand All @@ -356,10 +358,10 @@ Consider[3] = function()
-- If we're pushing or defending a lane
if (npcBot:GetActiveMode() == BOT_MODE_DEFEND_TOWER_TOP or
npcBot:GetActiveMode() == BOT_MODE_DEFEND_TOWER_MID or
npcBot:GetActiveMode() == BOT_MODE_DEFEND_TOWER_BOTTOM or
npcBot:GetActiveMode() == BOT_MODE_DEFEND_TOWER_BOT or
npcBot:GetActiveMode() == BOT_MODE_PUSH_TOWER_TOP or
npcBot:GetActiveMode() == BOT_MODE_PUSH_TOWER_MID or
npcBot:GetActiveMode() == BOT_MODE_PUSH_TOWER_BOTTOM)
npcBot:GetActiveMode() == BOT_MODE_PUSH_TOWER_BOT)
then
if (ManaPercentage > 0.6 and npcBot:GetMana() > ComboMana)
then
Expand Down Expand Up @@ -404,6 +406,7 @@ Consider[3] = function()
return BOT_ACTION_DESIRE_NONE, 0
end

-- ogre_magi_unrefined_fireblast
Consider[4] = function()

local ability = AbilitiesReal[4];
Expand Down Expand Up @@ -503,6 +506,7 @@ Consider[4] = function()
return BOT_ACTION_DESIRE_NONE, 0
end

-- ogre_magi_smash
Consider[5] = function()
local ability = AbilitiesReal[5]
if ability:IsHidden() or not ability:IsFullyCastable() then
Expand Down