Vultraz

Untitled

Sep 13th, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. first_time_only=no
  2. id="post_advance_amla_elynia_e1_spell_thorns"
  3. name="post advance"
  4. [filter]
  5. role="hero"
  6. side=1
  7. [/filter]
  8. [set_variable]
  9. name="temp_event_id"
  10. value="post_advance_amla_elynia_e1_spell_thorns"
  11. [/set_variable]
  12. [set_variable]
  13. name="i"
  14. value=0
  15. [/set_variable]
  16. [while]
  17. [variable]
  18. less_than="$unit.modifications.advance.length"
  19. name="i"
  20. [/variable]
  21. [do]
  22. [if]
  23. [variable]
  24. equals="amla_elynia_e1_spell_thorns"
  25. name="unit.modifications.advance[$i].id"
  26. [/variable]
  27. [then]
  28. [set_variable]
  29. name="k"
  30. value=0
  31. [/set_variable]
  32. [while]
  33. [variable]
  34. less_than="$unit.event.length"
  35. name="k"
  36. [/variable]
  37. [variable]
  38. name="unit.event[$k].id"
  39. not_equals="$temp_event_id"
  40. [/variable]
  41. [do]
  42. [set_variable]
  43. add=1
  44. name="k"
  45. [/set_variable]
  46. [/do]
  47. [/while]
  48. [bug]
  49. message="unit does not carry the amla command controller event!"
  50. [condition]
  51. [variable]
  52. name="k"
  53. numerical_equals="$unit.event.length"
  54. [/variable]
  55. [/condition]
  56. [/bug]
  57. [clear_variable]
  58. name="unit.event[$k],k"
  59. [/clear_variable]
  60. [unstore_unit]
  61. find_vacant=no
  62. variable="unit"
  63. [/unstore_unit]
  64. [learn_spell]
  65. cooldown_time=3
  66. #textdomain wesnoth-Shadows_of_Deception
  67. description=_"Unleashes a barrage of thorns at an enemy, slowing them."
  68. id="e1_thorns"
  69. image="attacks/thorns.png"
  70. name=_"Thorns"
  71. unit="Elynia"
  72. [target_filter]
  73. [filter]
  74. [not]
  75. [filter_wml]
  76. [status]
  77. petrified=yes
  78. slowed=""
  79. [/status]
  80. [/filter_wml]
  81. [/not]
  82. [filter_adjacent]
  83. id="Elynia"
  84. is_enemy=yes
  85. [/filter_adjacent]
  86. [/filter]
  87. [/target_filter]
  88. [spell_effect]
  89. [sound]
  90. name="magic-thorns-[1,2].ogg"
  91. [/sound]
  92. [modify_unit]
  93. [filter]
  94. x="$spell_target.x"
  95. y="$spell_target.y"
  96. [/filter]
  97. [status]
  98. slowed=yes
  99. [/status]
  100. [/modify_unit]
  101. [/spell_effect]
  102. [/learn_spell]
  103. [event]
  104. id="$temp_event_id"
  105. remove=yes
  106. [/event]
  107. [wml_message]
  108. logger="debug"
  109. message="[SoD] Post-advance commands applied for AMLA 'amla_elynia_e1_spell_thorns'"
  110. [/wml_message]
  111. [/then]
  112. [/if]
  113. [set_variable]
  114. add=1
  115. name="i"
  116. [/set_variable]
  117. [/do]
  118. [/while]
  119. [clear_variable]
  120. name="i"
  121. [/clear_variable]
  122. [clear_variable]
  123. name="temp_event_id"
  124. [/clear_variable]
Advertisement
Add Comment
Please, Sign In to add comment