Herb Pastoral
Scop's Operetta
Fowl Aubade
Goblin Gavotte
Gold Capriccio
Shining Fantasia
Puppet's Operetta
Warding Round
Started with Herb Pastoral. I made a herb_pastoral.lua within scripts\globals\spells and then a pastoral.lua within scripts\globals\effects.
herb_pastoral.lua
Code: Select all
-----------------------------------------
-- Spell: Herb Pastoral
-- Gives party members increased resistance to Poison
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
function onMagicCastingCheck(caster,target,spell)
return 0;
end;
function onSpellCast(caster,target,spell)
local sLvl = caster:getSkillLevel(SKILL_SNG); -- Gets skill level of Singing
local iLvl = caster:getWeaponSkillLevel(SLOT_RANGED);
local power = 9;
if (sLvl+iLvl > 130) then
power = power + math.floor((sLvl+iLvl-130) / 18);
end
if (power >= 30) then
power = 30;
end
local iBoost = caster:getMod(MOD_PASTORAL_EFFECT) + caster:getMod(MOD_ALL_SONGS_EFFECT);
if (iBoost > 0) then
power = power + 1 + (iBoost-1)*3;
end
if (caster:hasStatusEffect(EFFECT_SOUL_VOICE)) then
power = power * 2;
elseif (caster:hasStatusEffect(EFFECT_MARCATO)) then
power = power * 1.5;
end
caster:delStatusEffect(EFFECT_MARCATO);
local duration = 240;
duration = duration * ((iBoost * 0.1) + (caster:getMod(MOD_SONG_DURATION_BONUS)/100) + 1);
if (caster:hasStatusEffect(EFFECT_TROUBADOUR)) then
duration = duration * 2;
end
if not (target:addBardSong(caster,EFFECT_PASTORAL,power,0,duration,caster:getID(), 0, 2)) then
spell:setMsg(75);
end
return EFFECT_PASTORAL;
end;
Code: Select all
-----------------------------------
--
--
--
-----------------------------------
-----------------------------------
-- onEffectGain Action
-----------------------------------
function onEffectGain(target,effect)
end;
-----------------------------------
-- onEffectTick Action
-----------------------------------
function onEffectTick(target,effect)
end;
-----------------------------------
-- onEffectLose Action
-----------------------------------
function onEffectLose(target,effect)
end;
"Madrigal.lua" has the MOD_ACC applied. Would this mean that Prelude isn't actually adding anything?
Carol uses an array of "resistMod"
Etude uses "getSubPower".
When I cast the spell it doesn't crash me, but upon resolution of the spell it crashes the client. I looked within modifier.h and it isn't there. At the bottom there are MOD_SPARE's that could be used, but for ease of use is there anyway to have them be in order? If not do we just use these spares; take them off of the spare list and add them under // Bard? If we do this too add the new spells we'd be left with only 3 documented spares.
Any ideas would be much appreciated.