Let's take Warriors Charge for instance:
Code: Select all
function onEffectGain(target,effect)
target:addMod(MOD_TRIPLE_ATTACK, effect:getPower());
target:addMod(MOD_DOUBLE_ATTACK, 100);
end;
Thanks for any and all help.
Code: Select all
function onEffectGain(target,effect)
target:addMod(MOD_TRIPLE_ATTACK, effect:getPower());
target:addMod(MOD_DOUBLE_ATTACK, 100);
end;
Code: Select all
-----------------------------------
-- onUseAbility
-----------------------------------
function onUseAbility(player,target,ability)
local berserkbonus = player:getStat(MOD_STR)
player:addStatusEffect(EFFECT_BERSERK,berserkbonus,0,180);
return EFFECT_BERSERK;
end;
Code: Select all
-----------------------------------
-- onEffectGain Action
-----------------------------------
function onEffectGain(target,effect)
--Checks the character's strength and uses that value to apply the attack mod.
target:addMod(MOD_DEFP,-25);
target:addMod(MOD_ATTP, effect:getPower());
target:addMod(MOD_ACC,-10);
end;
Code: Select all
-----------------------------------
-- onUseAbility
-----------------------------------
function onUseAbility(player,target,ability)
local berserkbonus;
if (player:getMainJob() == JOBS.WAR) then
berserkbonus = player:getStat(MOD_STR) / 2;
else
berserkbonus = player:getStat(MOD_STR) / 3;
end
player:addStatusEffect(EFFECT_BERSERK,berserkbonus,0,180);
return EFFECT_BERSERK;
end;
Code: Select all
-----------------------------------
-- onEffectGain Action
-----------------------------------
function onEffectGain(target,effect)
target:addMod(MOD_DEFP,-35);
target:addMod(MOD_ACC,-10);
target:addMod(MOD_ATTP, effect:getPower());
end;