Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.42 KB | None | 0 0
  1. new hero - corsair
  2.  
  3. ---------------------------
  4.  
  5. "black_flag"
  6. {
  7. // General
  8. //-------------------------------------------------------------------------------------------------------------
  9. "BaseClass" "ability_datadriven"
  10. "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_POINT | DOTA_ABILITY_BEHAVIOR_AOE"
  11. "SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
  12. "AbilityTextureName" "techies_minefield_sign"
  13. "AOERadius" "%aura"
  14.  
  15. // Precache
  16. //-------------------------------------------------------------------------------------------------------------
  17. "precache"
  18. {
  19. "soundfile" "soundevents/game_sounds_heroes/game_sounds_techies.vsndevts"
  20. "particle" "particles/units/heroes/hero_techies/techies_land_mine.vpcf"
  21. "model" "models/heroes/techies/fx_techiesfx_mine.vmdl"
  22. }
  23.  
  24. // Casting
  25. //-------------------------------------------------------------------------------------------------------------
  26. "AbilityCastRange" "450"
  27. "AbilityCastPoint" "0.0 0.0 0.0 0.0"
  28.  
  29. // Time
  30. //-------------------------------------------------------------------------------------------------------------
  31. "AbilityCooldown" "15"
  32.  
  33. // Cost
  34. //-------------------------------------------------------------------------------------------------------------
  35. "AbilityManaCost" "100"
  36.  
  37. // Special
  38. //-------------------------------------------------------------------------------------------------------------
  39. "AbilitySpecial"
  40. {
  41. "01"
  42. {
  43. "var_type" "FIELD_INTEGER"
  44. "aura" "900"
  45. }
  46. "02"
  47. {
  48. "var_type" "FIELD_FLOAT"
  49. "shred" "-3 -4 -5 -6"
  50. }
  51. "03"
  52. {
  53. "var_type" "FIELD_FLOAT"
  54. "minus_damage" "-15 -20 -25 -30"
  55. }
  56. }
  57.  
  58. "OnSpellStart"
  59. {
  60. "CreateThinker"
  61. {
  62. "ModifierName" "modifier_black_flag"
  63. "Target" "TARGET"
  64. "Radius" "%aura"
  65. "Duration" "7"
  66. }
  67. }
  68.  
  69. "Modifiers"
  70. {
  71. "modifier_black_flag"
  72. {
  73. "IsHidden" "1"
  74. "Aura" "modifier_debuff"
  75. "Aura_Radius" "%aura"
  76. "Aura_Teams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  77. "Aura_Types" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
  78. "Aura_Flags" "DOTA_UNIT_TARGET_FLAG_NONE"
  79. "Aura_ApplyToCaster" "0"
  80. }
  81. "modifier_debuff"
  82. {
  83. "IsDebuff" "1"
  84. "Properties"
  85. {
  86. "MODIFIER_PROPERTY_BASEDAMAGEOUTGOING_PERCENTAGE" "%minus_damage"
  87. "MODIFIER_PROPERTY_PHYSICAL_ARMOR_BONUS" "%armor_shred"
  88. }
  89. }
  90. }
  91. }
  92.  
  93. "wildfire_rifle"
  94. {
  95. // General
  96. //-------------------------------------------------------------------------------------------------------------
  97. "BaseClass" "ability_datadriven"
  98. "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_AOE | DOTA_ABILITY_BEHAVIOR_POINT | DOTA_ABILITY_BEHAVIOR_IGNORE_BACKSWING"
  99. "AbilityUnitDamageType" "DAMAGE_TYPE_MAGICAL"
  100. "SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
  101. "FightRecapLevel" "1"
  102. "AbilityTextureName" "sniper_shrapnel"
  103. "AOERadius" "%radius"
  104.  
  105. // Casting
  106. //-------------------------------------------------------------------------------------------------------------
  107. "AbilityCastRange" "800"
  108. "AbilityCastPoint" "0.4"
  109.  
  110. // Time
  111. //-------------------------------------------------------------------------------------------------------------
  112. "AbilityCooldown" "12.0 10.0 8.0 6.0"
  113.  
  114. // Cost
  115. //-------------------------------------------------------------------------------------------------------------
  116. "AbilityManaCost" "60 80 100 120"
  117.  
  118. // Special
  119. //-------------------------------------------------------------------------------------------------------------
  120. "AbilitySpecial"
  121. {
  122. "01"
  123. {
  124. "var_type" "FIELD_INTEGER"
  125. "radius" "400"
  126. }
  127. "02"
  128. {
  129. "var_type" "FIELD_INTEGER"
  130. "slow" "-10 -20 -30 -40"
  131. }
  132. "03"
  133. {
  134. "var_type" "FIELD_INTEGER"
  135. "duration" "3 4 5 6"
  136. }
  137. "04"
  138. {
  139. "var_type" "FIELD_INTEGER"
  140. "damage" "100 200 300 400"
  141. }
  142. }
  143.  
  144. // Data driven
  145. //-------------------------------------------------------------------------------------------------------------
  146. "precache"
  147. {
  148. "soundfile" "soundevents/game_sounds_heroes/game_sounds_sniper.vsndevts"
  149. "particle" "particles/units/heroes/hero_sniper/sniper_assassinate.vpcf"
  150. }
  151.  
  152. "OnSpellStart"
  153. {
  154. "ActOnTargets"
  155. {
  156. "Target"
  157. {
  158. "Center" "POINT"
  159. "Radius" "%radius"
  160. "Teams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  161. "Types" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
  162. }
  163.  
  164. "Action"
  165. {
  166. "FireSound"
  167. {
  168. "EffectName" "Ability.Assassinate"
  169. "Target" "CASTER"
  170. }
  171. "TrackingProjectile"
  172. {
  173. "Target" "TARGET"
  174. "EffectName" "particles/units/heroes/hero_sniper/sniper_assassinate.vpcf"
  175. "Dodgeable" "0"
  176. "ProvidesVision" "0"
  177. "MoveSpeed" "9000"
  178. "SourceAttachment" "DOTA_PROJECTILE_ATTACHMENT_ATTACK_1"
  179. }
  180.  
  181. "FireSound"
  182. {
  183. "EffectName" "Hero_Sniper.AssassinateProjectile"
  184. "Target" "CASTER"
  185. }
  186. }
  187. }
  188. "DelayedAction"
  189. {
  190. "Delay" "0.1"
  191. "Action"
  192. {
  193. "ActOnTargets"
  194. {
  195. "FireSound"
  196. {
  197. "EffectName" "Hero_Sniper.AssassinateDamage"
  198. "Target" "TARGET"
  199. }
  200. "Target"
  201. {
  202. "Center" "POINT"
  203. "Radius" "%radius"
  204. "Teams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  205. "Types" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
  206. }
  207.  
  208. "Action"
  209. {
  210. "Damage"
  211. {
  212. "Target" "TARGET"
  213. "Type" "DAMAGE_TYPE_MAGICAL"
  214. "Damage" "%damage"
  215. }
  216. "ApplyModifier"
  217. {
  218. "ModifierName" "modifier_yo_ho_ho"
  219. "Target" "TARGET"
  220. }
  221. }
  222. }
  223. }
  224. }
  225. "DelayedAction"
  226. {
  227. "Delay" "0.2"
  228. "Action"
  229. {
  230. "ActOnTargets"
  231. {
  232. "Target"
  233. {
  234. "Center" "POINT"
  235. "Radius" "%radius"
  236. "Teams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  237. "Types" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
  238. "MaxTargets" "1"
  239. "Random" "1"
  240. }
  241.  
  242. "TrackingProjectile"
  243. {
  244. "Target" "TARGET"
  245. "EffectName" "particles/units/heroes/hero_sniper/sniper_assassinate.vpcf"
  246. "Dodgeable" "0"
  247. "ProvidesVision" "0"
  248. "MoveSpeed" "9000"
  249. "SourceAttachment" "DOTA_PROJECTILE_ATTACHMENT_ATTACK_1"
  250. }
  251.  
  252. "FireSound"
  253. {
  254. "EffectName" "Hero_Sniper.AssassinateProjectile"
  255. "Target" "CASTER"
  256. }
  257.  
  258. "Action"
  259. {
  260. "Damage"
  261. {
  262. "Target" "TARGET"
  263. "Type" "DAMAGE_TYPE_MAGICAL"
  264. "Damage" "%damage"
  265. }
  266. "FireSound"
  267. {
  268. "EffectName" "Hero_Sniper.AssassinateDamage"
  269. "Target" "TARGET"
  270. }
  271. "DelayedAction"
  272. {
  273. "Delay" "0.1"
  274. "Action"
  275. {
  276. "ActOnTargets"
  277. {
  278. "Target"
  279. {
  280. "Center" "TARGET"
  281. "Radius" "%radius"
  282. "Teams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  283. "Types" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
  284. }
  285.  
  286. "Action"
  287. {
  288. "Damage"
  289. {
  290. "Target" "TARGET"
  291. "Type" "DAMAGE_TYPE_MAGICAL"
  292. "Damage" "%damage"
  293. }
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. }
  301. }
  302. }
  303.  
  304. "Modifiers"
  305. {
  306.  
  307. "modifier_yo_ho_ho"
  308. {
  309. "IsDebuff" "1"
  310.  
  311. "Duration" "%duration"
  312.  
  313. "Properties"
  314. {
  315. "MODIFIER_PROPERTY_MOVESPEED_BONUS_PERCENTAGE" "%slow"
  316. }
  317. }
  318. }
  319. }
  320.  
  321. "plunder_claw"
  322. {
  323. // General
  324. //-------------------------------------------------------------------------------------------------------------
  325. "BaseClass" "ability_datadriven"
  326. "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_UNIT_TARGET"
  327. "AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  328. "AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO"
  329. "AbilityUnitTargetFlags" "DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES"
  330. "SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
  331. "AbilityTextureName" "phoenix_icarus_dive"
  332.  
  333. // Casting
  334. //-------------------------------------------------------------------------------------------------------------
  335. "AbilityCastPoint" "0.5 0.4 0.3 0.2"
  336.  
  337. // Time
  338. //-------------------------------------------------------------------------------------------------------------
  339. "AbilityCooldown" "20.0 18.0 16.0 14.0"
  340.  
  341. // Cost
  342. //-------------------------------------------------------------------------------------------------------------
  343. "AbilityManaCost" "80 90 100 110"
  344.  
  345. // Cast Range
  346. //-------------------------------------------------------------------------------------------------------------
  347. "AbilityCastRange" "800 900 1000 1100"
  348.  
  349. // Special
  350. //-------------------------------------------------------------------------------------------------------------
  351. "AbilitySpecial"
  352. {
  353. "01"
  354. {
  355. "var_type" "FIELD_FLOAT"
  356. "duration" "5 6 7 8"
  357. }
  358. "02"
  359. {
  360. "var_type" "FIELD_INTEGER"
  361. "projectile_speed" "1500"
  362. }
  363. "03"
  364. {
  365. "var_type" "FIELD_INTEGER"
  366. "global_radius" "9999999"
  367. }
  368. }
  369.  
  370. "OnSpellStart"
  371. {
  372. "FireSound"
  373. {
  374. "EffectName" "Hero_Beastmaster.Call.Hawk"
  375. "Target" "CASTER"
  376. }
  377.  
  378. "ApplyModifier"
  379. {
  380. "ModifierName" "modifier_speed"
  381. "Target" "CASTER"
  382. }
  383.  
  384. "RunScript"
  385. {
  386. "ScriptFile" "scripts/vscripts/plunder.lua"
  387. "Function" "SpellCheck"
  388. "particle" "particles/units/heroes/hero_rubick/rubick_spell_steal.vpcf"
  389. }
  390.  
  391. }
  392.  
  393. "OnProjectileHitUnit"
  394. {
  395. "RemoveModifier"
  396. {
  397. "ModifierName" "modifier_speed"
  398. "Target" "CASTER"
  399. }
  400. "ApplyModifier"
  401. {
  402. "ModifierName" "modifier_mute"
  403. "Target" "TARGET"
  404. "Duration" "%duration"
  405. }
  406. "RunScript"
  407. {
  408. "ScriptFile" "scripts/vscripts/plunder.lua"
  409. "Function" "SpellSteal"
  410. }
  411.  
  412. "FireSound"
  413. {
  414. "EffectName" "Hero_Beastmaster.Call.Hawk"
  415. "Target" "TARGET"
  416. }
  417. }
  418.  
  419. "Modifiers"
  420. {
  421. "modifier_mute"
  422. {
  423. "IsDebuff" "1"
  424.  
  425. "States"
  426. {
  427. "MODIFIER_STATE_MUTED" "MODIFIER_STATE_VALUE_ENABLED"
  428. }
  429. }
  430.  
  431. "modifier_speed"
  432. {
  433. "IsBuff" "1"
  434.  
  435. "Properties"
  436. {
  437. "MODIFIER_PROPERTY_MOVESPEED_BONUS_PERCENTAGE" "50 60 70 80"
  438. }
  439. }
  440.  
  441. "modifier_spell_steal_aura_datadriven"
  442. {
  443. "IsHidden" "1"
  444. "Passive" "1"
  445.  
  446. "Aura" "modifier_check_spell_datadriven"
  447. "Aura_Radius" "%global_radius"
  448. "Aura_Teams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  449. "Aura_Types" "DOTA_UNIT_TARGET_HERO"
  450. "Aura_Flags" "DOTA_UNIT_TARGET_FLAG_NOT_CREEP_HERO"
  451. }
  452.  
  453. "modifier_check_spell_datadriven"
  454. {
  455. "IsHidden" "1"
  456.  
  457. "OnAbilityExecuted"
  458. {
  459. "DelayedAction"
  460. {
  461. "Delay" "0.01"
  462. "Action"
  463. {
  464. "RunScript"
  465. {
  466. "ScriptFile" "scripts/vscripts/plunder.lua"
  467. "Function" "GetLastSpell"
  468. }
  469. }
  470. }
  471. }
  472. }
  473.  
  474. "modifier_spell_steal_datadriven"
  475. {
  476. "Duration" "%duration"
  477.  
  478. "OnDestroy"
  479. {
  480. "RunScript"
  481. {
  482. "ScriptFile" "scripts/vscripts/plunder.lua"
  483. "Function" "RemoveSpell"
  484. }
  485. }
  486.  
  487. "OnOrder"
  488. {
  489. "RunScript"
  490. {
  491. "ScriptFile" "scripts/vscripts/plunder.lua"
  492. "Function" "FixLevels"
  493. }
  494. }
  495. }
  496. }
  497. }
  498.  
  499.  
  500. "corsair_innate"
  501. {
  502. // General
  503. //-------------------------------------------------------------------------------------------------------------
  504. "BaseClass" "ability_datadriven"
  505. "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
  506. "AbilityUnitDamageType" "DAMAGE_TYPE_PHYSICAL"
  507. "SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
  508. "AbilityTextureName" "gyrocopter_homing_missile"
  509. }
  510.  
  511. // Stats
  512. //-------------------------------------------------------------------------------------------------------------
  513. "AbilityDamage" "50 80 120 150 180"
  514.  
  515. // Special
  516. //-------------------------------------------------------------------------------------------------------------
  517. "AbilitySpecial"
  518. {
  519. "01"
  520. {
  521. "var_type" "FIELD_INTEGER"
  522. "chance_pct" "17 20 23 26 29"
  523. }
  524. }
  525.  
  526. "Modifiers"
  527. {
  528. "modifier_silver_bullet"
  529. {
  530. "Passive" "1"
  531. "IsHidden" "1"
  532.  
  533. "OnAttackLanded"
  534. {
  535. "Random"
  536. {
  537. "Chance" "%chance_pct"
  538.  
  539. "OnSuccess"
  540. {
  541.  
  542. "LinearProjectile"
  543. {
  544. "Target" "TARGET"
  545. "EffectName" "particles/units/heroes/hero_phoenix/phoenix_sunray.vpcf"
  546. "MoveSpeed" "500"
  547. "StartRadius" "125"
  548. "StartPosition" "attach_attack1"
  549. "EndRadius" "250"
  550. "HasFrontalCone" "1"
  551. "FixedDistance" "500"
  552. "TargetTeams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  553. "TargetTypes" "DOTA_UNIT_TARGET_BASIC | DOTA_UNIT_TARGET_HERO"
  554. "TargetFlags" "DOTA_UNIT_TARGET_FLAG_NONE"
  555. "ProvidesVision" "0"
  556. }
  557.  
  558. "OnProjectileHitUnit"
  559. {
  560. "DeleteOnHit" "0"
  561. "Damage"
  562. {
  563. "Target" "TARGET"
  564. "Type" "DAMAGE_TYPE_PHYSICAL"
  565. "Damage" "%AbilityDamage"
  566. }
  567. }
  568. }
  569. }
  570. }
  571. }
  572. }
  573. }
  574.  
  575. "avast"
  576. {
  577. // General
  578. //-------------------------------------------------------------------------------------------------------------
  579. "BaseClass" "ability_datadriven"
  580. "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_POINT | DOTA_ABILITY_BEHAVIOR_AOE"
  581. "AbilityType" "DOTA_ABILITY_TYPE_ULTIMATE"
  582. "AbilityUnitDamageType" "DAMAGE_TYPE_MAGICAL"
  583. "AoERadius" "600"
  584. "SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
  585. "FightRecapLevel" "2"
  586. "AbilityTextureName" "jakiro_macropyre"
  587.  
  588. "precache"
  589. {
  590. "soundfile" "soundevents/game_sounds_heroes/game_sounds_centaur.vsndevts"
  591. "particle" "particles/units/heroes/hero_centaur/centaur_warstomp.vpcf"
  592. "particle" "particles/generic_gameplay/generic_stunned.vpcf"
  593. "soundfile" "soundevents/game_sounds_heroes/game_sounds_dragon_knight.vsndevts"
  594. "particle" "particles/units/heroes/hero_dragon_knight/dragon_knight_breathe_fire.vpcf"
  595. }
  596.  
  597. // Casting
  598. //-------------------------------------------------------------------------------------------------------------
  599. "AbilityCastRange" "1000"
  600. "AbilityCastPoint" "0.3 0.3 0.3"
  601.  
  602. // Time
  603. //-------------------------------------------------------------------------------------------------------------
  604. "AbilityCooldown" "55 50 45"
  605.  
  606. // Cost
  607. //-------------------------------------------------------------------------------------------------------------
  608. "AbilityManaCost" "125 125 125"
  609.  
  610. // Special
  611. //-------------------------------------------------------------------------------------------------------------
  612. "AbilitySpecial"
  613. {
  614. "01"
  615. {
  616. "var_type" "FIELD_INTEGER"
  617. "start_radius" "100 200 300"
  618. }
  619. "02"
  620. {
  621. "var_type" "FIELD_INTEGER"
  622. "end_radius" "200 300 400"
  623. }
  624. "03"
  625. {
  626. "var_type" "FIELD_INTEGER"
  627. "range" "600 700 800"
  628. }
  629. "04"
  630. {
  631. "var_type" "FIELD_INTEGER"
  632. "speed" "1050"
  633. }
  634. "05"
  635. {
  636. "var_type" "FIELD_INTEGER"
  637. "stun_duration" "2 3 4"
  638. }
  639. "06"
  640. {
  641. "var_type" "FIELD_INTEGER"
  642. "damage" "100 200 300"
  643. }
  644. }
  645.  
  646. "OnSpellStart"
  647. {
  648. "LinearProjectile"
  649. {
  650. "Target" "POINT"
  651. "EffectName" "particles/units/heroes/hero_dragon_knight/dragon_knight_breathe_fire.vpcf"
  652. "MoveSpeed" "%speed"
  653. "StartRadius" "%start_radius"
  654. "StartPosition" "attach_origin"
  655. "EndRadius" "%end_radius"
  656. "FixedDistance" "%range"
  657. "TargetTeams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  658. "TargetTypes" "DOTA_UNIT_TARGET_BASIC | DOTA_UNIT_TARGET_HERO | DOTA_UNITY_TARGET_MECHANICAL"
  659. "TargetFlags" "DOTA_UNIT_TARGET_FLAG_NONE"
  660. "HasFrontalCone" "1"
  661. "ProvidesVision" "0"
  662. }
  663. "FireSound"
  664. {
  665. "EffectName" "Hero_DragonKnight.BreathFire"
  666. "Target" "CASTER"
  667. }
  668. }
  669.  
  670. "OnProjectileFinish"
  671. {
  672. "FireEffect"
  673. {
  674. "EffectName" "particles/units/heroes/hero_centaur/centaur_warstomp.vpcf"
  675. "EffectAttachType" "follow_origin"
  676. "EffectRadius" "%radius"
  677. "Target" "POINT"
  678. "ControlPoints"
  679. {
  680. "01" "%radius 0 %radius"
  681. }
  682. }
  683.  
  684. "FireSound"
  685. {
  686. "EffectName" "Hero_Centaur.HoofStomp"
  687. "Target" "POINT"
  688. }
  689. "ActOnTargets"
  690. {
  691. "Target"
  692. {
  693. "Center" "POINT"
  694. "Radius" "%radius"
  695. "Teams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  696. "Types" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
  697. }
  698.  
  699. "Action"
  700. {
  701. "Damage"
  702. {
  703. "Target" "POINT"
  704. "Type" "DAMAGE_TYPE_MAGICAL"
  705. "Damage" "%damage"
  706. }
  707.  
  708. "ApplyModifier"
  709. {
  710. "Target" "TARGET"
  711. "ModifierName" "modifier_hoof_stomp"
  712. }
  713. }
  714. }
  715. "CreateThinker"
  716. {
  717. "ModifierName" "modifier_fire_new_projectile"
  718. "Target" "TARGET"
  719. }
  720. }
  721.  
  722. "Modifiers"
  723. {
  724. "modifier_hoof_stomp"
  725. {
  726. "IsDebuff" "1"
  727. "Duration" "%stun_duration"
  728. "States"
  729. {
  730. "MODIFIER_STATE_STUNNED" "MODIFIER_STATE_VALUE_ENABLED"
  731. }
  732. "OverrideAnimation" "ACT_DOTA_DISABLED"
  733. "EffectName" "particles/generic_gameplay/generic_stunned.vpcf"
  734. "EffectAttachType" "follow_overhead"
  735. }
  736. "modifier_fire_new_projectile"
  737. {
  738. "Duration" "0.1"
  739.  
  740. "OnCreated"
  741. {
  742. "LinearProjectile"
  743. {
  744. "Target" "POINT"
  745. "EffectName" "particles/units/heroes/hero_dragon_knight/dragon_knight_breathe_fire.vpcf"
  746. "MoveSpeed" "%speed"
  747. "StartRadius" "%start_radius"
  748. "StartPosition" "attach_origin"
  749. "EndRadius" "%end_radius"
  750. "FixedDistance" "%range"
  751. "TargetTeams" "DOTA_UNIT_TARGET_TEAM_ENEMY"
  752. "TargetTypes" "DOTA_UNIT_TARGET_BASIC | DOTA_UNIT_TARGET_HERO | DOTA_UNITY_TARGET_MECHANICAL"
  753. "TargetFlags" "DOTA_UNIT_TARGET_FLAG_NONE"
  754. "HasFrontalCone" "1"
  755. "ProvidesVision" "0"
  756. }
  757. }
  758. }
  759. }
  760. }
  761.  
  762. -----------------
  763.  
  764. scripts/vscripts/plunder.lua
  765.  
  766. -----------------
  767.  
  768. --[[Author: YOLOSPAGHETTI
  769. Date: July 11, 2016
  770. Get's the target's most recently cast spell]]
  771. function GetLastSpell(keys)
  772. local target = keys.unit
  773.  
  774. -- Loops throught the target's abilities
  775. for i=0, 15 do
  776. local current_ability = target:GetAbilityByIndex(i)
  777. if current_ability ~= nil then
  778. -- If the ability is toggleable, checks if it was turned on
  779. if current_ability:IsToggle() then
  780. if current_ability:GetToggleState() == true then
  781. -- Set this as the target's most recently cast ability
  782. target.last_ability = current_ability
  783. end
  784. else
  785. -- Finds the ability that caused the event trigger by checking if the cooldown is equal to the full cooldown
  786. local cd = current_ability:GetCooldownTimeRemaining()
  787. local full_cd = current_ability:GetCooldown(current_ability:GetLevel()-1)
  788. -- There is a delay after the ability cast event and before the ability goes on cooldown
  789. -- If the ability is on cooldown and the cooldown is within a small buffer of the full cooldown
  790. -- Set this as the target's most recently cast ability
  791. if cd > 0 and full_cd - cd < 0.04 then
  792. target.last_ability = current_ability
  793. end
  794. end
  795. end
  796. end
  797. end
  798.  
  799. --[[Author: YOLOSPAGHETTI
  800. Date: July 11, 2016
  801. Ensures the target has cast a spell]]
  802. function SpellCheck(keys)
  803. local caster = keys.caster
  804. local target = keys.target
  805. local ability = keys.ability
  806. local projectile_speed = ability:GetLevelSpecialValueFor("projectile_speed", (ability:GetLevel() -1))
  807.  
  808. if target.last_ability ~= nil then
  809. ability.new_steal = target.last_ability
  810. -- Create the projectile
  811. local info = {
  812. Target = caster,
  813. Source = target,
  814. Ability = ability,
  815. EffectName = keys.particle,
  816. bDodgeable = false,
  817. bProvidesVision = false,
  818. iMoveSpeed = projectile_speed,
  819. iSourceAttachment = DOTA_PROJECTILE_ATTACHMENT_HITLOCATION
  820. }
  821. ProjectileManager:CreateTrackingProjectile( info )
  822. else
  823. -- Resets the cooldown
  824. ability:EndCooldown()
  825. -- Regains lost mana
  826. ability:RefundManaCost()
  827. end
  828. end
  829.  
  830. --[[Author: YOLOSPAGHETTI
  831. Date: July 11, 2016
  832. Swaps rubick's spells]]
  833. function SpellSteal(keys)
  834. local caster = keys.caster
  835. local ability = keys.ability
  836.  
  837. local new_ability_name = ability.new_steal:GetAbilityName()
  838. local new_ability_level = ability.new_steal:GetLevel() - 1
  839.  
  840. -- If the caster has no stolen spell, swap the new one with the empty spell
  841. if caster:HasModifier("modifier_spell_steal_datadriven") == false then
  842. caster:AddAbility(new_ability_name)
  843. caster:SwapAbilities("empty1_datadriven", new_ability_name, false, true)
  844. caster:FindAbilityByName(new_ability_name):SetLevel(new_ability_level)
  845. -- If the new stolen ability is not the same as the previous one, swap them
  846. elseif new_ability_name ~= ability.current_steal:GetAbilityName() then
  847. caster:AddAbility(new_ability_name)
  848. caster:SwapAbilities(ability.current_steal:GetAbilityName(), new_ability_name, false, true)
  849. caster:FindAbilityByName(new_ability_name):SetLevel(new_ability_level)
  850. end
  851.  
  852. ability.current_steal = ability.new_steal
  853. ability:ApplyDataDrivenModifier(caster, caster, "modifier_spell_steal_datadriven", {})
  854. end
  855.  
  856. --[[Author: YOLOSPAGHETTI
  857. Date: July 11, 2016
  858. Swaps the stolen spell with the empty spell]]
  859. function RemoveSpell(keys)
  860. local caster = keys.caster
  861. local ability = keys.ability
  862. local new_ability_name = ability.current_steal:GetAbilityName()
  863.  
  864. caster:SwapAbilities(new_ability_name, "empty1_datadriven", false, true)
  865. --caster:RemoveAbility(new_ability_name)
  866. end
  867.  
  868. --[[Author: YOLOSPAGHETTI
  869. Date: July 11, 2016
  870. Since you can still level up stolen spells, they automatically readjust to the level when stolen]]
  871. function FixLevels(keys)
  872. local caster = keys.caster
  873. local ability = keys.ability
  874.  
  875. local current_ability = caster:FindAbilityByName(ability.current_steal:GetAbilityName())
  876. local correct_ability_level = ability.current_steal:GetLevel() - 1
  877. local current_ability_points = caster:GetAbilityPoints()
  878.  
  879. -- Checks if the current stolen ability's level is higher than it should be
  880. if current_ability:GetLevel() > correct_ability_level then
  881. -- Counts how many levels have been added
  882. local levels_higher = current_ability:GetLevel() - correct_ability_level
  883. -- Sets the ability to the correct level
  884. current_ability:SetLevel(correct_ability_level)
  885. -- Gives the caster back the unused ability points
  886. caster:SetAbilityPoints(levels_higher + current_ability_points)
  887. end
  888. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement