Advertisement
Sylow

[Lua] AzureLore : Blue Magic Include

Jan 3rd, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.19 KB | None | 0 0
  1. --Azure Lore : Blue Magic Set Handler by Sylow
  2. ----------------------------------------------------------------------------
  3. -- this is pretty much required to make everything work
  4. -- but i'm terrible at lua so i don't actually know why
  5. -- p.s. i'm okay with being terrible at lua because it is
  6. -- an affront to the almighty gods of programming
  7. ----------------------------------------------------------------------------
  8.  
  9. local assimilation = {}
  10.  
  11.  
  12. assimilation.azure_lore = {}
  13.  
  14. assimilation.azure_lore.physical = {}
  15.  
  16. -------------------------------------------------------------------------------
  17. --build a table for blue magic physical spells
  18. -------------------------------------------------------------------------------
  19. -- the format is ['Spell Name'] = {'wsc1','wsc2','attribute'}
  20. -- if there is no secondary modifier it is left as the empty string
  21. -- if there is no known modifier, then 'wsc1' is defined to be 'str'
  22. -- currently the attributes are defined as follows:
  23.  
  24. --  'damage'  : if i'm casting this spell, i'm casting it for damage
  25. --  'effect'  : this spell has an additional effect that's more useful than its damage
  26. --              so i favor magic accuracy
  27. --  'stun'    : i use this spell to stun, so i favor magic accuracy and recast
  28. --  'h_strike': heavy strike is a special spell, so it needs its own set
  29. --  'hp_diff' : not that there's a reason to cast final sting, but lol?
  30.  
  31. -------------------------------------------------------------------------------
  32.  
  33.  
  34. assimilation.azure_lore.physical['Foot Kick']           =   {'str','dex','damage'}
  35. assimilation.azure_lore.physical['Power Attack']        =   {'str','vit','damage'} 
  36. assimilation.azure_lore.physical['Sprout Smack']        =   {'vit','','effect'}    
  37. assimilation.azure_lore.physical['Wild Oats']           =   {'agi','','effect'}
  38. assimilation.azure_lore.physical['Queasyshroom']        =   {'int','','damage'}    
  39. assimilation.azure_lore.physical['Battle Dance']        =   {'str','','effect'}    
  40. assimilation.azure_lore.physical['Head Butt']           =   {'str','dex','stun'}
  41. assimilation.azure_lore.physical['Feather Storm']       =   {'chr','','damage'}
  42. assimilation.azure_lore.physical['Helldive']            =   {'agi','','damage'}    
  43. assimilation.azure_lore.physical['Bludgeon']            =   {'chr','','damage'}    
  44. assimilation.azure_lore.physical['Claw Cyclone']        =   {'dex','','damage'}    
  45. assimilation.azure_lore.physical['Screwdriver']         =   {'str','mnd','damage'} 
  46. assimilation.azure_lore.physical['Grand Slam']          =   {'vit','','damage'}    
  47. assimilation.azure_lore.physical['Smite of Rage']       =   {'str','dex','damage'} 
  48. assimilation.azure_lore.physical['Pinecone Bomb']       =   {'str','','effect'}    
  49. assimilation.azure_lore.physical['Jet Stream']          =   {'agi','','damage'}    
  50. assimilation.azure_lore.physical['Uppercut']            =   {'str','','damage'}    
  51. assimilation.azure_lore.physical['Terror Touch']        =   {'dex','int','effect'} 
  52. assimilation.azure_lore.physical['Mandibular Bite']     =   {'str','int','damage'} 
  53. assimilation.azure_lore.physical['Sickle Slash']        =   {'dex','','damage'}    
  54. assimilation.azure_lore.physical['Death Scissors']      =   {'str','','damage'}    
  55. assimilation.azure_lore.physical['Dimensional Death']   =   {'str','','damage'}
  56. assimilation.azure_lore.physical['Spiral Spin']         =   {'agi','','effect'}    
  57. assimilation.azure_lore.physical['Seedspray']           =   {'dex','','effect'}
  58. assimilation.azure_lore.physical['Body Slam']           =   {'vit','','damage'}
  59. assimilation.azure_lore.physical['Spinal Cleave']       =   {'str','','damage'}
  60. assimilation.azure_lore.physical['Frenetic Rip']        =   {'str','dex','damage'} 
  61. assimilation.azure_lore.physical['Frypan']              =   {'str','mnd','stun'}   
  62. assimilation.azure_lore.physical['Hydro Shot']          =   {'agi','','effect'}    
  63. assimilation.azure_lore.physical['Tail Slap']           =   {'str','vit','stun'}
  64. assimilation.azure_lore.physical['Hysteric Barrage']    =   {'dex','','damage'}    
  65. assimilation.azure_lore.physical['Cannonball']          =   {'str','vit','damage'} 
  66. assimilation.azure_lore.physical['Asuran Claws']        =   {'agi','','damage'}    
  67. assimilation.azure_lore.physical['Disseverment']        =   {'str','dex','effect'} 
  68. assimilation.azure_lore.physical['Sub-zero Smash']      =   {'vit','','effect'}    
  69. assimilation.azure_lore.physical['Ram Charge']          =   {'str','mnd','damage'} 
  70. assimilation.azure_lore.physical['Vertical Cleave']     =   {'str','','damage'}    
  71. assimilation.azure_lore.physical['Final Sting']         =   {'','','hp_diff'}      
  72. assimilation.azure_lore.physical['Goblin Rush']         =   {'str','dex','damage'} 
  73. assimilation.azure_lore.physical['Vanity Dive']         =   {'dex','','damage'}    
  74. assimilation.azure_lore.physical['Whirl of Rage']       =   {'str','mnd','stun'}
  75. assimilation.azure_lore.physical['Benthic Typhoon']     =   {'agi','','effect'}    
  76. assimilation.azure_lore.physical['Quad. Continuum']     =   {'str','vit','damage'} 
  77. assimilation.azure_lore.physical['Empty Thrash']        =   {'str','','damage'}    
  78. assimilation.azure_lore.physical['Delta Thrust']        =   {'str','vit','damage'} 
  79. assimilation.azure_lore.physical['Heavy Strike']        =   {'str','','h_strike'}  
  80. assimilation.azure_lore.physical['Sudden Lunge']        =   {'dex','agi','stun'}   
  81. assimilation.azure_lore.physical['Quadrastrike']        =   {'str','','damage'}    
  82. assimilation.azure_lore.physical['Tourbillion']         =   {'str','mnd','effect'} 
  83. assimilation.azure_lore.physical['Amorphic Spikes']     =   {'dex','int','damage'} 
  84. assimilation.azure_lore.physical['Barbed Crescent']     =   {'dex','','effect'}    
  85. assimilation.azure_lore.physical['Bilgestorm']          =   {'int','mnd','effect'} 
  86. assimilation.azure_lore.physical['Bloodrake']           =   {'str','mnd','damage'}
  87. assimilation.azure_lore.physical['Paralyzing Triad']    =   {'str','','effect'}    
  88. assimilation.azure_lore.physical['Glutinous Dart']      =   {'str','','damage'}    
  89.  
  90. assimilation.azure_lore.no_skill_buff = {
  91.  
  92. 'Refueling' , 'Animating Wail' , 'Cocoon' , 'Harden Shell' , 'Pyric Bulwark' ,
  93. 'Battery Charge' ,'Regeneration','Carcharian Verve','Nat. Meditation','Orcish Counterstance','Barrier Tusk',
  94. 'Winds of Promyvion','Fantod' ,'Reactor Cool' ,'Saline Coat' ,'Amplification' ,'Warm-Up' ,'Memento Mori' ,
  95. 'Zephyr Mantle' ,'Feather Barrier' }
  96.  
  97. assimilation.azure_lore.skill_buff = {
  98.  
  99. 'Magic Barrier' , 'Occultation' , 'Metallic Body' , 'Diamondhide'}
  100.  
  101. assimilation.azure_lore.hmg_cure = {
  102.  
  103. 'Pollen' , 'Wild Carrot' , 'Magic Fruit' , 'Plenilune Embrace' }
  104.  
  105. assimilation.azure_lore.mhp_cure = {
  106.  
  107. 'Healing Breeze' , 'White Wind' }
  108.  
  109. function assimilation.physical_blue_magic_build_set(blue_magic_spell)
  110.  
  111.     wsc1 = azure_lore.physical[blue_magic_spell][1]
  112.     wsc2 = azure_lore.physical[blue_magic_spell][2]
  113.     attribute = azure_lore.physical[blue_magic_spell][3]
  114.     out_set = ''
  115.    
  116.     if attribute ~= 'damage' then return 'blue_'..attribute
  117.     elseif wsc1 == 'str' and wsc2 == '' then return 'blue_str'
  118.     elseif wsc2 == '' then out_set = 'blue_str_'..wsc1
  119.     else out_set = 'blue_'..wsc1..'_'..wsc2
  120.     end
  121.    
  122.     if not sets.blue[out_set] then return 'blue_str'
  123.     else return out_set end
  124.    
  125. end
  126.  
  127. function assimilation.initialize_default_sets()
  128.  
  129.     if not sets.blue then sets.blue = {} end
  130.     if not sets.blue['blue_str'] then sets.blue['blue_str'] = {
  131.        
  132.         ammo = "Mavi Tathlum" ,
  133.         head = "Uk'uxkaj Cap" ,
  134.         body = "Assimilator's Jubbah +1" ,
  135.         hands = "Assimilator's Bazubands +1" ,
  136.         lring = "Rajas Ring" ,
  137.         back = "Cornflower Cape" ,
  138.         waist = "Wanion Belt" ,
  139.         legs = "Assimilator's Shalwar +1" ,
  140.         feet = "Assimilator's Charuqs +1"  } end
  141.  
  142.     if not sets.blue['blue_stun'] then sets.blue['blue_stun'] = {} end
  143.     if not sets.blue['blue_effect'] then sets.blue['blue_effect'] = {} end
  144.     if not sets.blue['blue_h_strike'] then sets.blue['blue_h_strike'] = {} end
  145.     if not sets.blue['blue_hp_diff'] then sets.blue['blue_hp_diff'] = {} end
  146.     if not sets.blue['blue_recast'] then sets.blue['blue_recast'] = {} end
  147.     if not sets.blue['blue_skill'] then sets.blue['blue_skill'] = {} end
  148.     if not sets.blue['blue_hmg_cure'] then sets.blue['blue_hmg_cure'] = {} end
  149.     if not sets.blue['blue_mhp_cure'] then sets.blue['blue_mhp_cure'] = {} end
  150.    
  151.     if not sets.precast then sets.precast = {} end
  152.     if not sets.precast.fast_cast then sets.precast.fast_cast = {} end
  153.     if not sets.precast.blue then
  154.         sets.precast.blue = set_combine(sets.precast.fast_cast,{body = "Mavi Mintan +2"})
  155.     end
  156.     if not sets.precast.quick_cast
  157.         then sets.precast.quick_cast = { ammo = "Impatiens" , waist = "Witful Belt" }
  158.     end
  159. end
  160.  
  161.  
  162. function assimilation.initialize_blue_library()
  163.  
  164.     initialize_default_sets()
  165.  
  166.     for spell in pairs(azure_lore.physical) do
  167.         to_set = physical_blue_magic_build_set(spell)
  168.         sets.blue[spell] = sets.blue[to_set]
  169.         sets.precast[spell] = sets.precast.blue
  170.     end
  171.    
  172.     for index,spell in pairs(azure_lore.no_skill_buff) do
  173.         sets.blue[spell] = sets.blue['blue_recast']
  174.         sets.precast[spell] = set_combine(sets.precast.blue , sets.precast.quick_cast)
  175.         if spell == "Animating Wail" then
  176.             for element,detail in pairs(sets.precast[spell]) do
  177.                 print(element, detail)
  178.             end
  179.         end
  180.     end
  181.        
  182.     for index,spell in pairs(azure_lore.skill_buff) do
  183.         sets.blue[spell] = sets.blue['blue_skill']
  184.         sets.precast[spell] = sets.precast.blue
  185.     end
  186.    
  187.     for index,spell in pairs(azure_lore.hmg_cure) do
  188.         sets.blue[spell] = sets.blue['blue_hmg_cure']
  189.         sets.precast[spell] = sets.precast.blue
  190.     end
  191.    
  192.     for index,spell in pairs(azure_lore.mhp_cure) do
  193.         sets.blue[spell] = sets.blue['blue_mhp_cure']
  194.         sets.precast[spell] = sets.precast.blue
  195.     end
  196.  
  197. end
  198.  
  199. return assimilation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement