Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.93 KB | None | 0 0
  1. -----------------------------------------
  2. -- Spell: Magic Hammer
  3. -- Steals an amount of enemy's MP equal to damage dealt. Ineffective against undead
  4. -- Spell cost: 40 MP
  5. -- Monster Type: Beastmen
  6. -- Spell Type: Magical (Light)
  7. -- Blue Magic Points: 4
  8. -- Stat Bonus: MP-5, MND+2
  9. -- Level: 74
  10. -- Casting Time: 4 seconds
  11. -- Recast Time: 180 seconds
  12. -- Magic Bursts on: Transfixion, Fusion, and Light
  13. -- Combos: Magic Attack Bonus
  14. -----------------------------------------
  15.  
  16. require("scripts/globals/magic");
  17. require("scripts/globals/status");
  18. require("scripts/globals/bluemagic");
  19.  
  20. -----------------------------------------
  21. -- OnMagicCastingCheck
  22. -----------------------------------------
  23.  
  24. function onMagicCastingCheck(caster,target,spell)
  25.     return 0;
  26. end;
  27.  
  28. -----------------------------------------
  29. -- OnSpellCast
  30. -----------------------------------------
  31.  
  32. function onSpellCast(caster,target,spell)
  33.     local dmg = 0;
  34.     local multi = 1.5;
  35.  
  36.     if (caster:hasStatusEffect(EFFECT_AZURE_LORE)) then
  37.         multi = multi + 0.50;
  38.     end
  39.  
  40.     local params = {};
  41.     -- This data should match information on http://wiki.ffxiclopedia.org/wiki/Calculating_Blue_Magic_Damage
  42.     params.multiplier = multi;
  43.     params.tMultiplier = 1.0;
  44.     params.duppercap = 35;
  45.     params.str_wsc = 0.0;
  46.     params.dex_wsc = 0.0;
  47.     params.vit_wsc = 0.0;
  48.     params.agi_wsc = 0.0;
  49.     params.int_wsc = 0.0;
  50.     params.mnd_wsc = 0.39;
  51.     params.chr_wsc = 0.0;
  52.  
  53.     if (target:isUndead()) then
  54.         spell:setMsg(75); -- No effect
  55.     else
  56.         dmg = BlueMagicalSpell(caster, target, spell, params, MND_BASED);
  57.         dmg = BlueFinalAdjustments(caster, target, spell, dmg, params);
  58.         if (target:getMP() > 0) then
  59.             if (target:getMP() < dmg) then
  60.                 dmg = target:getMP();
  61.             end
  62.             caster:addMP(dmg);
  63.         else
  64.             return 0;
  65.         end
  66.     end
  67.  
  68.     return dmg;
  69. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement