mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
New scripts
New scripts for commands and effects that use the new function signatures and work with the new statuseffectcontainer
This commit is contained in:
parent
4f80023156
commit
00017468cc
@ -108,7 +108,7 @@ function onEventStarted(player, actor, triggerName, isTeleport)
|
||||
randoPos = getRandomPointInBand(destination[2], destination[4], 3, 5);
|
||||
rotation = getAngleFacing(randoPos.x, randoPos.y, destination[2], destination[4]);
|
||||
--bandaid fix for returning while dead, missing things like weakness and the heal number
|
||||
if (player:GetHP() == 0) then
|
||||
if (player:IsDead()) then
|
||||
player:SetHP(player.GetMaxHP());
|
||||
player:ChangeState(0);
|
||||
player:PlayAnimation(0x01000066);
|
||||
|
@ -12,8 +12,12 @@ end;
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Only the bard gets the Battle Voice effect
|
||||
if caster == target then
|
||||
actionContainer.AddAction(caster.statusEffects.AddStatusForBattleAction(223253, 1, 0, 30));
|
||||
local effect = GetWorldManager():GetStatusEffect(223253);
|
||||
effect.SetDuration(30);
|
||||
caster.statusEffects.AddStatusEffect(effect, caster, actionContainer);
|
||||
end
|
||||
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
local effect = GetWorldManager():GetStatusEffect(223029);
|
||||
effect.SetDuration(60);
|
||||
caster.statusEffects.AddStatusEffect(effect, caster, actionContainer);
|
||||
end;
|
@ -14,6 +14,18 @@ function onAbilityStart(caster, target, ability)
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
--223207: Berserk
|
||||
--223208: Rampage
|
||||
--Remove Rampage effect. I'm assuming no message is sent like LNC surges
|
||||
caster.statusEffects.RemoveStatusEffect(223208);
|
||||
|
||||
--If caster has berserk already, remove it and send a message.
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223207)
|
||||
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
@ -22,22 +22,18 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--If we have a buff then Blissful Mind removes that buff and restores MP. Otherwise, it adds the Blissful Mind effect
|
||||
if buff ~= nil then
|
||||
local amount = buff.GetExtra();
|
||||
local remAction = caster.statusEffects.RemoveStatusEffectForBattleAction(buff, 30329);
|
||||
|
||||
caster.AddMP(amount);
|
||||
|
||||
actionContainer.AddMPAction(caster.actorId, 33007, amount);
|
||||
actionContainer.AddAction(remAction);
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--Blissful mind takes 25% of CURRENT HP and begins storing MP up to that point, at which point the buff changes to indicate its full
|
||||
local amount = caster.GetHP() * 0.25;
|
||||
|
||||
caster.DelHP(amount);
|
||||
caster.DelHP(amount, actionContainer);
|
||||
skill.statusMagnitude = amount;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
||||
end
|
||||
|
||||
end;
|
17
data/scripts/commands/ability/breath_of_the_dragon.lua
Normal file
17
data/scripts/commands/ability/breath_of_the_dragon.lua
Normal file
@ -0,0 +1,17 @@
|
||||
require("global");
|
||||
require("ability");
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
17
data/scripts/commands/ability/breath_of_the_ram.lua
Normal file
17
data/scripts/commands/ability/breath_of_the_ram.lua
Normal file
@ -0,0 +1,17 @@
|
||||
require("global");
|
||||
require("ability");
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
@ -14,5 +14,6 @@ function onAbilityStart(caster, target, ability)
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
target.hateContainer.UpdateHate(caster, -840);
|
||||
--Need a way to get all targets with hate for player
|
||||
--target.hateContainer.UpdateHate(caster, -840);
|
||||
end;
|
@ -10,6 +10,12 @@ function onAbilityStart(caster, target, ability)
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223227)
|
||||
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
@ -17,7 +17,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
coverTier = 2;
|
||||
end
|
||||
|
||||
actionContainer.AddAction(caster.statusEffects.AddStatusForBattleAction(223063, coverTier, skill.statusDuration));
|
||||
caster.statusEffects.AddStatusEffect(223063, coverTier, 0, 15, 0);
|
||||
|
||||
--Apply Covered to target
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
@ -1,18 +1,23 @@
|
||||
require("global");
|
||||
require("ability");
|
||||
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Need a better way to do this
|
||||
|
||||
for i = 223212,223217 do
|
||||
local remAction = caster.statusEffects.RemoveStatusEffectForBattleAction(i, 30329)
|
||||
local buff = caster.statusEffects.GetStatusEffectById(i);
|
||||
|
||||
if remAction ~= nil then
|
||||
actionContainer.AddAction(remAction);
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
skill.statusTier = 2;
|
||||
break;
|
||||
end
|
||||
|
19
data/scripts/commands/ability/fists_of_wind.lua
Normal file
19
data/scripts/commands/ability/fists_of_wind.lua
Normal file
@ -0,0 +1,19 @@
|
||||
require("global");
|
||||
require("ability");
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
--27124: Enhanced Fists of Fire
|
||||
if caster.HasTrait(27124) then
|
||||
ability.statusTier = 2;
|
||||
end
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
@ -12,6 +12,6 @@ end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Take off 1/3 of attack delay. Not sure if this is the exact amount HF reduces by
|
||||
action.statusMagnitude = 0.33 * caster.GetMod(modifiersGlobal.AttackDelay);
|
||||
skill.statusMagnitude = 0.33 * caster.GetMod(modifiersGlobal.Delay);
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
@ -20,9 +20,9 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--223213: Power Surge II
|
||||
--223212: Power Surge III
|
||||
--No message is sent when PS is removed by Life Surge
|
||||
caster.statusEffects.RemoveStatusEffect(223212, true);
|
||||
caster.statusEffects.RemoveStatusEffect(223213, true);
|
||||
caster.statusEffects.RemoveStatusEffect(223214, true);
|
||||
caster.statusEffects.RemoveStatusEffect(223212);
|
||||
caster.statusEffects.RemoveStatusEffect(223213);
|
||||
caster.statusEffects.RemoveStatusEffect(223214);
|
||||
|
||||
|
||||
--Using this ability moves to the next LS buff
|
||||
@ -45,7 +45,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
end
|
||||
|
||||
if not (removeId == 0) then
|
||||
--caster.statusEffects.RemoveStatusEffect(removeId, true);
|
||||
caster.statusEffects.ReplaceEffect(caster.statusEffects.GetStatusEffectById(removeId), skill.statusId, skill.statusTier, skill.statusMagnitude, skill.statusDuration);
|
||||
end
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
|
@ -14,11 +14,17 @@ function onAbilityStart(caster, target, ability)
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Need a better way to do this
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(223215));
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(223216));
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(223217));
|
||||
caster.statusEffects.RemoveStatusEffect(223215);
|
||||
caster.statusEffects.RemoveStatusEffect(223216);
|
||||
caster.statusEffects.RemoveStatusEffect(223217);
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
--If caster has any of the power surge effects
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223212) or caster.statusEffects.GetStatusEffectById(223213) or caster.statusEffects.GetStatusEffectById(223214);
|
||||
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
@ -12,18 +12,21 @@ end;
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--QS gives 300 TP by default.
|
||||
skill.statusMagnitude = 300;
|
||||
--I'm assuming that with raging strikes, that increases to 500.
|
||||
--and traited that increases again to 750 (or 450 without RS)
|
||||
if caster.statusEffects.HasStatusEffect(223221) then
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(223221));
|
||||
skill.statusMagnitude = 500;
|
||||
end
|
||||
|
||||
--27241: Enhanced Quelling Strike: Increases TP gained from QS by 50%
|
||||
if caster.HasTrait(27241) then
|
||||
skill.statusMagnitude = skill.statusMagnitude * 1.5;
|
||||
end
|
||||
|
||||
--When raging strikes is active, Quelling Strikes removes it and immediately restores 100 TP for each tier ofr Raging Strikes.
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223221)
|
||||
|
||||
if buff ~= nil then
|
||||
skill.tpCost = -100 * (buff.GetTier() - 1);
|
||||
--QS doesn't send a message
|
||||
caster.statusEffects.RemoveStatusEffect(buff);
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
@ -6,14 +6,24 @@ function onAbilityPrepare(caster, target, ability)
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
ability.statusMagnitude = 100;
|
||||
--27243: Enhanced Raging Strike: Increases effect of Raging Strike by 50%
|
||||
if caster.HasTrait(27241) then
|
||||
ability.statusTier = 2;
|
||||
ability.statusMagnitude = ability.statusMagnitude * 1.5;
|
||||
end
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
--If caster has raging strike, remove it and send message, otherwise apply it.
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223221)
|
||||
|
||||
if buff ~= nil then
|
||||
--30329: Your Raging Strike removes your Raging Strike effect.
|
||||
local remAction = caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
actionContainer.AddAction(remAction);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
@ -14,6 +14,18 @@ function onAbilityStart(caster, target, ability)
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
--223207: Berserk
|
||||
--223208: Rampage
|
||||
--Remove Berserk effect. I'm assuming no message is sent like LNC surges
|
||||
caster.statusEffects.RemoveStatusEffect(223207);
|
||||
|
||||
--If caster has rampage already, remove it and send a message.
|
||||
local buff = caster.statusEffects.GetStatusEffectById(223208)
|
||||
|
||||
if buff ~= nil then
|
||||
caster.statusEffects.RemoveStatusEffect(buff, actionContainer, 30329);
|
||||
else
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end
|
||||
end;
|
@ -12,9 +12,9 @@ end;
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Is this before or after status is gained?
|
||||
--Will probably need to switch to a flag for this because it might include more than just these 3 effects.
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(228011));
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(228013));
|
||||
actionContainer.AddAction(caster.statusEffects.RemoveStatusEffectForBattleAction(228021));
|
||||
caster.statusEffects.RemoveStatusEffect(228011, actionContainer, 30329);
|
||||
caster.statusEffects.RemoveStatusEffect(228013, actionContainer, 30329);
|
||||
caster.statusEffects.RemoveStatusEffect(228021, actionContainer, 30329);
|
||||
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
17
data/scripts/commands/ability/voice_of_the_dragon.lua
Normal file
17
data/scripts/commands/ability/voice_of_the_dragon.lua
Normal file
@ -0,0 +1,17 @@
|
||||
require("global");
|
||||
require("ability");
|
||||
|
||||
function onAbilityPrepare(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onAbilityStart(caster, target, ability)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
17
data/scripts/commands/autoattack/default.lua
Normal file
17
data/scripts/commands/autoattack/default.lua
Normal file
@ -0,0 +1,17 @@
|
||||
require("global");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate ws damage
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
@ -2,7 +2,7 @@ require("global");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sssss",
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
Adds experience <qty> to player or <targetname>.
|
||||
@ -11,18 +11,19 @@ Adds experience <qty> to player or <targetname>.
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, commandId, animationId, textId, effectId, amount)
|
||||
function onTrigger(player, argc, animType, modelAnim, effectId)
|
||||
local sender = "[battleaction] ";
|
||||
|
||||
if player then
|
||||
cid = tonumber(commandId) or 0;
|
||||
aid = tonumber(animationId) or 0;
|
||||
tid = tonumber(textId) or 0;
|
||||
print(effectId)
|
||||
eid = tonumber(effectId) or 0;
|
||||
amt = tonumber(amount) or 0;
|
||||
|
||||
player:DoBattleActionAnimation(cid, aid, tid, eid, amt);
|
||||
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
|
||||
if player and actor then
|
||||
aid = tonumber(animType) or 0
|
||||
mid = tonumber(modelAnim) or 0
|
||||
eid = tonumber(effectId) or 0
|
||||
local id = bit32.lshift(aid, 24);
|
||||
id = bit32.bor(id, bit32.lshift(mid, 12));
|
||||
id = bit32.bor(id, eid)
|
||||
print((tonumber(id)))
|
||||
player:DoBattleAction(30301, id);
|
||||
else
|
||||
print(sender.."unable to add experience, ensure player name is valid.");
|
||||
end;
|
||||
|
@ -20,16 +20,22 @@ function onTrigger(player, argc, slot, wId, eId, vId, cId)
|
||||
vId = tonumber(vId) or 0;
|
||||
cId = tonumber(cId) or 0;
|
||||
|
||||
if player and argc > 0 then
|
||||
if argc > 2 then
|
||||
player:GraphicChange(slot, wId, eId, vId, cId);
|
||||
player:SendMessage(messageID, sender, string.format("Changing appearance on slot %u", slot));
|
||||
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
|
||||
if player and actor then
|
||||
if player and argc > 0 then
|
||||
|
||||
-- player.appearanceIds[5] = player.achievementPoints;
|
||||
if argc > 2 then
|
||||
actor:GraphicChange(slot, wId, eId, vId, cId);
|
||||
--player.achievementPoints = player.achievementPoints + 1;
|
||||
actor:SendMessage(messageID, sender, string.format("Changing appearance on slot %u", slot));
|
||||
actor:SendMessage(messageID, sender, string.format("points %u", player.appearanceIds[5]));
|
||||
else
|
||||
actor.appearanceIds[slot] = wId;
|
||||
end
|
||||
actor:SendAppearance();
|
||||
else
|
||||
player:GraphicChange(slot, wId);
|
||||
end
|
||||
player:SendAppearance();
|
||||
else
|
||||
player:SendMessage(messageID, sender, "No parameters sent! Usage: "..properties.description);
|
||||
player:SendMessage(messageID, sender, "No parameters sent! Usage: "..properties.description);
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
135
data/scripts/commands/gm/spawnnpc.lua
Normal file
135
data/scripts/commands/gm/spawnnpc.lua
Normal file
@ -0,0 +1,135 @@
|
||||
require("global");
|
||||
require("modifiers");
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sss",
|
||||
description =
|
||||
[[
|
||||
yolo
|
||||
]],
|
||||
}
|
||||
|
||||
local modelIds =
|
||||
{
|
||||
["titan"] = 2107401,
|
||||
["ifrit"] = 2107302,
|
||||
["ifrithotair"] = 2207310,
|
||||
["nail"] = 2207307,
|
||||
["garuda"] = 2209501,
|
||||
["garudahelper"] = 2209516,
|
||||
["plume"] = 2209502,
|
||||
["monolith"] = 2209506,
|
||||
["mog"] = 2210408,
|
||||
["nael"] = 2210902,
|
||||
["meteor"] = 2210903,
|
||||
["cactuar"] = 2200905,
|
||||
["morbol"] = 2201002,
|
||||
["drake"] = 2202209,
|
||||
["ogre"] = 2202502,
|
||||
["treant"] = 2202801,
|
||||
["couerl"] = 2203203,
|
||||
["wyvern"] = 2203801,
|
||||
["clouddragon"] = 2208101,
|
||||
["golem"] = 2208901,
|
||||
["atomos"] = 2111002,
|
||||
["chimera"] = 2308701,
|
||||
["salamander"] = 2201302,
|
||||
["ahriman"] = 2201704,
|
||||
["rat"] = 9111275,
|
||||
["bat"] = 2104113,
|
||||
["chigoe"] = 2105613,
|
||||
["hedgemole"] = 2105709,
|
||||
["gnat"] = 2200604,
|
||||
["bird"] = 2201208,
|
||||
["puk"] = 2200112,
|
||||
["angler"] = 2204507,
|
||||
["snurble"] = 2204403,
|
||||
["lemur"] = 2200505,
|
||||
["doe"] = 2200303,
|
||||
["hippogryph"] = 2200405,
|
||||
["trap"] = 2202710,
|
||||
["goat"] = 2102312,
|
||||
["dodo"] = 9111263,
|
||||
["imp"] = 2202607,
|
||||
["spriggan"] = 2290036,
|
||||
["cyclops"] = 2210701,
|
||||
["raptor"] = 2200205,
|
||||
["wolf"] = 2201429,
|
||||
["fungus"] = 2205907,
|
||||
["basilisk"] = 2200708,
|
||||
["bomb"] = 2201611,
|
||||
["jellyfish"] = 2105415,
|
||||
["slug"] = 2104205,
|
||||
["coblyn"] = 2202103,
|
||||
["ghost"] = 2204317,
|
||||
["crab"] = 2107613,
|
||||
["yarzon"] = 2205520,
|
||||
["elemental"] = 2105104,
|
||||
["boar"] = 2201505,
|
||||
["kobold"] = 2206629,
|
||||
["sylph"] = 2206702,
|
||||
["ixal"] = 2206434,
|
||||
["amaljaa"] = 2206502,
|
||||
["qiqirn"] = 2206304,
|
||||
["apkallu"] = 2202902,
|
||||
["goobbue"] = 2103301,
|
||||
["garlean"] = 2207005,
|
||||
["flan"] = 2103404,
|
||||
["swarm"] = 2105304,
|
||||
["goblin"] = 2210301,
|
||||
["buffalo"] = 2200802,
|
||||
["skeleton"] = 2201902,
|
||||
["zombie"] = 2201807,
|
||||
["toad"] = 2203107,
|
||||
["wisp"] = 2209903,
|
||||
["juggernaut"] = 6000243,
|
||||
["mammet"] = 6000246,
|
||||
["lantern"] = 1200329,
|
||||
["helper"] = 2310605,
|
||||
["diremite"] = 2101108,
|
||||
["gong"] = 1200050,
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, name, width, height, blockCount)
|
||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local sender = "spawnnpc";
|
||||
|
||||
if player and (modelIds[name] != nil) then
|
||||
print("t")
|
||||
local pos = player:GetPos();
|
||||
local x = tonumber(pos[0]);
|
||||
local y = tonumber(pos[1]);
|
||||
local z = tonumber(pos[2]);
|
||||
local rot = tonumber(pos[3]);
|
||||
local zone = pos[4];
|
||||
local w = tonumber(width) or 0;
|
||||
|
||||
local h = tonumber(height) or 0;
|
||||
local blocks = tonumber(blockCount) or 0;
|
||||
for b = 0, blocks do
|
||||
for i = 0, w do
|
||||
for j = 0, h do
|
||||
local actor = player.GetZone().SpawnActor(2104001, 'ass', x + (i * 1), y, z + (j * 1), rot, 0, 0, true);
|
||||
actor.ChangeNpcAppearance(modelIds[name]);
|
||||
actor.SetMaxHP(5000);
|
||||
actor.SetHP(5000);
|
||||
actor.SetMod(modifiersGlobal.HasShield, 1);
|
||||
actor.SetMod(modifiersGlobal.AttackRange, 3);
|
||||
actor.SetMod(modifiersGlobal.Speed, 5);
|
||||
actor.SetMobMod(mobModifiersGlobal.Roams, 1);
|
||||
actor.SetMobMod(mobModifiersGlobal.RoamDelay, 3);
|
||||
actor.moveState = 3;
|
||||
end;
|
||||
end;
|
||||
|
||||
x = x + 500
|
||||
end;
|
||||
return;
|
||||
elseif player and (modelIds[name] == nil) then
|
||||
player:SendMessage(messageID, sender, "That name isn't valid");
|
||||
else
|
||||
print("I don't even know how you managed this")
|
||||
end
|
||||
|
||||
return;
|
||||
end;
|
24
data/scripts/commands/gm/vdragon.lua
Normal file
24
data/scripts/commands/gm/vdragon.lua
Normal file
@ -0,0 +1,24 @@
|
||||
require("global");
|
||||
require("utils");
|
||||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sssss",
|
||||
description =
|
||||
[[
|
||||
Angle stuff!
|
||||
!anglestuff
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc)
|
||||
local sender = "[battleaction] ";
|
||||
|
||||
if player and player.currentTarget then
|
||||
local actor = GetWorldManager():GetActorInWorld(player.currentTarget) or nil;
|
||||
actor.Ability(23459, actor.actorId);
|
||||
|
||||
else
|
||||
print(sender.."unable to add experience, ensure player name is valid.");
|
||||
end;
|
||||
end;
|
@ -12,7 +12,7 @@ end;
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
action.statusMagnitude = 15;
|
||||
skill.statusMagnitude = 15;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
@ -12,22 +12,16 @@ end;
|
||||
--Increased damage and conversion to single target
|
||||
function onCombo(caster, target, spell)
|
||||
spell.aoeType = 0;
|
||||
spell.potency = spell.potency * 1.5;
|
||||
spell.basePotency = spell.basePotency * 1.5;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Dispels an effect on each target.
|
||||
local effects = target.statusEffects.GetStatusEffectsByFlag2(16); --lose on dispel
|
||||
if effects != nil then
|
||||
target.statusEffects.RemoveStatusEffect(effects[0]);
|
||||
end;
|
||||
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
--Dispels an effect on each target.
|
||||
target.statusEffects.RemoveStatusEffect(GetRandomEffectByFlag(8), actionContainer, 30336);
|
||||
end;
|
@ -1,5 +1,6 @@
|
||||
require("global");
|
||||
require("magic");
|
||||
require("modifiers");
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
@ -14,7 +15,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--2.5 HP per Healing Magic Potency
|
||||
--0.5 HP per MND
|
||||
--this is WITH WHM AF chest, don't know formula without AF. AF seems to increase healing by 7-10%?
|
||||
action.amount = 2.5 * caster.GetMod(modifiersGlobal.MagicHeal) + 0.5 * (caster.GetMod(modifiersGlobal.Mind));
|
||||
action.amount = 2.5 * caster.GetMod(modifiersGlobal.HealingMagicPotency) + 0.5 * (caster.GetMod(modifiersGlobal.Mind));
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
@ -30,7 +30,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
hpPerMND = 0.25;
|
||||
end
|
||||
|
||||
action.amount = hpPerHMP * caster.GetMod(modifiersGlobal.MagicHeal) + hpPerMND * (caster.GetMod(modifiersGlobal.Mind));
|
||||
action.amount = hpPerHMP * caster.GetMod(modifiersGlobal.HealingMagicPotency) + hpPerMND * (caster.GetMod(modifiersGlobal.Mind));
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
@ -11,7 +11,7 @@ end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
action.amount = 5000;-- skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
@ -12,6 +12,7 @@ end;
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
skill.statusMagnitude = 20;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
@ -24,6 +24,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
if caster != target then
|
||||
caster.AddHP(action.amount / 2)
|
||||
--33012: You recover [amount] HP.
|
||||
actionContainer.AddHPAction(caster.actorId, 33012, (action.amount / 2));
|
||||
actionContainer.AddHPAbsorbAction(caster.actorId, 33012, (action.amount / 2));
|
||||
end
|
||||
end;
|
@ -12,7 +12,7 @@ end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--Actual amount of def/mdef will be calculated in OnGain
|
||||
skill.statusMagnitude = caster.GetMod(modifiersGlobal.MagicEnhancePotency);
|
||||
skill.statusMagnitude = caster.GetMod(modifiersGlobal.EnhancementMagicPotency);
|
||||
|
||||
--27365: Enhanced Protect: Increases magic defense gained from Protect.
|
||||
if caster.HasTrait(27365) then
|
||||
|
@ -25,7 +25,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
intercept = intercept * 1.25;
|
||||
end
|
||||
|
||||
local regenTick = (slope * caster.GetMod(modifiersGlobal.MagicEnhancePotency)) + intercept) + 1;
|
||||
local regenTick = (slope * caster.GetMod(modifiersGlobal.EnhancementMagicPotency)) + intercept + 1;
|
||||
|
||||
spell.statusMagnitude = regenTick;
|
||||
|
||||
|
@ -12,7 +12,7 @@ end;
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate damage
|
||||
action.amount = skill.basePotency;
|
||||
action.statusMagnitude = 50;
|
||||
skill.statusMagnitude = 50;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
@ -1,5 +1,6 @@
|
||||
require("global");
|
||||
require("magic");
|
||||
require("modifiers")
|
||||
|
||||
function onMagicPrepare(caster, target, spell)
|
||||
return 0;
|
||||
@ -19,7 +20,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
hpPerPoint = 1.96;
|
||||
end
|
||||
|
||||
spell.statusMagnitude = hpPerPoint * caster.GetMod(modifiersGlobal.MagicEnhancePotency);
|
||||
skill.statusMagnitude = hpPerPoint * caster.GetMod(modifiersGlobal.EnhancementMagicPotency);
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
35
data/scripts/commands/magic/swiftsong.lua
Normal file
35
data/scripts/commands/magic/swiftsong.lua
Normal file
@ -0,0 +1,35 @@
|
||||
require("global");
|
||||
require("magic");
|
||||
|
||||
function onMagicPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onMagicStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--223224: Swiftsong
|
||||
--223254: Ballad Of Magi
|
||||
--223256: Minuet of Rigor
|
||||
--If target has one of these effects that was from this caster, remove it
|
||||
local oldSong;
|
||||
local paeon = target.statusEffects.GetStatusEffectById(223255);
|
||||
local ballad = target.statusEffects.GetStatusEffectById(223254);
|
||||
local minuet = target.statusEffects.GetStatusEffectById(223256);
|
||||
if paeon and paeon.GetSource() == caster then
|
||||
oldSong = paeon;
|
||||
elseif ballad and ballad.GetSource() == caster then
|
||||
oldSong = ballad;
|
||||
elseif minuet and minuet.GetSource() == caster then
|
||||
oldSong = minuet;
|
||||
end
|
||||
|
||||
if oldSong then
|
||||
target.statusEffects.RemoveStatusEffect(oldSong);
|
||||
end
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
end;
|
@ -12,10 +12,7 @@ end;
|
||||
--Dispel
|
||||
--Does dispel have a text id?
|
||||
function onCombo(caster, target, skill)
|
||||
local effects = target.statusEffects.GetStatusEffectsByFlag(16); --lose on dispel
|
||||
if effects != nil then
|
||||
target.statusEffects.RemoveStatusEffect(effects[0]);
|
||||
end;
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
@ -25,6 +22,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
if skill.isCombo then
|
||||
target.statusEffects.RemoveStatusEffect(GetRandomEffectByFlag(8), actionContainer, 30336);
|
||||
end
|
||||
end;
|
@ -1,5 +1,6 @@
|
||||
require("global");
|
||||
require("weaponskill");
|
||||
require("utils");
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
@ -16,7 +17,7 @@ end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate ws damage
|
||||
action.amount = skill.basePotency;
|
||||
action.amount = 5000;--skill.basePotency;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
@ -21,6 +21,9 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
--Status only seems to apply on the first hit
|
||||
if(action.ActionLanded() and action.hitNum == 1) then
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
end
|
||||
end;
|
@ -1,20 +1,16 @@
|
||||
require("global");
|
||||
require("weaponskill");
|
||||
require("modifiers")
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
function onSkillStart(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
--Increased crit rate
|
||||
function onCombo(caster, target, skill)
|
||||
--Get Berserk statuseffect
|
||||
local berserk = caster.statusEffects.GetStatusEffectById(223160);
|
||||
|
||||
--if it isn't nil, remove the AP and Defense mods and reset extra to 0, increase potency
|
||||
--if it isn't nil, remove the AP and Defense mods and reset extra to 0, increase accuracy
|
||||
if berserk != nil then
|
||||
local apPerHit = 20;
|
||||
local defPerHit = 20;
|
||||
@ -23,14 +19,20 @@ function onCombo(caster, target, skill)
|
||||
apPerHit = 24;
|
||||
end
|
||||
|
||||
attacker.SubtractMod(modifiersGlobal.Attack, apPerHit * berserk.GetExtra());
|
||||
attacker.Add(modifiersGlobal.Defense, defPerHit * berserk.GetExtra());
|
||||
caster.SubtractMod(modifiersGlobal.Attack, apPerHit * berserk.GetExtra());
|
||||
caster.Add(modifiersGlobal.Defense, defPerHit * berserk.GetExtra());
|
||||
|
||||
berserk.SetExtra(0);
|
||||
|
||||
--This is about 50% crit. Don't know if that's what it gave on retail but seems kind of reasonable
|
||||
skill.critRateBonus = 300;
|
||||
skill.accuracyModifier = 50;
|
||||
end;
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
--Increased crit rate
|
||||
function onCombo(caster, target, skill)
|
||||
--This is about 25% crit. Don't know if that's what it gave on retail but seems kind of reasonable
|
||||
skill.critRateBonus = 200;
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
|
@ -15,7 +15,7 @@ end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--calculate ws damage
|
||||
skill.Potency = 100;
|
||||
skill.basePotency = 100;
|
||||
|
||||
--DoAction handles rates, buffs, dealing damage
|
||||
action.DoAction(caster, target, skill, actionContainer);
|
||||
|
@ -1,11 +1,27 @@
|
||||
require("global");
|
||||
require("weaponskill");
|
||||
require("modifiers")
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
end;
|
||||
|
||||
--Resets rampage to increase damage
|
||||
function onSkillStart(caster, target, skill)
|
||||
--Get Rampage statuseffect
|
||||
local rampage = caster.statusEffects.GetStatusEffectById(223208);
|
||||
|
||||
--if it isn't nil, remove the AP and Defense mods and reset extra to 0, increase potency
|
||||
if rampage != nil then
|
||||
local parryPerDT = 20;
|
||||
local delayMsPerDT = 100;
|
||||
|
||||
caster.SubtractMod(modifiersGlobal.Parry, parryPerDT * rampage.GetExtra());
|
||||
caster.AddMod(modifiersGlobal.Delay, delayMsPerDT * rampage.GetExtra());
|
||||
|
||||
rampage.SetExtra(0);
|
||||
skill.basePotency = skill.basePotency * 1.5;
|
||||
end;
|
||||
return 0;
|
||||
end;
|
||||
|
||||
@ -15,6 +31,10 @@ function onCombo(caster, target, skill)
|
||||
end;
|
||||
|
||||
function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
if target.target == caster then
|
||||
skill.statusId = 223015
|
||||
end;
|
||||
|
||||
--calculate ws damage
|
||||
action.amount = skill.basePotency;
|
||||
|
||||
@ -23,4 +43,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
|
||||
--Try to apply status effect
|
||||
action.TryStatus(caster, target, skill, actionContainer, true);
|
||||
|
||||
skill.statusId = 0;
|
||||
end;
|
@ -28,7 +28,7 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
--1.21: Equation used to calculate amount of MP adjusted.
|
||||
--fug
|
||||
--This might mean max MP isn't involved and the difference was between patches. need to recheck videos
|
||||
if action.GetHitType() > HitType.Evade and (action.param == HitDirection.Right or action.param == HitDirection.Left) then
|
||||
if action.ActionLanded() and (action.param == HitDirection.Right or action.param == HitDirection.Left) then
|
||||
local mpToReturn = 0;
|
||||
|
||||
if skill.isCombo then
|
||||
@ -39,6 +39,6 @@ function onSkillFinish(caster, target, skill, action, actionContainer)
|
||||
|
||||
caster.AddMP(mpToReturn);
|
||||
--30452: You recover x MP.
|
||||
actionContainer.AddMPAction(caster.actorId, 30452, mpToReturn);
|
||||
actionContainer.AddMPAbsorbAction(caster.actorId, 30452, mpToReturn);
|
||||
end
|
||||
end;
|
@ -1,5 +1,6 @@
|
||||
require("global");
|
||||
require("weaponskill");
|
||||
require("modifiers")
|
||||
|
||||
function onSkillPrepare(caster, target, skill)
|
||||
return 0;
|
||||
@ -23,8 +24,8 @@ function onCombo(caster, target, skill)
|
||||
apPerHit = 24;
|
||||
end
|
||||
|
||||
attacker.SubtractMod(modifiersGlobal.Attack, apPerHit * berserk.GetExtra());
|
||||
attacker.Add(modifiersGlobal.Defense, defPerHit * berserk.GetExtra());
|
||||
caster.SubtractMod(modifiersGlobal.Attack, apPerHit * berserk.GetExtra());
|
||||
caster.Add(modifiersGlobal.Defense, defPerHit * berserk.GetExtra());
|
||||
|
||||
berserk.SetExtra(0);
|
||||
skill.basePotency = skill.basePotency * 1.5;
|
||||
|
@ -3,17 +3,17 @@ require("utils")
|
||||
|
||||
--Forces a full block (0 damage taken)
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--If action hit from the rear and is a weaponskill ation
|
||||
--Can aegis boon block rear attacks or non-physical attacks?
|
||||
action.blockRate = 100.0;
|
||||
end;
|
||||
|
||||
--Heals for the amount of HP blocked, up to a certain point. I don't know what determines the cap but it seems to be 703 at level 50. Unsure if it scales down based on level, dlvl, or if that's an arbitrary cap added.
|
||||
function onBlock(effect, attacker, defender, action, actionContainer)
|
||||
function onBlock(effect, attacker, defender, skill, action, actionContainer)
|
||||
--Amount blocked
|
||||
local absorbAmount = math.Clamp(action.amountMitigated, 0, 703);
|
||||
|
||||
--33008: You recover x HP from Aegis Boon
|
||||
defender.AddHP(absorbAmount);
|
||||
actionContainer.AddHPAction(defender.actorId, 33008, absorbAmount);
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer);
|
||||
end;
|
@ -1,10 +1,10 @@
|
||||
require("modifiers")
|
||||
|
||||
--Doesn't do flat damage. 20 on Lv 50 Truffle Hog, 11 on Coincounter, 7 on nael hard, 19 on 52 fachan
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end;
|
@ -1,10 +1,10 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Only one song per bard can be active, need to figure out a good way to do this
|
||||
owner.AddMod(modifiersGlobal.Refresh, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Refresh, effect.GetMagnitude());
|
||||
end;
|
@ -8,6 +8,6 @@ end;
|
||||
function onCommandFinish(effect, owner, skill, actionContainer)
|
||||
--27259: Light Shot
|
||||
if skill.id == 27259 then
|
||||
actionContainer.AddAction(owner.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
@ -1,3 +1,8 @@
|
||||
require("modifiers")
|
||||
|
||||
--BV doesn't really do anything i think
|
||||
--BV doesn't really do anything i think
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
@ -1,13 +1,12 @@
|
||||
require("modifiers");
|
||||
|
||||
function onGain(owner, effect)
|
||||
owner.statusEffects.RemoveStatusEffect(223208);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end
|
||||
|
||||
--Increases attack power and reduces defense with each successful attack
|
||||
--Does this include weaponskills?
|
||||
--Is this on every hit or every succesfull skill useage?
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
--Trait increases effect by 20%. Does this include the reduced defense,
|
||||
--does this increase the cap or the rate at which you get AP or both?
|
||||
|
||||
@ -32,7 +31,7 @@ function onHit(effect, attacker, defender, action, actionContainer)
|
||||
end
|
||||
end;
|
||||
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
local apPerHit = 20;
|
||||
local defPerHit = 20;
|
||||
|
||||
@ -45,7 +44,7 @@ function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
effect.SetExtra(0);
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local apPerHit = 20;
|
||||
local defPerHit = 20;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
require("modifiers");
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
@ -1,9 +1,9 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
@ -4,12 +4,12 @@ require("battleutils")
|
||||
--Forces crit of a single WS action from rear.
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--If action hit from the rear and is a weaponskill ation
|
||||
if (action.param == HitDirection.Rear and action.commandType == CommandType.WeaponSkill) then
|
||||
if (action.param == HitDirection.Rear and skill.GetCommandType() == CommandType.WeaponSkill) then
|
||||
--Set action's crit rate to 100%
|
||||
action.critRate = 100.0;
|
||||
end
|
||||
|
||||
--Remove status and add message
|
||||
actionsList.AddAction(target.statusEffects.RemoveForBattleAction(effect));
|
||||
target.statusEffects.RemoveStatusEffect(effect, actionContainer);
|
||||
end;
|
||||
|
||||
|
17
data/scripts/effects/blindside2.lua
Normal file
17
data/scripts/effects/blindside2.lua
Normal file
@ -0,0 +1,17 @@
|
||||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Forces crit of a single WS action from rear.
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--If action hit from the rear and is a weaponskill ation
|
||||
if (action.param == HitDirection.Rear and skill.GetCommandType() == CommandType.WeaponSkill) then
|
||||
--Set action's crit rate to 100%
|
||||
action.critRate = 100.0;
|
||||
end
|
||||
|
||||
--Figure out INT bonus for tier 2
|
||||
|
||||
--Remove status and add message
|
||||
target.statusEffects.RemoveStatusEffect(effect, actionContainer);
|
||||
end;
|
||||
|
@ -2,15 +2,13 @@
|
||||
--Based on a few videos it seems like it heals for 0.5% of max MP every second, traited. This is an early guess but it seems correct
|
||||
--Untraited is less clear. It could be 0.25%, 0.30%, or 0.40%. Guessing it's 0.30
|
||||
|
||||
function onTick(owner, effect)
|
||||
function onTick(owner, effect, actionContainer)
|
||||
local percentPerSecond = 0.0030;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
percentPerSecond = 0.005;
|
||||
end
|
||||
|
||||
print(effect.GetExtra());
|
||||
|
||||
local amount = percentPerSecond * owner.GetMaxMP() + 0.25;
|
||||
effect.SetExtra(effect.GetExtra() + amount);
|
||||
if effect.GetExtra() >= effect.GetMagnitude() then
|
||||
|
@ -1,3 +1,3 @@
|
||||
function onLose(target, effect)
|
||||
target:SetProc(1, false);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(1, false);
|
||||
end;
|
@ -3,7 +3,7 @@ require("battleUtils")
|
||||
--Takes 10% of hp rounded down when using a weaponskill
|
||||
--Random guess, but increases damage by 10% (12.5% traited)?
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
if skill.commandType == CommandType.Weaponskill then
|
||||
if skill.GetCommandType() == CommandType.Weaponskill then
|
||||
local hpToRemove = math.floor(caster.GetHP() * 0.10);
|
||||
local modifier = 1.10;
|
||||
|
||||
@ -12,9 +12,9 @@ function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
end
|
||||
|
||||
action.amount = action.amount * modifier;
|
||||
caster.DelHP(hpToRemove);
|
||||
caster.DelHP(hpToRemove, actionContainer);
|
||||
|
||||
--Remove status and add message
|
||||
actionContainer.AddAction(target.statusEffects.RemoveForBattleAction(effect));
|
||||
--Remove status and add message
|
||||
caster.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, true);
|
||||
end
|
||||
end;
|
@ -1,7 +1,8 @@
|
||||
require("modifiers");
|
||||
require("battleutils")
|
||||
|
||||
--Absorb HP on next WS or ability
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
|
||||
--1.21: Absorb HP amount no longer affected by player VIT rating.
|
||||
--Bloodbath seems based on both defener and attacker's stats, even after 1.21.
|
||||
@ -11,14 +12,14 @@ function onHit(effect, attacker, defender, action, actionContainer)
|
||||
--Possibly magic resist? Slashing resist?
|
||||
|
||||
--For now using 1.0 as baseline since that seems to be the average
|
||||
if action.commandType == CommandType.Weaponskill or action.commandType == CommandType.Ability then
|
||||
if skill.GetCommandType() == CommandType.Weaponskill or skill.GetCommandType() == CommandType.Ability then
|
||||
local absorbModifier = 1.0
|
||||
local absorbAmount = action.amount * absorbModifier;
|
||||
|
||||
attacker.AddHP(absorbAmount);
|
||||
--30332: You absorb hp from target
|
||||
actionContainer.AddHPAction(defender.actorId, 30332, absorbAmount)
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, absorbAmount)
|
||||
--Bloodbath is lost after absorbing hp
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect,actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
@ -8,13 +8,14 @@ require("modifiers")
|
||||
--Bloodletter is apparently impacted by PIE
|
||||
--http://forum.square-enix.com/ffxiv/threads/35795-STR-DEX-PIE-ATK-Testing/page2
|
||||
--Chance to land is also impacted by PIE
|
||||
function onGain(owner, effect)
|
||||
--This is because PIE increases Enfeebling Magic Potency which impacts additional effect damage and land rates
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, 15);
|
||||
end
|
||||
|
||||
--Additional damage is 570 at level 50
|
||||
--https://ffxiv.gamerescape.com/w/index.php?title=Bloodletter&oldid=298020
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, 15);
|
||||
owner.DelHP(570);
|
||||
owner.DelHP(570, actionContainer);
|
||||
end
|
||||
|
@ -1,10 +1,10 @@
|
||||
require("modifiers")
|
||||
|
||||
--Bloodletter2 is the uncomboed version of Bloodletter. It doesn't deal any additional damage when it falls off but has the same tick damage
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, 15);
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, 15);
|
||||
end
|
||||
|
@ -1,12 +1,12 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Multiples Attack Magic Potency by 1.2 and Healing Magic Potency by 0.8
|
||||
target.SetMod(modifiersGlobal.MagicAttack, target.GetMod(modifiersGlobal.MagicAttack) * 1.2);
|
||||
target.SetMod(modifiersGlobal.MagicHeal, target.GetMod(modifiersGlobal.MagicHeal) * 0.8);
|
||||
owner.MultiplyMod(modifiersGlobal.AttackMagicPotency, 1.2);
|
||||
owner.MultiplyMod(modifiersGlobal.HealingMagicPotency, 0.8);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SetMod(modifiersGlobal.MagicAttack, target.GetMod(modifiersGlobal.MagicAttack) / 1.2);
|
||||
target.SetMod(modifiersGlobal.MagicHeal, target.GetMod(modifiersGlobal.MagicHeal) / 0.8);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.DivideMod(modifiersGlobal.AttackMagicPotency, 1.2);
|
||||
owner.DivideMod(modifiersGlobal.HealingMagicPotency, 0.8);
|
||||
end;
|
@ -1,10 +1,10 @@
|
||||
require("modifiers")
|
||||
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
local enmity = action.enmity;
|
||||
action.enmity = 0;
|
||||
|
||||
defender.hateContainer.UpdateHate(effect.GetSource(), enmity);
|
||||
--Does collusion send a message?
|
||||
actionContainer.AddAction(attacker.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end;
|
@ -1,3 +1,6 @@
|
||||
function onLose(target, effect)
|
||||
target:SetCombos();
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetCombos();
|
||||
end;
|
@ -1,7 +1,7 @@
|
||||
require("modifiers")
|
||||
|
||||
--Enahnced Cover: Restores 25% of damage taken as MP. Does not send a message
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
if effect.GetTier() == 2 then
|
||||
defender.AddMP(0.25 * action.amount);
|
||||
end
|
||||
|
@ -5,9 +5,9 @@ require("battleutils")
|
||||
--There isn't really any information on this, but due to the fact it falls off BEFORE the target is hit,
|
||||
--I'm assuming it increases a spell's accuracy modifier instead of giving actual magic accuracy
|
||||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
if skill.actionType == ActionType.Magic then
|
||||
if skill.GetActionType() == ActionType.Magic then
|
||||
--50 is random guess.
|
||||
skill.accuracyModifier = skill.accuracyModifier + 50;
|
||||
actionContainer.AddAction(owner.RemoveStatusEffectForBattleAction(effect));
|
||||
owner.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
@ -5,12 +5,13 @@ require("battleutils")
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--Evade single ranged or magic attack
|
||||
--Traited allows for physical attacks
|
||||
if target.allegiance != caster.allegiance and (skill.isRanged or action.actionType == ActionType.Magic) then
|
||||
if target.allegiance != caster.allegiance and (skill.isRanged or skill.GetActionType() == ActionType.Magic) then
|
||||
--Unsure if decoy forces a miss/resist or if this is the one case where the evade hittype is used
|
||||
--Set action's hit rate to 0
|
||||
action.hirRate = 0.0;
|
||||
|
||||
action.hitRate = 0.0;
|
||||
action.resistRate = 750;
|
||||
--Remove status and add message
|
||||
actionContainer.AddAction(target.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
|
||||
end;
|
@ -5,11 +5,12 @@ require("battleutils")
|
||||
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
||||
--Evade single ranged or magic attack
|
||||
--Traited allows for physical attacks
|
||||
if target.allegiance != caster.allegiance and (skill.isRanged or action.actionType == ActionType.Magic or action.actionType == ActionType.Physical) then
|
||||
if target.allegiance != caster.allegiance and (skill.isRanged or skill.GetActionType() == ActionType.Magic or skill.GetActionType() == ActionType.Physical) then
|
||||
--Set action's hit rate to 0
|
||||
action.hirRate = 0.0;
|
||||
action.hitRate = 0.0;
|
||||
action.resistRate = 400;
|
||||
--Remove status and add message
|
||||
actionContainer.AddAction(target.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
|
||||
end;
|
@ -1,5 +1,5 @@
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
@ -1,9 +1,9 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetMagnitude());
|
||||
end
|
||||
|
@ -1,9 +1,9 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regen, effect.GetMagnitude());
|
||||
end
|
||||
|
@ -1,18 +1,18 @@
|
||||
require("modifiers")
|
||||
|
||||
--Increases block rate by 100%
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RawBlockRate, 100);
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RawBlockRate, 100);
|
||||
end
|
||||
|
||||
--Applys Divine Regen to party in range when healed by cure or cura
|
||||
function onHealed(caster, target, effect, skill, action, actionContainer)
|
||||
function onHealed(effect, caster, target, skill, action, actionContainer)
|
||||
-- cure cura
|
||||
if (skill.id == 27346 or skill.id == 27347) and (caster != owner) then
|
||||
if (skill.id == 27346 or skill.id == 27347) and (caster != target) then
|
||||
local regenDuration = 30;
|
||||
--Apparently heals for 85 without AF, 113 with. Unsure if these can be improved with stats
|
||||
local magnitude = 85
|
||||
@ -23,9 +23,8 @@ function onHealed(caster, target, effect, skill, action, actionContainer)
|
||||
end
|
||||
|
||||
--For each party member in range, add divine regen
|
||||
for chara in owner.GetPartyMembersInRange(8) do
|
||||
local addAction = chara.statusEffects.AddStatusForBattleAction(223264, effect.GetTier(), magnitude, regenDuration);
|
||||
actionContainer.AddAction(addAction);
|
||||
for chara in target.GetPartyMembersInRange(8) do
|
||||
chara.statusEffects.AddStatusEffect(223264, effect.GetTier(), magnitude, regenDuration, actionContainer);
|
||||
end
|
||||
end
|
||||
end;
|
@ -7,8 +7,8 @@ require("battleutils")
|
||||
--It still shows the enemy's "Enemy used [command]." message but there is no 0 damage dealt message.
|
||||
--Don't know how this works with multi-hit attacks or even how it works with stoneskin or other buffs that respond to damage
|
||||
-- I dont really know how this should work...
|
||||
function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
if action.actionType == ActionType.Physical then
|
||||
function onDamageTaken(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetActionType() == ActionType.Physical then
|
||||
--maybe this works?
|
||||
local absorbPercent = 0.5;
|
||||
|
||||
@ -24,7 +24,6 @@ function onDamageTaken(effect, attacker, defender, action, actionContainer)
|
||||
--30451: You recover [absorbAmount] HP.
|
||||
actionContainer.AddHPAction(defender.actorId, 30451, absorbAmount)
|
||||
--Dread Spike is lost after absorbing hp
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end;
|
||||
|
||||
end;
|
@ -1,20 +1,20 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Traited increases speed by 20%. Assuming that means it actually increases speed instead of simply offsetting the negative speed it has by default
|
||||
local speedModifier = 0.8;
|
||||
if effect.GetTier() == 2 then
|
||||
speedModifier = 1.2;
|
||||
end
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) * speedModifier);
|
||||
owner.MultiplyMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local speedModifier = 0.8;
|
||||
if effect.GetTier() == 2 then
|
||||
speedModifier = 1.2;
|
||||
end
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) / speedModifier);
|
||||
owner.DivideMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
@ -1,3 +1,3 @@
|
||||
function onLose(target, effect)
|
||||
target:SetProc(0, false);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(0, false);
|
||||
end;
|
@ -2,7 +2,7 @@ require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
--Gradually increases critical rate of spells
|
||||
function onTick(owner, effect)
|
||||
function onTick(owner, effect, actionContainer)
|
||||
--No clue how fast the crit rate increases or how often it ticks
|
||||
--Only clue I have to go on is that the strategy seemed to be to use it
|
||||
--before or after fire/thunder and you'd usually get a crit at firaga/thundaga
|
||||
@ -23,8 +23,8 @@ function onCommandStart(effect, owner, skill, actionContainer)
|
||||
skill.bonusCritRate = skill.bonusCritRate + effect.GetMagnitude();
|
||||
end
|
||||
|
||||
function onCrit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.Spell then
|
||||
actionContainer.AddAction(attacker.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
function onCrit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.Spell then
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
7
data/scripts/effects/expchain.lua
Normal file
7
data/scripts/effects/expchain.lua
Normal file
@ -0,0 +1,7 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end;
|
@ -1,16 +1,16 @@
|
||||
require("modifiers");
|
||||
|
||||
--15% in ARR, dont know how it worked in 1.0
|
||||
function onGain(target, effect)
|
||||
target.AddMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SubtractMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RawEvadeRate, 15);
|
||||
end;
|
||||
|
||||
--Returns 25%? of amount dodged as MP
|
||||
function onEvade(effect, attacker, defender, action, actionContainer)
|
||||
function onEvade(effect, attacker, defender, skill, action, actionContainer)
|
||||
--25% of amount dodged untraited, 50% traited
|
||||
local percent = 0.25;
|
||||
if (effect.GetTier() == 2) then
|
||||
@ -22,5 +22,5 @@ function onEvade(effect, attacker, defender, action, actionContainer)
|
||||
--33010: You recover x MP from Featherfoot
|
||||
actionContainer.AddMPAction(defender.actorId, 33010, mpToReturn);
|
||||
--Featherfoot is lost after evading
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end;
|
@ -1,6 +1,4 @@
|
||||
function onGain(target, effect)
|
||||
target.statusEffects.RemoveStatusEffect(223209)
|
||||
target.statusEffects.RemoveStatusEffect(223211)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
||||
|
||||
--Need to do more research on these.
|
||||
|
@ -1,4 +1,2 @@
|
||||
function onGain(target, effect)
|
||||
target.statusEffects.RemoveStatusEffect(223210)
|
||||
target.statusEffects.RemoveStatusEffect(223211)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
@ -1,4 +1,2 @@
|
||||
function onGain(target, effect)
|
||||
target.statusEffects.RemoveStatusEffect(223210)
|
||||
target.statusEffects.RemoveStatusEffect(223209)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
end;
|
9
data/scripts/effects/flare2.lua
Normal file
9
data/scripts/effects/flare2.lua
Normal file
@ -0,0 +1,9 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
@ -1,15 +1,15 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Parry is .1% per , Random guess but gonna say it gives 20% worth of parry.
|
||||
target.AddMod(modifiersGlobal.Parry, 200);
|
||||
owner.AddMod(modifiersGlobal.Parry, 200);
|
||||
end;
|
||||
|
||||
function onParry(effect, attacker, defender, action, actionContainer)
|
||||
function onParry(effect, attacker, defender, skill, action, actionContainer)
|
||||
--Foresight is lost after parrying
|
||||
actionContainer.AddAction(defender.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
defender.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SubtractMod(modifiersGlobal.Parry, 200);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Parry, 200);
|
||||
end;
|
@ -1,7 +1,7 @@
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Using extra because that's what blissful_mind uses
|
||||
effect.SetExtra(effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
end
|
||||
|
9
data/scripts/effects/glare.lua
Normal file
9
data/scripts/effects/glare.lua
Normal file
@ -0,0 +1,9 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
@ -1,9 +1,9 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.RegenDown, effect.GetMagnitude());
|
||||
end
|
||||
|
9
data/scripts/effects/hallowed_ground.lua
Normal file
9
data/scripts/effects/hallowed_ground.lua
Normal file
@ -0,0 +1,9 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.DamageTakenDown, 100);
|
||||
end;
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.DamageTakenDown, 100);
|
||||
end;
|
@ -1,10 +1,10 @@
|
||||
require("modifiers")
|
||||
|
||||
--Set magnitude to milliseconds that HF will reduce delay by
|
||||
function onGain(target, effect)
|
||||
target.SubtractMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.AddMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.AttackDelay, effect.GetMagnitude());
|
||||
end;
|
@ -6,19 +6,19 @@ require("modifiers");
|
||||
--This could mean traited hawk's eye gives 28.125% (18.75% * 1.5) or it could mean it gives 68.75% (18.75% + 50%)
|
||||
--It's also possible that Hawk's Eye gives 15 + 15% accuracy untraited, which would give 450.85, which would be rounded down.
|
||||
--In that case, traited hawks eye could be 15 + 22.5% or 22.5 + 22.5% or (15 + 15%) * 1.5
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local accuracyMod = 0.1875;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
accuracyMod = 0.28125;
|
||||
end
|
||||
|
||||
local amountGained = accuracyMod * target.GetMod(modifiersGlobal.Accuracy);
|
||||
local amountGained = accuracyMod * owner.GetMod(modifiersGlobal.Accuracy);
|
||||
effect.SetMagnitude(amountGained);
|
||||
target.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
|
||||
target.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
end;
|
@ -1,13 +1,13 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(target, effect)
|
||||
local speedModifier = 0.5;
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local speedModifier = 0.8;
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) * speedModifier);
|
||||
owner.MultiplyMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
local speedModifier = 0.5;
|
||||
function onLose(owner, effect, actionContainer)
|
||||
local speedModifier = 0.8;
|
||||
|
||||
target.SetMod(modifiersGlobal.Speed, target.GetMod(modifiersGlobal.Speed) / speedModifier);
|
||||
owner.DivideMod(modifiersGlobal.MovementSpeed, speedModifier);
|
||||
end;
|
@ -2,14 +2,14 @@ require("modifiers")
|
||||
|
||||
--Battle Voice grants HP_Boost and it sets max hp to 125% normal amount and heals for the difference between current
|
||||
--This doesn't seem like the correct way to do this. If max HP changes between gainign and losing wont this break?
|
||||
function onGain(target, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local newMaxHP = target.GetMaxHP() * 1.25;
|
||||
local healAmount = newMaxHP - target.GetMaxHP();
|
||||
|
||||
target.SetMaxHP(newMaxHP);
|
||||
target.AddHP(healAmount);
|
||||
owner.SetMaxHP(newMaxHP);
|
||||
owner.AddHP(healAmount);
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.SetMaxHP(target.GetMaxHP() / 1.25);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SetMaxHP(owner.GetMaxHP() / 1.25);
|
||||
end;
|
@ -1,10 +1,10 @@
|
||||
require("modifiers")
|
||||
|
||||
--Set magnitude to milliseconds that HF will reduce delay by
|
||||
function onGain(target, effect)
|
||||
target.SubtractMod(modifiersGlobal.AttackDelay), effect.GetMagnitude());
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Delay, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(target, effect)
|
||||
target.AddMod(modifiersGlobal.AttackDelay), effect.GetMagnitude());
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Delay, effect.GetMagnitude());
|
||||
end;
|
@ -1,10 +1,10 @@
|
||||
require("modifiers")
|
||||
|
||||
--100 TP per tick without AF. 133 TP per tick with AF
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Regain, effect.GetMagnitude());
|
||||
end
|
||||
|
@ -3,7 +3,7 @@ require("battleutils")
|
||||
--Untraited reduces cooldown by 50%
|
||||
--Traited reduces cooldown by 100%
|
||||
function onCommandStart(effect, owner, skill, actionContainer)
|
||||
if skill.commandType == CommandType.Weaponskill then
|
||||
if skill.GetCommandType() == CommandType.Weaponskill then
|
||||
local reduction = 0.5;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
|
@ -4,8 +4,8 @@ require("battleutils")
|
||||
--Trait: Increases healing by 20%. Is this the base % or the amount after taking the base percent?
|
||||
--I'm guessing the way it works is that LSI/II/III have 10/20/30% absorb by default and 30/40/50% traited.
|
||||
--Seems to match what i can find in videos
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.AutoAttack then
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.AutoAttack then
|
||||
local healPercent = 0.10;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
@ -14,6 +14,6 @@ function onHit(effect, attacker, defender, action, actionContainer)
|
||||
|
||||
local amount = math.floor((healPercent * action.amount) + 1);
|
||||
attacker.AddHP(amount);
|
||||
actionContainer.AddHPAction(defender.actorId, 30332, amount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
|
||||
end
|
||||
end;
|
@ -1,7 +1,7 @@
|
||||
require("battleutils")
|
||||
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.AutoAttack then
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.AutoAttack then
|
||||
local healPercent = 0.20;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
@ -10,6 +10,6 @@ function onHit(effect, attacker, defender, action, actionContainer)
|
||||
|
||||
local amount = math.floor((healPercent * action.amount) + 1);
|
||||
attacker.AddHP(amount);
|
||||
actionContainer.AddHPAction(defender.actorId, 30332, amount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
|
||||
end
|
||||
end;
|
@ -4,16 +4,16 @@ require("battleutils")
|
||||
--Trait: Increases healing by 20%. Is this the base % or the amount after taking the base percent?
|
||||
--I'm guessing the way it works is that LSI/II/III have 10/20/30% absorb by default and 30/40/50% traited.
|
||||
--Seems to match what i can find in videos
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.AutoAttack then
|
||||
local healPercent = 0.10;
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.AutoAttack then
|
||||
local healPercent = 0.30;
|
||||
|
||||
if effect.GetTier() == 2 then
|
||||
healPercent = 0.30;
|
||||
healPercent = 0.50;
|
||||
end
|
||||
|
||||
local amount = math.floor((healPercent * action.amount) + 1);
|
||||
attacker.AddHP(amount);
|
||||
actionContainer.AddHPAction(defender.actorId, 30332, amount);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 30332, amount);
|
||||
end
|
||||
end;
|
@ -1,9 +1,9 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.MagicEvasion, effect.GetMagnitude());
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.AddMod(modifiersGlobal.MagicEvasion, effect.GetMagnitude());
|
||||
end
|
||||
|
@ -1,12 +1,12 @@
|
||||
require("modifiers")
|
||||
|
||||
function onGain(owner, effect)
|
||||
function onGain(owner, effect, actionContainer)
|
||||
--Only one song per bard can be active, need to figure out a good way to do this
|
||||
owner.AddMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.MagicAccuracy, effect.GetMagnitude());
|
||||
end;
|
||||
|
||||
function onLose(owner, effect)
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Accuracy, effect.GetMagnitude());
|
||||
owner.SubtractMod(modifiersGlobal.MagicAccuracy, effect.GetMagnitude());
|
||||
end;
|
@ -1,3 +1,3 @@
|
||||
function onLose(target, effect)
|
||||
target:SetProc(3, false);
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner:SetProc(3, false);
|
||||
end;
|
@ -1,12 +1,12 @@
|
||||
require("modifiers")
|
||||
require("battleutils")
|
||||
|
||||
function onHit(effect, attacker, defender, action, actionContainer)
|
||||
if action.commandType == CommandType.Spell then
|
||||
function onHit(effect, attacker, defender, skill, action, actionContainer)
|
||||
if skill.GetCommandType() == CommandType.Spell then
|
||||
--Necrogenesis returns 75% of damage done rounded up(?) as MP.
|
||||
local hpToReturn = math.ceil(0.75 * action.amount);
|
||||
attacker.AddMp(hpToReturn);
|
||||
actionContainer.AddHPAction(attacker.actorId, 33012, mpToReturn);
|
||||
actionContainer.AddAction(attacker.statusEffects.RemoveStatusEffectForBattleAction(effect));
|
||||
attacker.AddHP(hpToReturn);
|
||||
actionContainer.AddHPAbsorbAction(defender.actorId, 33012, hpToReturn);
|
||||
attacker.statusEffects.RemoveStatusEffect(effect, actionContainer, 30331, false);
|
||||
end
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user