2018-04-18 16:06:41 -05:00
|
|
|
require("modifiers")
|
|
|
|
require("battleutils")
|
|
|
|
|
|
|
|
--Forces crit of a single WS action from rear.
|
2018-06-25 23:36:18 -05:00
|
|
|
function onPreAction(effect, caster, target, skill, action, actionContainer)
|
2018-04-18 16:06:41 -05:00
|
|
|
--If action hit from the rear and is a weaponskill ation
|
2019-05-29 23:05:40 -07:00
|
|
|
if (action.param == HitDirection.Rear and skill.GetCommandType() == CommandType.WeaponSkill) then
|
2018-04-18 16:06:41 -05:00
|
|
|
--Set action's crit rate to 100%
|
|
|
|
action.critRate = 100.0;
|
|
|
|
end
|
|
|
|
|
|
|
|
--Remove status and add message
|
2019-05-29 23:05:40 -07:00
|
|
|
target.statusEffects.RemoveStatusEffect(effect, actionContainer);
|
2018-04-18 16:06:41 -05:00
|
|
|
end;
|
|
|
|
|