Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function projectile (keys)
- local caster = keys.caster
- local projectile_model = keys.particle_name
- caster:SetRangedProjectileName(projectile_model)
- end
- function damage (keys)
- local target = keys.target
- local caster = keys.caster
- local ability = keys.ability
- local pos = target:GetAbsOrigin()
- local radius = ability:GetLevelSpecialValueFor("radius", ability:GetLevel() - 1)
- local damageTable = {
- attacker = caster,
- ability = ability,
- damage_type = DAMAGE_TYPE_PHYSICAL,
- damage = caster:GetAttackDamage()
- }
- local units = FindUnitsInRadius(caster:GetTeam(), pos, nil, radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_ALL, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, 0, false)
- for _,unit in ipairs(units) do
- if unit ~= target then
- damageTable.victim = unit
- ApplyDamage(damageTable)
- end
- local particleid = ParticleManager:CreateParticle(keys.particle_name, PATTACH_POINT, unit)
- ParticleManager:SetParticleControl(particleid, 0, unit:GetAbsOrigin())
- Timers:CreateTimer(0.01, function()
- ParticleManager:DestroyParticle(particleid, false)
- end)
- end
- end
- "NPC_ability_shockwave"
- {
- "BaseClass" "ability_datadriven"
- "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
- "AbilityTextureName" "custom/NPC_Tower_FireCannon"
- "MaxLevel" "1"
- "RequiredLevel" "1"
- "AbilitySpecial"
- {
- "01"
- {
- "var_type" "FIELD_INTEGER"
- "radius" "225"
- }
- }
- "precache"
- {
- "particle" "particles/base_attacks/ranged_tower_bad.vpcf"
- "particle" "particles/units/heroes/hero_techies/techies_blast_off_fire.vpcf"
- }
- "Modifiers"
- {
- "NPC_Tower_ability_1_fire_state"
- {
- "Passive" "1"
- "IsHidden" "1"
- "OnCreated"
- {
- "RunScript"
- {
- "ScriptFile" "npc_abilities/shockwave"
- "Function" "projectile"
- "particle_name" "particles/units/heroes/hero_abaddon/abaddon_death_coil.vpcf"
- }
- }
- "OnAttackLanded"
- {
- "RunScript"
- {
- "ScriptFile" "npc_abilities/shockwave"
- "Function" "damage"
- "particle_name" "particles/units/heroes/hero_magnataur/magnataur_shockwave.vpcf"
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement