Index: scripts/globals/abilities/boost.lua =================================================================== --- scripts/globals/abilities/boost.lua (revision 1734) +++ scripts/globals/abilities/boost.lua (working copy) @@ -10,15 +10,15 @@ ----------------------------------- 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); - newPower = effect:getPower() + power; + local effect = player:getStatusEffect(EFFECT_BOOST); + local newPower = effect:getPower() + power; effect:setPower(newPower); player:addMod(MOD_ATTP,power); else Index: scripts/globals/abilities/chakra.lua =================================================================== --- scripts/globals/abilities/chakra.lua (revision 1734) +++ scripts/globals/abilities/chakra.lua (working copy) @@ -10,32 +10,23 @@ ----------------------------------- function OnUseAbility(player, target, ability) - local hp = player:getHP(); 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); - end - if(player:hasStatusEffect(EFFECT_BLINDNESS)) then - player:delStatusEffect(EFFECT_BLINDNESS); - end - if((main == 12639) or (main == 14474)) then -- Temple Cyclas (+1) equipped - if(player:hasStatusEffect(EFFECT_PARALYSIS)) then - player:delStatusEffect(EFFECT_PARALYSIS); - end + player:delStatusEffect(EFFECT_POISON); + player:delStatusEffect(EFFECT_BLINDNESS); + if((body == 12639) or (body == 14474)) then -- Temple Cyclas (+1) equipped + player:delStatusEffect(EFFECT_PARALYSIS); multi = multi + 1; end if((hand == 15103) or (hand == 14910)) then -- Melee Gloves (+1) equipped - if(player:hasStatusEffect(EFFECT_DISEASE)) then - player:delStatusEffect(EFFECT_DISEASE); - end + player:delStatusEffect(EFFECT_DISEASE); multi = multi + 0.6; end local recover = (multi * vit); - player:setHP((hp + recover)); + player:addHP(recover); player:messageBasic(24,0,recover); -- <#> HP. end; \ No newline at end of file Index: scripts/globals/abilities/meditate.lua =================================================================== --- scripts/globals/abilities/meditate.lua (revision 1734) +++ scripts/globals/abilities/meditate.lua (working copy) @@ -10,10 +10,26 @@ ----------------------------------- function OnUseAbility(player, target, ability) - amount = 12; + local amount = 12; if(player:getMainJob()==12) then 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() * 100) % 2) + 1); + elseif (extratick == 2) then + extratick = (((math.random() * 100) % 2) + 2); + end + local 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,14 @@ +----------------------------------- +-- Ability: Sentinel +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + player:addStatusEffect(EFFECT_SENTINEL,90,3,30); +end; Index: scripts/globals/abilities/sharpshot.lua =================================================================== --- scripts/globals/abilities/sharpshot.lua (revision 0) +++ scripts/globals/abilities/sharpshot.lua (revision 0) @@ -0,0 +1,14 @@ +----------------------------------- +-- Ability: Sharpshot +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + player:addStatusEffect(EFFECT_SHARPSHOT,1,0,60); +end; 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,15 @@ +----------------------------------- +-- Ability: Velocity Shot +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + player:delStatusEffect(EFFECT_VELOCITY_SHOT); + player:addStatusEffect(EFFECT_VELOCITY_SHOT,1,0,7200); +end; Index: scripts/globals/effects/camouflage.lua =================================================================== --- scripts/globals/effects/camouflage.lua (revision 1734) +++ 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/sentinel.lua =================================================================== --- scripts/globals/effects/sentinel.lua (revision 1734) +++ scripts/globals/effects/sentinel.lua (working copy) @@ -1,7 +1,7 @@ ----------------------------------- -- +-- EFFECT_SENTINEL -- --- ----------------------------------- ----------------------------------- @@ -16,6 +16,8 @@ ----------------------------------- function onEffectTick(target,effect) + local power = effect:getPower(); + effect:setPower(power - 5); end; ----------------------------------- Index: src/map/battleutils.cpp =================================================================== --- src/map/battleutils.cpp (revision 1734) +++ src/map/battleutils.cpp (working copy) @@ -1005,8 +1005,22 @@ damage = 0; } - damage = (damage * (100 + PDefender->getMod(MOD_DMG) + PDefender->getMod(MOD_DMGPHYS))) / 100; - + if (PDefender->StatusEffectContainer->HasStatusEffect(EFFECT_SENTINEL) || + PDefender->StatusEffectContainer->HasStatusEffect(EFFECT_SENTINEL, 0)) + { + int sentinel = PDefender->StatusEffectContainer->GetStatusEffect(EFFECT_SENTINEL, 0)->GetPower(); + if (PDefender->objtype == TYPE_PC) + { + CItemArmor* PItem = (CItemArmor*)((CCharEntity*)PDefender)->getStorage(LOC_INVENTORY)->GetItem( + ((CCharEntity*)PDefender)->equip[SLOT_FEET]); + if (PItem!=NULL && (PItem->getID() == 15138 || PItem->getID() == 15671)) + { + sentinel = sentinel + 10; + } + } + damage = (damage * (100 + (-sentinel))) / 100; //Sentinel is applied before dmg reduction gear + } + damage = (damage * (100 + PDefender->getMod(MOD_DMG) + PDefender->getMod(MOD_DMGPHYS))) / 100; switch(PAttacker->m_Weapons[slot]->getDmgType()) { case DAMAGE_CROSSBOW: