Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "berserkky"
- {
- "BaseClass" "ability_datadriven"
- "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
- "SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
- "AbilityTextureName" "axe_berserkers_call"
- "FightRecapLevel" "1"
- "precache"
- {
- "soundfile" "soundevents/game_sounds_heroes/game_sounds_axe.vsndevts"
- "particle" "particles/status_fx/status_effect_beserkers_call.vpcf"
- }
- "AbilitySpecial"
- {
- "02"
- {
- "var_type" "FIELD_INTEGER"
- "AbilityDamage" "100 200 300 400"
- }
- "03"
- {
- "var_type" "FIELD_FLOAT"
- "duration" "6"
- }
- "04"
- {
- "var_type" "FIELD_INTEGER"
- "trigger_chance" "1 2 3 4"
- }
- }
- "Modifiers"
- {
- "modifier_beserkers_call"
- {
- "Passive" "1"
- "IsBuff" "0"
- "IsDebuff" "0"
- "IsHidden" "1"
- "IsPurgable" "0"
- "OnAttack"
- {
- "Random"
- {
- "Chance" "%trigger_chance"
- "OnSuccess"
- {
- "RunScript"
- {
- "ScriptFile" "npc_abilities/spd_mundmg.lua"
- "Function" "ApplyBuffs"
- }
- }
- }
- }
- }
- "modifier_beseall"
- {
- "Passive" "0"
- "IsHidden" "0"
- "IsPurgable" "1"
- "IsBuff" "0"
- "IsDebuff" "1"
- "IsStunDebuff" "0"
- "OnCreated"
- {
- "Damage"
- {
- "Target" "TARGET"
- "Type" "DAMAGE_TYPE_PURE"
- "Damage" "%AbilityDamage"
- "Target"
- {
- "Center" "TARGET"
- "Types" "DOTA_UNIT_TARGET_BASIC"
- }
- }
- "RunScript"
- {
- "ScriptFile" "npc_abilities/double_edge.lua"
- "Function" "DoubleEdgeSelfDamage"
- }
- }
- }
- }
- function ApplyBuffs(event)
- local caster = event.caster
- local ability = event.ability
- if caster:PassivesDisabled() then
- return
- end
- local duration = ability:GetSpecialValueFor("duration")
- ability:ApplyDataDrivenModifier(caster, caster, "modifier_beseall", {duration = duration})
- local abiShadow = caster:FindAbilityByName("shadow_master_shadow")
- if abiShadow and abiShadow.shadow and IsValidEntity(abiShadow.shadow) and abiShadow.shadow:IsAlive() then
- ability:ApplyDataDrivenModifier(caster, abiShadow.shadow, "modifier_beseall", {duration = duration})
- end
- local abiArt = caster:FindAbilityByName("shadow_master_art_of_shadows")
- if abiArt and abiArt.shadows then
- for _,unit in pairs(abiArt.shadows) do
- if IsValidEntity(unit) and unit:IsAlive() then
- ability:ApplyDataDrivenModifier(caster, unit, "modifier_beseall", {duration = duration})
- end
- end
- end
- end
- function DoubleEdgeSelfDamage( event )
- -- Variables
- local caster = event.caster
- local ability = event.ability
- local self_damage = ability:GetLevelSpecialValueFor( "edge_damage" , ability:GetLevel() - 1 )
- local damageType = ability:GetAbilityDamageType()
- -- Self damage
- ApplyDamage({ victim = caster, attacker = caster, damage = self_damage, damage_type = damageType, damage_flags = DOTA_DAMAGE_FLAG_NON_LETHAL })
- end
- function DoubleEdgeParticle( event )
- local caster = event.caster
- local target = event.target
- -- Particle
- local particle = ParticleManager:CreateParticle("particles/units/heroes/hero_centaur/centaur_double_edge.vpcf", PATTACH_ABSORIGIN_FOLLOW, target)
- ParticleManager:SetParticleControl(particle, 0, caster:GetAbsOrigin()) -- Origin
- ParticleManager:SetParticleControl(particle, 1, target:GetAbsOrigin()) -- Destination
- ParticleManager:SetParticleControl(particle, 5, target:GetAbsOrigin()) -- Hit Glow
- end
Advertisement
Add Comment
Please, Sign In to add comment