Guest User

Untitled

a guest
Mar 16th, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <Custom Requirement>
  2. // Get the group that the user belongs to.
  3. var group = user.friendsUnit();
  4. // Get the alive members of the group.
  5. var allies = group.aliveMembers();
  6. // Check to see if there are more than 1 allied members (user + ally).
  7. value = allies.length > 1;
  8. </Custom Requirement>
  9.  
  10. <Custom Cost Display>
  11. \i[1]Ally
  12. </Custom Cost Display>
  13.  
  14. <Custom Execution>
  15. // Get the group that the user belongs to.
  16. var group = user.friendsUnit();
  17. // Get the alive members of the group.
  18. var allies = group.aliveMembers();
  19. // Remove the user from the group.
  20. allies.splice(allies.indexOf(user), 1);
  21. // Pick a random ally.
  22. var ally = allies[Math.floor(Math.random() * allies.length)];
  23. // Store the ally's current HP value with the user.
  24. user._allyHp = ally.hp;
  25. // Store the ally's current MAT value with the user.
  26. user._allyMat = ally.mat;
  27. // Play animation 65 on the ally.
  28. ally.startAnimation(65);
  29. // Time to kill off the ally.
  30. ally.gainHp(-1 * ally.hp);
  31. // Perform the collapse effect on the ally.
  32. ally.performCollapse();
  33. </Custom Execution>
  34.  
  35. <Damage Formula>
  36. // Damage Formula used for the skill.
  37. value = user._allyHp + user._allyMat * 14;
  38. // Remove stored ally HP value.
  39. user._allyHp = undefined;
  40. // Remove stored ally MAT value.
  41. user._allyMat = undefined;
  42. </Damage Formula>
Advertisement
Add Comment
Please, Sign In to add comment