Index: scripts/globals/spells/protect.lua =================================================================== --- scripts/globals/spells/protect.lua (revision 1762) +++ scripts/globals/spells/protect.lua (working copy) @@ -9,22 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = 10; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end + local power = 15; + local duration = 1800; - if(target:hasStatusEffect(EFFECT_PROTECT) == true) then - effect = target:getStatusEffect(EFFECT_PROTECT); - cPower = effect:getPower(); - if(cPower > 10) then + local typeEffect = EFFECT_PROTECT; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower(); + if(cPower > power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_PROTECT); - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; \ No newline at end of file Index: scripts/globals/spells/protect_ii.lua =================================================================== --- scripts/globals/spells/protect_ii.lua (revision 1762) +++ scripts/globals/spells/protect_ii.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = 20; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_PROTECT) == true) then - effect = target:getStatusEffect(EFFECT_PROTECT); - cPower = effect:getPower(); - if(cPower > 20) then + local power = 40; + local duration = 1800; + + local typeEffect = EFFECT_PROTECT; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower(); + if(cPower > power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_PROTECT); - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/protect_iii.lua =================================================================== --- scripts/globals/spells/protect_iii.lua (revision 1762) +++ scripts/globals/spells/protect_iii.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = 30; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_PROTECT) == true) then - effect = target:getStatusEffect(EFFECT_PROTECT); - cPower = effect:getPower(); - if(cPower > 30) then + local power = 75; + local duration = 1800; + + local typeEffect = EFFECT_PROTECT; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower(); + if(cPower > power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_PROTECT); - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/protect_iv.lua =================================================================== --- scripts/globals/spells/protect_iv.lua (revision 1762) +++ scripts/globals/spells/protect_iv.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = 40; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_PROTECT) == true) then - effect = target:getStatusEffect(EFFECT_PROTECT); - cPower = effect:getPower(); - if(cPower > 40) then + local power = 120; + local duration = 1800; + + local typeEffect = EFFECT_PROTECT; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower(); + if(cPower > power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_PROTECT); - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/protectra.lua =================================================================== --- scripts/globals/spells/protectra.lua (revision 1762) +++ scripts/globals/spells/protectra.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = 10; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_PROTECT) == true) then - effect = target:getStatusEffect(EFFECT_PROTECT); - cPower = effect:getPower(); - if(cPower > 10) then + local power = 15; + local duration = 1800; + + local typeEffect = EFFECT_PROTECT; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower(); + if(cPower > power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_PROTECT); - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/protectra_ii.lua =================================================================== --- scripts/globals/spells/protectra_ii.lua (revision 1762) +++ scripts/globals/spells/protectra_ii.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = 20; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_PROTECT) == true) then - effect = target:getStatusEffect(EFFECT_PROTECT); - cPower = effect:getPower(); - if(cPower > 20) then + local power = 40; + local duration = 1800; + + local typeEffect = EFFECT_PROTECT; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower(); + if(cPower > power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_PROTECT); - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/protectra_iii.lua =================================================================== --- scripts/globals/spells/protectra_iii.lua (revision 1762) +++ scripts/globals/spells/protectra_iii.lua (working copy) @@ -9,18 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = 30; - duration = 1800; - if(target:hasStatusEffect(EFFECT_PROTECT) == true) then - effect = target:getStatusEffect(EFFECT_PROTECT); - cPower = effect:getPower(); - if(cPower > 30) then + local power = 75; + local duration = 1800; + + local typeEffect = EFFECT_PROTECT; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower(); + if(cPower > power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_PROTECT); - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/protectra_iv.lua =================================================================== --- scripts/globals/spells/protectra_iv.lua (revision 1762) +++ scripts/globals/spells/protectra_iv.lua (working copy) @@ -9,18 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = 40; - duration = 1800; - if(target:hasStatusEffect(EFFECT_PROTECT) == true) then - effect = target:getStatusEffect(EFFECT_PROTECT); - cPower = effect:getPower(); - if(cPower > 40) then + local power = 120; + local duration = 1800; + + local typeEffect = EFFECT_PROTECT; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower(); + if(cPower > power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_PROTECT); - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_PROTECT,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/reraise.lua =================================================================== --- scripts/globals/spells/reraise.lua (revision 1762) +++ scripts/globals/spells/reraise.lua (working copy) @@ -9,10 +9,7 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end + --duration = 1800; target:delStatusEffect(EFFECT_RERAISE); - target:addStatusEffect(EFFECT_RERAISE,1,0,duration); --reraise 1, 30min duration + target:addStatusEffect(EFFECT_RERAISE,1,0,3600); --reraise 1, 30min duration end; \ No newline at end of file Index: scripts/globals/spells/reraise_ii.lua =================================================================== --- scripts/globals/spells/reraise_ii.lua (revision 1762) +++ scripts/globals/spells/reraise_ii.lua (working copy) @@ -9,10 +9,7 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end + --duration = 1800; target:delStatusEffect(EFFECT_RERAISE); - target:addStatusEffect(EFFECT_RERAISE,2,0,duration); --reraise 2, 30min duration + target:addStatusEffect(EFFECT_RERAISE,2,0,3600); --reraise 2, 30min duration end; \ No newline at end of file Index: scripts/globals/spells/reraise_iii.lua =================================================================== --- scripts/globals/spells/reraise_iii.lua (revision 1762) +++ scripts/globals/spells/reraise_iii.lua (working copy) @@ -9,10 +9,7 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end + --duration = 1800; target:delStatusEffect(EFFECT_RERAISE); - target:addStatusEffect(EFFECT_RERAISE,3,0,duration); --reraise 3, 30min duration + target:addStatusEffect(EFFECT_RERAISE,3,0,3600); --reraise 3, 30min duration end; \ No newline at end of file Index: scripts/globals/spells/shell.lua =================================================================== --- scripts/globals/spells/shell.lua (revision 1762) +++ scripts/globals/spells/shell.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = -24; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_SHELL) == true) then - effect = target:getStatusEffect(EFFECT_SHELL); - cPower = effect:getPower(); - if(cPower < -24) then + local power = -24; + local duration = 1800; + + local typeEffect = EFFECT_SHELL; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower() - 65536; + if(cPower < power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_SHELL); - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/shell_ii.lua =================================================================== --- scripts/globals/spells/shell_ii.lua (revision 1762) +++ scripts/globals/spells/shell_ii.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = -36; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_SHELL) == true) then - effect = target:getStatusEffect(EFFECT_SHELL); - cPower = effect:getPower(); - if(cPower < -36) then + local power = -36; + local duration = 1800; + + local typeEffect = EFFECT_SHELL; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower() - 65536; + if(cPower < power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_SHELL); - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/shell_iii.lua =================================================================== --- scripts/globals/spells/shell_iii.lua (revision 1762) +++ scripts/globals/spells/shell_iii.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = -48; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_SHELL) == true) then - effect = target:getStatusEffect(EFFECT_SHELL); - cPower = effect:getPower(); - if(cPower < -48) then + local power = -48; + local duration = 1800; + + local typeEffect = EFFECT_SHELL; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower() - 65536; + if(cPower < power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_SHELL); - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/shell_iv.lua =================================================================== --- scripts/globals/spells/shell_iv.lua (revision 1762) +++ scripts/globals/spells/shell_iv.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = -56; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_SHELL) == true) then - effect = target:getStatusEffect(EFFECT_SHELL); - cPower = effect:getPower(); - if(cPower < -56) then + local power = -56; + local duration = 1800; + + local typeEffect = EFFECT_SHELL; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower() - 65536; + if(cPower < power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_SHELL); - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/shellra.lua =================================================================== --- scripts/globals/spells/shellra.lua (revision 1762) +++ scripts/globals/spells/shellra.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = -24; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_SHELL) == true) then - effect = target:getStatusEffect(EFFECT_SHELL); - cPower = effect:getPower(); - if(cPower < -24) then + local power = -24; + local duration = 1800; + + local typeEffect = EFFECT_SHELL; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower() - 65536; + if(cPower < power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_SHELL); - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/shellra_ii.lua =================================================================== --- scripts/globals/spells/shellra_ii.lua (revision 1762) +++ scripts/globals/spells/shellra_ii.lua (working copy) @@ -9,21 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = -36; - duration = 1800; - if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then - duration = duration * 3; - end - if(target:hasStatusEffect(EFFECT_SHELL) == true) then - effect = target:getStatusEffect(EFFECT_SHELL); - cPower = effect:getPower(); - if(cPower < -36) then + local power = -36; + local duration = 1800; + + local typeEffect = EFFECT_SHELL; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower() - 65536; + if(cPower < power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_SHELL); - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/shellra_iii.lua =================================================================== --- scripts/globals/spells/shellra_iii.lua (revision 1762) +++ scripts/globals/spells/shellra_iii.lua (working copy) @@ -9,19 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = -48; - duration = 1800; - - if(target:hasStatusEffect(EFFECT_SHELL) == true) then - effect = target:getStatusEffect(EFFECT_SHELL); - cPower = effect:getPower(); - if(cPower < -48) then + local power = -48; + local duration = 1800; + + local typeEffect = EFFECT_SHELL; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower() - 65536; + if(cPower < power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_SHELL); - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end; Index: scripts/globals/spells/shellra_iv.lua =================================================================== --- scripts/globals/spells/shellra_iv.lua (revision 1762) +++ scripts/globals/spells/shellra_iv.lua (working copy) @@ -9,18 +9,20 @@ ----------------------------------------- function onSpellCast(caster,target,spell) - power = -56; - duration = 1800; - if(target:hasStatusEffect(EFFECT_SHELL) == true) then - effect = target:getStatusEffect(EFFECT_SHELL); - cPower = effect:getPower(); - if(cPower < -56) then + local power = -56; + local duration = 1800; + + local typeEffect = EFFECT_SHELL; + if(target:hasStatusEffect(typeEffect) == true) then + local effect = target:getStatusEffect(typeEffect); + local cPower = effect:getPower() - 65536; + if(cPower < power) then spell:setMsg(75); -- no effect else - target:delStatusEffect(EFFECT_SHELL); - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:delStatusEffect(typeEffect); + target:addStatusEffect(typeEffect,power,0,duration); end else - target:addStatusEffect(EFFECT_SHELL,power,0,duration); + target:addStatusEffect(typeEffect,power,0,duration); end end;