Index: scripts/globals/abilities/boost.lua =================================================================== --- scripts/globals/abilities/boost.lua (revision 1719) +++ scripts/globals/abilities/boost.lua (working copy) @@ -10,14 +10,14 @@ ----------------------------------- function OnUseAbility(player, target, ability) - sHands = player:getEquipID(5); - power = 12.5 + local sHands = player:getEquipID(6); + local power = 12.5 if(sHands == 13962 or sHands == 14891) then power = power + 5.5; end if(player:hasStatusEffect(EFFECT_BOOST) == true) then - effect = player:getStatusEffect(EFFECT_BOOST); + local effect = player:getStatusEffect(EFFECT_BOOST); newPower = effect:getPower() + power; effect:setPower(newPower); player:addMod(MOD_ATTP,power); Index: scripts/globals/abilities/camouflage.lua =================================================================== --- scripts/globals/abilities/camouflage.lua (revision 1719) +++ scripts/globals/abilities/camouflage.lua (working copy) @@ -10,5 +10,15 @@ ----------------------------------- function OnUseAbility(player, target, ability) - player:addStatusEffect(EFFECT_CAMOUFLAGE,1,0,30); + + duration = math.random(30, 300); + duration = math.random(30, 300); + duration = math.random(30, 300); + + if (target:getEquipID(5) == 14224) then -- Hunter's Jerkin + duration = duration * 1.3; + elseif (target:getEquipID(5) == 15571) then -- Hunter's Jerkin +1 + duration = duration * 1.5; + end + player:addStatusEffect(EFFECT_CAMOUFLAGE,1,0,math.floor(duration)); end; \ No newline at end of file Index: scripts/globals/abilities/chakra.lua =================================================================== --- scripts/globals/abilities/chakra.lua (revision 1719) +++ scripts/globals/abilities/chakra.lua (working copy) @@ -14,8 +14,8 @@ local vit = player:getStat(MOD_VIT); local multi = 2; - local main = player:getEquipID(1); - local hand = player:getEquipID(7); + local body = player:getEquipID(4); + local hand = player:getEquipID(6); if(player:hasStatusEffect(EFFECT_POISON)) then player:delStatusEffect(EFFECT_POISON); Index: scripts/globals/abilities/dodge.lua =================================================================== --- scripts/globals/abilities/dodge.lua (revision 1719) +++ scripts/globals/abilities/dodge.lua (working copy) @@ -10,5 +10,10 @@ ----------------------------------- function OnUseAbility(player, target, ability) - player:addStatusEffect(EFFECT_DODGE,1,0,120); + local sLegs = player:getEquipID(5); + local power = 20 + if(sLegs == 14090 or sLegs == 15353) then + power = power + 10; + end + player:addStatusEffect(EFFECT_DODGE,power,0,120); end; \ No newline at end of file Index: scripts/globals/abilities/focus.lua =================================================================== --- scripts/globals/abilities/focus.lua (revision 1719) +++ scripts/globals/abilities/focus.lua (working copy) @@ -10,5 +10,10 @@ ----------------------------------- function OnUseAbility(player, target, ability) - player:addStatusEffect(EFFECT_FOCUS,1,0,120); + local sLegs = player:getEquipID(4); + local power = 20 + if(sLegs == 12512 or sLegs == 15226) then + power = power + 10; + end + player:addStatusEffect(EFFECT_FOCUS,power,0,120); end; \ No newline at end of file Index: scripts/globals/abilities/meditate.lua =================================================================== --- scripts/globals/abilities/meditate.lua (revision 1719) +++ scripts/globals/abilities/meditate.lua (working copy) @@ -15,5 +15,21 @@ amount = 20; end --TODO: Meditate doesnt actually give an icon, it's not regain as such. - player:addStatusEffect(EFFECT_REGAIN,20,3,15); + local tick = 15; + local extratick = 0; + local sHands = target:getEquipID(6); + local sHead = target:getEquipID(4); + if (sHands == 15113 or sHands == 14920) then + extratick = 1; + end + if (sHead == 13868 or sHead == 15236) then + extratick = extratick + 1; + end + if (extratick == 1) then + extratick = ((math.random() % 2) + 1); + elseif (extratick == 2) then + extratick = ((math.random() % 2) + 2); + end + tick = tick + (extratick * 3); + player:addStatusEffect(EFFECT_REGAIN,20,3,tick); end; \ No newline at end of file Index: scripts/globals/abilities/sentinel.lua =================================================================== --- scripts/globals/abilities/sentinel.lua (revision 0) +++ scripts/globals/abilities/sentinel.lua (revision 0) @@ -0,0 +1,38 @@ +----------------------------------- +-- Ability: Aggressor +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + local sFeet = target:getEquipID(8); + local power = 90; + if (sFeet == 15138 or sFeet == 15671) then + power = power + 100; --This is to detect if Valor Leggings wer removed after use. + end + player:addStatusEffect(EFFECT_SENTINEL,power,3,300); +end; +----------------------------------- +-- Ability: Aggressor +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + local sFeet = target:getEquipID(8); + local power = 90; + if (sFeet == 15138 or sFeet == 15671) then + power = power + 100; --This is to detect if Valor Leggings wer removed after use. + end + player:addStatusEffect(EFFECT_SENTINEL,power,3,300); +end; \ No newline at end of file Index: scripts/globals/abilities/sharpshot.lua =================================================================== --- scripts/globals/abilities/sharpshot.lua (revision 0) +++ scripts/globals/abilities/sharpshot.lua (revision 0) @@ -0,0 +1,28 @@ +----------------------------------- +-- Ability: Sharpshot +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + player:addStatusEffect(EFFECT_SHARPSHOT,1,0,60); +end; +----------------------------------- +-- Ability: Sharpshot +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + player:addStatusEffect(EFFECT_SHARPSHOT,1,0,60); +end; \ No newline at end of file Index: scripts/globals/abilities/velocity_shot.lua =================================================================== --- scripts/globals/abilities/velocity_shot.lua (revision 0) +++ scripts/globals/abilities/velocity_shot.lua (revision 0) @@ -0,0 +1,28 @@ +----------------------------------- +-- Ability: Velocity Shot +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + player:addStatusEffect(EFFECT_VELOCITY_SHOT,1,0,7200); +end; +----------------------------------- +-- Ability: Velocity Shot +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + player:addStatusEffect(EFFECT_VELOCITY_SHOT,1,0,7200); +end; Index: scripts/globals/effects/camouflage.lua =================================================================== --- scripts/globals/effects/camouflage.lua (revision 1719) +++ scripts/globals/effects/camouflage.lua (working copy) @@ -9,6 +9,7 @@ ----------------------------------- function onEffectGain(target,effect) + target:addMod(MOD_ENMITY,-25); end; ----------------------------------- @@ -23,4 +24,5 @@ ----------------------------------- function onEffectLose(target,effect) + target:addMod(MOD_ENMITY,-25); end; \ No newline at end of file Index: scripts/globals/effects/dodge.lua =================================================================== --- scripts/globals/effects/dodge.lua (revision 1719) +++ scripts/globals/effects/dodge.lua (working copy) @@ -9,7 +9,7 @@ ----------------------------------- function onEffectGain(target,effect) -target:addMod(MOD_EVA,20); + target:addMod(MOD_EVA,effect:getPower()); end; ----------------------------------- @@ -24,5 +24,5 @@ ----------------------------------- function onEffectLose(target,effect) -target:delMod(MOD_EVA,20); + target:delMod(MOD_EVA,effect:getPower()); end; \ No newline at end of file Index: scripts/globals/effects/focus.lua =================================================================== --- scripts/globals/effects/focus.lua (revision 1719) +++ scripts/globals/effects/focus.lua (working copy) @@ -9,7 +9,7 @@ ----------------------------------- function onEffectGain(target,effect) - target:addMod(MOD_ACC,20); + target:addMod(MOD_ACC,effect:getPower()); end; ----------------------------------- @@ -24,5 +24,5 @@ ----------------------------------- function onEffectLose(target,effect) - target:delMod(MOD_ACC,20); + target:delMod(MOD_ACC,effect:getPower()); end; \ No newline at end of file Index: scripts/globals/effects/sentinel.lua =================================================================== --- scripts/globals/effects/sentinel.lua (revision 1719) +++ scripts/globals/effects/sentinel.lua (working copy) @@ -1,7 +1,7 @@ ----------------------------------- -- +-- EFFECT_SENTINEL -- --- ----------------------------------- ----------------------------------- @@ -9,6 +9,11 @@ ----------------------------------- function onEffectGain(target,effect) + local power = effect:getPower(); + if (power > 100) then + power = (power - 100) + 10; + end + target:addMod(MOD_DMGPHYS,power); end; ----------------------------------- @@ -16,6 +21,22 @@ ----------------------------------- function onEffectTick(target,effect) + --todo: CORE: apply sentinel damage reduction and other sources of damage reduction separately, to match retail + --Use of Sentinel (starts at 90% reduction) with Earth Staff (20% reduction) does not mean temporary 100% reduction. + local sFeet = target:getEquipID(8); + local power = effect:getPower(); + local oldpower = power; + power = power - 5; + if ((power > 100) and ((sFeet == 15138) or (sFeet == 15671)) then + power = power - 100; + elseif ((power < 100) and ((sFeet ~= 15138) or (sFeet ~= 15671)) then + power = power + 100; + end + if (power > 100) then + power = (power - 100) + 10; + end + target:delMod(MOD_DMGPHYS,oldpower); + target:addMod(MOD_DMGPHYS,power); end; ----------------------------------- @@ -23,4 +44,6 @@ ----------------------------------- function onEffectLose(target,effect) + local power = effect:getPower(); + target:delMod(MOD_DMGPHYS,power); end; \ No newline at end of file Index: scripts/globals/effects/sharpshot.lua =================================================================== --- scripts/globals/effects/sharpshot.lua (revision 1719) +++ scripts/globals/effects/sharpshot.lua (working copy) @@ -1,7 +1,7 @@ ----------------------------------- -- +-- EFFECT_SHARPSHOT -- --- ----------------------------------- ----------------------------------- @@ -9,6 +9,7 @@ ----------------------------------- function onEffectGain(target,effect) + target:addMod(MOD_RACC,20); end; ----------------------------------- @@ -23,4 +24,5 @@ ----------------------------------- function onEffectLose(target,effect) + target:delMod(MOD_RACC,20); end; \ No newline at end of file Index: scripts/globals/effects/velocity_shot.lua =================================================================== --- scripts/globals/effects/velocity_shot.lua (revision 1719) +++ scripts/globals/effects/velocity_shot.lua (working copy) @@ -1,7 +1,7 @@ ----------------------------------- -- +-- EFFECT_VELOCITY_SHOT -- --- ----------------------------------- ----------------------------------- @@ -9,6 +9,10 @@ ----------------------------------- function onEffectGain(target,effect) + target:addMod(MOD_ATTP,-15); + target:addMod(MOD_DELAY,15); + target:addMod(MOD_RATTP,15); + target:addMod(MOD_RANGED_DELAY,-15); end; ----------------------------------- @@ -23,4 +27,8 @@ ----------------------------------- function onEffectLose(target,effect) + target:delMod(MOD_ATTP,-15); + target:delMod(MOD_DELAY,15); + target:delMod(MOD_RATTP,15); + target:delMod(MOD_RANGED_DELAY,-15); end; \ No newline at end of file