mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02: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
129 changed files with 884 additions and 396 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue