Advertisement
CtelinAjira

Evade Shield

Aug 4th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. //when the state sticks...
  2. <Custom Apply Effect>
  3. //initialize maximum number of evaded attacks
  4. var attEva = x;
  5. //set counter to variable attEva
  6. target.setStateCounter(stateId, attEva);
  7. </Custom Apply Effect>
  8.  
  9. //after accuracy checks...
  10. <Custom React Effect>
  11. //if attack is physical...
  12. if (this.isPhysical()) {
  13. //force a dodge
  14. target.result().evaded = true;
  15. //decrement counter by one
  16. target.addStateCounter(stateId, -1);
  17. //if counter is zero...
  18. if (target.getStateCounter(stateId) <= 0) {
  19. //nuke the counter
  20. target.removeStateCounter(stateId);
  21. //remove the state
  22. target.removeState(stateId);
  23. }
  24. }
  25. </Custom React Effect>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement