dEN5

Untitled

Jan 21st, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.41 KB | None | 0 0
  1. "berserkky"
  2. {
  3. "BaseClass" "ability_datadriven"
  4. "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
  5. "SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
  6. "AbilityTextureName" "axe_berserkers_call"
  7. "FightRecapLevel" "1"
  8. "precache"
  9. {
  10. "soundfile" "soundevents/game_sounds_heroes/game_sounds_axe.vsndevts"
  11. "particle" "particles/status_fx/status_effect_beserkers_call.vpcf"
  12. }
  13. "AbilitySpecial"
  14. {
  15. "02"
  16. {
  17. "var_type" "FIELD_INTEGER"
  18. "AbilityDamage" "100 200 300 400"
  19. }
  20. "03"
  21. {
  22. "var_type" "FIELD_FLOAT"
  23. "duration" "6"
  24. }
  25. "04"
  26. {
  27. "var_type" "FIELD_INTEGER"
  28. "trigger_chance" "1 2 3 4"
  29. }
  30. }
  31. "Modifiers"
  32. {
  33. "modifier_beserkers_call"
  34. {
  35. "Passive" "1"
  36. "IsBuff" "0"
  37. "IsDebuff" "0"
  38. "IsHidden" "1"
  39. "IsPurgable" "0"
  40. "OnAttack"
  41. {
  42. "Random"
  43. {
  44. "Chance" "%trigger_chance"
  45. "OnSuccess"
  46. {
  47. "RunScript"
  48. {
  49. "ScriptFile" "npc_abilities/spd_mundmg.lua"
  50. "Function" "ApplyBuffs"
  51. }
  52. }
  53. }
  54. }
  55. }
  56. "modifier_beseall"
  57. {
  58. "Passive" "0"
  59. "IsHidden" "0"
  60. "IsPurgable" "1"
  61. "IsBuff" "0"
  62. "IsDebuff" "1"
  63. "IsStunDebuff" "0"
  64. "OnCreated"
  65. {
  66. "Damage"
  67. {
  68. "Target" "TARGET"
  69. "Type" "DAMAGE_TYPE_PURE"
  70. "Damage" "%AbilityDamage"
  71. "Target"
  72. {
  73. "Center" "TARGET"
  74. "Types" "DOTA_UNIT_TARGET_BASIC"
  75. }
  76. }
  77. "RunScript"
  78. {
  79. "ScriptFile" "npc_abilities/double_edge.lua"
  80. "Function" "DoubleEdgeSelfDamage"
  81. }
  82. }
  83. }
  84. }
  85.  
  86. function ApplyBuffs(event)
  87. local caster = event.caster
  88. local ability = event.ability
  89.  
  90. if caster:PassivesDisabled() then
  91. return
  92. end
  93.  
  94. local duration = ability:GetSpecialValueFor("duration")
  95.  
  96. ability:ApplyDataDrivenModifier(caster, caster, "modifier_beseall", {duration = duration})
  97.  
  98. local abiShadow = caster:FindAbilityByName("shadow_master_shadow")
  99. if abiShadow and abiShadow.shadow and IsValidEntity(abiShadow.shadow) and abiShadow.shadow:IsAlive() then
  100. ability:ApplyDataDrivenModifier(caster, abiShadow.shadow, "modifier_beseall", {duration = duration})
  101. end
  102.  
  103. local abiArt = caster:FindAbilityByName("shadow_master_art_of_shadows")
  104. if abiArt and abiArt.shadows then
  105. for _,unit in pairs(abiArt.shadows) do
  106. if IsValidEntity(unit) and unit:IsAlive() then
  107. ability:ApplyDataDrivenModifier(caster, unit, "modifier_beseall", {duration = duration})
  108. end
  109. end
  110. end
  111. end
  112.  
  113.  
  114. function DoubleEdgeSelfDamage( event )
  115. -- Variables
  116. local caster = event.caster
  117. local ability = event.ability
  118. local self_damage = ability:GetLevelSpecialValueFor( "edge_damage" , ability:GetLevel() - 1 )
  119. local damageType = ability:GetAbilityDamageType()
  120.  
  121. -- Self damage
  122. ApplyDamage({ victim = caster, attacker = caster, damage = self_damage, damage_type = damageType, damage_flags = DOTA_DAMAGE_FLAG_NON_LETHAL })
  123. end
  124.  
  125. function DoubleEdgeParticle( event )
  126. local caster = event.caster
  127. local target = event.target
  128.  
  129. -- Particle
  130. local particle = ParticleManager:CreateParticle("particles/units/heroes/hero_centaur/centaur_double_edge.vpcf", PATTACH_ABSORIGIN_FOLLOW, target)
  131. ParticleManager:SetParticleControl(particle, 0, caster:GetAbsOrigin()) -- Origin
  132. ParticleManager:SetParticleControl(particle, 1, target:GetAbsOrigin()) -- Destination
  133. ParticleManager:SetParticleControl(particle, 5, target:GetAbsOrigin()) -- Hit Glow
  134. end
Advertisement
Add Comment
Please, Sign In to add comment