Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. //TESH.scrollpos=69
  2. //TESH.alwaysfold=0
  3. //! runtextmacro BuffType("Weldinator1")
  4. //! runtextmacro SetBuffName("Weldinator Phase I")
  5. //! runtextmacro SetBuffAlignment("POSITIVE")
  6. //! runtextmacro SetBuffTooltip("Adds fire splash to attack.")
  7. //! runtextmacro SetBuffIcon("ReplaceableTextures\\CommandButtons\\BTNFireBolt.blp")
  8. //! runtextmacro BuffStruct()
  9. unit caster
  10. unit target
  11. integer abilId
  12. integer damage
  13. method onCreate takes nothing returns nothing
  14. set this.abilId = BuffAbilId
  15. set this.caster = BuffCaster
  16. set this.target = BuffTarget
  17. endmethod
  18. method onApply takes nothing returns nothing
  19. set damage = GetUnitAbilityLevel(this.caster,this.abilId)*5
  20. call Status[this.unit].modDamageBonus(damage)
  21. endmethod
  22. method onRemove takes nothing returns nothing
  23. call Status[this.unit].modDamageBonus(-damage)
  24. endmethod
  25. method onDamageDealt takes nothing returns nothing
  26. local unit u = null
  27. if Damage_IsAttack() then
  28. set P = GetOwningPlayer(this.target)
  29. call GroupEnumUnitsInRange(G2,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),70,Condition(function EnemyAliveFilter))
  30. loop
  31. set u = FirstOfGroup(G2)
  32. exitwhen u == null
  33. if u != GetTriggerUnit() then
  34. call Damage_Spell(this.target,u,GetEventDamage())
  35. call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl",u,"origin"))
  36. endif
  37. call GroupRemoveUnit(G2,u)
  38. endloop
  39. endif
  40. endmethod
  41. //! runtextmacro EndBuff()
  42.  
  43. //! runtextmacro BuffType("Weldinator2")
  44. //! runtextmacro SetBuffName("Weldinator Phase II")
  45. //! runtextmacro SetBuffAlignment("POSITIVE")
  46. //! runtextmacro SetBuffTooltip("Brute strength.")
  47. //! runtextmacro SetBuffIcon("ReplaceableTextures\\CommandButtons\\BTNGolemThunderclap.blp")
  48. //! runtextmacro BuffStruct()
  49. unit caster
  50. unit target
  51. integer abilId
  52. integer str
  53. method onCreate takes nothing returns nothing
  54. set this.abilId = BuffAbilId
  55. set this.caster = BuffCaster
  56. set this.target = BuffTarget
  57. endmethod
  58. method onApply takes nothing returns nothing
  59. set str = R2I(GetHeroStr(this.caster,true)*0.6)
  60. call Status[this.unit].modStrBonus(str)
  61. endmethod
  62. method onRemove takes nothing returns nothing
  63. call Status[this.unit].modStrBonus(-str)
  64. endmethod
  65. //! runtextmacro EndBuff()
  66.  
  67. //! runtextmacro BuffType("Weldinator3")
  68. //! runtextmacro SetBuffName("Weldinator Phase III")
  69. //! runtextmacro SetBuffAlignment("POSITIVE")
  70. //! runtextmacro SetBuffTooltip("Somehow being stuffed with explosives makes you run faster.")
  71. //! runtextmacro SetBuffIcon("ReplaceableTextures\\PassiveButtons\\PASBTNScatterRockets.blp")
  72. //! runtextmacro BuffStruct()
  73. unit caster
  74. unit target
  75. integer abilId
  76. integer ms
  77. real damage
  78. method onCreate takes nothing returns nothing
  79. set this.abilId = BuffAbilId
  80. set this.caster = BuffCaster
  81. set this.target = BuffTarget
  82. endmethod
  83. method onApply takes nothing returns nothing
  84. set ms = 30
  85. set damage = GetHeroStr(this.caster,true)*6
  86. call Status[this.unit].modMoveSpeedBonus(ms)
  87. endmethod
  88. method onRemove takes nothing returns nothing
  89. local unit u = null
  90. call Status[this.unit].modMoveSpeedBonus(-ms)
  91. if IsUnitType(this.target,UNIT_TYPE_DEAD) then
  92. set P = GetOwningPlayer(this.caster)
  93. call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",GetUnitX(this.target),GetUnitY(this.target)))
  94. call GroupEnumUnitsInRange(G2,GetUnitX(this.target),GetUnitY(this.target),400,Condition(function EnemyAliveFilter))
  95. loop
  96. set u = FirstOfGroup(G2)
  97. exitwhen u == null
  98. call Damage_Spell(this.target,u,damage)
  99. call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl",u,"chest"))
  100. call GroupRemoveUnit(G2,u)
  101. endloop
  102. endif
  103. endmethod
  104. //! runtextmacro EndBuff()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement