Script fixes and new effects.

Cleaned up unneeded requires in some scripts
Fixed Second Wind
Added new effect scripts
Added bard song scripts that mostly work
This commit is contained in:
yogurt 2018-06-25 23:36:18 -05:00
parent ace4dfe58f
commit c442dc9ecd
72 changed files with 524 additions and 171 deletions

View file

@ -3,17 +3,24 @@ require("battleutils")
--Dread spike completely nullifies a physical action and absorbs how much damage it would have done (when it's powered up)
--I'm going to assume it only absorbs half damage without LS/PS up
--When I say it nullifies an attack, it even gets rid of the message. It's as if the attack didn't happen
--When I say it nullifies an attack, it even gets rid of the message. It's as if the damage action didn't happen.
--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
--maybe this works?
local absorbAmount = action.amount;
local absorbPercent = 0.5;
if effect.GetTier() == 2 then
absorbPercent = 1;
end
local absorbAmount = action.amount * absorbPercent;
action.amount = 0;
action.worldMasterTextId = 0;
attacker.AddHP(absorbAmount);
defender.AddHP(absorbAmount);
--30451: You recover [absorbAmount] HP.
actionContainer.AddHPAction(defender.actorId, 30451, absorbAmount)
--Dread Spike is lost after absorbing hp