@@ -107,6 +107,7 @@
{
"model"
{
"models/courier/defense3_sheep/defense3_sheep_flying.vmdl" "modifier_hex_sheep"
"models/creeps/neutral_creeps/n_creep_troll_skeleton/n_creep_troll_skeleton_fx.vmdl" "corpse_model"
"models/heroes/tiny_01/tiny_01_tree.vmdl" "mountain_giant_war_club"
}
@@ -10,12 +10,12 @@ function modifier_hex_frog:DeclareFunctions()
end

function modifier_hex_frog:CheckState()
local state = {
[MODIFIER_STATE_DISARMED] = true,
[MODIFIER_STATE_MUTED] = true,
[MODIFIER_STATE_HEXED] = true,
[MODIFIER_STATE_EVADE_DISABLED] = true,
[MODIFIER_STATE_SILENCED] = true,
local state = {
[MODIFIER_STATE_DISARMED] = true,
[MODIFIER_STATE_MUTED] = true,
[MODIFIER_STATE_HEXED] = true,
[MODIFIER_STATE_EVADE_DISABLED] = true,
[MODIFIER_STATE_SILENCED] = true,
}

return state
@@ -43,19 +43,23 @@ function modifier_hex_sheep:DeclareFunctions()
end

function modifier_hex_sheep:CheckState()
local state = {
[MODIFIER_STATE_DISARMED] = true,
[MODIFIER_STATE_MUTED] = true,
[MODIFIER_STATE_HEXED] = true,
[MODIFIER_STATE_EVADE_DISABLED] = true,
[MODIFIER_STATE_SILENCED] = true,
}
local state = {
[MODIFIER_STATE_DISARMED] = true,
[MODIFIER_STATE_MUTED] = true,
[MODIFIER_STATE_HEXED] = true,
[MODIFIER_STATE_EVADE_DISABLED] = true,
[MODIFIER_STATE_SILENCED] = true,
}

return state
end

function modifier_hex_sheep:GetModifierModelChange()
return "models/items/hex/sheep_hex/sheep_hex.vmdl"
if self:GetParent():HasFlyMovementCapability() then
return "models/courier/defense3_sheep/defense3_sheep_flying.vmdl"
else
return "models/items/hex/sheep_hex/sheep_hex.vmdl"
end
end

function modifier_hex_sheep:GetModifierMoveSpeedOverride()
@@ -58,8 +58,7 @@ end

function TrainPriest( event )
local caster = event.caster
local hero = caster:GetOwner()
local playerID = hero:GetPlayerOwnerID()
local playerID = caster:GetPlayerOwnerID()
local upgrades = Players:GetUpgradeTable(playerID)

local target = event.target
@@ -77,8 +76,7 @@ end

function TrainSorceress( event )
local caster = event.caster
local hero = caster:GetOwner()
local playerID = hero:GetPlayerOwnerID()
local playerID = caster:GetPlayerOwnerID()
local upgrades = Players:GetUpgradeTable(playerID)

local target = event.target
@@ -41,7 +41,7 @@ function BearFormOff( event )
ParticleManager:SetParticleControl(particle, 3, caster:GetAbsOrigin())

-- Enable rejuvenation if the research is valid
if not Players:HasResearch(playerID, "nightelf_research_druid_of_the_claw_training1") then
if Players:HasResearch(playerID, "nightelf_research_druid_of_the_claw_training1") then
local rejuvenation = caster:FindAbilityByName("nightelf_rejuvenation")
rejuvenation:SetHidden(false)
else
@@ -83,8 +83,6 @@ function TrueFormStart( event )
local main_ability_name = ability:GetAbilityName()

caster:SwapAbilities(main_ability_name, sub_ability_name, false, true)
print("Swapped "..main_ability_name.." with " ..sub_ability_name)

end

-- Reverts back to the original model, swaps abilities, removes modifier passed
@@ -123,7 +121,6 @@ function TrueFormEnd( event )
local sub_ability_name = ability:GetAbilityName()

caster:SwapAbilities(sub_ability_name, main_ability_name, false, true)
print("Swapped "..sub_ability_name.." with " ..main_ability_name)

-- Remove modifier
caster:RemoveModifierByName("modifier_bear_form")
@@ -47,7 +47,7 @@ end
-- Upgrade all Huntresses
function UpgradeMoonGlaives( event )
local caster = event.caster
local player = caster:GetPlayerOwner()
local playerID = caster:GetPlayerOwnerID()
local units = Players:GetUnits( playerID )

for _,unit in pairs(units) do
@@ -64,7 +64,7 @@ end
-- Upgrade all transformed Druids of the Claw
function UpgradeMarkOfTheClaw( event )
local caster = event.caster
local player = caster:GetPlayerOwnerID()
local playerID = caster:GetPlayerOwnerID()
local units = Players:GetUnits( playerID )

for _,unit in pairs(units) do
@@ -79,7 +79,7 @@ end
-- Upgrade all transformed Druids of the Talon
function UpgradeMarkOfTheTalon( event )
local caster = event.caster
local player = caster:GetPlayerOwnerID()
local playerID = caster:GetPlayerOwnerID()
local units = Players:GetUnits( playerID )

for _,unit in pairs(units) do
@@ -94,7 +94,7 @@ end
-- Upgrade all Mountain Giants with Resistant Skin by replacing them
function UpgradeResistantSkin( event )
local caster = event.caster
local player = caster:GetPlayerOwnerID()
local playerID = caster:GetPlayerOwnerID()
local units = Players:GetUnits( playerID )

for _,unit in pairs(units) do