Vultraz

Untitled

Sep 12th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. #define APPLY_EXTRA_AMLA_EFFECT _AMLA_ID _ACTIONS
  2. [event]
  3. id="post_advance_ + {_AMLA_ID}"
  4. name=post advance
  5. first_time_only=no
  6. [filter]
  7. side=1
  8. role=hero
  9. [/filter]
  10.  
  11. [store_unit]
  12. [filter]
  13. id=$unit.id
  14. [/filter]
  15. variable=temp_advancements
  16. [/store_unit]
  17.  
  18. {FOREACH temp_advancements.modifications.advance i}
  19. [if]
  20. {VARIABLE_LEXICAL_EQUALS temp_advancements.modifications.advance[$i].id {_AMLA_ID}}
  21. {VARIABLE_BOOLEAN_EQUALS temp_advancements.modifications.advance[$i].actions_executed no}
  22. [then]
  23. {_ACTIONS}
  24.  
  25. {VARIABLE temp_advancements.modifications.advance[$i].actions_executed yes}
  26.  
  27. {LOG_NX_DBG ("Post-advance commands applied for AMLA '" + {_AMLA_ID} + "'")}
  28. [/then]
  29. [/if]
  30. {NEXT i}
  31.  
  32. [unstore_unit]
  33. variable=temp_advancements
  34. find_vacant=no
  35. [/unstore_unit]
  36.  
  37. {CLEAR_VARIABLE temp_advancements}
  38. [/event]
  39. #enddef
Advertisement
Add Comment
Please, Sign In to add comment