initial commit
This commit is contained in:
44
aghanim_singleplayer/scripts/vscripts/items/item_ambient_sorcery.lua
Executable file
44
aghanim_singleplayer/scripts/vscripts/items/item_ambient_sorcery.lua
Executable file
@@ -0,0 +1,44 @@
|
||||
|
||||
item_ambient_sorcery = class({})
|
||||
LinkLuaModifier( "modifier_item_ambient_sorcery", "modifiers/modifier_item_ambient_sorcery", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_ambient_sorcery_effect", "modifiers/modifier_item_ambient_sorcery_effect", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ambient_sorcery:GetIntrinsicModifierName()
|
||||
return "modifier_item_ambient_sorcery"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ambient_sorcery:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ambient_sorcery:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ambient_sorcery:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
42
aghanim_singleplayer/scripts/vscripts/items/item_amorphotic_shell.lua
Executable file
42
aghanim_singleplayer/scripts/vscripts/items/item_amorphotic_shell.lua
Executable file
@@ -0,0 +1,42 @@
|
||||
item_amorphotic_shell = class({})
|
||||
LinkLuaModifier( "modifier_item_amorphotic_shell", "modifiers/modifier_item_amorphotic_shell", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_amorphotic_shell_effect", "modifiers/modifier_item_amorphotic_shell_effect", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_amorphotic_shell:GetIntrinsicModifierName()
|
||||
return "modifier_item_amorphotic_shell"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_amorphotic_shell:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_amorphotic_shell:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_amorphotic_shell:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
36
aghanim_singleplayer/scripts/vscripts/items/item_arcane_fragments.lua
Executable file
36
aghanim_singleplayer/scripts/vscripts/items/item_arcane_fragments.lua
Executable file
@@ -0,0 +1,36 @@
|
||||
|
||||
item_arcane_fragments = class({})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_arcane_fragments:Precache( context )
|
||||
PrecacheResource( "particle", "particles/msg_fx/msg_bp.vpcf", context )
|
||||
PrecacheResource( "particle", "particles/generic_gameplay/arcane_fragments_splash.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_arcane_fragments:GetBehavior()
|
||||
return DOTA_ABILITY_BEHAVIOR_IMMEDIATE
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_arcane_fragments:OnSpellStart()
|
||||
if IsServer() then
|
||||
|
||||
self:GetCaster():EmitSoundParams( "Item.ArcaneFragmentsClaimed", 0, 0.5, 0)
|
||||
local gameEvent = {}
|
||||
gameEvent["player_id"] = self:GetCaster():GetPlayerID()
|
||||
gameEvent["teamnumber"] = -1
|
||||
gameEvent["int_value"] = self:GetCurrentCharges()
|
||||
gameEvent["message"] = "#Aghanim_ArcaneFragmentsFound"
|
||||
FireGameEvent( "dota_combat_event_message", gameEvent )
|
||||
|
||||
GameRules.Aghanim:GrantAllPlayersPoints( self:GetCurrentCharges(), false, "item_arcane_fragments" )
|
||||
|
||||
UTIL_Remove( self )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
30
aghanim_singleplayer/scripts/vscripts/items/item_battle_points.lua
Executable file
30
aghanim_singleplayer/scripts/vscripts/items/item_battle_points.lua
Executable file
@@ -0,0 +1,30 @@
|
||||
|
||||
item_battle_points = class({})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_battle_points:GetBehavior()
|
||||
return DOTA_ABILITY_BEHAVIOR_IMMEDIATE
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_battle_points:OnSpellStart()
|
||||
if IsServer() then
|
||||
|
||||
self:GetCaster():EmitSoundParams( "Item.BattlePointsClaimed", 0, 0.5, 0)
|
||||
|
||||
local gameEvent = {}
|
||||
gameEvent["player_id"] = self:GetCaster():GetPlayerID()
|
||||
gameEvent["teamnumber"] = -1
|
||||
gameEvent["int_value"] = self:GetCurrentCharges()
|
||||
gameEvent["message"] = "#Aghanim_BattlePointsFound"
|
||||
FireGameEvent( "dota_combat_event_message", gameEvent )
|
||||
|
||||
GameRules.Aghanim:GrantAllPlayersPoints( self:GetCurrentCharges(), true, "item_battle_points" )
|
||||
|
||||
UTIL_Remove( self )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
44
aghanim_singleplayer/scripts/vscripts/items/item_bear_cloak.lua
Executable file
44
aghanim_singleplayer/scripts/vscripts/items/item_bear_cloak.lua
Executable file
@@ -0,0 +1,44 @@
|
||||
|
||||
item_bear_cloak = class({})
|
||||
LinkLuaModifier( "modifier_item_bear_cloak", "modifiers/modifier_item_bear_cloak", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_bear_cloak_effect", "modifiers/modifier_item_bear_cloak_effect", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bear_cloak:GetIntrinsicModifierName()
|
||||
return "modifier_item_bear_cloak"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bear_cloak:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bear_cloak:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bear_cloak:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_bogduggs_baldric.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_bogduggs_baldric.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_bogduggs_baldric = class({})
|
||||
LinkLuaModifier( "modifier_item_bogduggs_baldric", "modifiers/modifier_item_bogduggs_baldric", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_baldric:GetIntrinsicModifierName()
|
||||
return "modifier_item_bogduggs_baldric"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_baldric:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_baldric:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_baldric:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
46
aghanim_singleplayer/scripts/vscripts/items/item_bogduggs_cudgel.lua
Executable file
46
aghanim_singleplayer/scripts/vscripts/items/item_bogduggs_cudgel.lua
Executable file
@@ -0,0 +1,46 @@
|
||||
item_bogduggs_cudgel = class({})
|
||||
LinkLuaModifier( "modifier_item_bogduggs_cudgel", "modifiers/modifier_item_bogduggs_cudgel", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
----------------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_cudgel:Precache( context )
|
||||
|
||||
PrecacheResource( "particle", "particles/creatures/ogre/ogre_melee_smash.vpcf", context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", context )
|
||||
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_cudgel:GetIntrinsicModifierName()
|
||||
return "modifier_item_bogduggs_cudgel"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_cudgel:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_cudgel:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_cudgel:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
44
aghanim_singleplayer/scripts/vscripts/items/item_bogduggs_lucky_femur.lua
Executable file
44
aghanim_singleplayer/scripts/vscripts/items/item_bogduggs_lucky_femur.lua
Executable file
@@ -0,0 +1,44 @@
|
||||
item_bogduggs_lucky_femur = class({})
|
||||
LinkLuaModifier( "modifier_item_bogduggs_lucky_femur", "modifiers/modifier_item_bogduggs_lucky_femur", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
|
||||
----------------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_lucky_femur:Precache( context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_ogre_magi/ogre_magi_multicast.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_lucky_femur:GetIntrinsicModifierName()
|
||||
return "modifier_item_bogduggs_lucky_femur"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_lucky_femur:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_lucky_femur:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_bogduggs_lucky_femur:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_carapace_of_qaldin.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_carapace_of_qaldin.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_carapace_of_qaldin = class({})
|
||||
LinkLuaModifier( "modifier_item_carapace_of_qaldin", "modifiers/modifier_item_carapace_of_qaldin", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_carapace_of_qaldin:GetIntrinsicModifierName()
|
||||
return "modifier_item_carapace_of_qaldin"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_carapace_of_qaldin:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_carapace_of_qaldin:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_carapace_of_qaldin:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
42
aghanim_singleplayer/scripts/vscripts/items/item_corrupting_blade.lua
Executable file
42
aghanim_singleplayer/scripts/vscripts/items/item_corrupting_blade.lua
Executable file
@@ -0,0 +1,42 @@
|
||||
|
||||
item_corrupting_blade = class({})
|
||||
LinkLuaModifier( "modifier_item_corrupting_blade", "modifiers/modifier_item_corrupting_blade", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_corrupting_blade_buff", "modifiers/modifier_item_corrupting_blade_buff", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_corrupting_blade:GetIntrinsicModifierName()
|
||||
return "modifier_item_corrupting_blade"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_corrupting_blade:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_corrupting_blade:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_corrupting_blade:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
38
aghanim_singleplayer/scripts/vscripts/items/item_creed_of_omniscience.lua
Executable file
38
aghanim_singleplayer/scripts/vscripts/items/item_creed_of_omniscience.lua
Executable file
@@ -0,0 +1,38 @@
|
||||
item_creed_of_omniscience = class({})
|
||||
LinkLuaModifier( "modifier_item_creed_of_omniscience", "modifiers/modifier_item_creed_of_omniscience", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_creed_of_omniscience:GetIntrinsicModifierName()
|
||||
return "modifier_item_creed_of_omniscience"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_creed_of_omniscience:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_creed_of_omniscience:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_creed_of_omniscience:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
22
aghanim_singleplayer/scripts/vscripts/items/item_double_damage_potion.lua
Executable file
22
aghanim_singleplayer/scripts/vscripts/items/item_double_damage_potion.lua
Executable file
@@ -0,0 +1,22 @@
|
||||
|
||||
item_double_damage_potion = class({})
|
||||
LinkLuaModifier( "modifier_item_double_damage_potion", "modifiers/modifier_item_double_damage_potion", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_double_damage_potion:OnSpellStart()
|
||||
if IsServer() then
|
||||
local kv =
|
||||
{
|
||||
duration = self:GetSpecialValueFor( "buff_duration" ),
|
||||
}
|
||||
|
||||
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_item_double_damage_potion", kv )
|
||||
|
||||
EmitSoundOn( "DoubleDamagePotion.Activate", self:GetCaster() )
|
||||
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
41
aghanim_singleplayer/scripts/vscripts/items/item_dredged_trident.lua
Executable file
41
aghanim_singleplayer/scripts/vscripts/items/item_dredged_trident.lua
Executable file
@@ -0,0 +1,41 @@
|
||||
|
||||
item_dredged_trident = class({})
|
||||
LinkLuaModifier( "modifier_item_dredged_trident", "modifiers/modifier_item_dredged_trident", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_dredged_trident:GetIntrinsicModifierName()
|
||||
return "modifier_item_dredged_trident"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_dredged_trident:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_dredged_trident:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_dredged_trident:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
28
aghanim_singleplayer/scripts/vscripts/items/item_evasion_potion.lua
Executable file
28
aghanim_singleplayer/scripts/vscripts/items/item_evasion_potion.lua
Executable file
@@ -0,0 +1,28 @@
|
||||
|
||||
item_evasion_potion = class({})
|
||||
LinkLuaModifier( "modifier_item_evasion_potion", "modifiers/modifier_item_evasion_potion", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_evasion_potion:Precache( context )
|
||||
PrecacheResource( "particle", "particles/generic_gameplay/evasion_potion_owner.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_evasion_potion:OnSpellStart()
|
||||
if IsServer() then
|
||||
local kv =
|
||||
{
|
||||
duration = self:GetSpecialValueFor( "buff_duration" ),
|
||||
}
|
||||
|
||||
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_item_evasion_potion", kv )
|
||||
|
||||
EmitSoundOn( "EvasionPotion.Activate", self:GetCaster() )
|
||||
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
56
aghanim_singleplayer/scripts/vscripts/items/item_glimmerdark_shield.lua
Executable file
56
aghanim_singleplayer/scripts/vscripts/items/item_glimmerdark_shield.lua
Executable file
@@ -0,0 +1,56 @@
|
||||
|
||||
item_glimmerdark_shield = class({})
|
||||
LinkLuaModifier( "modifier_item_glimmerdark_shield", "modifiers/modifier_item_glimmerdark_shield", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_glimmerdark_shield_prism", "modifiers/modifier_item_glimmerdark_shield_prism", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_glimmerdark_shield:OnSpellStart()
|
||||
self.prism_duration = self:GetSpecialValueFor( "prism_duration" )
|
||||
|
||||
if IsServer() then
|
||||
local hCaster = self:GetCaster()
|
||||
hCaster:AddNewModifier( hCaster, self, "modifier_item_glimmerdark_shield_prism", { duration = self.prism_duration } )
|
||||
|
||||
EmitSoundOn( "DOTA_Item.GhostScepter.Activate", self:GetCaster() )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_glimmerdark_shield:GetIntrinsicModifierName()
|
||||
return "modifier_item_glimmerdark_shield"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_glimmerdark_shield:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_glimmerdark_shield:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_glimmerdark_shield:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_gravel_foot.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_gravel_foot.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_gravel_foot = class({})
|
||||
LinkLuaModifier( "modifier_item_gravel_foot", "modifiers/modifier_item_gravel_foot", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_gravel_foot:GetIntrinsicModifierName()
|
||||
return "modifier_item_gravel_foot"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_gravel_foot:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_gravel_foot:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_gravel_foot:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_guardian_shell.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_guardian_shell.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_guardian_shell = class({})
|
||||
LinkLuaModifier( "modifier_item_guardian_shell", "modifiers/modifier_item_guardian_shell", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_guardian_shell:GetIntrinsicModifierName()
|
||||
return "modifier_item_guardian_shell"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_guardian_shell:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_guardian_shell:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_guardian_shell:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
40
aghanim_singleplayer/scripts/vscripts/items/item_health_potion.lua
Executable file
40
aghanim_singleplayer/scripts/vscripts/items/item_health_potion.lua
Executable file
@@ -0,0 +1,40 @@
|
||||
|
||||
item_health_potion = class({})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_health_potion:GetBehavior()
|
||||
return DOTA_ABILITY_BEHAVIOR_IMMEDIATE
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_health_potion:OnSpellStart()
|
||||
if IsServer() then
|
||||
local hp_restore_pct = self:GetSpecialValueFor( "hp_restore_pct" )
|
||||
self:GetCaster():EmitSoundParams( "DOTA_Item.FaerieSpark.Activate", 0, 0.5, 0)
|
||||
|
||||
local nTeamNumber = self:GetCaster():GetTeamNumber()
|
||||
|
||||
local Heroes = HeroList:GetAllHeroes()
|
||||
|
||||
for _,Hero in pairs ( Heroes ) do
|
||||
if Hero ~= nil and Hero:IsRealHero() and Hero:IsAlive() and Hero:GetTeamNumber() == nTeamNumber then
|
||||
local hBlessing = Hero:FindModifierByName( "modifier_blessing_potion_health" )
|
||||
if hBlessing ~= nil then
|
||||
local nBonusHealPct = hBlessing:GetHealthRestorePercentBonus()
|
||||
hp_restore_pct = hp_restore_pct * ( ( 100 + nBonusHealPct ) / 100 )
|
||||
--print( 'item_health_potion:OnSpellStart - adding ' .. nBonusHealPct .. '% to heal. Final heal % is ' .. hp_restore_pct )
|
||||
end
|
||||
|
||||
local flHealAmount = Hero:GetMaxHealth() * hp_restore_pct / 100
|
||||
Hero:Heal( flHealAmount, self )
|
||||
|
||||
local nFXIndex = ParticleManager:CreateParticle( "particles/items3_fx/fish_bones_active.vpcf", PATTACH_ABSORIGIN_FOLLOW, Hero )
|
||||
ParticleManager:ReleaseParticleIndex( nFXIndex )
|
||||
end
|
||||
end
|
||||
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
46
aghanim_singleplayer/scripts/vscripts/items/item_ice_dragon_maw.lua
Executable file
46
aghanim_singleplayer/scripts/vscripts/items/item_ice_dragon_maw.lua
Executable file
@@ -0,0 +1,46 @@
|
||||
item_ice_dragon_maw = class({})
|
||||
LinkLuaModifier( "modifier_item_ice_dragon_maw", "modifiers/modifier_item_ice_dragon_maw", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_large_frostbitten_icicle", "modifiers/modifier_large_frostbitten_icicle", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ice_dragon_maw:Precache( context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_crystalmaiden/maiden_frostbite.vpcf", context )
|
||||
PrecacheResource( "particle", "particles/status_fx/status_effect_wyvern_cold_embrace.vpcf", context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_crystalmaiden/maiden_frostbite_buff.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ice_dragon_maw:GetIntrinsicModifierName()
|
||||
return "modifier_item_ice_dragon_maw"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ice_dragon_maw:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ice_dragon_maw:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ice_dragon_maw:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
46
aghanim_singleplayer/scripts/vscripts/items/item_life_rune.lua
Executable file
46
aghanim_singleplayer/scripts/vscripts/items/item_life_rune.lua
Executable file
@@ -0,0 +1,46 @@
|
||||
item_life_rune = class({})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_life_rune:GetBehavior()
|
||||
return DOTA_ABILITY_BEHAVIOR_IMMEDIATE
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_life_rune:OnSpellStart()
|
||||
if IsServer() then
|
||||
if self:GetCaster() ~= nil and self:GetCaster():IsRealHero() then
|
||||
if self:GetCaster().nRespawnsRemaining >= AGHANIM_MAX_LIVES then
|
||||
local newItem = CreateItem( "item_life_rune", nil, nil )
|
||||
newItem:SetPurchaseTime( 0 )
|
||||
local drop = CreateItemOnPositionSync( self:GetCaster():GetAbsOrigin(), newItem )
|
||||
local dropTarget = self:GetCaster():GetAbsOrigin() + RandomVector( RandomFloat( 50, 150 ) )
|
||||
newItem:LaunchLoot( false, 150, 0.75, dropTarget )
|
||||
self:SpendCharge()
|
||||
return
|
||||
end
|
||||
|
||||
self:GetCaster().nRespawnsRemaining = math.min( self:GetCaster().nRespawnsRemaining + 1, AGHANIM_MAX_LIVES )
|
||||
local hPlayer = self:GetCaster():GetPlayerOwner()
|
||||
if hPlayer then
|
||||
PlayerResource:SetCustomBuybackCooldown( hPlayer:GetPlayerID(), 0 )
|
||||
PlayerResource:SetCustomBuybackCost( hPlayer:GetPlayerID(), 0 )
|
||||
end
|
||||
|
||||
local netTable = {}
|
||||
CustomGameEventManager:Send_ServerToPlayer( self:GetCaster():GetPlayerOwner(), "gained_life", netTable )
|
||||
CustomNetTables:SetTableValue( "respawns_remaining", string.format( "%d", self:GetCaster():entindex() ), { respawns = self:GetCaster().nRespawnsRemaining } )
|
||||
|
||||
local gameEvent = {}
|
||||
gameEvent["player_id"] = self:GetCaster():GetPlayerOwner():GetPlayerID()
|
||||
gameEvent["team_number"] = DOTA_TEAM_GOODGUYS
|
||||
gameEvent["locstring_value"] = "#DOTA_Tooltip_Ability_item_life_rune"
|
||||
gameEvent["message"] = "#Dungeon_FoundLifeRune"
|
||||
FireGameEvent( "dota_combat_event_message", gameEvent )
|
||||
end
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
56
aghanim_singleplayer/scripts/vscripts/items/item_lifestone.lua
Executable file
56
aghanim_singleplayer/scripts/vscripts/items/item_lifestone.lua
Executable file
@@ -0,0 +1,56 @@
|
||||
|
||||
item_lifestone = class({})
|
||||
LinkLuaModifier( "modifier_item_lifestone", "modifiers/modifier_item_lifestone", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_lifestone_pact", "modifiers/modifier_item_lifestone_pact", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_lifestone:GetIntrinsicModifierName()
|
||||
return "modifier_item_lifestone"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_lifestone:OnSpellStart()
|
||||
if IsServer() then
|
||||
local hCaster = self:GetCaster()
|
||||
if hCaster:HasModifier( "modifier_item_lifestone_pact" ) then
|
||||
hCaster:RemoveModifierByName( "modifier_item_lifestone_pact" )
|
||||
else
|
||||
hCaster:AddNewModifier( hCaster, self, "modifier_item_lifestone_pact", { duration = -1 } )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_lifestone:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_lifestone:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_lifestone:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
38
aghanim_singleplayer/scripts/vscripts/items/item_longclaws_amulet.lua
Executable file
38
aghanim_singleplayer/scripts/vscripts/items/item_longclaws_amulet.lua
Executable file
@@ -0,0 +1,38 @@
|
||||
item_longclaws_amulet = class({})
|
||||
LinkLuaModifier( "modifier_item_longclaws_amulet", "modifiers/modifier_item_longclaws_amulet", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_longclaws_amulet:GetIntrinsicModifierName()
|
||||
return "modifier_item_longclaws_amulet"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_longclaws_amulet:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_longclaws_amulet:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_longclaws_amulet:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
42
aghanim_singleplayer/scripts/vscripts/items/item_mana_potion.lua
Executable file
42
aghanim_singleplayer/scripts/vscripts/items/item_mana_potion.lua
Executable file
@@ -0,0 +1,42 @@
|
||||
|
||||
item_mana_potion = class({})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_mana_potion:GetBehavior()
|
||||
return DOTA_ABILITY_BEHAVIOR_IMMEDIATE
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_mana_potion:OnSpellStart()
|
||||
if IsServer() then
|
||||
local mana_restore_pct = self:GetSpecialValueFor( "mana_restore_pct" )
|
||||
self:GetCaster():EmitSoundParams( "DOTA_Item.Mango.Activate", 0, 0.5, 0 )
|
||||
|
||||
local nTeamNumber = self:GetCaster():GetTeamNumber()
|
||||
|
||||
local Heroes = HeroList:GetAllHeroes()
|
||||
|
||||
for _,Hero in pairs ( Heroes ) do
|
||||
if Hero ~= nil and Hero:IsRealHero() and Hero:IsAlive() and Hero:GetTeamNumber() == nTeamNumber then
|
||||
local hBlessing = Hero:FindModifierByName( "modifier_blessing_potion_mana" )
|
||||
if hBlessing ~= nil then
|
||||
local nBonusManaPct = hBlessing:GetManaRestorePercentBonus()
|
||||
mana_restore_pct = mana_restore_pct * ( ( 100 + nBonusManaPct ) / 100 )
|
||||
--print( 'item_mana_potion:OnSpellStart - adding ' .. nBonusManaPct .. '% to mana. Final mana % is ' .. mana_restore_pct )
|
||||
end
|
||||
|
||||
local flManaAmount = Hero:GetMaxMana() * mana_restore_pct / 100
|
||||
Hero:GiveMana( flManaAmount )
|
||||
|
||||
local nFXIndex = ParticleManager:CreateParticle( "particles/items3_fx/mango_active.vpcf", PATTACH_ABSORIGIN_FOLLOW, Hero )
|
||||
ParticleManager:ReleaseParticleIndex( nFXIndex )
|
||||
end
|
||||
end
|
||||
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
61
aghanim_singleplayer/scripts/vscripts/items/item_oblivions_locket.lua
Executable file
61
aghanim_singleplayer/scripts/vscripts/items/item_oblivions_locket.lua
Executable file
@@ -0,0 +1,61 @@
|
||||
item_oblivions_locket = class({})
|
||||
LinkLuaModifier( "modifier_item_oblivions_locket", "modifiers/modifier_item_oblivions_locket", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_oblivions_locket:OnSpellStart()
|
||||
if IsServer() then
|
||||
EmitSoundOn( "DOTA_Item.GhostScepter.Activate", self:GetCaster() )
|
||||
|
||||
local kv =
|
||||
{
|
||||
duration = -1,
|
||||
extra_spell_damage_percent = self:GetSpecialValueFor( "extra_spell_damage_percent" ),
|
||||
}
|
||||
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_ghost_state", kv )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_oblivions_locket:OnChannelFinish( bInterrupted )
|
||||
if IsServer() then
|
||||
self:GetCaster():RemoveModifierByName( "modifier_ghost_state" )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_oblivions_locket:GetIntrinsicModifierName()
|
||||
return "modifier_item_oblivions_locket"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_oblivions_locket:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_oblivions_locket:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_oblivions_locket:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
152
aghanim_singleplayer/scripts/vscripts/items/item_ogre_seal_totem.lua
Executable file
152
aghanim_singleplayer/scripts/vscripts/items/item_ogre_seal_totem.lua
Executable file
@@ -0,0 +1,152 @@
|
||||
|
||||
item_ogre_seal_totem = class({})
|
||||
LinkLuaModifier( "modifier_item_ogre_seal_totem", "modifiers/modifier_item_ogre_seal_totem", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_ogreseal_flop", "modifiers/creatures/modifier_ogreseal_flop", LUA_MODIFIER_MOTION_BOTH )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ogre_seal_totem:Precache( context )
|
||||
PrecacheResource( "particle", "particles/creatures/ogre_seal/ogre_seal_warcry.vpcf", context )
|
||||
PrecacheResource( "particle", "particles/creatures/ogre/ogre_melee_smash.vpcf", context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ogre_seal_totem:GetAOERadius()
|
||||
return self:GetSpecialValueFor( "radius" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ogre_seal_totem:GetIntrinsicModifierName()
|
||||
return "modifier_item_ogre_seal_totem"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ogre_seal_totem:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ogre_seal_totem:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ogre_seal_totem:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
function item_ogre_seal_totem:OnAbilityPhaseStart()
|
||||
if IsServer() then
|
||||
--self:GetCaster():StartGesture( ACT_DOTA_VICTORY )
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ogre_seal_totem:OnAbilityPhaseInterrupted()
|
||||
if IsServer() then
|
||||
ParticleManager:DestroyParticle( self.nPreviewFXIndex, true )
|
||||
|
||||
--self:GetCaster():RemoveGesture( ACT_DOTA_VICTORY )
|
||||
self:GetCaster():RemoveModifierByName( "modifier_techies_suicide_leap_animation" )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ogre_seal_totem:OnSpellStart()
|
||||
if IsServer() then
|
||||
if self.nPreviewFXIndex then
|
||||
ParticleManager:DestroyParticle( self.nPreviewFXIndex, true )
|
||||
end
|
||||
|
||||
--self:GetCaster():RemoveGesture( ACT_DOTA_VICTORY )
|
||||
|
||||
self.stun_duration = self:GetSpecialValueFor("stun_duration")
|
||||
|
||||
local vToTarget = self:GetCursorPosition() - self:GetCaster():GetOrigin()
|
||||
vToTarget = vToTarget:Normalized()
|
||||
local vLocation = self:GetCaster():GetOrigin() + vToTarget * 25
|
||||
local kv =
|
||||
{
|
||||
vLocX = vLocation.x,
|
||||
vLocY = vLocation.y,
|
||||
vLocZ = vLocation.z
|
||||
}
|
||||
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_ogreseal_flop", kv )
|
||||
|
||||
EmitSoundOn( "OgreTank.Grunt", self:GetCaster() )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_ogre_seal_totem:TryToDamage()
|
||||
if IsServer() then
|
||||
local radius = self:GetSpecialValueFor( "radius" )
|
||||
local damage = self:GetSpecialValueFor( "damage" )
|
||||
local silence_duration = self:GetSpecialValueFor( "silence_duration" )
|
||||
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetOrigin(), self:GetCaster(), radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_NOT_ANCIENTS, 0, false )
|
||||
if #enemies > 0 then
|
||||
for _,enemy in pairs(enemies) do
|
||||
if enemy ~= nil and ( not enemy:IsMagicImmune() ) and ( not enemy:IsInvulnerable() ) then
|
||||
local DamageInfo =
|
||||
{
|
||||
victim = enemy,
|
||||
attacker = self:GetCaster(),
|
||||
ability = self,
|
||||
damage = damage,
|
||||
damage_type = DAMAGE_TYPE_PHYSICAL,
|
||||
}
|
||||
ApplyDamage( DamageInfo )
|
||||
if enemy:IsAlive() == false and enemy:GetUnitName() ~= "npc_dota_crate" and enemy:GetUnitName() ~= "npc_dota_vase" then
|
||||
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", PATTACH_CUSTOMORIGIN, nil )
|
||||
ParticleManager:SetParticleControlEnt( nFXIndex, 0, enemy, PATTACH_POINT_FOLLOW, "attach_hitloc", enemy:GetOrigin(), true )
|
||||
ParticleManager:SetParticleControl( nFXIndex, 1, enemy:GetOrigin() )
|
||||
ParticleManager:SetParticleControlForward( nFXIndex, 1, -self:GetCaster():GetForwardVector() )
|
||||
ParticleManager:SetParticleControlEnt( nFXIndex, 10, enemy, PATTACH_ABSORIGIN_FOLLOW, nil, enemy:GetOrigin(), true )
|
||||
ParticleManager:ReleaseParticleIndex( nFXIndex )
|
||||
|
||||
EmitSoundOn( "Dungeon.BloodSplatterImpact", enemy )
|
||||
else
|
||||
enemy:AddNewModifier( self:GetCaster(), self, "modifier_stunned", { duration = self.stun_duration } )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
EmitSoundOnLocationWithCaster( self:GetCaster():GetOrigin(), "OgreTank.GroundSmash", self:GetCaster() )
|
||||
local nFXIndex = ParticleManager:CreateParticle( "particles/creatures/ogre/ogre_melee_smash.vpcf", PATTACH_WORLDORIGIN, self:GetCaster() )
|
||||
ParticleManager:SetParticleControl( nFXIndex, 0, self:GetCaster():GetOrigin() )
|
||||
ParticleManager:SetParticleControl( nFXIndex, 1, Vector( self.radius, self.radius, self.radius ) )
|
||||
ParticleManager:ReleaseParticleIndex( nFXIndex )
|
||||
|
||||
GridNav:DestroyTreesAroundPoint( self:GetCaster():GetOrigin(), radius, false )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
44
aghanim_singleplayer/scripts/vscripts/items/item_paw_of_lucius.lua
Executable file
44
aghanim_singleplayer/scripts/vscripts/items/item_paw_of_lucius.lua
Executable file
@@ -0,0 +1,44 @@
|
||||
item_paw_of_lucius = class({})
|
||||
LinkLuaModifier( "modifier_item_paw_of_lucius", "modifiers/modifier_item_paw_of_lucius", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_paw_of_lucius:GetIntrinsicModifierName()
|
||||
return "modifier_item_paw_of_lucius"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_paw_of_lucius:Precache( context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_bloodseeker/bloodseeker_rupture.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_paw_of_lucius:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_paw_of_lucius:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_paw_of_lucius:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
38
aghanim_singleplayer/scripts/vscripts/items/item_pelt_of_the_old_wolf.lua
Executable file
38
aghanim_singleplayer/scripts/vscripts/items/item_pelt_of_the_old_wolf.lua
Executable file
@@ -0,0 +1,38 @@
|
||||
item_pelt_of_the_old_wolf = class({})
|
||||
LinkLuaModifier( "modifier_item_pelt_of_the_old_wolf", "modifiers/modifier_item_pelt_of_the_old_wolf", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_pelt_of_the_old_wolf:GetIntrinsicModifierName()
|
||||
return "modifier_item_pelt_of_the_old_wolf"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_pelt_of_the_old_wolf:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_pelt_of_the_old_wolf:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_pelt_of_the_old_wolf:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
18
aghanim_singleplayer/scripts/vscripts/items/item_pocket_campfire.lua
Executable file
18
aghanim_singleplayer/scripts/vscripts/items/item_pocket_campfire.lua
Executable file
@@ -0,0 +1,18 @@
|
||||
|
||||
item_pocket_campfire = class({})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_pocket_campfire:OnSpellStart()
|
||||
if IsServer() then
|
||||
local vPos = self:GetCursorPosition()
|
||||
local hPocketCampfire = CreateUnitByName( "npc_dota_pocket_campfire", vPos, true, nil, nil, DOTA_TEAM_GOODGUYS )
|
||||
if hPocketCampfire ~= nil then
|
||||
EmitSoundOn( "PocketCampfire.Create", hCampfire )
|
||||
end
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_precious_egg.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_precious_egg.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_precious_egg = class({})
|
||||
LinkLuaModifier( "modifier_item_precious_egg", "modifiers/modifier_item_precious_egg", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_precious_egg:GetIntrinsicModifierName()
|
||||
return "modifier_item_precious_egg"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_precious_egg:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_precious_egg:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_precious_egg:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
39
aghanim_singleplayer/scripts/vscripts/items/item_preserved_skull.lua
Executable file
39
aghanim_singleplayer/scripts/vscripts/items/item_preserved_skull.lua
Executable file
@@ -0,0 +1,39 @@
|
||||
item_preserved_skull = class({})
|
||||
LinkLuaModifier( "modifier_item_preserved_skull", "modifiers/modifier_item_preserved_skull", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_preserved_skull_effect", "modifiers/modifier_item_preserved_skull_effect", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_preserved_skull:GetIntrinsicModifierName()
|
||||
return "modifier_item_preserved_skull"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_preserved_skull:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_preserved_skull:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_preserved_skull:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
76
aghanim_singleplayer/scripts/vscripts/items/item_purification_potion.lua
Executable file
76
aghanim_singleplayer/scripts/vscripts/items/item_purification_potion.lua
Executable file
@@ -0,0 +1,76 @@
|
||||
|
||||
item_purification_potion = class({})
|
||||
LinkLuaModifier( "modifier_item_purification_potion", "modifiers/modifier_item_purification_potion", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_purification_potion:Precache( context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_omniknight/omniknight_purification.vpcf", context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_omniknight/omniknight_purification_hit.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_purification_potion:OnSpellStart()
|
||||
if IsServer() then
|
||||
self.heal = self:GetSpecialValueFor( "heal" )
|
||||
self.radius = self:GetSpecialValueFor( "radius" )
|
||||
|
||||
--print( 'item_purification_potion:OnSpellStart() - radius is ' .. self.radius )
|
||||
|
||||
local kv =
|
||||
{
|
||||
duration = 0.1,
|
||||
}
|
||||
|
||||
self:HealAlly( self:GetCursorTarget() )
|
||||
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_purification_potion:HealAlly( hAlliedHero )
|
||||
if IsServer() then
|
||||
hAlliedHero:Heal( self.heal, self )
|
||||
|
||||
SendOverheadEventMessage( self:GetCaster():GetPlayerOwner(), OVERHEAD_ALERT_HEAL, hAlliedHero, self.heal, nil )
|
||||
|
||||
-- blessing adds a dispel on the target
|
||||
local hBuff = self:GetCaster():FindModifierByName( "modifier_blessing_potion_purification" )
|
||||
if hBuff ~= nil then
|
||||
--print( "item_purification_potion:HealAlly - purging the target because we've got modifier_blessing_potion_purification!" )
|
||||
-- PositiveBuffs, NegativeBuffs, FrameOnly, RemoveStuns, RemoveExceptions
|
||||
hAlliedHero:Purge( false, true, false, true, false )
|
||||
end
|
||||
|
||||
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_omniknight/omniknight_purification.vpcf", PATTACH_CUSTOMORIGIN, hAlliedHero )
|
||||
ParticleManager:SetParticleControlEnt( nFXIndex, 0, hAlliedHero, PATTACH_ABSORIGIN_FOLLOW, nil, hAlliedHero:GetOrigin(), true )
|
||||
ParticleManager:SetParticleControl( nFXIndex, 1, Vector( self.radius, self.radius, self.radius ) )
|
||||
ParticleManager:ReleaseParticleIndex( nFXIndex )
|
||||
|
||||
EmitSoundOn( "PurificationPotion.Activate", hAlliedHero )
|
||||
|
||||
local enemies = FindUnitsInRadius( hAlliedHero:GetTeamNumber(), hAlliedHero:GetOrigin(), nil, self.radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_CLOSEST, false )
|
||||
for _, enemy in pairs( enemies ) do
|
||||
if enemy ~= nil and enemy:IsInvulnerable() == false and enemy:IsMagicImmune() == false then
|
||||
local damageInfo =
|
||||
{
|
||||
victim = enemy,
|
||||
attacker = self:GetCaster(),
|
||||
damage = self.heal,
|
||||
damage_type = self:GetAbilityDamageType(),
|
||||
ability = self,
|
||||
}
|
||||
ApplyDamage( damageInfo )
|
||||
|
||||
local nFXIndex3 = ParticleManager:CreateParticle( "particles/units/heroes/hero_omniknight/omniknight_purification_hit.vpcf", PATTACH_ABSORIGIN_FOLLOW, enemy )
|
||||
ParticleManager:SetParticleControlEnt( nFXIndex3, 1, enemy, PATTACH_POINT_FOLLOW, "attach_hitloc", enemy:GetOrigin(), true )
|
||||
ParticleManager:ReleaseParticleIndex( nFXIndex3 )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_rhyziks_eye.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_rhyziks_eye.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_rhyziks_eye = class({})
|
||||
LinkLuaModifier( "modifier_item_rhyziks_eye", "modifiers/modifier_item_rhyziks_eye", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_rhyziks_eye:GetIntrinsicModifierName()
|
||||
return "modifier_item_rhyziks_eye"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_rhyziks_eye:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_rhyziks_eye:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_rhyziks_eye:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
39
aghanim_singleplayer/scripts/vscripts/items/item_sign_of_the_arachnid.lua
Executable file
39
aghanim_singleplayer/scripts/vscripts/items/item_sign_of_the_arachnid.lua
Executable file
@@ -0,0 +1,39 @@
|
||||
item_sign_of_the_arachnid = class({})
|
||||
LinkLuaModifier( "modifier_item_sign_of_the_arachnid", "modifiers/modifier_item_sign_of_the_arachnid", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_sign_of_the_arachnid_effect", "modifiers/modifier_item_sign_of_the_arachnid_effect", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_sign_of_the_arachnid:GetIntrinsicModifierName()
|
||||
return "modifier_item_sign_of_the_arachnid"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_sign_of_the_arachnid:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_sign_of_the_arachnid:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_sign_of_the_arachnid:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
57
aghanim_singleplayer/scripts/vscripts/items/item_slippers_of_the_abyss.lua
Executable file
57
aghanim_singleplayer/scripts/vscripts/items/item_slippers_of_the_abyss.lua
Executable file
@@ -0,0 +1,57 @@
|
||||
|
||||
item_slippers_of_the_abyss = class({})
|
||||
LinkLuaModifier( "modifier_item_slippers_of_the_abyss", "modifiers/modifier_item_slippers_of_the_abyss", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_slippers_of_the_abyss_sprint", "modifiers/modifier_item_slippers_of_the_abyss_sprint", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
||||
function item_slippers_of_the_abyss:Precache( context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_slardar/slardar_sprint.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_slippers_of_the_abyss:GetIntrinsicModifierName()
|
||||
return "modifier_item_slippers_of_the_abyss"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_slippers_of_the_abyss:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_slippers_of_the_abyss:OnSpellStart()
|
||||
if IsServer() then
|
||||
self.sprint_duration = self:GetSpecialValueFor( "sprint_duration" )
|
||||
|
||||
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_item_slippers_of_the_abyss_sprint", { duration = self.sprint_duration } )
|
||||
|
||||
EmitSoundOn( "Siltbreaker.Sprint", self:GetCaster() )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_slippers_of_the_abyss:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_slippers_of_the_abyss:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
28
aghanim_singleplayer/scripts/vscripts/items/item_spell_amp_potion.lua
Executable file
28
aghanim_singleplayer/scripts/vscripts/items/item_spell_amp_potion.lua
Executable file
@@ -0,0 +1,28 @@
|
||||
|
||||
item_spell_amp_potion = class({})
|
||||
LinkLuaModifier( "modifier_item_spell_amp_potion", "modifiers/modifier_item_spell_amp_potion", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_spell_amp_potion:Precache( context )
|
||||
PrecacheResource( "particle", "particles/generic_gameplay/spell_amp_potion_owner.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_spell_amp_potion:OnSpellStart()
|
||||
if IsServer() then
|
||||
local kv =
|
||||
{
|
||||
duration = self:GetSpecialValueFor( "buff_duration" ),
|
||||
}
|
||||
|
||||
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_item_spell_amp_potion", kv )
|
||||
|
||||
EmitSoundOn( "SpellAmpPotion.Activate", self:GetCaster() )
|
||||
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_stonework_pendant.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_stonework_pendant.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_stonework_pendant = class({})
|
||||
LinkLuaModifier( "modifier_item_stonework_pendant", "modifiers/modifier_item_stonework_pendant", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stonework_pendant:GetIntrinsicModifierName()
|
||||
return "modifier_item_stonework_pendant"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stonework_pendant:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stonework_pendant:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stonework_pendant:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
67
aghanim_singleplayer/scripts/vscripts/items/item_stony_coat.lua
Executable file
67
aghanim_singleplayer/scripts/vscripts/items/item_stony_coat.lua
Executable file
@@ -0,0 +1,67 @@
|
||||
item_stony_coat = class({})
|
||||
LinkLuaModifier( "modifier_item_stony_coat", "modifiers/modifier_item_stony_coat", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stony_coat:Precache( context )
|
||||
PrecacheResource( "particle", "particles/neutral_fx/mud_golem_hurl_boulder.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stony_coat:GetIntrinsicModifierName()
|
||||
return "modifier_item_stony_coat"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stony_coat:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
self.boulder_damage = self:GetSpecialValueFor( "boulder_damage" )
|
||||
self.boulder_stun_duration = self:GetSpecialValueFor( "boulder_stun_duration" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stony_coat:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stony_coat:OnProjectileHit( hTarget, vLocation )
|
||||
if IsServer() then
|
||||
if hTarget ~= nil and hTarget:IsMagicImmune() == false and hTarget:IsInvulnerable() == false then
|
||||
local damageinfo =
|
||||
{
|
||||
victim = hTarget,
|
||||
attacker = self:GetCaster(),
|
||||
damage = self.boulder_damage,
|
||||
damage_type = DAMAGE_TYPE_MAGICAL,
|
||||
ability = self,
|
||||
}
|
||||
ApplyDamage( damageinfo )
|
||||
EmitSoundOn( "n_mud_golem.Boulder.Target", hTarget )
|
||||
hTarget:AddNewModifier( self:GetCaster(), self, "modifier_stunned", { duration = self.boulder_stun_duration } )
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_stony_coat:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_the_caustic_finale.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_the_caustic_finale.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_the_caustic_finale = class({})
|
||||
LinkLuaModifier( "modifier_item_the_caustic_finale", "modifiers/modifier_item_the_caustic_finale", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_the_caustic_finale:GetIntrinsicModifierName()
|
||||
return "modifier_item_the_caustic_finale"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_the_caustic_finale:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_the_caustic_finale:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_the_caustic_finale:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
@@ -0,0 +1,33 @@
|
||||
item_tome_of_greater_knowledge = class({})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_tome_of_greater_knowledge:Precache( context )
|
||||
PrecacheResource( "model", "models/gameplay/attrib_tome_str.vmdl", context )
|
||||
PrecacheResource( "particle", "particles/generic_hero_status/hero_levelup.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_tome_of_greater_knowledge:OnSpellStart()
|
||||
if IsServer() then
|
||||
if self:GetCaster() ~= nil and self:GetCaster():IsRealHero() then
|
||||
|
||||
for nPlayerID = 0,AGHANIM_PLAYERS-1 do
|
||||
local hPlayerHero = PlayerResource:GetSelectedHeroEntity( nPlayerID )
|
||||
if hPlayerHero then
|
||||
local nFXIndex = ParticleManager:CreateParticle( "particles/generic_hero_status/hero_levelup.vpcf", PATTACH_ABSORIGIN_FOLLOW, hPlayerHero )
|
||||
ParticleManager:ReleaseParticleIndex( nFXIndex )
|
||||
|
||||
local nXP = ( GetXPNeededToReachNextLevel( hPlayerHero:GetLevel() ) - GetXPNeededToReachNextLevel( hPlayerHero:GetLevel() - 1 ) ) / 2
|
||||
hPlayerHero:AddExperience( nXP, DOTA_ModifyXP_Unspecified, false, false )
|
||||
|
||||
EmitSoundOn( "Item.TomeOfKnowledge", hPlayerHero )
|
||||
end
|
||||
end
|
||||
end
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_torrent_effect_potion.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_torrent_effect_potion.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
|
||||
item_torrent_effect_potion = class({})
|
||||
LinkLuaModifier( "modifier_item_torrent_effect_potion", "modifiers/modifier_item_torrent_effect_potion", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_torrent_effect_potion:Precache( context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_kunkka/kunkka_spell_torrent_bubbles.vpcf", context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_kunkka/kunkka_spell_torrent_splash.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_torrent_effect_potion:OnSpellStart()
|
||||
if IsServer() then
|
||||
self.proc_chance = self:GetSpecialValueFor( "proc_chance" )
|
||||
self.radius = self:GetSpecialValueFor( "radius" )
|
||||
self.movespeed_bonus = self:GetSpecialValueFor( "movespeed_bonus" )
|
||||
self.slow_duration = self:GetSpecialValueFor( "slow_duration" )
|
||||
self.stun_duration = self:GetSpecialValueFor( "stun_duration" )
|
||||
self.delay = self:GetSpecialValueFor( "delay" )
|
||||
self.torrent_damage = self:GetSpecialValueFor( "torrent_damage" )
|
||||
|
||||
local kv =
|
||||
{
|
||||
duration = -1,
|
||||
}
|
||||
|
||||
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_item_torrent_effect_potion", kv )
|
||||
|
||||
EmitSoundOn( "TorrentEffectPotion.Activate", self:GetCaster() )
|
||||
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_treads_of_ermacor.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_treads_of_ermacor.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_treads_of_ermacor = class({})
|
||||
LinkLuaModifier( "modifier_item_treads_of_ermacor", "modifiers/modifier_item_treads_of_ermacor", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_treads_of_ermacor:GetIntrinsicModifierName()
|
||||
return "modifier_item_treads_of_ermacor"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_treads_of_ermacor:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_treads_of_ermacor:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_treads_of_ermacor:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
41
aghanim_singleplayer/scripts/vscripts/items/item_treasure_box.lua
Executable file
41
aghanim_singleplayer/scripts/vscripts/items/item_treasure_box.lua
Executable file
@@ -0,0 +1,41 @@
|
||||
item_treasure_box = class({})
|
||||
|
||||
function item_treasure_box:GetBehavior()
|
||||
return DOTA_ABILITY_BEHAVIOR_IMMEDIATE
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_treasure_box:OnSpellStart()
|
||||
if IsServer() then
|
||||
local CurrentZone = nil
|
||||
for _,Zone in pairs( GameRules.Dungeon.Zones ) do
|
||||
if Zone ~= nil and Zone:ContainsUnit( self:GetCaster() ) then
|
||||
CurrentZone = Zone
|
||||
end
|
||||
end
|
||||
|
||||
if CurrentZone == nil then
|
||||
self:SpendCharge()
|
||||
return
|
||||
end
|
||||
|
||||
local ChestTable = CurrentZone.Chests[#CurrentZone.Chests]
|
||||
local hTreasure = CreateUnitByName( ChestTable.szNPCName, self:GetCaster():GetOrigin() + RandomVector( RandomFloat( 50, 100 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS )
|
||||
if hTreasure ~= nil then
|
||||
hTreasure.zone = CurrentZone
|
||||
hTreasure.Items = ChestTable.Items
|
||||
hTreasure.fItemChance = ChestTable.fItemChance
|
||||
hTreasure.Relics = ChestTable.Relics
|
||||
hTreasure.fRelicChance = ChestTable.fRelicChance
|
||||
hTreasure.nMinGold = ChestTable.nMinGold
|
||||
hTreasure.nMaxGold = ChestTable.nMaxGold
|
||||
hTreasure.szTraps = ChestTable.szTraps
|
||||
hTreasure.nTrapLevel = ChestTable.nTrapLevel
|
||||
EmitSoundOn( "Dungeon.TreasureItemDrop", hTreasure )
|
||||
end
|
||||
self:SpendCharge()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
39
aghanim_singleplayer/scripts/vscripts/items/item_unhallowed_icon.lua
Executable file
39
aghanim_singleplayer/scripts/vscripts/items/item_unhallowed_icon.lua
Executable file
@@ -0,0 +1,39 @@
|
||||
item_unhallowed_icon = class({})
|
||||
LinkLuaModifier( "modifier_item_unhallowed_icon", "modifiers/modifier_item_unhallowed_icon", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_unhallowed_icon_effect", "modifiers/modifier_item_unhallowed_icon_effect", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_unhallowed_icon:GetIntrinsicModifierName()
|
||||
return "modifier_item_unhallowed_icon"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_unhallowed_icon:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_unhallowed_icon:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_unhallowed_icon:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
60
aghanim_singleplayer/scripts/vscripts/items/item_wand_of_the_brine.lua
Executable file
60
aghanim_singleplayer/scripts/vscripts/items/item_wand_of_the_brine.lua
Executable file
@@ -0,0 +1,60 @@
|
||||
|
||||
item_wand_of_the_brine = class({})
|
||||
LinkLuaModifier( "modifier_item_wand_of_the_brine", "modifiers/modifier_item_wand_of_the_brine", LUA_MODIFIER_MOTION_NONE )
|
||||
LinkLuaModifier( "modifier_item_wand_of_the_brine_bubble", "modifiers/modifier_item_wand_of_the_brine_bubble", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_wand_of_the_brine:Precache( context )
|
||||
PrecacheResource( "particle", "particles/act_2/wand_of_the_brine_bubble.vpcf", context )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_wand_of_the_brine:OnSpellStart()
|
||||
if IsServer() then
|
||||
self.bubble_duration = self:GetSpecialValueFor( "bubble_duration" )
|
||||
|
||||
local hTarget = self:GetCursorTarget()
|
||||
hTarget:AddNewModifier( self:GetCaster(), self, "modifier_item_wand_of_the_brine_bubble", { duration = self.bubble_duration } )
|
||||
|
||||
EmitSoundOn( "DOTA_Item.GhostScepter.Activate", self:GetCaster() )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_wand_of_the_brine:GetIntrinsicModifierName()
|
||||
return "modifier_item_wand_of_the_brine"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_wand_of_the_brine:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_wand_of_the_brine:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_wand_of_the_brine:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
72
aghanim_singleplayer/scripts/vscripts/items/item_watchers_gaze.lua
Executable file
72
aghanim_singleplayer/scripts/vscripts/items/item_watchers_gaze.lua
Executable file
@@ -0,0 +1,72 @@
|
||||
item_watchers_gaze = class({})
|
||||
LinkLuaModifier( "modifier_item_watchers_gaze", "modifiers/modifier_item_watchers_gaze", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_watchers_gaze:Precache( context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_medusa/medusa_stone_gaze_cast.vpcf", context )
|
||||
PrecacheResource( "particle", "particles/units/heroes/hero_medusa/medusa_stone_gaze_active.vpcf", context )
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_watchers_gaze:OnSpellStart()
|
||||
if IsServer() then
|
||||
local vision_cone = self:GetSpecialValueFor( "vision_cone" )
|
||||
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_medusa/medusa_stone_gaze_cast.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
|
||||
ParticleManager:ReleaseParticleIndex( nFXIndex )
|
||||
|
||||
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetOrigin(), nil, 800, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, 0, false )
|
||||
for _,enemy in pairs( enemies ) do
|
||||
if enemy ~= nil then
|
||||
local vToTarget = enemy:GetOrigin() - self:GetCaster():GetOrigin()
|
||||
vToTarget = vToTarget:Normalized()
|
||||
local flDirectionDot = DotProduct( vToTarget, self:GetCaster():GetForwardVector() )
|
||||
local flAngle = 180 * math.acos( flDirectionDot ) / math.pi
|
||||
if flAngle < 60 then
|
||||
enemy:AddNewModifier( self:GetCaster(), self, "modifier_medusa_stone_gaze_stone", {duration = self:GetSpecialValueFor( "stone_duration" ) } )
|
||||
EmitSoundOn( "WatchersGaze.Target" ,enemy )
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_medusa/medusa_stone_gaze_active.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
|
||||
ParticleManager:SetParticleControlEnt( nFXIndex, 1, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_hitloc", self:GetCaster():GetOrigin(), true )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_watchers_gaze:GetIntrinsicModifierName()
|
||||
return "modifier_item_watchers_gaze"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_watchers_gaze:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_watchers_gaze:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_watchers_gaze:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
37
aghanim_singleplayer/scripts/vscripts/items/item_winter_embrace.lua
Executable file
37
aghanim_singleplayer/scripts/vscripts/items/item_winter_embrace.lua
Executable file
@@ -0,0 +1,37 @@
|
||||
item_winter_embrace = class({})
|
||||
LinkLuaModifier( "modifier_item_winter_embrace", "modifiers/modifier_item_winter_embrace", LUA_MODIFIER_MOTION_NONE )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_winter_embrace:GetIntrinsicModifierName()
|
||||
return "modifier_item_winter_embrace"
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_winter_embrace:Spawn()
|
||||
self.required_level = self:GetSpecialValueFor( "required_level" )
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_winter_embrace:OnHeroLevelUp()
|
||||
if IsServer() then
|
||||
if self:GetCaster():GetLevel() == self.required_level and self:IsInBackpack() == false then
|
||||
self:OnUnequip()
|
||||
self:OnEquip()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function item_winter_embrace:IsMuted()
|
||||
if self.required_level > self:GetCaster():GetLevel() then
|
||||
return true
|
||||
end
|
||||
if not self:GetCaster():IsHero() then
|
||||
return true
|
||||
end
|
||||
return self.BaseClass.IsMuted( self )
|
||||
end
|
||||
Reference in New Issue
Block a user