mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 06:24:38 +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
|
@ -2,9 +2,20 @@ require("modifiers")
|
|||
require("battleutils")
|
||||
|
||||
--https://www.bluegartr.com/threads/107403-Stats-and-how-they-work/page22
|
||||
function onGain(owner, effect)
|
||||
owner.AddMod(modifiersGlobal.Attack, 345);
|
||||
owner.SubtractMod(modifiersGlobal.Defense, 158);
|
||||
function onGain(owner, effect, actionContainer)
|
||||
local attackGained = 315;
|
||||
local defenseLost = 158;
|
||||
|
||||
--Enhanced Power Surge: Increases effect of Power Surge by 10% (assuming this doesn't lower defense further)
|
||||
if owner.HasTrait(27281) then
|
||||
attackGained = attackGained * 1.1;
|
||||
end
|
||||
|
||||
effect.SetMagnitude(attackGained);
|
||||
effect.SetExtra(defenseLost);
|
||||
|
||||
owner.AddMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.SubtractMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
||||
|
||||
function onCommandStart(effect, owner, command, actionContainer)
|
||||
|
@ -16,8 +27,7 @@ function onCommandStart(effect, owner, command, actionContainer)
|
|||
end
|
||||
end
|
||||
|
||||
function onLose(owner, effect)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, 345);
|
||||
owner.AddMod(modifiersGlobal.Defense, 158);
|
||||
end
|
||||
|
||||
function onLose(owner, effect, actionContainer)
|
||||
owner.SubtractMod(modifiersGlobal.Attack, effect.GetMagnitude());
|
||||
owner.AddMod(modifiersGlobal.Defense, effect.GetExtra());
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue