Index: scripts/globals/magic.lua =================================================================== --- scripts/globals/magic.lua (revision 2230) +++ scripts/globals/magic.lua (working copy) @@ -71,8 +71,8 @@ function calculateMagicDamage(V,M,player,spell,target,skilltype,atttype,hasMultipleTargetReduction) - dint = player:getStat(atttype) - target:getStat(atttype); - dmg = V; + local dint = player:getStat(atttype) - target:getStat(atttype); + local dmg = V; if(dint<=0) then --ifdINT penalises, it's always M=1 dmg = dmg + dint; @@ -88,7 +88,7 @@ return dmg; -end +end; function doEnspell(caster,target,spell,effect) if(target:getStatusEffect(EFFECT_BLOOD_WEAPON) ~= nil) then @@ -113,95 +113,140 @@ target:delStatusEffect(EFFECT_ENLIGHT); target:delStatusEffect(EFFECT_ENDARK); - if(effect==EFFECT_BLOOD_WEAPON)then + if(effect==EFFECT_BLOOD_WEAPON) then target:addStatusEffect(EFFECT_BLOOD_WEAPON,1,0,30); return; end - duration = 180; + local duration = 180; if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then duration = duration * 3; end --calculate potency - magicskill = target:getSkillLevel(ENHANCING_MAGIC_SKILL) + target:getMod(79 + ENHANCING_MAGIC_SKILL); + local magicskill = target:getSkillLevel(ENHANCING_MAGIC_SKILL) + target:getMod(79 + ENHANCING_MAGIC_SKILL); - potency = 3 + ((6*magicskill)/100); + local potency = 3 + ((6*magicskill)/100); if(magicskill>200) then potency = 5 + ((5*magicskill)/100); end target:addStatusEffect(effect,potency,0,duration); spell:setMsg(230); -end +end; ------------------------------------ --- Author: Tenjou --- Cure Potency Check --- List of gear which enhances Cure Potency. ------------------------------------ -function curePotency(caster) -c = 0; -main = caster:getEquipID(SLOT_MAIN); -sub = caster:getEquipID(SLOT_SUB); -range = caster:getEquipID(SLOT_RANGED); -ammo = caster:getEquipID(SLOT_AMMO); -head = caster:getEquipID(SLOT_HEAD); -body = caster:getEquipID(SLOT_BODY); -hand = caster:getEquipID(SLOT_HANDS); -leg = caster:getEquipID(SLOT_LEGS); -foot = caster:getEquipID(SLOT_FEET); -neck = caster:getEquipID(SLOT_NECK); -waist = caster:getEquipID(SLOT_WAIST); -ear1 = caster:getEquipID(SLOT_EAR1); -ear2 = caster:getEquipID(SLOT_EAR2); -ring1 = caster:getEquipID(SLOT_RING1); -ring2 = caster:getEquipID(SLOT_RING2); -back = caster:getEquipID(SLOT_BACK); -if (main == 0x443a or sub == 0x443a) then - c = (c+0.01); - --print("Cure enhanced by Dia Wand."); -end -if (main == 0x442e or sub == 0x442e) then - c = (c+0.05); - --print("Cure enhanced by Asklepios."); -end -if (main == 0x4999 or sub == 0x4999) then - c = (c+0.10); - --print("Cure enhanced by Templar Mace."); -end -if (main == 17557 or main == 17558 or main == 0x42d4 or main == 0x429b) then - c = (c+0.10); - --print("Cure enhanced by Staff."); -end -if (body == 0x313d) then - c = (c+0.10); - --print("Cure enhanced by Noble's Tunic."); -elseif (body == 0x35ce) then - c = (c+0.12); - --print("Cure enhanced by Aristocrat's Coat."); -end -if (ear1 == 0x39d7 or ear2 == 0x39d7) then - c = (c+0.05); - --print("Cure enhanced by Hospitaler Earring."); -end -if (ear1 == 0x3e82 or ear2 == 0x3e82) then - c = (c+0.05); - --print("Cure enhanced by Roundel Earring."); -end -if (ring1 == 0x33e8 or ring2 == 0x33e8) then - hp = caster:getHP(); - maxhp = caster:getMaxHP(); - ratio = (hp/maxhp); - tp = caster:getTP(); - if (ratio <= 0.75 and tp <= 100) then - c = (c+0.10); - --print("Cure enhanced by Medicine Ring."); - end -end ---print("Total enhancement: " .. (c+1)); -return c; - end; + --------------------------------- + -- Author: ZeDingo + -- getCurePower returns the caster's cure power + -- getCureFinal returns the final cure amount + -- Source: http://members.shaw.ca/pizza_steve/cure/Cure_Calculator.html + --------------------------------- + function getCurePower(caster,isBlueMagic) + local MND = caster:getMod(MOD_MND); + local VIT = caster:getMod(MOD_VIT); + local skill = caster:getSkillLevel(HEALING_MAGIC_SKILL) + caster:getMod(MOD_HEALING); + local power = math.floor(MND/2) + math.floor(VIT/4) + skill; + return power; +end; +function getCurePowerOld(caster) + local MND = caster:getMod(MOD_MND); + local VIT = caster:getMod(MOD_VIT); + local skill = caster:getSkillLevel(HEALING_MAGIC_SKILL) + caster:getMod(MOD_HEALING);--it's healing magic skill for the BLU cures as well + local power = ((3 * MND) + VIT + (3 * math.floor(skill/5))); + return power; +end; +function getBaseCure(power,divisor,constant,basepower) + return ((power - basepower) / divisor) + constant; +end; +function getBaseCureOld(power,divisor,constant) + return (power / 2) / divisor + constant; +end; +function getCureFinal(caster,spell,basecure,minCure,isBlueMagic) + if(basecure < minCure) then + basecure = minCure; + end + + local potency = 1 + (caster:getMod(MOD_CURE_POTENCY) / 100); + if(potency > 1.5) then + potency = 1.5; + end + + local dSeal = 1; + if (caster:hasStatusEffect(EFFECT_DIVINE_SEAL)) then + dSeal = 2; + end + + local rapture = 1; + if(isBlueMagic == false) then --rapture doesn't affect BLU cures as they're not white magic + if (caster:hasStatusEffect(EFFECT_RAPTURE)) then + local equippedHead = caster:getEquipID(SLOT_HEAD); + if(equippedHead == 11183) then + rapture = 1.55; --savant's bonnet +1 + elseif(equippedHead == 11083) then + rapture = 1.6; --savant's bonnet +2 + else + rapture = 1.5; + end + end + end + local dayWeatherBonus = 1; + local ele = spell:getElement(); + + local castersWeather = caster:getWeather(); + local equippedMain = caster:getEquipID(SLOT_MAIN); + local equippedWaist = caster:getEquipID(SLOT_WAIST); + + if(castersWeather == singleWeatherStrong[ele]) then + if(equippedMain == 18632 or equippedMain == 18633) then + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then + dayWeatherBonus = dayWeatherBonus + 0.10; + end + end + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then + dayWeatherBonus = dayWeatherBonus + 0.10; + end + elseif(castersWeather == singleWeatherWeak[ele]) then + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then + dayWeatherBonus = dayWeatherBonus - 0.10; + end + elseif(castersWeather == doubleWeatherStrong[ele]) then + if(equippedMain == 18632 or equippedMain == 18633) then + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then + dayWeatherBonus = dayWeatherBonus + 0.10; + end + end + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then + dayWeatherBonus = dayWeatherBonus + 0.25; + end + elseif(castersWeather == doubleWeatherWeak[ele]) then + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then + dayWeatherBonus = dayWeatherBonus - 0.25; + end + end + + local dayElement = VanadielDayElement(); + if(dayElement == dayStrong[ele]) then + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then + dayWeatherBonus = dayWeatherBonus + 0.10; + end + elseif(dayElement == dayWeak[ele]) then + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then + dayWeatherBonus = dayWeatherBonus - 0.10; + end + end + + if(dayWeatherBonus > 1.35) then + dayWeatherBonus = 1.35; + end + + local final = math.floor(math.floor(math.floor(math.floor(basecure) * potency) * dayWeatherBonus) * rapture) * dSeal; + return final; +end; + +function getCureAsNukeFinal(caster,spell,power,divisor,constant,basepower) + return getCureFinal(caster,spell,power,divisor,constant,basepower); +end; + ----------------------------------- -- Author: ReaperX -- Returns the staff bonus for the caster and spell. @@ -212,15 +257,15 @@ function AffinityBonus(caster,spell) - bonus = 1.00; + local bonus = 1.00; - ele = spell:getElement(); + local ele = spell:getElement(); - affinity = caster:getMod(strongAffinity[ele]) - caster:getMod(weakAffinity[ele]); + local affinity = caster:getMod(strongAffinity[ele]) - caster:getMod(weakAffinity[ele]); - if affinity > 0 then + if(affinity > 0) then bonus = bonus + 0.05 + 0.05 * affinity; - elseif affinity < 0 then + elseif(affinity < 0) then bonus = bonus - 0.05 + 0.05 * affinity; end @@ -236,13 +281,13 @@ function applyResistance(player,spell,target,diff,skill,staff) - resist = 1.0; - magicaccbonus = 0; + local resist = 1.0; + local magicaccbonus = 0; --get the base acc (just skill plus magic acc mod) - magicacc = player:getSkillLevel(skill) + player:getMod(79 + skill) + player:getMod(MOD_MACC); + local magicacc = player:getSkillLevel(skill) + player:getMod(79 + skill) + player:getMod(MOD_MACC); --difference in int/mnd - if diff > 10 then + if(diff > 10) then magicacc = magicacc + 10 + (diff - 10)/2; else magicacc = magicacc + diff; @@ -254,7 +299,7 @@ magicaccbonus = magicaccbonus + 256; end --add acc for staves - affinityBonus = AffinityBonus(player, spell); + local affinityBonus = AffinityBonus(player, spell); magicaccbonus = magicaccbonus + (affinityBonus-1) * 200; local skillchainTier, skillchainCount = FormMagicBurst(spell, target); @@ -264,16 +309,16 @@ end --base magic evasion (base magic evasion plus resistances(players), plus elemental defense(mobs) - magiceva = target:getMod(MOD_MEVA) + target:getMod(resistMod[spell:getElement()]) + target:getMod(defenseMod[spell:getElement()])/10; + local magiceva = target:getMod(MOD_MEVA) + target:getMod(resistMod[spell:getElement()]) + target:getMod(defenseMod[spell:getElement()])/10; --get the difference of acc and eva, scale with level (3.33 at 10 to 0.44 at 75) - multiplier = 0; + local multiplier = 0; if player:getMainLvl() < 40 then multiplier = 100 / 120; else multiplier = 100 / (player:getMainLvl() * 3); end; - p = (magicacc * multiplier) - (magiceva * 0.45); + local p = (magicacc * multiplier) - (magiceva * 0.45); magicaccbonus = magicaccbonus / 2; --add magicacc bonus p = p + magicaccbonus; @@ -283,7 +328,7 @@ --double any acc over 50 if it's over 50 - if p > 5 then + if(p > 5) then p = 5 + (p - 5) * 2; end @@ -291,8 +336,8 @@ p = p + 45; --add a scaling bonus or penalty based on difference of targets level from caster - leveldiff = player:getMainLvl() - target:getMainLvl(); - if leveldiff < 0 then + local leveldiff = player:getMainLvl() - target:getMainLvl(); + if(leveldiff < 0) then p = p - (25 * ( (player:getMainLvl()) / 75 )) + leveldiff; else p = p + (25 * ( (player:getMainLvl()) / 75 )) + leveldiff; @@ -307,16 +352,16 @@ p = p / 100; -- Resistance thresholds based on p. A higher p leads to lower resist rates, and a lower p leads to higher resist rates. - half = (1 - p); - quart = ((1 - p)^2); - eighth = ((1 - p)^3); - sixteenth = ((1 - p)^4); + local half = (1 - p); + local quart = ((1 - p)^2); + local eighth = ((1 - p)^3); + local sixteenth = ((1 - p)^4); -- print("HALF:",half); -- print("QUART:",quart); -- print("EIGHTH:",eighth); -- print("SIXTEENTH:",sixteenth); - resvar = math.random(); + local resvar = math.random(); -- Determine final resist based on which thresholds have been crossed. if(resvar <= sixteenth) then @@ -353,7 +398,7 @@ function getSkillLvl(rank,level) - skill = 0; --Failsafe + local skill = 0; --Failsafe if(level <= 50) then --Levels 1-50 if(rank == 1 or rank == 2) then --A-Rated Skill @@ -448,7 +493,7 @@ end --handling stoneskin - skin = target:getMod(MOD_STONESKIN); + local skin = target:getMod(MOD_STONESKIN); if(skin>0) then if(skin >= dmg) then --absorb all damage target:delMod(MOD_STONESKIN,dmg); @@ -467,17 +512,17 @@ target:updateEnmityFromDamage(caster,dmg); target:addTP(10); return dmg; - end + end; function adjustForTarget(target,dmg) --e.g. family % reduction return dmg; -end +end; function calculateMagicBurstAndBonus(caster, spell, target) - local hand = caster:getEquipID(SLOT_HANDS); - local ear1 = caster:getEquipID(SLOT_EAR1); - local ear2 = caster:getEquipID(SLOT_EAR2); + local equippedHands = caster:getEquipID(SLOT_HANDS); + local equippedEar1 = caster:getEquipID(SLOT_EAR1); + local equippedEar2 = caster:getEquipID(SLOT_EAR2); local burst = 1.0; local burstBonus = 1.0; @@ -503,11 +548,11 @@ -- Get burst bonus from gear/spell bonus -- Sorcerer's Gloves - if(hand == 15105 or hand == 14912) then + if(equippedHands == 15105 or equippedHands == 14912) then burstBonus = burstBonus + 0.05; end - if(ear1 == 15962 or ear2 == 15962) then + if(equippedEar1 == 15962 or equippedEar2 == 15962) then burstBonus = burstBonus + 0.05; end @@ -532,58 +577,64 @@ end return burst, burstBonus; -end +end; function addBonuses(caster, spell, target, dmg) - ele = spell:getElement(); + local ele = spell:getElement(); - affinityBonus = AffinityBonus(caster, spell); + local affinityBonus = AffinityBonus(caster, spell); dmg = math.floor(dmg * affinityBonus); - speciesReduction = target:getMod(defenseMod[ele]); + local speciesReduction = target:getMod(defenseMod[ele]); speciesReduction = 1.00 - (speciesReduction/1000); dmg = math.floor(dmg * speciesReduction); - dayWeatherBonus = 1.00; + local dayWeatherBonus = 1.00; + local equippedMain = caster:getEquipID(SLOT_MAIN); + local equippedWaist = caster:getEquipID(SLOT_WAIST); + local weather = caster:getWeather(); - if caster:getWeather() == singleWeatherStrong[ele] then + if(weather == singleWeatherStrong[ele]) then -- Iridescence - if caster:getEquipID(SLOT_MAIN) == 18632 or caster:getEquipID(SLOT_MAIN) == 18633 then - if math.random() < 0.33 or caster:getEquipID(10) == elementalObi[ele] then + if(equippedMain == 18632 or equippedMain == 18633) then + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then dayWeatherBonus = dayWeatherBonus + 0.10; end - elseif math.random() < 0.33 or caster:getEquipID(SLOT_WAIST) == elementalObi[ele] then + end + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then dayWeatherBonus = dayWeatherBonus + 0.10; end - elseif caster:getWeather() == singleWeatherWeak[ele] then - if math.random() < 0.33 or caster:getEquipID(SLOT_WAIST) == elementalObiWeak[ele] then + elseif(caster:getWeather() == singleWeatherWeak[ele]) then + if(math.random() < 0.33 or equippedWaist == elementalObiWeak[ele]) then dayWeatherBonus = dayWeatherBonus - 0.10; end - elseif caster:getWeather() == doubleWeatherStrong[ele] then + elseif(weather == doubleWeatherStrong[ele]) then -- Iridescence - if caster:getEquipID(SLOT_MAIN) == 18632 or caster:getEquipID(SLOT_MAIN) == 18633 then - if math.random() < 0.33 or caster:getEquipID(10) == elementalObi[ele] then - dayWeatherBonus = dayWeatherBonus + 0.25; + if(equippedMain == 18632 or equippedMain == 186330) then + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then + dayWeatherBonus = dayWeatherBonus + 0.10; end - elseif math.random() < 0.33 or caster:getEquipID(SLOT_WAIST) == elementalObi[ele] then + end + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then dayWeatherBonus = dayWeatherBonus + 0.25; end - elseif caster:getWeather() == doubleWeatherWeak[ele] then - if math.random() < 0.33 or caster:getEquipID(SLOT_WAIST) == elementalObiWeak[ele] then + elseif(weather == doubleWeatherWeak[ele]) then + if(math.random() < 0.33 or equippedWaist == elementalObiWeak[ele]) then dayWeatherBonus = dayWeatherBonus - 0.25; end end - if VanadielDayElement() == dayStrong[ele] then - local legs = caster:getEquipID(7); - if legs == 15120 or legs == 15583 then + local dayElement = VanadielDayElement(); + if(dayElement == dayStrong[ele]) then + local equippedLegs = caster:getEquipID(SLOT_LEGS); + if(equippedLegs == 15120 or equippedLegs == 15583) then dayWeatherBonus = dayWeatherBonus + 0.05; end - if math.random() < 0.33 or caster:getEquipID(SLOT_WAIST) == elementalObi[ele] then + if(math.random() < 0.33 or equippedWaist == elementalObi[ele]) then dayWeatherBonus = dayWeatherBonus + 0.10; end - elseif VanadielDayElement() == dayWeak[ele] then - if math.random() < 0.33 or caster:getEquipID(SLOT_WAIST) == elementalObiWeak[ele] then + elseif(dayElement == dayWeak[ele]) then + if(math.random() < 0.33 or equippedWaist == elementalObiWeak[ele]) then dayWeatherBonus = dayWeatherBonus + 0.10; end end @@ -594,7 +645,7 @@ dmg = math.floor(dmg * dayWeatherBonus); - burst, burstBonus = calculateMagicBurstAndBonus(caster, spell, target); + local burst, burstBonus = calculateMagicBurstAndBonus(caster, spell, target); if(burst > 1.0) then spell:setMsg(spell:getMagicBurstMessage()); -- "Magic Burst!" @@ -602,11 +653,11 @@ dmg = math.floor(dmg * burst); - mab = (100 + caster:getMod(MOD_MATT)) / (100 + target:getMod(MOD_MDEF)) ; + local mab = (100 + caster:getMod(MOD_MATT)) / (100 + target:getMod(MOD_MDEF)); dmg = math.floor(dmg * mab); - magicDmgMod = (256 + target:getMod(MOD_DMGMAGIC)) / 256; + local magicDmgMod = (256 + target:getMod(MOD_DMGMAGIC)) / 256; dmg = math.floor(dmg * magicDmgMod); @@ -618,7 +669,7 @@ -- print(magicDmgMod); return dmg; -end +end; --------------------------------------------------------------------- -- Author: ReaperX @@ -626,6 +677,7 @@ --------------------------------------------------------------------- function getElementalDebuffDOT(INT) + local DOT = 0; if (INT<= 39) then DOT = 1; elseif (INT <= 69) then @@ -636,11 +688,12 @@ DOT = 4; else DOT = 5; - end; + end return DOT; end; function getElementalDebuffStatDownFromDOT(dot) + local stat_down = 0; if (dot == 1) then stat_down = 5; elseif (dot == 2) then @@ -651,21 +704,32 @@ stat_down = 11; else stat_down = 13; - end; + end return stat_down; end; function getHelixDuration(caster, target, spell) - return math.random(45, 90); + --Dark Arts will further increase Helix duration, but testing is ongoing. + + local casterLevel = caster:getMainLvl(); + local duration = 30; --fallthrough + if(casterLevel <= 39) then + duration = 30; + elseif(casterLevel <= 59) then + duration = 60; + elseif(casterLevel <= 99) then + duration = 90; + end + return duration; end; function handleThrenody(caster, target, spell, basePower, baseDuration, modifier) -- Process resitances - staff = AffinityBonus(caster, spell); + local staff = AffinityBonus(caster, spell); print("staff=" .. staff); - dCHR = (caster:getStat(MOD_CHR) - target:getStat(MOD_CHR)); + local dCHR = (caster:getStat(MOD_CHR) - target:getStat(MOD_CHR)); print("dCHR=" .. dCHR); - resm = applyResistance(caster, spell, target, dCHR, SINGING_SKILL, staff); + local resm = applyResistance(caster, spell, target, dCHR, SINGING_SKILL, staff); print("rsem=" .. resm); if(resm < 0.5) then @@ -678,8 +742,8 @@ target:delStatusEffect(EFFECT_THRENODY); -- TODO: Check equipment bounses, increase duration/power - power = basePower; - duration = baseDuration; + local power = basePower; + local duration = baseDuration; -- Set spell message and apply status effect target:addStatusEffect(EFFECT_THRENODY, power, 0, duration, 0, modifier, 0); Index: scripts/globals/settings.lua =================================================================== --- scripts/globals/settings.lua (revision 2230) +++ scripts/globals/settings.lua (working copy) @@ -130,6 +130,7 @@ ABSORB_SPELL_AMOUNT = 8; -- how much of a stat gets absorbed by DRK absorb spells - expected to be a multiple of 8. ABSORB_SPELL_TICK = 9; -- duration of 1 absorb spell tick SNEAK_INVIS_DURATION_MULTIPLIER = 1; -- multiplies duration of sneak,invis,deodorize to reduce player torture. 1 = retail behavior. MUST BE INTEGER. +USE_OLD_CURE_FORMULA = false; -- true/false. if true, uses older cure formula (3*MND + VIT + 3*(healing skill/5)) // cure 6 will use the newer formula -- CELEBRATIONS EXPLORER_MOOGLE = 1; -- Enables Explorer Moogle teleports Index: scripts/globals/spells/curaga.lua =================================================================== --- scripts/globals/spells/curaga.lua (revision 2230) +++ scripts/globals/spells/curaga.lua (working copy) @@ -12,91 +12,27 @@ ----------------------------------------- function onSpellCast(caster,target,spell) + local minCure = 60; - --Pull base stats from caster. - MND = caster:getStat(MOD_MND); - VIT = target:getStat(MOD_VIT); - Healing = caster:getSkillLevel(HEALING_MAGIC_SKILL); - - power = ((3 * MND) + (VIT) + (3 * math.floor(Healing / 5))); - --printf("MIND: %u",MND); - --printf("VIT: %u",VIT); - --printf("POWER: %u",power); - - --Rate and Constant are based on which soft caps have been overcome by the caster. - rate = 1; - constant = 20; + local divisor = 1; + local constant = 20; + local power = getCurePowerOld(caster); if(power > 170) then - rate = 35.6666; + divisor = 35.6666; constant = 87.62; elseif(power > 110) then - rate = 2; + divisor = 2; constant = 47.5; end - --Amount to cure the target with. - cure = (math.floor(power / 2)) / (rate) + constant; - --printf("CURE: %u",cure); + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,false); - --Adjust bonus for bonus. - bonus = AffinityBonus(caster,spell); - - --Check for cure potency equipment. - potency = curePotency(caster); - - day = 1;--spellDayWeatherBonus(caster, spell, false); - --print("Total day/weather bonus:",day); - - --Final amount to heal the target with. - final = cure * bonus * day * (1 + potency) * CURE_POWER; - - --Raise the amount above the minimum hard cap. - if(final < 60) then - final = 60; - end; - - if(caster:getStatusEffect(EFFECT_AFFLATUS_SOLACE) ~= nil) and (target:getStatusEffect(EFFECT_STONESKIN) == nil) then - Afflatus_Stoneskin = math.floor(final / 4); - if(Afflatus_Stoneskin > 300) then - Afflatus_Stoneskin = 300; - end; - --printf("Additional effect on target: Stoneskin"); - target:addStatusEffect(EFFECT_STONESKIN,Afflatus_Stoneskin,0,25); - end; - - --Check to see ifthe target doesn't need that much healing. - maxhp = target:getMaxHP(); - hp = target:getHP(); - diff = (maxhp - hp); - mobfinal = final; + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); if(final > diff) then final = diff; end - - --Truncate decimal amounts. - final = math.floor(final); - - -- Do it! - if(target:getRank() ~= nil) then - if(caster:getStatusEffect(EFFECT_DIVINE_SEAL) ~= nil) then - final = final * 2; - end - spell:setMsg(7); - target:addHP(final); - else - harm = 1;--cureResist(target:getFamily()); - if(harm < 0) then - spell:setMsg(2); - if(mobfinal < 0) then - mobfinal = mobfinal * -1; - end - target:delHP(mobfinal); - final = mobfinal; - else - final = 0; - end - end + target:addHP(final); caster:updateEnmityFromCure(target,final); return final; - end; \ No newline at end of file Index: scripts/globals/spells/curaga_ii.lua =================================================================== --- scripts/globals/spells/curaga_ii.lua (revision 2230) +++ scripts/globals/spells/curaga_ii.lua (working copy) @@ -12,91 +12,27 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - - --Pull base stats from caster. - MND = caster:getStat(MOD_MND); - VIT = target:getStat(MOD_VIT); - Healing = caster:getSkillLevel(HEALING_MAGIC_SKILL); - - power = ((3 * MND) + (VIT) + (3 * math.floor(Healing / 5))); - --printf("MIND: %u",MND); - --printf("VIT: %u",VIT); - --printf("POWER: %u",power); - - --Rate and Constant are based on which soft caps have been overcome by the caster. - rate = 1; - constant = 70; + local minCure = 130; + + local divisor = 1; + local constant = 70; + local power = getCurePowerOld(caster); if(power > 300) then - rate = 15.6666; + divisor = 15.6666; constant = 180.43; elseif(power > 180) then - rate = 2; + divisor = 2; constant = 115; end + + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,false); - --Amount to cure the target with. - cure = (math.floor(power / 2)) / (rate) + constant; - --printf("CURE: %u",cure); - - --Adjust bonus for bonus. - bonus = AffinityBonus(caster,spell); - - --Check for cure potency equipment. - potency = curePotency(caster); - - day = 1;--spellDayWeatherBonus(caster, spell, false); - --print("Total day/weather bonus:",day); - - --Final amount to heal the target with. - final = cure * bonus * day * (1 + potency) * CURE_POWER; - - --Raise the amount above the minimum hard cap. - if(final < 130) then - final = 130; - end; - - if(caster:getStatusEffect(EFFECT_AFFLATUS_SOLACE) ~= nil) and (target:getStatusEffect(EFFECT_STONESKIN) == nil) then - Afflatus_Stoneskin = math.floor(final / 4); - if(Afflatus_Stoneskin > 300) then - Afflatus_Stoneskin = 300; - end; - --printf("Additional effect on target: Stoneskin"); - target:addStatusEffect(EFFECT_STONESKIN,Afflatus_Stoneskin,0,25); - end; - - --Check to see ifthe target doesn't need that much healing. - maxhp = target:getMaxHP(); - hp = target:getHP(); - diff = (maxhp - hp); - mobfinal = final; + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); if(final > diff) then final = diff; end - - --Truncate decimal amounts. - final = math.floor(final); - - -- Do it! - if(target:getRank() ~= nil) then - if(caster:getStatusEffect(EFFECT_DIVINE_SEAL) ~= nil) then - final = final * 2; - end - spell:setMsg(7); - target:addHP(final); - else - harm = 1;--cureResist(target:getFamily()); - if(harm < 0) then - spell:setMsg(2); - if(mobfinal < 0) then - mobfinal = mobfinal * -1; - end - target:delHP(mobfinal); - final = mobfinal; - else - final = 0; - end - end + target:addHP(final); caster:updateEnmityFromCure(target,final); return final; - end; \ No newline at end of file Index: scripts/globals/spells/curaga_iii.lua =================================================================== --- scripts/globals/spells/curaga_iii.lua (revision 2230) +++ scripts/globals/spells/curaga_iii.lua (working copy) @@ -12,91 +12,27 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - - --Pull base stats from caster. - MND = caster:getStat(MOD_MND); - VIT = target:getStat(MOD_VIT); - Healing = caster:getSkillLevel(HEALING_MAGIC_SKILL); - - power = ((3 * MND) + (VIT) + (3 * math.floor(Healing / 5))); - --printf("MIND: %u",MND); - --printf("VIT: %u",VIT); - --printf("POWER: %u",power); - - --Rate and Constant are based on which soft caps have been overcome by the caster. - rate = 0.6666; - constant = 165; + local minCure = 270; + + local divisor = 0.6666; + local constant = 165; + local power = getCurePowerOld(caster); if(power > 460) then - rate = 6.5; + divisor = 6.5; constant = 354.6666; elseif(power > 220) then - rate = 2; + divisor = 2; constant = 275; end + + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,false); - --Amount to cure the target with. - cure = (math.floor(power / 2)) / (rate) + constant; - --printf("CURE: %u",cure); - - --Adjust bonus for bonus. - bonus = AffinityBonus(caster,spell); - - --Check for cure potency equipment. - potency = curePotency(caster); - - day = 1;--spellDayWeatherBonus(caster, spell, false); - --print("Total day/weather bonus:",day); - - --Final amount to heal the target with. - final = cure * bonus * day * (1 + potency) * CURE_POWER; - - --Raise the amount above the minimum hard cap. - if(final < 270) then - final = 270; - end; - - if(caster:getStatusEffect(EFFECT_AFFLATUS_SOLACE) ~= nil) and (target:getStatusEffect(EFFECT_STONESKIN) == nil) then - Afflatus_Stoneskin = math.floor(final / 4); - if(Afflatus_Stoneskin > 300) then - Afflatus_Stoneskin = 300; - end; - --printf("Additional effect on target: Stoneskin"); - target:addStatusEffect(EFFECT_STONESKIN,Afflatus_Stoneskin,0,25); - end; - - --Check to see ifthe target doesn't need that much healing. - maxhp = target:getMaxHP(); - hp = target:getHP(); - diff = (maxhp - hp); - mobfinal = final; + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); if(final > diff) then final = diff; end - - --Truncate decimal amounts. - final = math.floor(final); - - -- Do it! - if(target:getRank() ~= nil) then - if(caster:getStatusEffect(EFFECT_DIVINE_SEAL) ~= nil) then - final = final * 2; - end - spell:setMsg(7); - target:addHP(final); - else - harm = 1;--cureResist(target:getFamily()); - if(harm < 0) then - spell:setMsg(2); - if(mobfinal < 0) then - mobfinal = mobfinal * -1; - end - target:delHP(mobfinal); - final = mobfinal; - else - final = 0; - end - end + target:addHP(final); caster:updateEnmityFromCure(target,final); return final; - end; \ No newline at end of file Index: scripts/globals/spells/curaga_iv.lua =================================================================== --- scripts/globals/spells/curaga_iv.lua (revision 2230) +++ scripts/globals/spells/curaga_iv.lua (working copy) @@ -3,98 +3,36 @@ -- Restores HP of all party members within area of effect. ----------------------------------------- +require("scripts/globals/settings"); require("scripts/globals/status"); +require("scripts/globals/magic"); ----------------------------------------- -- OnSpellCast ----------------------------------------- function onSpellCast(caster,target,spell) - - --Pull base stats from caster. - MND = caster:getStat(MOD_MND); - VIT = target:getStat(MOD_VIT); - Healing = caster:getSkillLevel(HEALING_MAGIC_SKILL); - - power = ((3 * MND) + (VIT) + (3 * math.floor(Healing / 5))); - --printf("MIND: %u",MND); - --printf("VIT: %u",VIT); - --printf("POWER: %u",power); - - -- Rate and Constant are based on which soft caps have been overcome by the caster. - rate = 0.6666; - constant = 330; + local minCure = 450; + + local divisor = 0.6666; + local constant = 330; + local power = getCurePowerOld(caster); if(power > 560) then - rate = 2.8333; + divisor = 2.8333; constant = 591.2; elseif(power > 320) then - rate = 1; + divisor = 1; constant = 410; end - --Amount to cure the target with. - cure = (math.floor(power / 2)) / (rate) + constant; - --printf("CURE: %u",cure); + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,false); - --Adjust bonus for bonus. - bonus = AffinityBonus(caster,spell); - - --Check for cure potency equipment. - potency = curePotency(caster); - - day = 1;--spellDayWeatherBonus(caster, spell, false); - --print("Total day/weather bonus:",day); - - --Final amount to heal the target with. - final = cure * bonus * day * (1 + potency) * CURE_POWER; - - --Raise the amount above the minimum hard cap. - if(final < 450) then - final = 450; - end; - - if(caster:getStatusEffect(EFFECT_AFFLATUS_SOLACE) ~= nil) and (target:getStatusEffect(EFFECT_STONESKIN) == nil) then - Afflatus_Stoneskin = math.floor(final / 4); - if(Afflatus_Stoneskin > 300) then - Afflatus_Stoneskin = 300; - end; - --printf("Additional effect on target: Stoneskin"); - target:addStatusEffect(EFFECT_STONESKIN,Afflatus_Stoneskin,0,25); - end; - - --Check to see if the target doesn't need that much healing. - maxhp = target:getMaxHP(); - hp = target:getHP(); - diff = (maxhp - hp); - mobfinal = final; + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); if(final > diff) then final = diff; end - - --Truncate decimal amounts. - final = math.floor(final); - - -- Do it! - if(target:getRank() ~= nil) then - if(caster:getStatusEffect(EFFECT_DIVINE_SEAL) ~= nil) then - final = final * 2; - end - spell:setMsg(7); - target:addHP(final); - else - harm = 1;--cureResist(target:getFamily()); - if(harm < 0) then - spell:setMsg(2); - if(mobfinal < 0) then - mobfinal = mobfinal * -1; - end - target:delHP(mobfinal); - final = mobfinal; - else - final = 0; - end - end + target:addHP(final); caster:updateEnmityFromCure(target,final); return final; - end; \ No newline at end of file Index: scripts/globals/spells/cure.lua =================================================================== --- scripts/globals/spells/cure.lua (revision 2230) +++ scripts/globals/spells/cure.lua (working copy) @@ -13,90 +13,95 @@ ----------------------------------------- function onSpellCast(caster,target,spell) + local divisor = 0; + local constant = 0; + local basepower = 0; + local power = 0; + local basecure = 0; + local final = 0; - --Pull base stats from caster. - MND = caster:getStat(MOD_MND); - VIT = target:getStat(MOD_VIT); - Healing = caster:getSkillLevel(HEALING_MAGIC_SKILL); - - power = ((3 * MND) + (VIT) + (3 * math.floor(Healing / 5))); - --printf("MIND: %u",MND); - --printf("VIT: %u",VIT); - --printf("POWER: %u",power); - - -- Rate and Constant are based on which soft caps have been overcome by the caster. - rate = 1; - constant = -10; - if(power > 100) then - rate = 57; - constant = 29.125; - elseif(power > 60) then - rate = 2; - constant = 5; + local minCure = 10; + if(USE_OLD_CURE_FORMULA == true) then + power = getCurePowerOld(caster); + divisor = 1; + constant = -10; + if(power > 100) then + divisor = 57; + constant = 29.125; + elseif(power > 60) then + divisor = 2; + constant = 5; + end + else + power = getCurePower(caster); + if(power < 20) then + divisor = 4; + constant = 10; + basepower = 0; + elseif(power < 40) then + divisor = 1.3333; + constant = 15; + basepower = 20; + elseif(power < 125) then + divisor = 8.5; + constant = 30; + basepower = 40; + elseif(power < 200) then + divisor = 15; + constant = 40; + basepower = 125; + elseif(power < 600) then + divisor = 20; + constant = 40; + basepower = 200; + else + divisor = 999999; + constant = 65; + basepower = 0; + end end - --Amount to cure the target with. - cure = (math.floor(power / 2)) / (rate) + constant; - --printf("CURE: %u",cure); - - --Adjust bonus for bonus. - bonus = AffinityBonus(caster,spell); - - --Check for cure potency equipment. - potency = curePotency(caster); - - day = 1;--spellDayWeatherBonus(caster, spell, false); - --print("Total day/weather bonus:",day); - - --Final amount to heal the target with. - final = cure * bonus * day * (1 + potency) * CURE_POWER; - - --Raise the amount above the minimum hard cap. - if(final < 10) then - final = 10; - end; - - if(caster:hasStatusEffect(EFFECT_AFFLATUS_SOLACE) and target:hasStatusEffect(EFFECT_STONESKIN)) then - Afflatus_Stoneskin = math.floor(final / 4); - if(Afflatus_Stoneskin > 300) then - Afflatus_Stoneskin = 300; - end; - --printf("Additional effect on target: Stoneskin"); - target:addStatusEffect(EFFECT_STONESKIN,Afflatus_Stoneskin,0,25); - end; - - --Check to see if the target doesn't need that much healing. - maxhp = target:getMaxHP(); - hp = target:getHP(); - diff = (maxhp - hp); - mobfinal = final; - if(final > diff) then - final = diff; - end - - --Truncate decimal amounts. - final = math.floor(final); - - -- Do it! if(target:getRank() ~= nil) then - if(caster:hasStatusEffect(EFFECT_DIVINE_SEAL)) then - final = final * 2; + if(USE_OLD_CURE_FORMULA == true) then + basecure = getBaseCure(power,divisor,constant); + else + basecure = getBaseCure(power,divisor,constant,basepower); end + final = getCureFinal(caster,spell,basecure,minCure,false); + if(caster:hasStatusEffect(EFFECT_AFFLATUS_SOLACE) and target:hasStatusEffect(EFFECT_STONESKIN) == false) then + local solaceStoneskin = 0; + local equippedBody = caster:getEquipID(SLOT_BODY); + if(equippedBody == 11186) then + solaceStoneskin = math.floor(final * 0.30); + elseif(equippedBody == 11086) then + solaceStoneskin = math.floor(final * 0.35); + else + solaceStoneskin = math.floor(final * 0.25); + end + target:addStatusEffect(EFFECT_STONESKIN,solaceStoneskin,0,25); + end; + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end target:addHP(final); + caster:updateEnmityFromCure(target,final); else if(target:isUndead()) then spell:setMsg(2); - if(mobfinal < 0) then - mobfinal = mobfinal * -1; - end - target:delHP(mobfinal); - final = mobfinal; + local dmg = calculateMagicDamage(10,1,caster,spell,target,HEALING_MAGIC_SKILL,MOD_MND,false); + local resist = applyResistance(caster,spell,target,caster:getMod(MOD_MND)-target:getMod(MOD_MND),HEALING_MAGIC_SKILL,1.0); + dmg = dmg*resist; + dmg = addBonuses(caster,spell,target,dmg); + dmg = adjustForTarget(target,dmg); + dmg = finalMagicAdjustments(caster,target,spell,dmg); + final = dmg; + target:delHP(final); + caster:updateEnmityFromDamage(target,final); else final = 0; end end - - caster:updateEnmityFromCure(target,final); return final; - end; \ No newline at end of file Index: scripts/globals/spells/cure_ii.lua =================================================================== --- scripts/globals/spells/cure_ii.lua (revision 2230) +++ scripts/globals/spells/cure_ii.lua (working copy) @@ -13,90 +13,95 @@ ----------------------------------------- function onSpellCast(caster,target,spell) + local divisor = 0; + local constant = 0; + local basepower = 0; + local power = 0; + local basecure = 0; + local final = 0; - --Pull base stats from caster. - MND = caster:getStat(MOD_MND); - VIT = target:getStat(MOD_VIT); - Healing = caster:getSkillLevel(HEALING_MAGIC_SKILL); - - power = ((3 * MND) + (VIT) + (3 * math.floor(Healing / 5))); - --printf("MIND: %u",MND); - --printf("VIT: %u",VIT); - --printf("POWER: %u",power); - - --Rate and Constant are based on which soft caps have been overcome by the caster. - rate = 1; - constant = 20; - if(power > 170) then - rate = 35.6666; - constant = 87.62; - elseif(power > 110) then - rate = 2; - constant = 47.5; + local minCure = 60; + if(USE_OLD_CURE_FORMULA == true) then + power = getCurePowerOld(caster); + divisor = 1; + constant = 20; + if(power > 170) then + divisor = 35.6666; + constant = 87.62; + elseif(power > 110) then + divisor = 2; + constant = 47.5; + end + else + power = getCurePower(caster); + if(power < 70) then + divisor = 1; + constant = 60; + basepower = 40; + elseif(power < 125) then + divisor = 5.5; + constant = 90; + basepower = 70; + elseif(power < 200) then + divisor = 7.5; + constant = 100; + basepower = 125; + elseif(power < 400) then + divisor = 10; + constant = 110; + basepower = 200; + elseif(power < 700) then + divisor = 20; + constant = 130; + basepower = 400; + else + divisor = 999999; + constant = 145; + basepower = 0; + end end - --Amount to cure the target with. - cure = (math.floor(power / 2)) / (rate) + constant; - --printf("CURE: %u",cure); - - --Adjust bonus for bonus. - bonus = AffinityBonus(caster,spell); - - --Check for cure potency equipment. - potency = curePotency(caster); - - day = 1;--spellDayWeatherBonus(caster, spell, false); - --print("Total day/weather bonus:",day); - - --Final amount to heal the target with. - final = cure * bonus * day * (1 + potency) * CURE_POWER; - - --Raise the amount above the minimum hard cap. - if(final < 60) then - final = 60; - end; - - if(caster:hasStatusEffect(EFFECT_AFFLATUS_SOLACE) and target:hasStatusEffect(EFFECT_STONESKIN)) then - Afflatus_Stoneskin = math.floor(final / 4); - if(Afflatus_Stoneskin > 300) then - Afflatus_Stoneskin = 300; - end; - --printf("Additional effect on target: Stoneskin"); - target:addStatusEffect(EFFECT_STONESKIN,Afflatus_Stoneskin,0,25); - end; - - --Check to see ifthe target doesn't need that much healing. - maxhp = target:getMaxHP(); - hp = target:getHP(); - diff = (maxhp - hp); - mobfinal = final; - if(final > diff) then - final = diff; - end - - --Truncate decimal amounts. - final = math.floor(final); - - -- Do it! if(target:getRank() ~= nil) then - if(caster:hasStatusEffect(EFFECT_DIVINE_SEAL)) then - final = final * 2; + if(USE_OLD_CURE_FORMULA == true) then + basecure = getBaseCure(power,divisor,constant); + else + basecure = getBaseCure(power,divisor,constant,basepower); end + final = getCureFinal(caster,spell,basecure,minCure,false); + if(caster:hasStatusEffect(EFFECT_AFFLATUS_SOLACE) and target:hasStatusEffect(EFFECT_STONESKIN) == false) then + local solaceStoneskin = 0; + local equippedBody = caster:getEquipID(SLOT_BODY); + if(equippedBody == 11186) then + solaceStoneskin = math.floor(final * 0.30); + elseif(equippedBody == 11086) then + solaceStoneskin = math.floor(final * 0.35); + else + solaceStoneskin = math.floor(final * 0.25); + end + target:addStatusEffect(EFFECT_STONESKIN,solaceStoneskin,0,25); + end; + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end target:addHP(final); + caster:updateEnmityFromCure(target,final); else if(target:isUndead()) then spell:setMsg(2); - if(mobfinal < 0) then - mobfinal = mobfinal * -1; - end - target:delHP(mobfinal); - final = mobfinal; + local dmg = calculateMagicDamage(60,1,caster,spell,target,HEALING_MAGIC_SKILL,MOD_MND,false); + local resist = applyResistance(caster,spell,target,caster:getMod(MOD_MND)-target:getMod(MOD_MND),HEALING_MAGIC_SKILL,1.0); + dmg = dmg*resist; + dmg = addBonuses(caster,spell,target,dmg); + dmg = adjustForTarget(target,dmg); + dmg = finalMagicAdjustments(caster,target,spell,dmg); + final = dmg; + target:delHP(final); + caster:updateEnmityFromDamage(target,final); else final = 0; end end - - caster:updateEnmityFromCure(target,final); return final; - end; \ No newline at end of file Index: scripts/globals/spells/cure_iii.lua =================================================================== --- scripts/globals/spells/cure_iii.lua (revision 2230) +++ scripts/globals/spells/cure_iii.lua (working copy) @@ -13,90 +13,91 @@ ----------------------------------------- function onSpellCast(caster,target,spell) + local divisor = 0; + local constant = 0; + local basepower = 0; + local power = 0; + local basecure = 0; + local final = 0; - --Pull base stats from caster. - MND = caster:getStat(MOD_MND); - VIT = target:getStat(MOD_VIT); - Healing = caster:getSkillLevel(HEALING_MAGIC_SKILL); - - power = ((3 * MND) + (VIT) + (3 * math.floor(Healing / 5))); - --printf("MIND: %u",MND); - --printf("VIT: %u",VIT); - --printf("POWER: %u",power); - - --Rate and Constant are based on which soft caps have been overcome by the caster. - rate = 1; - constant = 70; - if(power > 300) then - rate = 15.6666; - constant = 180.43; - elseif(power > 180) then - rate = 2; - constant = 115; + local minCure = 130; + if(USE_OLD_CURE_FORMULA == true) then + power = getCurePowerOld(caster); + rate = 1; + constant = 70; + if(power > 300) then + rate = 15.6666; + constant = 180.43; + elseif(power > 180) then + rate = 2; + constant = 115; + end + else + power = getCurePower(caster); + if(power < 125) then + divisor = 2.2 + constant = 130; + basepower = 70; + elseif(power < 200) then + divisor = 75/65; + constant = 155; + basepower = 125; + elseif(power < 300) then + divisor = 2.5; + constant = 220; + basepower = 200; + elseif(power < 700) then + divisor = 5; + constant = 260; + basepower = 300; + else + divisor = 999999; + constant = 340; + basepower = 0; + end end - --Amount to cure the target with. - cure = (math.floor(power / 2)) / (rate) + constant; - --printf("CURE: %u",cure); - - --Adjust bonus for bonus. - bonus = AffinityBonus(caster,spell); - - --Check for cure potency equipment. - potency = curePotency(caster); - - day = 1;--spellDayWeatherBonus(caster, spell, false); - --print("Total day/weather bonus:",day); - - --Final amount to heal the target with. - final = cure * bonus * day * (1 + potency) * CURE_POWER; - - --Raise the amount above the minimum hard cap. - if(final < 130) then - final = 130; - end; - - if(caster:getStatusEffect(EFFECT_AFFLATUS_SOLACE) ~= nil) and (target:getStatusEffect(EFFECT_STONESKIN) == nil) then - Afflatus_Stoneskin = math.floor(final / 4); - if(Afflatus_Stoneskin > 300) then - Afflatus_Stoneskin = 300; - end; - --printf("Additional effect on target: Stoneskin"); - target:addStatusEffect(EFFECT_STONESKIN,Afflatus_Stoneskin,0,25); - end; - - --Check to see ifthe target doesn't need that much healing. - maxhp = target:getMaxHP(); - hp = target:getHP(); - diff = (maxhp - hp); - mobfinal = final; - if(final > diff) then - final = diff; - end - - --Truncate decimal amounts. - final = math.floor(final); - - -- Do it! if(target:getRank() ~= nil) then - if(caster:getStatusEffect(EFFECT_DIVINE_SEAL) ~= nil) then - final = final * 2; + if(USE_OLD_CURE_FORMULA == true) then + basecure = getBaseCure(power,divisor,constant); + else + basecure = getBaseCure(power,divisor,constant,basepower); end + final = getCureFinal(caster,spell,basecure,minCure,false); + if(caster:hasStatusEffect(EFFECT_AFFLATUS_SOLACE) and target:hasStatusEffect(EFFECT_STONESKIN) == false) then + local solaceStoneskin = 0; + local equippedBody = caster:getEquipID(SLOT_BODY); + if(equippedBody == 11186) then + solaceStoneskin = math.floor(final * 0.30); + elseif(equippedBody == 11086) then + solaceStoneskin = math.floor(final * 0.35); + else + solaceStoneskin = math.floor(final * 0.25); + end + target:addStatusEffect(EFFECT_STONESKIN,solaceStoneskin,0,25); + end; + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end target:addHP(final); + caster:updateEnmityFromCure(target,final); else if(target:isUndead()) then spell:setMsg(2); - if(mobfinal < 0) then - mobfinal = mobfinal * -1; - end - target:delHP(mobfinal); - final = mobfinal; + local dmg = calculateMagicDamage(130,1,caster,spell,target,HEALING_MAGIC_SKILL,MOD_MND,false); + local resist = applyResistance(caster,spell,target,caster:getMod(MOD_MND)-target:getMod(MOD_MND),HEALING_MAGIC_SKILL,1.0); + dmg = dmg*resist; + dmg = addBonuses(caster,spell,target,dmg); + dmg = adjustForTarget(target,dmg); + dmg = finalMagicAdjustments(caster,target,spell,dmg); + final = dmg; + target:delHP(final); + caster:updateEnmityFromDamage(target,final); else final = 0; end end - - caster:updateEnmityFromCure(target,final); return final; - end; \ No newline at end of file Index: scripts/globals/spells/cure_iv.lua =================================================================== --- scripts/globals/spells/cure_iv.lua (revision 2230) +++ scripts/globals/spells/cure_iv.lua (working copy) @@ -12,90 +12,91 @@ ----------------------------------------- function onSpellCast(caster,target,spell) + local divisor = 0; + local constant = 0; + local basepower = 0; + local power = 0; + local basecure = 0; + local final = 0; - --Pull base stats from caster. - MND = caster:getStat(MOD_MND); - VIT = target:getStat(MOD_VIT); - Healing = caster:getSkillLevel(HEALING_MAGIC_SKILL); - - power = ((3 * MND) + (VIT) + (3 * math.floor(Healing / 5))); - --printf("MIND: %u",MND); - --printf("VIT: %u",VIT); - --printf("POWER: %u",power); - - --Rate and Constant are based on which soft caps have been overcome by the caster. - rate = 0.6666; - constant = 165; - if(power > 460) then - rate = 6.5; - constant = 354.6666; - elseif(power > 220) then - rate = 2; - constant = 275; + local minCure = 270; + if(USE_OLD_CURE_FORMULA == true) then + power = getCurePowerOld(caster); + rate = 0.6666; + constant = 165; + if(power > 460) then + rate = 6.5; + constant = 354.6666; + elseif(power > 220) then + rate = 2; + constant = 275; + end + else + power = getCurePower(caster); + if(power < 200) then + divisor = 1; + constant = 270; + basepower = 70; + elseif(power < 300) then + divisor = 2; + constant = 400; + basepower = 200; + elseif(power < 400) then + divisor = 10/7; + constant = 450; + basepower = 300; + elseif(power < 700) then + divisor = 2.5; + constant = 520; + basepower = 400; + else + divisor = 999999; + constant = 640; + basepower = 0; + end end - --Amount to cure the target with. - cure = (math.floor(power / 2)) / (rate) + constant; - --printf("CURE: %u",cure); - - --Adjust bonus for bonus. - bonus = AffinityBonus(caster,spell); - - --Check for cure potency equipment. - potency = curePotency(caster); - - day = 1;--spellDayWeatherBonus(caster, spell, false); - --print("Total day/weather bonus:",day); - - --Final amount to heal the target with. - final = cure * bonus * day * (1 + potency) * CURE_POWER; - - --Raise the amount above the minimum hard cap. - if(final < 270) then - final = 270; - end; - - if(caster:getStatusEffect(EFFECT_AFFLATUS_SOLACE) ~= nil) and (target:getStatusEffect(EFFECT_STONESKIN) == nil) then - Afflatus_Stoneskin = math.floor(final / 4); - if(Afflatus_Stoneskin > 300) then - Afflatus_Stoneskin = 300; - end; - --printf("Additional effect on target: Stoneskin"); - target:addStatusEffect(EFFECT_STONESKIN,Afflatus_Stoneskin,0,25); - end; - - --Check to see ifthe target doesn't need that much healing. - maxhp = target:getMaxHP(); - hp = target:getHP(); - diff = (maxhp - hp); - mobfinal = final; - if(final > diff) then - final = diff; - end - - --Truncate decimal amounts. - final = math.floor(final); - - -- Do it! if(target:getRank() ~= nil) then - if(caster:getStatusEffect(EFFECT_DIVINE_SEAL) ~= nil) then - final = final * 2; + if(USE_OLD_CURE_FORMULA == true) then + basecure = getBaseCure(power,divisor,constant); + else + basecure = getBaseCure(power,divisor,constant,basepower) end + final = getCureFinal(caster,spell,basecure,minCure,false); + if(caster:hasStatusEffect(EFFECT_AFFLATUS_SOLACE) and target:hasStatusEffect(EFFECT_STONESKIN) == false) then + local solaceStoneskin = 0; + local equippedBody = caster:getEquipID(SLOT_BODY); + if(equippedBody == 11186) then + solaceStoneskin = math.floor(final * 0.30); + elseif(equippedBody == 11086) then + solaceStoneskin = math.floor(final * 0.35); + else + solaceStoneskin = math.floor(final * 0.25); + end + target:addStatusEffect(EFFECT_STONESKIN,solaceStoneskin,0,25); + end; + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end target:addHP(final); + caster:updateEnmityFromCure(target,final); else if(target:isUndead()) then spell:setMsg(2); - if(mobfinal < 0) then - mobfinal = mobfinal * -1; - end - target:delHP(mobfinal); - final = mobfinal; + local dmg = calculateMagicDamage(270,1,caster,spell,target,HEALING_MAGIC_SKILL,MOD_MND,false); + local resist = applyResistance(caster,spell,target,caster:getMod(MOD_MND)-target:getMod(MOD_MND),HEALING_MAGIC_SKILL,1.0); + dmg = dmg*resist; + dmg = addBonuses(caster,spell,target,dmg); + dmg = adjustForTarget(target,dmg); + dmg = finalMagicAdjustments(caster,target,spell,dmg); + final = dmg; + target:delHP(final); + caster:updateEnmityFromDamage(target,final); else final = 0; end end - - caster:updateEnmityFromCure(target,final); return final; - end; \ No newline at end of file Index: scripts/globals/spells/cure_v.lua =================================================================== --- scripts/globals/spells/cure_v.lua (revision 2230) +++ scripts/globals/spells/cure_v.lua (working copy) @@ -13,90 +13,99 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - - --Pull base stats from caster. - MND = caster:getStat(MOD_MND); - VIT = target:getStat(MOD_VIT); - Healing = caster:getSkillLevel(HEALING_MAGIC_SKILL); - - power = ((3 * MND) + (VIT) + (3 * math.floor(Healing / 5))); - --printf("MIND: %u",MND); - --printf("VIT: %u",VIT); - --printf("POWER: %u",power); - - -- Rate and Constant are based on which soft caps have been overcome by the caster. - rate = 0.6666; - constant = 330; - if(power > 560) then - rate = 2.8333; - constant = 591.2; - elseif(power > 320) then - rate = 1; - constant = 410; + local divisor = 0; + local constant = 0; + local basepower = 0; + local power = 0; + local basecure = 0; + local final = 0; + + local minCure = 450; + if(USE_OLD_CURE_FORMULA == true) then + power = getCurePowerOld(caster); + rate = 0.6666; + constant = 330; + if(power > 560) then + rate = 2.8333; + constant = 591.2; + elseif(power > 320) then + rate = 1; + constant = 410; + end + else + power = getCurePower(caster); + if(power < 150) then + divisor = 0.70; + constant = 450; + basepower = 80; + elseif(power < 190) then + divisor = 1.25; + constant = 550; + basepower = 150; + elseif(power < 260) then + divisor = 70/38; + constant = 582; + basepower = 190; + elseif(power < 300) then + divisor = 2; + constant = 620; + basepower = 260; + elseif(power < 500) then + divisor = 2.5; + constant = 640; + basepower = 300; + elseif(power < 700) then + divisor = 10/3; + constant = 720; + basepower = 500; + else + divisor = 999999; + constant = 780; + basepower = 0; + end end - --Amount to cure the target with. - cure = (math.floor(power / 2)) / (rate) + constant; - --printf("CURE: %u",cure); - - --Adjust bonus for bonus. - bonus = AffinityBonus(caster,spell); - - --Check for cure potency equipment. - potency = curePotency(caster); - - day = 1;--spellDayWeatherBonus(caster, spell, false); - --print("Total day/weather bonus:",day); - - --Final amount to heal the target with. - final = cure * bonus * day * (1 + potency) * CURE_POWER; - - --Raise the amount above the minimum hard cap. - if(final < 450) then - final = 450; - end; - - if(caster:getStatusEffect(EFFECT_AFFLATUS_SOLACE) ~= nil) and (target:getStatusEffect(EFFECT_STONESKIN) == nil) then - Afflatus_Stoneskin = math.floor(final / 4); - if(Afflatus_Stoneskin > 300) then - Afflatus_Stoneskin = 300; - end; - --printf("Additional effect on target: Stoneskin"); - target:addStatusEffect(EFFECT_STONESKIN,Afflatus_Stoneskin,0,25); - end; - - --Check to see if the target doesn't need that much healing. - maxhp = target:getMaxHP(); - hp = target:getHP(); - diff = (maxhp - hp); - mobfinal = final; - if(final > diff) then - final = diff; - end - - --Truncate decimal amounts. - final = math.floor(final); - - -- Do it! if(target:getRank() ~= nil) then - if(caster:getStatusEffect(EFFECT_DIVINE_SEAL) ~= nil) then - final = final * 2; + if(USE_OLD_CURE_FORMULA == true) then + basecure = getBaseCureOld(power,divisor,constant); + else + basecure = getBaseCure(power,divisor,constant,basepower); end + final = getCureFinal(caster,spell,basecure,minCure,false); + if(caster:hasStatusEffect(EFFECT_AFFLATUS_SOLACE) and target:hasStatusEffect(EFFECT_STONESKIN) == false) then + local solaceStoneskin = 0; + local equippedBody = caster:getEquipID(SLOT_BODY); + if(equippedBody == 11186) then + solaceStoneskin = math.floor(final * 0.30); + elseif(equippedBody == 11086) then + solaceStoneskin = math.floor(final * 0.35); + else + solaceStoneskin = math.floor(final * 0.25); + end + target:addStatusEffect(EFFECT_STONESKIN,solaceStoneskin,0,25); + end; + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end target:addHP(final); + caster:updateEnmityFromCure(target,final); else if(target:isUndead()) then spell:setMsg(2); - if(mobfinal < 0) then - mobfinal = mobfinal * -1; - end - target:delHP(mobfinal); - final = mobfinal; + local dmg = calculateMagicDamage(450,1,caster,spell,target,HEALING_MAGIC_SKILL,MOD_MND,false); + local resist = applyResistance(caster,spell,target,caster:getMod(MOD_MND)-target:getMod(MOD_MND),HEALING_MAGIC_SKILL,1.0); + dmg = dmg*resist; + dmg = addBonuses(caster,spell,target,dmg); + dmg = adjustForTarget(target,dmg); + dmg = finalMagicAdjustments(caster,target,spell,dmg); + final = dmg; + target:delHP(final); + caster:updateEnmityFromDamage(target,final); else final = 0; end end - - caster:updateEnmityFromCure(target,65535); --65535 is the special code for "cure v enmity generation" return final; - end; \ No newline at end of file Index: scripts/globals/spells/exuviation.lua =================================================================== --- scripts/globals/spells/exuviation.lua (revision 0) +++ scripts/globals/spells/exuviation.lua (working copy) @@ -0,0 +1,41 @@ +----------------------------------------- +-- Spell: Exuviation +-- Restores HP and removes one detrimental magic effect. +-- Can be used with Diffusion. +-- Shamelessly stolen from http://members.shaw.ca/pizza_steve/cure/Cure_Calculator.html +----------------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + local minCure = 60; + + local divisor = 1; + local constant = 40; + local power = getCurePowerOld(caster); + if(power > 99) then + divisor = 57; + constant = 79.125; + elseif(power > 59) then + divisor = 2; + constant = 55; + end + + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,true); + + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end + caster:eraseStatusEffect(); + target:addHP(final); + caster:updateEnmityFromCure(target,final); + return final; +end; \ No newline at end of file Index: scripts/globals/spells/healing_breeze.lua =================================================================== --- scripts/globals/spells/healing_breeze.lua (revision 0) +++ scripts/globals/spells/healing_breeze.lua (working copy) @@ -0,0 +1,39 @@ +----------------------------------------- +-- Spell: Healing Breeze +-- Restores target's HP. +-- Shamelessly stolen from http://members.shaw.ca/pizza_steve/cure/Cure_Calculator.html +----------------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + local minCure = 60; + + local divisor = 0.6666; + local constant = -45; + local power = getCurePowerOld(caster); + if(power > 459) then + divisor = 6.5; + constant = 144.6666; + elseif(power > 219) then + divisor = 2; + constant = 65; + end + + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,true); + + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end + target:addHP(final); + caster:updateEnmityFromCure(target,final); + return final; +end; \ No newline at end of file Index: scripts/globals/spells/magic_fruit.lua =================================================================== --- scripts/globals/spells/magic_fruit.lua (revision 0) +++ scripts/globals/spells/magic_fruit.lua (working copy) @@ -0,0 +1,39 @@ +----------------------------------------- +-- Spell: Magic Fruit +-- Restores target's HP. +-- Shamelessly stolen from http://members.shaw.ca/pizza_steve/cure/Cure_Calculator.html +----------------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + local minCure = 250; + + local divisor = 0.6666; + local constant = 130; + local power = getCurePowerOld(caster); + if(power > 559) then + divisor = 2.8333; + constant = 391.2 + elseif(power > 319) then + divisor = 1; + constant = 210; + end + + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,true); + + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end + target:addHP(final); + caster:updateEnmityFromCure(target,final); + return final; +end; \ No newline at end of file Index: scripts/globals/spells/plenilune_embrace.lua =================================================================== --- scripts/globals/spells/plenilune_embrace.lua (revision 0) +++ scripts/globals/spells/plenilune_embrace.lua (working copy) @@ -0,0 +1,68 @@ +----------------------------------------- +-- Spell: Plenilune Embrace +-- Restores target party member's HP and enhances attack and magic attack.. +-- Shamelessly stolen from http://members.shaw.ca/pizza_steve/cure/Cure_Calculator.html +----------------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + local duration = 90; + local attBoost = 1; + local magAttBoost = 1; + local moonPhase = VanadielMoonPhase(); + if(moonPhase <= 5) then + magAttBoost = 15; + attBoost = 1; + elseif(moonPhase <= 25) then + magAttBoost = 12; + attBoost = 3; + elseif(moonPhase <= 40) then + magAttBoost = 10; + attBoost = 5; + elseif(moonPhase <= 60) then + magAttBoost = 7; + attBoost = 7; + elseif(moonPhase <= 75) then + magAttBoost = 5; + attBoost = 10; + elseif(moonPhase <= 90) then + magAttBoost = 3; + attBoost = 12; + elseif(moonPhase <= 100) then + magAttBoost = 1; + attBoost = 15; + end + caster:addStatusEffect(EFFECT_ATTACK_BOOST,attBoost,0,duration); + caster:addStatusEffect(EFFECT_MAGIC_ATK_BOOST,magAttBoost,0,duration); + + local minCure = 350; + + local divisor = 0.6666; + local constant = 230; + local power = getCurePowerOld(caster); + if(power > 559) then + divisor = 2.8333; + constant = 491.2 + elseif(power > 319) then + divisor = 1; + constant = 310; + end + + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,true); + + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end + target:addHP(final); + caster:updateEnmityFromCure(target,final); + return final; +end; \ No newline at end of file Index: scripts/globals/spells/pollen.lua =================================================================== --- scripts/globals/spells/pollen.lua (revision 0) +++ scripts/globals/spells/pollen.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------------- +-- Spell: Pollen +-- Restores target's HP. +-- Shamelessly stolen from http://members.shaw.ca/pizza_steve/cure/Cure_Calculator.html +----------------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + local minCure = 14; + + local divisor = 1; + local constant = -6; + local power = getCurePowerOld(caster); + if(power > 99) then + divisor = 57; + constant = 33.125; + elseif(power > 59) then + divisor = 2; + constant = 9; + end + + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,true); + + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end + caster:updateEnmityFromCure(target,final); + return final; +end; \ No newline at end of file Index: scripts/globals/spells/wild_carrot.lua =================================================================== --- scripts/globals/spells/wild_carrot.lua (revision 0) +++ scripts/globals/spells/wild_carrot.lua (working copy) @@ -0,0 +1,39 @@ +----------------------------------------- +-- Spell: Wild Carrot +-- Restores target's HP. +-- Shamelessly stolen from http://members.shaw.ca/pizza_steve/cure/Cure_Calculator.html +----------------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + local minCure = 120; + + local divisor = 1; + local constant = 60; + local power = getCurePowerOld(caster); + if(power > 299) then + divisor = 15.6666; + constant = 170.43; + elseif(power > 179) then + divisor = 2; + constant = 105; + end + + local final = getCureFinal(caster,spell,getBaseCureOld(power,divisor,constant),minCure,true); + + final = final + (final * target:getMod(MOD_CURE_POTENCY_RCVD)); + local diff = (target:getMaxHP() - target:getHP()); + if(final > diff) then + final = diff; + end + target:addHP(final); + caster:updateEnmityFromCure(target,final); + return final; +end; \ No newline at end of file Index: scripts/globals/status.lua =================================================================== --- scripts/globals/status.lua (revision 2230) +++ scripts/globals/status.lua (working copy) @@ -749,6 +749,15 @@ MOD_HIGH_JUMP_ENMITY_REDUCTION = 0x16B MOD_REWARD_HP_BONUS = 0x16C +MOD_SNAP_SHOT = 0x16D + +MOD_REGAIN = 0x170 +MOD_REFRESH = 0x171 +MOD_REGEN = 0x172 + +MOD_CURE_POTENCY = 0x176 +MOD_CURE_POTENCY_RCVD = 0x177 + ----------------------------------- -- Slot Definitions ----------------------------------- Index: sql/item_mods.sql =================================================================== --- sql/item_mods.sql (revision 2230) +++ sql/item_mods.sql (working copy) @@ -15118,4 +15118,60 @@ INSERT INTO `item_mods` VALUES(10491, 370, 2); INSERT INTO `item_mods` VALUES(11875, 370, 1); INSERT INTO `item_mods` VALUES(13748, 369, 1); -INSERT INTO `item_mods` VALUES(13749, 369, 1); \ No newline at end of file +INSERT INTO `item_mods` VALUES(13749, 369, 1); +INSERT INTO `item_mods` VALUES(18605, 374, 3); +INSERT INTO `item_mods` VALUES(17466, 374, 1); +INSERT INTO `item_mods` VALUES(18607, 374, 1); +INSERT INTO `item_mods` VALUES(17557, 374, 10); +INSERT INTO `item_mods` VALUES(17558, 374, 10); +INSERT INTO `item_mods` VALUES(18632, 374, 10); +INSERT INTO `item_mods` VALUES(18633, 374, 10); +INSERT INTO `item_mods` VALUES(14807, 374, 5); +INSERT INTO `item_mods` VALUES(17108, 374, 10); +INSERT INTO `item_mods` VALUES(18587, 374, 10); +INSERT INTO `item_mods` VALUES(11342, 374, 3); +INSERT INTO `item_mods` VALUES(17454, 374, 5); +INSERT INTO `item_mods` VALUES(12605, 374, 10); +INSERT INTO `item_mods` VALUES(13774, 374, 12); +INSERT INTO `item_mods` VALUES(18841, 374, 10); +INSERT INTO `item_mods` VALUES(11579, 374, 2); +INSERT INTO `item_mods` VALUES(11580, 374, 3); +INSERT INTO `item_mods` VALUES(14888, 374, 4); +INSERT INTO `item_mods` VALUES(11554, 374, 3); +INSERT INTO `item_mods` VALUES(11066, 374, 10); +INSERT INTO `item_mods` VALUES(11166, 374, 7); +INSERT INTO `item_mods` VALUES(17057, 374, 15); +INSERT INTO `item_mods` VALUES(11030, 374, 5); +INSERT INTO `item_mods` VALUES(11705, 374, 2); +INSERT INTO `item_mods` VALUES(16202, 374, 5); +INSERT INTO `item_mods` VALUES(10986, 374, 4); +INSERT INTO `item_mods` VALUES(18906, 374, 10); +INSERT INTO `item_mods` VALUES(11864, 374, 10); +INSERT INTO `item_mods` VALUES(11867, 374, 15); +INSERT INTO `item_mods` VALUES(11870, 374, 12); +INSERT INTO `item_mods` VALUES(11982, 374, 4); +INSERT INTO `item_mods` VALUES(10989, 374, 4); +INSERT INTO `item_mods` VALUES(11972, 374, 4); +INSERT INTO `item_mods` VALUES(10274, 374, 5); +INSERT INTO `item_mods` VALUES(10275, 374, 6); +INSERT INTO `item_mods` VALUES(10325, 374, 5); +INSERT INTO `item_mods` VALUES(10404, 374, 8); +INSERT INTO `item_mods` VALUES(10409, 374, 11); +INSERT INTO `item_mods` VALUES(10562, 374, 3); +INSERT INTO `item_mods` VALUES(10563, 374, 5); +INSERT INTO `item_mods` VALUES(10564, 374, 7); +INSERT INTO `item_mods` VALUES(10635, 374, 1); +INSERT INTO `item_mods` VALUES(10640, 374, 4); +INSERT INTO `item_mods` VALUES(10960, 374, 4); +INSERT INTO `item_mods` VALUES(11005, 374, 2); +INSERT INTO `item_mods` VALUES(11008, 374, 2); +INSERT INTO `item_mods` VALUES(18630, 374, 14); +INSERT INTO `item_mods` VALUES(18631, 374, 15); +INSERT INTO `item_mods` VALUES(18909, 374, 13); +INSERT INTO `item_mods` VALUES(27651, 374, 11); +INSERT INTO `item_mods` VALUES(10806, 375, 15); +INSERT INTO `item_mods` VALUES(18909, 375, 10); +INSERT INTO `item_mods` VALUES(11030, 375, 5); +INSERT INTO `item_mods` VALUES(10960, 375, 4); +INSERT INTO `item_mods` VALUES(10787, 375, 3); +INSERT INTO `item_mods` VALUES(10279, 375, 3); \ No newline at end of file Index: src/map/modifier.h =================================================================== --- src/map/modifier.h (revision 2230) +++ src/map/modifier.h (working copy) @@ -398,20 +398,22 @@ MOD_OFF_DMG_RATING = 0x16F, //adds damage rating to off hand weapon MOD_REGAIN = 0x170, //auto regain TP (from items) | this is multiplied by 10 e.g. 20 is 2% TP MOD_REFRESH = 0x171, //auto refresh from equipment - MOD_REGEN = 0x172 //auto regen from equipment + MOD_REGEN = 0x172, //auto regen from equipment + MOD_CURE_POTENCY = 0x176, //% cure potency | bonus from gear is capped at 50 + MOD_CURE_POTENCY_RCVD = 0x177 //% potency of received cure | healer's roll, some items have this // Use these for new modifiers. - //SPARE_MOD = 0x176 - //SPARE_MOD = 0x177 //SPARE_MOD = 0x178 //SPARE_MOD = 0x179 //SPARE_MOD = 0x17A //SPARE_MOD = 0x17B //SPARE_MOD = 0x17C + //SPARE_MOD = 0x17D + //SPARE_MOD = 0x17E }; -#define MAX_MODIFIER 0x176 +#define MAX_MODIFIER 0x178