Skip to content

Commit

Permalink
Merged in Bugfixes_AltiV (pull request #19)
Browse files Browse the repository at this point in the history
Bugfixes AltiV


Former-commit-id: a4460cb9ac7069ec04c1ab8aaa229cbde42f0204
  • Loading branch information
Altivu authored and EarthSalamander42 committed Jan 13, 2019
2 parents be3a6e1 + f64e334 commit 7ae2a61
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function GGLocal() {
GGInitCountDown();
$.GetContextPanel().FindChildTraverse('Root').AddClass("visible");

$.Schedule(9, function() {
$.Schedule(5, function() {
if (gg_state) {
GameEvents.SendCustomGameEventToServer("send_gg_vote", {
ID: Game.GetLocalPlayerID(),
Expand All @@ -69,11 +69,11 @@ function GGLocal() {
}

function GGInitCountDown() {
for (var i = 0; i < 9; i++) {
for (var i = 0; i < 5; i++) {
// Isolating scope of i to be called later
(function(i){
$.Schedule(i, function() {
$.GetContextPanel().FindChildTraverse('GGTimer').text = 8-i;
$.GetContextPanel().FindChildTraverse('GGTimer').text = 4-i;
});
})(i);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6593,7 +6593,7 @@
"01"
{
"var_type" "FIELD_INTEGER"
"value" "32"
"value" "40"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7175,6 +7175,7 @@
"ItemStockMax" "2"
"ItemStockTime" "120.0"
"SideShop" "0"
"IsTempestDoubleClonable" "0"

// Special
//-------------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ function GoodGame:Call(event)

-- print("Team left counter: "..team_counter)
-- print("Team left max counter: "..PlayerResource:GetPlayerCountForTeam(event.team))
-- GG end activates when at least 80% of the team GGs
if team_counter / PlayerResource:GetPlayerCountForTeam(event.team) >= 0.8 then
-- GG end activates when at least 70% of the team GGs
if team_counter / PlayerResource:GetPlayerCountForTeam(event.team) >= 0.7 then
-- print("Full team has gg: "..event.team)
abandon_team = event.team
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ function imba_centaur_hoof_stomp:OnSpellStart()
self.lastCasterLocation = nil

caster:RemoveModifierByName("modifier_imba_return_passive")
caster:AddNewModifier(caster,caster:FindAbilityByName("imba_centaur_return"),"modifier_imba_return_passive",{})

if caster:HasAbility("imba_centaur_return") then
caster:AddNewModifier(caster,caster:FindAbilityByName("imba_centaur_return"),"modifier_imba_return_passive",{})
end

-- Ability specials
local radius = ability:GetSpecialValueFor("radius")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function modifier_imba_winter_wyvern_arctic_burn:DeclareFunctions()
MODIFIER_PROPERTY_PROJECTILE_SPEED_BONUS,
MODIFIER_PROPERTY_ATTACK_POINT_CONSTANT,
MODIFIER_PROPERTY_MOVESPEED_BONUS_PERCENTAGE,
MODIFIER_PROPERTY_BASE_ATTACK_TIME_CONSTANT,
-- MODIFIER_PROPERTY_BASE_ATTACK_TIME_CONSTANT,
}

return decFuncs
Expand Down Expand Up @@ -131,9 +131,9 @@ function modifier_imba_winter_wyvern_arctic_burn:GetModifierAttackPointConstant(
return self:GetAbility():GetSpecialValueFor("attack_point")
end

function modifier_imba_winter_wyvern_arctic_burn:GetModifierBaseAttackTimeConstant()
return self:GetAbility():GetSpecialValueFor("bat_constant")
end
-- function modifier_imba_winter_wyvern_arctic_burn:GetModifierBaseAttackTimeConstant()
-- return self:GetAbility():GetSpecialValueFor("bat_constant")
-- end

--------------------------------------------------------------
-- Arctic Burn (Slow modifier) --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ function AghanimsSynthCast( keys )
local sound_cast = keys.sound_cast

-- If the caster already has the synth buff, do nothing
if caster:HasModifier(modifier_synth) or caster:HasModifier("modifier_arc_warden_tempest_double") then
if caster:HasModifier(modifier_synth) then
return nil
end

if caster:HasModifier("modifier_arc_warden_tempest_double") then
DisplayError(caster:GetPlayerID(),"Tempest Doubles cannot create a divergent synth modifier.")
return nil
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ end
function GainChargesOnAssist( keys )
local target = keys.unit
local item = keys.ability

if not item then return end

local item_level = item:GetLevel() - 1

-- Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ function modifier_item_imba_guardian_greaves_aura:GetTexture()
-- Stores the aura's parameters to prevent errors when the item is destroyed
function modifier_item_imba_guardian_greaves_aura:OnCreated(keys)
local ability = self:GetAbility()
if not ability then return end
self.aura_regen = ability:GetSpecialValueFor("aura_regen")
self.aura_armor = ability:GetSpecialValueFor("aura_armor")
self.aura_max_regen_bonus = ability:GetSpecialValueFor("aura_max_regen_bonus")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function GameMode:OnHeroFirstSpawn(hero)
-- CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "show_netgraph_heronames", {})
-- end

if hero:GetUnitName() == "npc_dota_hero_arc_warden" and hero:IsTempestDouble() then
if hero:IsTempestDouble() then
GameMode:OnHeroSpawned(hero)
-- Not a big deal, but don't give the MK ult clones frantic modifier (blue auras)
elseif hero:GetUnitName() == "npc_dota_hero_monkey_king" then
Expand Down Expand Up @@ -170,12 +170,17 @@ end

-- everytime a real hero respawn
function GameMode:OnHeroSpawned(hero)
if hero:GetUnitName() == "npc_dota_hero_arc_warden" and hero:IsTempestDouble() then
--print("Does double have modifier_legion_commander_duel_damage_boost? ", hero:HasModifier("modifier_legion_commander_duel_damage_boost"))

if IsMutationMap() then
Mutation:OnHeroSpawn(hero)
end

if hero:IsTempestDouble() then
local clone_shared_buffs = {
"modifier_item_imba_moon_shard_active",
"modifier_imba_soul_of_truth_buff"
"modifier_imba_soul_of_truth_buff",
"modifier_imba_war_veteran_0",
"modifier_imba_war_veteran_1",
"modifier_imba_war_veteran_2"
}

-- Iterate through the main hero's potential modifiers
Expand Down Expand Up @@ -209,11 +214,6 @@ function GameMode:OnHeroSpawned(hero)
local current_item = main_hero:GetItemInSlot(i)
if current_item and current_item:GetName() == "item_imba_soul_of_truth" then
local cloned_modifier = hero:AddNewModifier(main_hero, current_item, "modifier_item_gem_of_true_sight", {duration = buff_time})
-- This code block doesn't work
Timers:CreateTimer(FrameTime(), function()
hero:RemoveItem(current_item)
end)
--
break
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,17 @@ function GameMode:OnHeroDeath(killer, victim)
-------------------------------------------------------------------------------------------------
-- Arc Warden Tempest Double keeping Duel Damage
-------------------------------------------------------------------------------------------------
if killer:GetName() == "npc_dota_hero_arc_warden" and killer:IsTempestDouble() then
Timers:CreateTimer(FrameTime(), function()
if killer:HasModifier("modifier_legion_commander_duel_damage_boost") then
killer.duel_damage = killer:FindModifierByName("modifier_legion_commander_duel_damage_boost"):GetStackCount()
killer.duel_ability = killer:FindModifierByName("modifier_legion_commander_duel_damage_boost"):GetAbility()
if killer:HasModifier("modifier_legion_commander_duel") or victim:HasModifier("modifier_legion_commander_duel") then
for _, ent in pairs(Entities:FindAllByName("npc_dota_hero_arc_warden")) do
if ent:IsTempestDouble() then
Timers:CreateTimer(FrameTime(), function()
if ent:HasModifier("modifier_legion_commander_duel_damage_boost") then
ent.duel_damage = ent:FindModifierByName("modifier_legion_commander_duel_damage_boost"):GetStackCount()
ent.duel_ability = ent:FindModifierByName("modifier_legion_commander_duel_damage_boost"):GetAbility()
end
end)
end
end)
end
end

return
Expand Down
46 changes: 23 additions & 23 deletions game/dota_addons/dota_imba_reborn/scripts/vscripts/filters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ function GameMode:ItemAddedFilter( keys )
DisplayError(unit:GetPlayerID(),"#dota_hud_error_cant_item_enough_slots")
end
end
if unit:IsIllusion() or unit:IsTempestDouble() then
if unit:IsIllusion() or unit:IsTempestDouble() or unit:IsHero() then
return true
else
unit:DropRapier(nil, item_name)
Expand Down Expand Up @@ -730,28 +730,28 @@ function GameMode:OrderFilter( keys )
end

-- Meepo item handle
if unit:GetUnitName() == "npc_dota_hero_meepo" then
local meepo_table = Entities:FindAllByName("npc_dota_hero_meepo")
local ability = EntIndexToHScript(keys.entindex_ability)
if ability == nil then return end

for m = 1, #meepo_table do
if keys.order_type == DOTA_UNIT_ORDER_CAST_NO_TARGET then
if ability:GetName() == "item_black_king_bar" then
local duration = ability:GetLevelSpecialValueFor("duration", ability:GetLevel() -1)
meepo_table[m]:AddNewModifier(meepo_table[m], ability, "modifier_black_king_bar_immune", {duration = duration})
elseif ability:GetName() == "item_imba_white_queen_cape" then
local duration = ability:GetLevelSpecialValueFor("duration", ability:GetLevel() -1)
meepo_table[m]:AddNewModifier(meepo_table[m], ability, "modifier_black_king_bar_immune", {duration = duration})
end
elseif keys.order_type == DOTA_UNIT_ORDER_CAST_TARGET then
if ability:GetName() == "item_imba_black_queen_cape" then
local duration = ability:GetLevelSpecialValueFor("bkb_duration", ability:GetLevel() -1)
meepo_table[m]:AddNewModifier(meepo_table[m], nil, "modifier_imba_black_queen_cape_active_bkb", {duration = duration})
end
end
end
end
-- if unit:GetUnitName() == "npc_dota_hero_meepo" then
-- local meepo_table = Entities:FindAllByName("npc_dota_hero_meepo")
-- local ability = EntIndexToHScript(keys.entindex_ability)
-- if ability == nil then return end

-- for m = 1, #meepo_table do
-- if keys.order_type == DOTA_UNIT_ORDER_CAST_NO_TARGET then
-- if ability:GetName() == "item_black_king_bar" then
-- local duration = ability:GetLevelSpecialValueFor("duration", ability:GetLevel() -1)
-- meepo_table[m]:AddNewModifier(meepo_table[m], ability, "modifier_black_king_bar_immune", {duration = duration})
-- elseif ability:GetName() == "item_imba_white_queen_cape" then
-- local duration = ability:GetLevelSpecialValueFor("duration", ability:GetLevel() -1)
-- meepo_table[m]:AddNewModifier(meepo_table[m], ability, "modifier_black_king_bar_immune", {duration = duration})
-- end
-- elseif keys.order_type == DOTA_UNIT_ORDER_CAST_TARGET then
-- if ability:GetName() == "item_imba_black_queen_cape" then
-- local duration = ability:GetLevelSpecialValueFor("bkb_duration", ability:GetLevel() -1)
-- meepo_table[m]:AddNewModifier(meepo_table[m], nil, "modifier_imba_black_queen_cape_active_bkb", {duration = duration})
-- end
-- end
-- end
-- end

if GetMapName() == Map1v1() then
if keys.order_type == DOTA_UNIT_ORDER_MOVE_TO_TARGET then
Expand Down

0 comments on commit 7ae2a61

Please sign in to comment.