Advertisement
Guest User

Presto Understanding

a guest
Nov 7th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. I might be grasping at straws but from what I understand that first function tracks your FMs from an arguments to a number.
  2.  
  3. So:
  4.  
  5. [Code]local fm_count = 0[/CODE]
  6.  
  7. Our local variable called fm_count is with a value of 0 without any modification.
  8.  
  9. [CODE]  for i, v in pairs(buffactive) do
  10.         ---
  11.         ---
  12.         ---
  13.     end[/CODE]
  14.  
  15. This is setting up the argument that an iterator pairs a value to the variable which is the buffactive table.
  16.  
  17. [CODE]  if tostring(i):startswith('finishing move') or tostring(i):startswith('フィニシングムーブ') then
  18.             fm_count = tonumber(string.match(i, '%d+')) or 1
  19.         end[/CODE]
  20.  
  21. The function is to then convert the iterator into a string. It looks for a buffactive named finishing move. Followed by fm_count being amended! tonumber converts the following string that matches the iterator and  '%d+' (but I have no clue what that means) or 1
  22.  
  23. [CODE] if spell.type == 'Step' and fm_count < 6 then
  24.         ---
  25.         ---
  26.         ---
  27.     end[/CODE]
  28.  
  29. And like you said, if the action is a step and the amended fm_count is less than 6 then the following code is executed.
  30.  
  31.  
  32. Is that what I am understanding how this whole thing works? I normally use https://www.lua.org/manual/5.0/manual.html#format to help understand some of the functions you have used. :>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement